Skip to content

Commit 09c2444

Browse files
committedJul 24, 2015
Add title for "Panels" and "Toolbars" in Menu
1 parent 4eaf8de commit 09c2444

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <QApplication>
2525
#include <QBitmap>
2626
#include <QCheckBox>
27-
#include <QSpinBox>
2827
#include <QClipboard>
2928
#include <QColor>
3029
#include <QCursor>
@@ -55,18 +54,20 @@
5554
#include <QRegExp>
5655
#include <QRegExpValidator>
5756
#include <QSettings>
57+
#include <QSpinBox>
5858
#include <QSplashScreen>
5959
#include <QStatusBar>
6060
#include <QStringList>
6161
#include <QTcpSocket>
6262
#include <QTextStream>
6363
#include <QtGlobal>
64+
#include <QThread>
6465
#include <QTimer>
6566
#include <QToolButton>
6667
#include <QUuid>
6768
#include <QVBoxLayout>
6869
#include <QWhatsThis>
69-
#include <QThread>
70+
#include <QWidgetAction>
7071

7172
#include <qgsnetworkaccessmanager.h>
7273
#include <qgsapplication.h>
@@ -322,7 +323,7 @@ extern "C"
322323

323324
class QTreeWidgetItem;
324325

325-
/** set the application title bar text
326+
/** Set the application title bar text
326327
327328
If the current project title is null
328329
if the project file is null then
@@ -8056,7 +8057,7 @@ QgsMapLayer *QgisApp::activeLayer()
80568057
return mLayerTreeView ? mLayerTreeView->currentLayer() : 0;
80578058
}
80588059

8059-
/** set the current layer */
8060+
/** Set the current layer */
80608061
bool QgisApp::setActiveLayer( QgsMapLayer *layer )
80618062
{
80628063
if ( !layer )
@@ -10558,11 +10559,17 @@ QMenu* QgisApp::createPopupMenu()
1055810559
}
1055910560

1056010561
qSort( panels.begin(), panels.end(), cmpByText_ );
10562+
QWidgetAction* panelstitle = new QWidgetAction( menu );
10563+
panelstitle->setDefaultWidget( new QLabel( QString( "<b>%1</b>" ).arg( tr( "Panels" ) ) ) );
10564+
menu->addAction( panelstitle );
1056110565
foreach ( QAction* a, panels )
1056210566
{
1056310567
menu->addAction( a );
1056410568
}
1056510569
menu->addSeparator();
10570+
QWidgetAction* toolbarstitle = new QWidgetAction( menu );
10571+
toolbarstitle->setDefaultWidget( new QLabel( QString( "<b>%1</b>" ).arg( tr( "Toolbars" ) ) ) );
10572+
menu->addAction( toolbarstitle );
1056610573
qSort( toolbars.begin(), toolbars.end(), cmpByText_ );
1056710574
foreach ( QAction* a, toolbars )
1056810575
{

0 commit comments

Comments
 (0)
Please sign in to comment.