@@ -78,35 +78,16 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
78
78
// mActionAddImage
79
79
// mActionSelectMoveItem
80
80
81
- QAction* moveItemContentAction = new QAction ( QIcon ( QPixmap ( myIconPath + " mActionMoveItemContent.png" ) ),
82
- tr ( " Move Content" ), 0 );
83
- moveItemContentAction->setToolTip ( tr ( " Move item content" ) );
84
- moveItemContentAction->setCheckable ( true );
85
- connect ( moveItemContentAction, SIGNAL ( triggered () ), this , SLOT ( moveItemContent () ) );
86
- toolBar->addAction ( moveItemContentAction );
87
- // toolBar->addAction(QIcon(QPixmap(myIconPath+"mActionMoveItemContent.png")), tr("Move Item content"), this, SLOT(moveItemContent()));
88
-
89
- QAction* groupItemsAction = toolBar->addAction ( QIcon ( QPixmap ( myIconPath + " mActionGroupItems.png" ) ),
90
- tr ( " &Group" ), this , SLOT ( groupItems () ) );
91
- groupItemsAction->setToolTip ( tr ( " Group items" ) );
92
- QAction* ungroupItemsAction = toolBar->addAction ( QIcon ( QPixmap ( myIconPath + " mActionUngroupItems.png" ) ),
93
- tr ( " &Ungroup" ), this , SLOT ( ungroupItems () ) );
94
- ungroupItemsAction->setToolTip ( tr ( " Ungroup items" ) );
95
- QAction* raiseItemsAction = toolBar->addAction ( QIcon ( QPixmap ( myIconPath + " mActionRaiseItems.png" ) ),
96
- tr ( " Raise" ), this , SLOT ( raiseSelectedItems () ) );
97
- raiseItemsAction->setToolTip ( tr ( " Raise selected items" ) );
98
- QAction* lowerItemsAction = toolBar->addAction ( QIcon ( QPixmap ( myIconPath + " mActionLowerItems.png" ) ),
99
- tr ( " Lower" ), this , SLOT ( lowerSelectedItems () ) );
100
- lowerItemsAction->setToolTip ( tr ( " Lower selected items" ) );
101
- QAction* moveItemsToTopAction = toolBar->addAction ( QIcon ( QPixmap ( myIconPath + " mActionMoveItemsToTop.png" ) ),
102
- tr ( " Bring to Front" ), this , SLOT ( moveSelectedItemsToTop () ) );
103
- moveItemsToTopAction->setToolTip ( tr ( " Move selected items to top" ) );
104
- QAction* moveItemsToBottomAction = toolBar->addAction ( QIcon ( QPixmap ( myIconPath + " mActionMoveItemsToBottom.png" ) ),
105
- tr ( " Send to Back" ), this , SLOT ( moveSelectedItemsToBottom () ) );
106
- moveItemsToBottomAction->setToolTip ( tr ( " Move selected items to bottom" ) );
81
+ mActionMoveItemContent ->setToolTip ( tr ( " Move item content" ) );
82
+ mActionGroupItems ->setToolTip ( tr ( " Group items" ) );
83
+ mActionUngroupItems ->setToolTip ( tr ( " Ungroup items" ) );
84
+ mActionRaiseItems ->setToolTip ( tr ( " Raise selected items" ) );
85
+ mActionLowerItems ->setToolTip ( tr ( " Lower selected items" ) );
86
+ mActionMoveItemsToTop ->setToolTip ( tr ( " Move selected items to top" ) );
87
+ mActionMoveItemsToBottom ->setToolTip ( tr ( " Move selected items to bottom" ) );
107
88
108
89
QActionGroup* toggleActionGroup = new QActionGroup ( this );
109
- toggleActionGroup->addAction ( moveItemContentAction );
90
+ toggleActionGroup->addAction ( mActionMoveItemContent );
110
91
toggleActionGroup->addAction ( mActionAddNewMap );
111
92
toggleActionGroup->addAction ( mActionAddNewLabel );
112
93
toggleActionGroup->addAction ( mActionAddNewLegend );
@@ -124,6 +105,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
124
105
mActionSelectMoveItem ->setCheckable ( true );
125
106
mActionAddNewScalebar ->setCheckable ( true );
126
107
mActionAddImage ->setCheckable ( true );
108
+ mActionMoveItemContent ->setCheckable ( true );
127
109
128
110
#ifdef Q_WS_MAC
129
111
QMenu *appMenu = menuBar ()->addMenu ( tr ( " QGIS" ) );
@@ -257,6 +239,13 @@ void QgsComposer::setupTheme()
257
239
mActionAddNewLegend ->setIcon ( QgisApp::getThemeIcon ( " /mActionAddLegend.png" ) );
258
240
mActionAddNewScalebar ->setIcon ( QgisApp::getThemeIcon ( " /mActionScaleBar.png" ) );
259
241
mActionSelectMoveItem ->setIcon ( QgisApp::getThemeIcon ( " /mActionSelectPan.png" ) );
242
+ mActionMoveItemContent ->setIcon ( QgisApp::getThemeIcon (" /mActionMoveItemContent.png" ));
243
+ mActionGroupItems ->setIcon ( QgisApp::getThemeIcon (" /mActionGroupItems.png" ));
244
+ mActionUngroupItems ->setIcon ( QgisApp::getThemeIcon (" /mActionUngroupItems.png" ));
245
+ mActionRaiseItems ->setIcon ( QgisApp::getThemeIcon (" /mActionRaiseItems.png" ));
246
+ mActionLowerItems ->setIcon ( QgisApp::getThemeIcon (" /mActionLowerItems.png" ));
247
+ mActionMoveItemsToTop ->setIcon ( QgisApp::getThemeIcon (" /mActionMoveItemsToTop.png" ));
248
+ mActionMoveItemsToBottom ->setIcon ( QgisApp::getThemeIcon (" /mActionMoveItemsToBottom.png" ));
260
249
}
261
250
262
251
void QgsComposer::connectSlots ()
@@ -740,55 +729,55 @@ void QgsComposer::on_mActionAddImage_activated( void )
740
729
}
741
730
}
742
731
743
- void QgsComposer::moveItemContent ( )
732
+ void QgsComposer::on_mActionMoveItemContent_activated ( void )
744
733
{
745
734
if ( mView )
746
735
{
747
736
mView ->setCurrentTool ( QgsComposerView::MoveItemContent );
748
737
}
749
738
}
750
739
751
- void QgsComposer::groupItems ( void )
740
+ void QgsComposer::on_mActionGroupItems_activated ( void )
752
741
{
753
742
if ( mView )
754
743
{
755
744
mView ->groupItems ();
756
745
}
757
746
}
758
747
759
- void QgsComposer::ungroupItems ( void )
748
+ void QgsComposer::on_mActionUngroupItems_activated ( void )
760
749
{
761
750
if ( mView )
762
751
{
763
752
mView ->ungroupItems ();
764
753
}
765
754
}
766
755
767
- void QgsComposer::raiseSelectedItems ( )
756
+ void QgsComposer::on_mActionRaiseItems_activated ( void )
768
757
{
769
758
if ( mComposition )
770
759
{
771
760
mComposition ->raiseSelectedItems ();
772
761
}
773
762
}
774
763
775
- void QgsComposer::lowerSelectedItems ( )
764
+ void QgsComposer::on_mActionLowerItems_activated ( void )
776
765
{
777
766
if ( mComposition )
778
767
{
779
768
mComposition ->lowerSelectedItems ();
780
769
}
781
770
}
782
771
783
- void QgsComposer::moveSelectedItemsToTop ( )
772
+ void QgsComposer::on_mActionMoveItemsToTop_activated ( void )
784
773
{
785
774
if ( mComposition )
786
775
{
787
776
mComposition ->moveSelectedItemsToTop ();
788
777
}
789
778
}
790
779
791
- void QgsComposer::moveSelectedItemsToBottom ( )
780
+ void QgsComposer::on_mActionMoveItemsToBottom ( void )
792
781
{
793
782
if ( mComposition )
794
783
{
0 commit comments