2004-03-26 17:42:11 +00:00
|
|
|
/***************************************************************************
|
|
|
|
qgsgrassselect.h - Select GRASS layer dialog
|
|
|
|
-------------------
|
|
|
|
begin : March, 2004
|
|
|
|
copyright : (C) 2004 by Radim Blazek
|
|
|
|
email : blazek@itc.it
|
|
|
|
***************************************************************************/
|
|
|
|
/***************************************************************************
|
|
|
|
* *
|
|
|
|
* 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 QGSGRASSSELECT_H
|
|
|
|
#define QGSGRASSSELECT_H
|
|
|
|
#include "qgsgrassselectbase.h"
|
|
|
|
/*! \class QgsGrassSelect
|
|
|
|
* \brief Dialog to select GRASS layer.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class QgsGrassSelect: public QgsGrassSelectBase
|
|
|
|
{
|
2005-09-27 09:43:08 +00:00
|
|
|
Q_OBJECT;
|
|
|
|
|
2004-03-26 17:42:11 +00:00
|
|
|
public:
|
|
|
|
//! Constructor
|
|
|
|
//QgsGrassSelect(QWidget *parent = 0, int type = VECTOR );
|
|
|
|
QgsGrassSelect(int type = VECTOR );
|
|
|
|
//! Destructor
|
|
|
|
~QgsGrassSelect();
|
|
|
|
|
2005-10-04 15:16:51 +00:00
|
|
|
enum TYPE
|
|
|
|
{
|
|
|
|
MAPSET,
|
|
|
|
VECTOR,
|
|
|
|
RASTER,
|
|
|
|
GROUP, // group of rasters, used in selectedType
|
|
|
|
MAPCALC // file in $MAPSET/mapcalc directory (used by QgsGrassMapcalc)
|
|
|
|
};
|
2004-03-26 17:42:11 +00:00
|
|
|
|
|
|
|
//! OK
|
|
|
|
void accept (void);
|
2004-05-25 14:13:16 +00:00
|
|
|
|
|
|
|
//! Cancel
|
|
|
|
void reject (void);
|
2004-03-26 17:42:11 +00:00
|
|
|
|
|
|
|
//! Open dialog for Gisdbase
|
|
|
|
void getGisdbase(void);
|
|
|
|
|
|
|
|
//! Reset combobox of locations for current Gisdbase
|
|
|
|
void setLocations (void );
|
|
|
|
|
|
|
|
//! Reset combobox of mapsets for current Location
|
|
|
|
void setMapsets (void );
|
|
|
|
|
|
|
|
//! Reset combobox of maps for current Gisdbase + Location
|
|
|
|
void setMaps (void );
|
|
|
|
|
|
|
|
//! Reset combobox of layers for current Gisdbase + Location + Map
|
|
|
|
void setLayers (void );
|
|
|
|
|
2005-09-27 16:12:59 +00:00
|
|
|
//! Get list of vector layer
|
|
|
|
static QStringList vectorLayers ( QString, QString, QString, QString );
|
|
|
|
|
2004-03-26 17:42:11 +00:00
|
|
|
QString gisdbase;
|
|
|
|
QString location;
|
|
|
|
QString mapset;
|
|
|
|
QString map;
|
|
|
|
QString layer;
|
2004-05-25 14:13:16 +00:00
|
|
|
int selectedType; // RASTER or GROUP
|
2004-03-26 17:42:11 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
int type; // map type (mapset element)
|
|
|
|
static bool first; // called first time
|
|
|
|
static QString lastGisdbase; // Last selected values
|
|
|
|
static QString lastLocation;
|
|
|
|
static QString lastMapset;
|
2004-05-25 14:13:16 +00:00
|
|
|
static QString lastVectorMap;
|
|
|
|
static QString lastRasterMap;
|
|
|
|
static QString lastLayer; // vector layer
|
2005-10-04 15:16:51 +00:00
|
|
|
static QString lastMapcalc;
|
2004-07-29 12:49:13 +00:00
|
|
|
|
|
|
|
void restorePosition(void);
|
|
|
|
void saveWindowLocation(void);
|
2004-03-26 17:42:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // QGSGRASSSELECT_H
|