mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Added custom projection builder to app menus. Doesnt do anything yet exept pop up the dialog.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@3122 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
bf32308705
commit
68f2f81dbc
@ -84,7 +84,7 @@
|
||||
#include "qgsproject.h"
|
||||
#include "qgsmapserverexport.h"
|
||||
#include "qgsgeomtypedialog.h"
|
||||
|
||||
#include "qgscustomprojectiondialog.h"
|
||||
|
||||
#ifdef HAVE_POSTGRESQL
|
||||
#include "qgsdbsourceselect.h"
|
||||
@ -4413,3 +4413,8 @@ void QgisApp::debugHook()
|
||||
// show the map canvas extent
|
||||
std::cout << mMapCanvas->extent() << std::endl;
|
||||
}
|
||||
void QgisApp::actionCustomProjection_activated()
|
||||
{
|
||||
QgsCustomProjectionDialog * myDialog = new QgsCustomProjectionDialog(this);
|
||||
myDialog->show();
|
||||
}
|
||||
|
@ -331,6 +331,8 @@ private slots:
|
||||
void openURL(QString url, bool useQgisDocDirectory=true);
|
||||
//! Check qgis version against the qgis version server
|
||||
void checkQgisVersion();
|
||||
//!Invoke the custom projection dialog
|
||||
void actionCustomProjection_activated();
|
||||
//! options dialog slot
|
||||
void options();
|
||||
//! Whats-this help slot
|
||||
|
File diff suppressed because one or more lines are too long
@ -315,3 +315,9 @@ void QgisAppBase::measure()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void QgisAppBase::actionCustomProjection_activated()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -56,12 +56,16 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog( QWidget* parent , const ch
|
||||
#if defined(Q_OS_MACX) || defined(WIN32)
|
||||
QString PKGDATAPATH = qApp->applicationDirPath() + "/share/qgis";
|
||||
#endif
|
||||
QString masterDatabaseFileName = PKGDATAPATH;
|
||||
masterDatabaseFileName += "/resources/home/user_projections.db";
|
||||
QString myMasterDatabaseFileName = PKGDATAPATH;
|
||||
myMasterDatabaseFileName += "/resources/user_projections.db";
|
||||
//now make sure the users .qgis dir exists
|
||||
//XXX make windows friendly too!!!
|
||||
QUrlOperator *myUrlOperator = new QUrlOperator();
|
||||
myUrlOperator->copy ("file:/"+masterDatabaseFileName,
|
||||
#ifdef QGISDEBUG
|
||||
std::cout << "copying " << myMasterDatabaseFileName << " to " << myUserProjectionDb << std::endl;
|
||||
#endif
|
||||
|
||||
myUrlOperator->copy ("file:/"+myMasterDatabaseFileName,
|
||||
"file:/"+myUserProjectionDb,
|
||||
false, false);
|
||||
delete myUrlOperator;
|
||||
|
@ -24,7 +24,7 @@ class QgsCustomProjectionDialog : public QgsCustomProjectionDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsCustomProjectionDialog(QWidget* parent , const char* name , WFlags fl=0);
|
||||
QgsCustomProjectionDialog(QWidget* parent , const char* name = "", WFlags fl=0);
|
||||
//a recursive function to make a directory and its ancestors
|
||||
bool makeDir(QDir &theQDir);
|
||||
public slots:
|
||||
|
Loading…
x
Reference in New Issue
Block a user