Salome HOME
LCM // Import/Export of SHP p.3
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportLandCoverMapDlg.h
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19
20 #ifndef HYDROGUI_ImportLandCoverMapDlg_H
21 #define HYDROGUI_ImportLandCoverMapDlg_H
22
23 #include "HYDROGUI_Wizard.h"
24 #include <qvector.h>
25
26 class QListWidget;
27 class QLineEdit;
28 class QGroupBox;
29 class QComboBox;
30 class QLabel;
31 class QTableWidget;
32
33
34 class HYDROGUI_ImportLandCoverMapDlg : public HYDROGUI_Wizard
35 {
36   Q_OBJECT
37
38 public:
39   HYDROGUI_ImportLandCoverMapDlg( HYDROGUI_Module* theModule, const QString& theTitle );
40   virtual ~HYDROGUI_ImportLandCoverMapDlg();
41
42   void                  reset();
43
44   void                  setPolygonNames( const QStringList& theNames );
45   //void                  removePolygonNames( const QStringList& theNames );
46
47   void                  setSelectedPolygonNames( const QStringList& theNames );
48
49   void                  setAttributeNames( const QStringList& theAttrNames );
50
51   void                  FillCorrTable(const QStringList& theFirstColumn, const QStringList& theSecondColumn);
52
53   QStringList           getSelectedPolygonNames() const;
54   QString               getSelectedFieldName() const;
55
56   void                  setObjectName( const QString& theName );
57   QString               getObjectName() const;
58
59   void                  setFileName( const QString& theFileName );
60   QString               getFileName() const;
61
62   void                  setFirstPageState(bool bState);
63   //void                  setThirdPageState(bool bState);
64   void                  GetAttribute2StricklerCorr(QStringList& AttrValues, QStringList& ST);
65   QVector<int>          getSelectedPolygonIndices() const;
66
67 signals:
68   void                  FileSelected( const QString& theFileName );
69   void                  selectionChanged( const QStringList& );
70
71 protected slots:
72   void                  onBrowse();
73   void                  onItemSelectionChanged();
74
75 protected:
76   bool                  acceptCurrent() const;
77
78 private:
79
80   QWizardPage*          createPage1();
81   QWizardPage*          createPage2();
82   QWizardPage*          createPage3();
83
84   //First page
85   QLineEdit*            myFileName; 
86   QGroupBox*            myFileNameGroup;
87   QListWidget*          myPolygons;     
88
89   QGroupBox*            myObjectNameGroup;
90   QLineEdit*            myObjectName;
91
92   //second page
93   QGroupBox*            myAttrNameGroup;
94   QListWidget*          myDBFAttr; 
95   QGroupBox*            myCorrNameGroup;
96
97   //third page
98   QLabel*               myCLabel;
99   QTableWidget*         myTableW;
100
101   //State of pages
102   bool                  myFirstPageState;
103   //bool                  myThirdPageState;
104
105 };
106
107 #endif