Skip to content

Commit

Permalink
[FEATURE] add second browser
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 14, 2013
1 parent b288b3a commit fcb5045
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,17 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
mSnappingDialog = new QgsSnappingDialog( this, mMapCanvas );
mSnappingDialog->setObjectName( "SnappingOption" );

mBrowserWidget = new QgsBrowserDockWidget( this );
mBrowserWidget = new QgsBrowserDockWidget( tr( "Browser" ), this );
mBrowserWidget->setObjectName( "Browser" );
addDockWidget( Qt::LeftDockWidgetArea, mBrowserWidget );
mBrowserWidget->hide();

// create the GPS tool on starting QGIS - this is like the Browser
mBrowserWidget2 = new QgsBrowserDockWidget( tr( "Browser (2)" ), this );
mBrowserWidget2->setObjectName( "Browser2" );
addDockWidget( Qt::LeftDockWidgetArea, mBrowserWidget2 );
mBrowserWidget2->hide();

// create the GPS tool on starting QGIS - this is like the browser
mpGpsWidget = new QgsGPSInformationWidget( mMapCanvas );
//create the dock widget
mpGpsDock = new QDockWidget( tr( "GPS Information" ), this );
Expand Down
1 change: 1 addition & 0 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QgsUndoWidget* mUndoWidget;

QgsBrowserDockWidget* mBrowserWidget;
QgsBrowserDockWidget* mBrowserWidget2;

QgsSnappingDialog* mSnappingDialog;

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsbrowserdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ class QgsBrowserTreeFilterProxyModel : public QSortFilterProxyModel
}

};
QgsBrowserDockWidget::QgsBrowserDockWidget( QWidget * parent ) :
QgsBrowserDockWidget::QgsBrowserDockWidget( QString name, QWidget * parent ) :
QDockWidget( parent ), mModel( NULL ), mProxyModel( NULL )
{
setupUi( this );

setWindowTitle( tr( "Browser" ) );
setWindowTitle( name );

mBrowserView = new QgsBrowserTreeView( this );
mLayoutBrowser->addWidget( mBrowserView );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsbrowserdockwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class QgsBrowserDockWidget : public QDockWidget, private Ui::QgsBrowserDockWidge
{
Q_OBJECT
public:
explicit QgsBrowserDockWidget( QWidget *parent = 0 );
explicit QgsBrowserDockWidget( QString name, QWidget *parent = 0 );

signals:

Expand Down

0 comments on commit fcb5045

Please sign in to comment.