From d3bc661ce28887c6a13d949963a821dc1f75aad5 Mon Sep 17 00:00:00 2001 From: gsherman Date: Mon, 26 Jan 2004 03:00:49 +0000 Subject: [PATCH] changes to support compilation under Qt 3.1.x git-svn-id: http://svn.osgeo.org/qgis/trunk@594 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/main.cpp | 1 - src/qgscontcoldialogbase.ui | 2 +- src/qgsgrasydialogbase.ui | 2 +- src/qgshelpviewer.ui | 2 +- src/qgsmaplayer.h | 8 ++++---- src/qgsmapserverexport.cpp | 2 +- src/qgsmapserverexportbase.ui | 2 +- src/qgspluginmanager.cpp | 3 ++- src/qgspluginmanagerbase.ui | 2 +- src/qgsproviderregistry.cpp | 3 ++- 10 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 77e12b61b73..ff5167f735d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,7 +30,6 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); - // a.setFont(QFont("helvetica", 11)); QTranslator tor(0); // set the location where your .qm files are in load() below as the last parameter instead of "." diff --git a/src/qgscontcoldialogbase.ui b/src/qgscontcoldialogbase.ui index 0b5f1147722..b6d6b108c25 100644 --- a/src/qgscontcoldialogbase.ui +++ b/src/qgscontcoldialogbase.ui @@ -1,4 +1,4 @@ - + QgsContColDialogBase diff --git a/src/qgsgrasydialogbase.ui b/src/qgsgrasydialogbase.ui index c3aea6e995a..d232b842836 100644 --- a/src/qgsgrasydialogbase.ui +++ b/src/qgsgrasydialogbase.ui @@ -1,4 +1,4 @@ - + QgsGraSyDialogBase diff --git a/src/qgshelpviewer.ui b/src/qgshelpviewer.ui index 867a2ced0fc..78349726579 100644 --- a/src/qgshelpviewer.ui +++ b/src/qgshelpviewer.ui @@ -1,4 +1,4 @@ - + QgsHelpViewer diff --git a/src/qgsmaplayer.h b/src/qgsmaplayer.h index ee05f251c80..41eb3c2f1f2 100644 --- a/src/qgsmaplayer.h +++ b/src/qgsmaplayer.h @@ -126,8 +126,6 @@ class QgsMapLayer:public QObject signals:void visibilityChanged(void); protected: - //popup menu that will apear when right clicking legend - QPopupMenu *popMenu; //! Extent of the layer QgsRect layerExtent; //! Indicates if the layer is valid and can be drawn @@ -141,12 +139,14 @@ class QgsMapLayer:public QObject QPixmap m_legendPixmap; /** Name of the layer - used for display */ QString layerName; + //! context menu + QPopupMenu *popMenu; private: // Private attributes /** Unique ID of this layer - used to refer to this layer in QGIS code */ QString ID; /** Type of the layer (eg. vector, raster, database */ int layerType; - + //! Tag for embedding additional information QString tag; /** */ @@ -161,7 +161,7 @@ class QgsMapLayer:public QObject signals: /**This signal should be connected with the slot QgsMapCanvas::refresh()*/ - void repaintRequested(); + virtual void repaintRequested(); }; #endif diff --git a/src/qgsmapserverexport.cpp b/src/qgsmapserverexport.cpp index bbecb3aea0f..4a92cea66a5 100644 --- a/src/qgsmapserverexport.cpp +++ b/src/qgsmapserverexport.cpp @@ -238,7 +238,7 @@ void QgsMapserverExport::writeMapFile(){ void QgsMapserverExport::showHelp(){ //QMessageBox::information(this, "Help","Help"); QgsHelpViewer *hv = new QgsHelpViewer(this); - hv->setModal(false); +// causes problems in qt3.1.x: hv->setModal(false); hv->setCaption("QGIS Help - Mapserver Export"); hv->show(); } diff --git a/src/qgsmapserverexportbase.ui b/src/qgsmapserverexportbase.ui index 71e71e5c86d..3d7640a233d 100644 --- a/src/qgsmapserverexportbase.ui +++ b/src/qgsmapserverexportbase.ui @@ -1,4 +1,4 @@ - + QgsMapserverExportBase diff --git a/src/qgspluginmanager.cpp b/src/qgspluginmanager.cpp index 7262fd2cf81..8d3a890db46 100644 --- a/src/qgspluginmanager.cpp +++ b/src/qgspluginmanager.cpp @@ -30,7 +30,8 @@ QgsPluginManager::QgsPluginManager(QWidget *parent, const char * name) : QgsPluginManagerBase(parent, name) { // set the default lib dir to the qgis install directory/lib - QString appDir = qApp->applicationDirPath(); + char **argv = qApp->argv(); + QString appDir = argv[0]; int bin = appDir.findRev("/bin", -1, false); QString baseDir = appDir.left(bin); QString libDir = baseDir + "/lib"; diff --git a/src/qgspluginmanagerbase.ui b/src/qgspluginmanagerbase.ui index 7fe2aff2f48..2f16b2642d0 100644 --- a/src/qgspluginmanagerbase.ui +++ b/src/qgspluginmanagerbase.ui @@ -1,4 +1,4 @@ - + QgsPluginManagerBase diff --git a/src/qgsproviderregistry.cpp b/src/qgsproviderregistry.cpp index d2fa7602524..5ba735bb050 100644 --- a/src/qgsproviderregistry.cpp +++ b/src/qgsproviderregistry.cpp @@ -44,7 +44,8 @@ QgsProviderRegistry::QgsProviderRegistry(){ // check all libs in the current plugin directory and get name and descriptions //TODO figure out how to register and identify data source plugin for a specific //TODO layer type -QString appDir = qApp->applicationDirPath(); +char **argv = qApp->argv(); +QString appDir = argv[0]; int bin = appDir.findRev("/bin", -1, false); QString baseDir = appDir.left(bin); QString libDir = baseDir + "/lib";