Skip to content
Permalink
Browse files
select and measure toolbar flyouts and submenus (followup #2938)
git-svn-id: http://svn.osgeo.org/qgis/trunk@14101 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 17, 2010
1 parent 8f46f35 commit 621196077a191902cf10c2509d6cdddc365e7d6d
Showing with 43 additions and 28 deletions.
  1. +43 −27 src/app/qgisapp.cpp
  2. +0 −1 src/app/qgisapp.h
@@ -879,7 +879,7 @@ void QgisApp::createActions()
mActionZoomOut->setStatusTip( tr( "Zoom Out" ) );
connect( mActionZoomOut, SIGNAL( triggered() ), this, SLOT( zoomOut() ) );

mActionSelect = new QAction( getThemeIcon( "mActionSelect.png" ), tr( "Select Features" ), this );
mActionSelect = new QAction( getThemeIcon( "mActionSelect.png" ), tr( "Select Features" ) , this );
shortcuts->registerAction( mActionSelect );
mActionSelect->setStatusTip( tr( "Select Features" ) );
connect( mActionSelect, SIGNAL( triggered() ), this, SLOT( select() ) );
@@ -1460,17 +1460,22 @@ void QgisApp::createMenus()
mViewMenu->addAction( mActionZoomIn );
mViewMenu->addAction( mActionZoomOut );
mActionViewSeparator1 = mViewMenu->addSeparator();
mViewMenu->addAction( mActionSelect );
mViewMenu->addAction( mActionSelectRectangle );
mViewMenu->addAction( mActionSelectPolygon );
mViewMenu->addAction( mActionSelectFreehand );
mViewMenu->addAction( mActionSelectRadius );
mViewMenu->addAction( mActionDeselectAll );
mActionViewSeparator2 = mViewMenu->addSeparator();

QMenu *menu = mViewMenu->addMenu( tr( "Select" ) );
menu->addAction( mActionSelect );
menu->addAction( mActionSelectRectangle );
menu->addAction( mActionSelectPolygon );
menu->addAction( mActionSelectFreehand );
menu->addAction( mActionSelectRadius );
menu->addAction( mActionDeselectAll );

mViewMenu->addAction( mActionIdentify );
mViewMenu->addAction( mActionMeasure );
mViewMenu->addAction( mActionMeasureArea );
mViewMenu->addAction( mActionMeasureAngle );

menu = mViewMenu->addMenu( tr( "Measure" ) );
menu->addAction( mActionMeasure );
menu->addAction( mActionMeasureArea );
menu->addAction( mActionMeasureAngle );

mActionViewSeparator3 = mViewMenu->addSeparator();

mViewMenu->addAction( mActionZoomFullExtent );
@@ -1697,32 +1702,43 @@ void QgisApp::createToolBars()
mMapNavToolBar->addAction( mActionDraw );
mToolbarMenu->addAction( mMapNavToolBar->toggleViewAction() );

//
// Feature Select Toolbar
mFeatureSelectToolBar = addToolBar( tr( "Select Tools" ) );
mFeatureSelectToolBar->setIconSize( myIconSize );
mFeatureSelectToolBar->setObjectName( "Select Tools" );
mFeatureSelectToolBar->addAction( mActionIdentify );
mFeatureSelectToolBar->addAction( mActionSelect );
mFeatureSelectToolBar->addAction( mActionSelectRectangle );
mFeatureSelectToolBar->addAction( mActionSelectPolygon );
mFeatureSelectToolBar->addAction( mActionSelectFreehand );
mFeatureSelectToolBar->addAction( mActionSelectRadius );
mFeatureSelectToolBar->addAction( mActionDeselectAll );

//
// Attributes Toolbar
mAttributesToolBar = addToolBar( tr( "Attributes" ) );
mAttributesToolBar->setIconSize( myIconSize );
mAttributesToolBar->setObjectName( "Attributes" );
mAttributesToolBar->addAction( mActionIdentify );

QToolButton *bt = new QToolButton( mAttributesToolBar );
QMenu *menu = new QMenu( bt );
bt->setMenu( menu );
bt->setPopupMode( QToolButton::InstantPopup );
menu->addAction( mActionSelect );
menu->addAction( mActionSelectRectangle );
menu->addAction( mActionSelectPolygon );
menu->addAction( mActionSelectFreehand );
menu->addAction( mActionSelectRadius );
bt->setDefaultAction( mActionSelect );
mAttributesToolBar->addWidget( bt );

mAttributesToolBar->addAction( mActionDeselectAll );
mAttributesToolBar->addAction( mActionOpenTable );
mAttributesToolBar->addAction( mActionMeasure );
mAttributesToolBar->addAction( mActionMeasureArea );
mAttributesToolBar->addAction( mActionMeasureAngle );

bt = new QToolButton( mAttributesToolBar );
menu = new QMenu( bt );
bt->setMenu( menu );
bt->setPopupMode( QToolButton::InstantPopup );
menu->addAction( mActionMeasure );
menu->addAction( mActionMeasureArea );
menu->addAction( mActionMeasureAngle );
bt->setDefaultAction( mActionMeasure );
mAttributesToolBar->addWidget( bt );

mAttributesToolBar->addAction( mActionMapTips );
mAttributesToolBar->addAction( mActionShowBookmarks );
mAttributesToolBar->addAction( mActionNewBookmark );
mAttributesToolBar->addAction( mActionLabeling );

// Annotation tools
QToolButton *annotationToolButton = new QToolButton();
annotationToolButton->setPopupMode( QToolButton::InstantPopup );
@@ -844,7 +844,6 @@ class QgisApp : public QMainWindow
QToolBar *mDigitizeToolBar;
QToolBar *mAdvancedDigitizeToolBar;
QToolBar *mAttributesToolBar;
QToolBar *mFeatureSelectToolBar;
QToolBar *mPluginToolBar;
QToolBar *mHelpToolBar;

0 comments on commit 6211960

Please sign in to comment.