|
52 | 52 | #include <QPrinter> |
53 | 53 | #include <QProcess> |
54 | 54 | #include <QProgressBar> |
| 55 | +#include <QRegExp> |
| 56 | +#include <QRegExpValidator> |
55 | 57 | #include <QSettings> |
56 | 58 | #include <QSplashScreen> |
57 | 59 | #include <QStatusBar> |
58 | 60 | #include <QStringList> |
59 | 61 | #include <QTcpSocket> |
60 | 62 | #include <QTextStream> |
| 63 | +#include <QTimer> |
61 | 64 | #include <QToolButton> |
62 | 65 | #include <QVBoxLayout> |
63 | 66 | #include <QWhatsThis> |
64 | 67 | #include <QtGlobal> |
65 | | -#include <QRegExp> |
66 | | -#include <QRegExpValidator> |
67 | | -#include <QTimer> |
68 | 68 | // |
69 | 69 | // Mac OS X Includes |
70 | 70 | // Must include before GEOS 3 due to unqualified use of 'Point' |
@@ -359,7 +359,6 @@ static void customSrsValidation_(QgsSpatialRefSys* srs) |
359 | 359 |
|
360 | 360 | mSplash->showMessage(tr("Starting Python"), Qt::AlignHCenter | Qt::AlignBottom); |
361 | 361 | qApp->processEvents(); |
362 | | - |
363 | 362 | // try to load python support |
364 | 363 | QLibrary pythonlib("qgispython"); |
365 | 364 | // It's necessary to set these two load hints, otherwise Python library won't work correctly |
@@ -586,10 +585,10 @@ void QgisApp::createActions() |
586 | 585 | // |
587 | 586 | // Layer Menu Related Items |
588 | 587 | // |
589 | | - mActionAddNonDbLayer= new QAction(QIcon(myIconPath+"/mActionAddNonDbLayer.png"), tr("Add a Vector Layer..."), this); |
590 | | - mActionAddNonDbLayer->setShortcut(tr("V","Add a Vector Layer")); |
591 | | - mActionAddNonDbLayer->setStatusTip(tr("Add a Vector Layer")); |
592 | | - connect(mActionAddNonDbLayer, SIGNAL(triggered()), this, SLOT(addVectorLayer())); |
| 588 | + mActionAddOgrLayer= new QAction(QIcon(myIconPath+"/mActionAddOgrLayer.png"), tr("Add a Vector Layer..."), this); |
| 589 | + mActionAddOgrLayer->setShortcut(tr("V","Add a Vector Layer")); |
| 590 | + mActionAddOgrLayer->setStatusTip(tr("Add a Vector Layer")); |
| 591 | + connect(mActionAddOgrLayer, SIGNAL(triggered()), this, SLOT(addVectorLayer())); |
593 | 592 | // |
594 | 593 | mActionAddRasterLayer= new QAction(QIcon(myIconPath+"/mActionAddRasterLayer.png"), tr("Add a Raster Layer..."), this); |
595 | 594 | mActionAddRasterLayer->setShortcut(tr("R","Add a Raster Layer")); |
@@ -990,7 +989,7 @@ void QgisApp::createMenus() |
990 | 989 | // |
991 | 990 | // Layers Menu |
992 | 991 | mLayerMenu = menuBar()->addMenu(tr("&Layer")); |
993 | | - mLayerMenu->addAction(mActionAddNonDbLayer); |
| 992 | + mLayerMenu->addAction(mActionAddOgrLayer); |
994 | 993 | mLayerMenu->addAction(mActionAddRasterLayer); |
995 | 994 | #ifdef HAVE_POSTGRESQL |
996 | 995 | mLayerMenu->addAction(mActionAddLayer); |
@@ -1058,30 +1057,23 @@ void QgisApp::createToolBars() |
1058 | 1057 | mFileToolBar->addAction(mActionFileSaveAs); |
1059 | 1058 | mFileToolBar->addAction(mActionFileOpen); |
1060 | 1059 | mFileToolBar->addAction(mActionFilePrint); |
| 1060 | + mFileToolBar->addAction(mActionAddOgrLayer); |
| 1061 | + mFileToolBar->addAction(mActionAddRasterLayer); |
| 1062 | +#ifdef HAVE_POSTGRESQL |
| 1063 | + mFileToolBar->addAction(mActionAddLayer); |
| 1064 | +#endif |
| 1065 | + mFileToolBar->addAction(mActionAddWmsLayer); |
1061 | 1066 | // |
1062 | 1067 | // Layer Toolbar |
1063 | 1068 | mLayerToolBar = addToolBar(tr("Manage Layers")); |
1064 | 1069 | mLayerToolBar->setIconSize(myIconSize); |
1065 | 1070 | mLayerToolBar->setObjectName("LayerToolBar"); |
1066 | | - mLayerToolBar->addAction(mActionAddNonDbLayer); |
1067 | | - mLayerToolBar->addAction(mActionAddRasterLayer); |
1068 | | -#ifdef HAVE_POSTGRESQL |
1069 | | - mLayerToolBar->addAction(mActionAddLayer); |
1070 | | -#endif |
1071 | | - mLayerToolBar->addAction(mActionAddWmsLayer); |
1072 | 1071 | mLayerToolBar->addAction(mActionNewVectorLayer); |
1073 | 1072 | mLayerToolBar->addAction(mActionRemoveLayer); |
1074 | 1073 | mLayerToolBar->addAction(mActionInOverview); |
1075 | 1074 | mLayerToolBar->addAction(mActionShowAllLayers); |
1076 | 1075 | mLayerToolBar->addAction(mActionHideAllLayers); |
1077 | 1076 | // |
1078 | | - // Help Toolbar |
1079 | | - mHelpToolBar = addToolBar(tr("Help")); |
1080 | | - mHelpToolBar->setIconSize(myIconSize); |
1081 | | - mHelpToolBar->setObjectName("Help"); |
1082 | | - mHelpToolBar->addAction(mActionHelpContents); |
1083 | | - mHelpToolBar->addAction(QWhatsThis::createAction()); |
1084 | | - // |
1085 | 1077 | // Digitizing Toolbar |
1086 | 1078 | mDigitizeToolBar = addToolBar(tr("Digitizing")); |
1087 | 1079 | mDigitizeToolBar->setIconSize(myIconSize); |
@@ -1132,6 +1124,13 @@ void QgisApp::createToolBars() |
1132 | 1124 | mPluginToolBar = addToolBar(tr("Plugins")); |
1133 | 1125 | mPluginToolBar->setIconSize(myIconSize); |
1134 | 1126 | mPluginToolBar->setObjectName("Plugins"); |
| 1127 | + // |
| 1128 | + // Help Toolbar |
| 1129 | + mHelpToolBar = addToolBar(tr("Help")); |
| 1130 | + mHelpToolBar->setIconSize(myIconSize); |
| 1131 | + mHelpToolBar->setObjectName("Help"); |
| 1132 | + mHelpToolBar->addAction(mActionHelpContents); |
| 1133 | + mHelpToolBar->addAction(QWhatsThis::createAction()); |
1135 | 1134 |
|
1136 | 1135 | //Add the menu for toolbar visibility here |
1137 | 1136 | //because createPopupMenu() would return 0 |
@@ -1288,7 +1287,7 @@ void QgisApp::setTheme(QString theThemeName) |
1288 | 1287 | mActionExportMapServer->setIconSet(QIcon(QPixmap(myIconPath + "/mActionExportMapServer.png"))); |
1289 | 1288 | */ |
1290 | 1289 | mActionFileExit->setIconSet(QIcon(QPixmap(myIconPath + "/mActionFileExit.png"))); |
1291 | | - mActionAddNonDbLayer->setIconSet(QIcon(QPixmap(myIconPath + "/mActionAddNonDbLayer.png"))); |
| 1290 | + mActionAddOgrLayer->setIconSet(QIcon(QPixmap(myIconPath + "/mActionAddOgrLayer.png"))); |
1292 | 1291 | mActionAddRasterLayer->setIconSet(QIcon(QPixmap(myIconPath + "/mActionAddRasterLayer.png"))); |
1293 | 1292 | mActionAddLayer->setIconSet(QIcon(QPixmap(myIconPath + "/mActionAddLayer.png"))); |
1294 | 1293 | mActionRemoveLayer->setIconSet(QIcon(QPixmap(myIconPath + "/mActionRemoveLayer.png"))); |
@@ -3355,6 +3354,11 @@ void QgisApp::stopRendering() |
3355 | 3354 | } |
3356 | 3355 | } |
3357 | 3356 |
|
| 3357 | +QToolBar * QgisApp::fileToolBar() |
| 3358 | +{ |
| 3359 | + return mFileToolBar; |
| 3360 | +} |
| 3361 | + |
3358 | 3362 | //reimplements method from base (gui) class |
3359 | 3363 | void QgisApp::hideAllLayers() |
3360 | 3364 | { |
|
0 commit comments