16
16
#ifndef QGSGRASSNEWMAPSET_H
17
17
#define QGSGRASSNEWMAPSET_H
23
#include <QCloseEvent>
28
// Must be here, so that it is included to moc file
30
#include "qgisiface.h"
32
#include "qgsspatialrefsys.h"
33
#include "qgsprojectionselector.h"
35
class QgsGrassProvider;
36
#include "qgsgrassplugin.h"
37
19
#include "ui_qgsgrassnewmapsetbase.h"
39
#include "qgsgrassselect.h"
40
#include "qgsgrassattributes.h"
20
#include "qgscoordinatereferencesystem.h"
25
class QgsProjectionSelector;
43
29
#include <grass/gis.h>
44
#include <grass/gprojects.h>
45
#include <grass/Vect.h>
48
33
/*! \class QgsGrassNewMapset
49
34
* \brief GRASS vector edit.
52
class QgsGrassNewMapset : public Q3Wizard, private Ui::QgsGrassNewMapsetBase
37
class QgsGrassNewMapset : public QWizard, private Ui::QgsGrassNewMapsetBase
68
QgsGrassNewMapset ( QgisApp *qgisApp, QgisIface *iface,
69
QgsGrassPlugin *plugin,
70
QWidget * parent = 0, const char * name = "", Qt::WFlags f = 0 );
54
QgsGrassNewMapset( QgisInterface *iface,
55
QgsGrassPlugin *plugin,
56
QWidget * parent = 0, Qt::WFlags f = 0 );
73
59
~QgsGrassNewMapset();
76
65
static bool isRunning();
82
71
//! Browse database
83
72
void on_mDatabaseButton_clicked() { browseDatabase(); }
84
73
void browseDatabase();
87
76
void on_mDatabaseLineEdit_returnPressed() { databaseChanged(); }
88
77
void on_mDatabaseLineEdit_textChanged() { databaseChanged(); }
89
78
void databaseChanged();
91
80
/***************** LOCATION *****************/
92
81
//! Set location page
93
void setLocationPage ( );
82
void setLocationPage( );
96
void setLocations ( );
98
87
//! Location radio switched
99
88
void on_mCreateLocationRadioButton_clicked() { locationRadioSwitched(); }
100
89
void on_mSelectLocationRadioButton_clicked() { locationRadioSwitched(); }
101
void locationRadioSwitched ( );
90
void locationRadioSwitched( );
103
92
//! Existing location selection
104
void on_mLocationComboBox_textChanged(const QString &txt) {
105
existingLocationChanged ( txt ); }
106
void existingLocationChanged(const QString&);
93
void on_mLocationComboBox_textChanged( const QString &txt )
95
existingLocationChanged( txt );
97
void existingLocationChanged( const QString& );
108
99
//! New location name has changed
109
100
void on_mLocationLineEdit_returnPressed() { newLocationChanged(); }
113
104
//! Check location
114
105
void checkLocation();
116
/***************** PROJECTION ****************/
107
/***************** CRS ****************/
117
108
//! Set projection page, called when entered from location page
118
109
void setProjectionPage();
120
111
//! Projection selected
121
void sridSelected(QString);
112
void sridSelected( QString );
122
113
void projectionSelected();
124
115
//! Location radio switched
125
116
void on_mNoProjRadioButton_clicked() { projRadioSwitched(); }
126
117
void on_mProjRadioButton_clicked() { projRadioSwitched(); }
127
void projRadioSwitched ( );
118
void projRadioSwitched( );
129
120
//! Set GRASS projection structures for currently selected projection
130
// or PROJECTION_XY if 'not defined' is selected
121
// or CRS_XY if 'not defined' is selected
131
122
void setGrassProjection();
133
124
/******************* REGION ******************/
134
125
//! Set region page, called when entered from projection
135
126
void setRegionPage();
173
164
//! Set finish page
174
165
void setFinishPage();
179
170
//! Create new mapset
180
171
void createMapset();
182
173
//! New page was selected
183
void pageSelected ( const QString & );
174
void pageSelected( int index );
186
void closeEvent(QCloseEvent *e);
177
void closeEvent( QCloseEvent *e );
189
void keyPressEvent ( QKeyEvent * e );
180
void keyPressEvent( QKeyEvent * e );
191
182
//! Set error line
192
void setError ( QLabel *line, const QString &err );
183
void setError( QLabel *line, const QString &err );
197
185
//! Pointer to the QGIS interface object
186
QgisInterface *mIface;
201
189
QgsGrassPlugin *mPlugin;
203
191
//! Editing is already running
204
192
static bool mRunning;
206
194
//! Projection selector
207
195
QgsProjectionSelector *mProjectionSelector;