2005-04-10 07:04:07 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2005 by Tim Sutton *
|
|
|
|
* tim@linfiniti.com *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef QGSPROJECTIONSELECTOR_H
|
|
|
|
#define QGSPROJECTIONSELECTOR_H
|
|
|
|
|
2005-04-10 12:22:44 +00:00
|
|
|
#ifndef WIN32
|
2005-04-10 07:04:07 +00:00
|
|
|
#include "qgsprojectionselectorbase.uic.h"
|
|
|
|
#else
|
|
|
|
#include "qgsprojectionselectorbase.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <qgis.h>
|
|
|
|
#include <qstring.h>
|
|
|
|
#include <qlistview.h>
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@author Tim Sutton
|
|
|
|
*/
|
|
|
|
class QgsProjectionSelector: public QgsProjectionSelectorBase
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
QgsProjectionSelector( QWidget* parent , const char* name ,WFlags fl =0 );
|
|
|
|
~QgsProjectionSelector();
|
2005-04-17 22:19:11 +00:00
|
|
|
//! Populate the proj tree view with user defined projection names...
|
|
|
|
void getUserProjList();
|
|
|
|
//! Populate the proj tree view with system projection names...
|
2005-04-10 07:04:07 +00:00
|
|
|
void getProjList();
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void setSelectedWKT(QString theWKT);
|
|
|
|
QString getSelectedWKT();
|
|
|
|
void setSelectedSRID(QString theSRID);
|
|
|
|
QString getCurrentWKT();
|
2005-04-28 11:28:42 +00:00
|
|
|
long getCurrentSRID();
|
|
|
|
|
2005-04-10 07:04:07 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
// List view nodes for the tree view of projections
|
2005-04-17 22:19:11 +00:00
|
|
|
//! User defined projections node
|
|
|
|
QListViewItem *mUserProjList;
|
2005-04-10 07:04:07 +00:00
|
|
|
//! GEOGCS node
|
2005-04-17 22:19:11 +00:00
|
|
|
QListViewItem *mGeoList;
|
2005-04-10 07:04:07 +00:00
|
|
|
//! PROJCS node
|
2005-04-17 22:19:11 +00:00
|
|
|
QListViewItem *mProjList;
|
2005-04-10 07:04:07 +00:00
|
|
|
//! Users custom coordinate system file
|
2005-04-17 22:19:11 +00:00
|
|
|
QString mCustomCsFile;
|
2005-04-10 07:04:07 +00:00
|
|
|
//! File name of the sqlite3 database
|
2005-04-17 22:19:11 +00:00
|
|
|
QString mSrsDatabaseFileName;
|
2005-04-10 07:04:07 +00:00
|
|
|
|
|
|
|
//private handler for when user selects a cs
|
|
|
|
//it will cause wktSelected and sridSelected events to be spawned
|
|
|
|
void coordinateSystemSelected(QListViewItem*);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void wktSelected(QString theWKT);
|
|
|
|
void sridSelected(QString theSRID);
|
|
|
|
//! Refresh any listening canvases
|
|
|
|
void refresh();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|