Skip to content
Permalink
Browse files

Merge pull request #4659 from boundlessgeo/browser-to-gui

Move QgsBrowserDockWidget from app to gui
  • Loading branch information
elpaso committed Jun 2, 2017
2 parents 2d78ef8 + d62d444 commit c9e6f15ca113f94299b33ac5821c554a50840328
@@ -27,6 +27,7 @@
%Include qgsattributeforminterface.sip
%Include qgsattributetypeloaddialog.sip
%Include qgsbrowsertreeview.sip
%Include qgsbrowserdockwidget.sip
%Include qgsbusyindicatordialog.sip
%Include qgscollapsiblegroupbox.sip
%If (HAVE_QSCI_SIP)
@@ -0,0 +1,142 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsbrowserdockwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/




class QgsBrowserDockWidget : QgsDockWidget
{
%Docstring
The QgsBrowserDockWidget class
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsbrowserdockwidget.h"
%End
public:

explicit QgsBrowserDockWidget( const QString &name, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsBrowserDockWidget
\param name name of the widget
\param parent parent widget
%End
~QgsBrowserDockWidget();
void addFavoriteDirectory( const QString &favDir );
%Docstring
Add directory to favorites
%End

public slots:
void addLayerAtIndex( const QModelIndex &index );
%Docstring
Add layer at index
%End
void showContextMenu( QPoint );
%Docstring
Show context menu
%End

void addFavorite();
%Docstring
Add current item to favorite
%End
void addFavoriteDirectory();
%Docstring
Add directory from file dialog to favorite
%End
void removeFavorite();
%Docstring
Remove from favorite
%End

void refresh();
%Docstring
Refresh browser view model (and view)
%End

void showFilterWidget( bool visible );
%Docstring
Show/hide filter widget
%End
void enablePropertiesWidget( bool enable );
%Docstring
Enable/disable properties widget
%End
void setFilterSyntax( QAction * );
%Docstring
Set filter syntax
%End
void setCaseSensitive( bool caseSensitive );
%Docstring
Set filter case sensitivity
%End
void setFilter();
%Docstring
Apply filter to the model
%End
void updateProjectHome();
%Docstring
Update project home directory
%End

void addSelectedLayers();
%Docstring
Add selected layers to the project
%End
void showProperties();
%Docstring
Show the layer properties
%End
void hideItem();
%Docstring
Hide current item
%End
void toggleFastScan();
%Docstring
Toggle fast scan
%End

void selectionChanged( const QItemSelection &selected, const QItemSelection &deselected );
%Docstring
Selection hass changed
%End
void splitterMoved();
%Docstring
Splitter has been moved
%End

signals:
void openFile( const QString & );
%Docstring
Emitted when a file needs to be opened
%End
void handleDropUriList( const QgsMimeDataUtils::UriList & );
%Docstring
Emitted when drop uri list needs to be handled
%End

protected:
virtual void showEvent( QShowEvent *event );

%Docstring
Show event override
%End

};



/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsbrowserdockwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -16,7 +16,6 @@ SET(QGIS_APP_SRCS
qgsattributetypedialog.cpp
qgsattributetabledialog.cpp
qgsbookmarks.cpp
qgsbrowserdockwidget.cpp
qgsclipboard.cpp
qgscustomization.cpp
qgscustomprojectiondialog.cpp
@@ -204,7 +203,6 @@ SET (QGIS_APP_MOC_HDRS
qgsattributetypedialog.h
qgsattributetabledialog.h
qgsbookmarks.h
qgsbrowserdockwidget.h
qgsclipboard.h
qgscustomization.h
qgscustomprojectiondialog.h
@@ -885,11 +885,17 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
mBrowserWidget->setObjectName( QStringLiteral( "Browser" ) );
addDockWidget( Qt::LeftDockWidgetArea, mBrowserWidget );
mBrowserWidget->hide();
connect( this, &QgisApp::newProject, mBrowserWidget, &QgsBrowserDockWidget::updateProjectHome );
connect( mBrowserWidget, &QgsBrowserDockWidget::openFile, this, &QgisApp::openFile );
connect( mBrowserWidget, &QgsBrowserDockWidget::handleDropUriList, this, &QgisApp::handleDropUriList );

mBrowserWidget2 = new QgsBrowserDockWidget( tr( "Browser Panel (2)" ), this );
mBrowserWidget2->setObjectName( QStringLiteral( "Browser2" ) );
addDockWidget( Qt::LeftDockWidgetArea, mBrowserWidget2 );
mBrowserWidget2->hide();
connect( this, &QgisApp::newProject, mBrowserWidget2, &QgsBrowserDockWidget::updateProjectHome );
connect( mBrowserWidget2, &QgsBrowserDockWidget::openFile, this, &QgisApp::openFile );
connect( mBrowserWidget2, &QgsBrowserDockWidget::handleDropUriList, this, &QgisApp::handleDropUriList );

addDockWidget( Qt::LeftDockWidgetArea, mAdvancedDigitizingDockWidget );
mAdvancedDigitizingDockWidget->hide();
@@ -232,9 +232,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
*/
bool addProject( const QString &projectFile );

/** Convenience function to open either a project or a layer file.
*/
void openFile( const QString &fileName );
//!Overloaded version of the private function with same name that takes the imagename as a parameter
void saveMapAsImage( const QString &, QPixmap * );

@@ -618,13 +615,16 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
//! Unregister a previously registered custom drop handler.
void unregisterCustomDropHandler( QgsCustomDropHandler *handler );

public slots:
//! Process the list of URIs that have been dropped in QGIS
void handleDropUriList( const QgsMimeDataUtils::UriList &lst );

//! Returns the active map layer.
QgsMapLayer *activeLayer();

public slots:
//! Convenience function to open either a project or a layer file.
void openFile( const QString &fileName );
void layerTreeViewDoubleClicked( const QModelIndex &index );
//! Make sure the insertion point for new layers is up-to-date with the current item in layer tree view
void updateNewLayerInsertionPoint();
@@ -173,6 +173,8 @@ SET(QGIS_GUI_SRCS
qgsattributetypeloaddialog.cpp
qgsblendmodecombobox.cpp
qgsbrowsertreeview.cpp
qgsbrowserdockwidget.cpp
qgsbrowserdockwidget_p.cpp
qgsbusyindicatordialog.cpp
qgscharacterselectordialog.cpp
qgscheckablecombobox.cpp
@@ -362,6 +364,8 @@ SET(QGIS_GUI_MOC_HDRS
qgsdial.h
qgsdialog.h
qgsdockwidget.h
qgsbrowserdockwidget_p.h
qgsbrowserdockwidget.h
qgsencodingfiledialog.h
qgserrordialog.h
qgsexpressionbuilderdialog.h
@@ -648,6 +652,8 @@ SET(QGIS_GUI_HDRS
qgssqlcomposerdialog.h
qgstablewidgetitem.h
qgsuserinputdockwidget.h
qgsbrowserdockwidget.h
qgsbrowserdockwidget_p.h
qgsvertexmarker.h
qgsfiledownloader.h

0 comments on commit c9e6f15

Please sign in to comment.
You can’t perform that action at this time.