Salome HOME
Profile dialog backgound like it is in OCC viewer.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_GeoreferencementDlg.h
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef HYDROGUI_GEOREFERENCEMENT_H
24 #define HYDROGUI_GEOREFERENCEMENT_H
25
26 #include "HYDROGUI_InputPanel.h"
27
28 class QGroupBox;
29 class QButtonGroup;
30 class QTableWidget;
31
32 class HYDROGUI_GeoreferencementDlg : public HYDROGUI_InputPanel
33 {
34   Q_OBJECT
35
36 public:
37   enum ProfilesMode { AllProfiles, SelectedProfiles };
38
39   struct ProfileGeoData
40   {
41     double Xg;
42     double Yg;
43     double Xd;
44     double Yd;
45
46     bool isValid;
47
48     ProfileGeoData() :
49       isValid( false ) {}
50
51     ProfileGeoData( double theXg, double theYg, double theXd, double theYd ) :
52       Xg( theXg ), Yg( theYg ), Xd( theXd ), Yd( theYd ), isValid( true ) {}
53   };
54   typedef QMap< QString, ProfileGeoData > ProfilesGeoDataMap;
55
56 public:
57   HYDROGUI_GeoreferencementDlg( HYDROGUI_Module* theModule, const QString& theTitle );
58   virtual ~HYDROGUI_GeoreferencementDlg();
59
60   void                       reset();
61
62   void                       setMode( const int theMode );
63
64   void                       setData( const ProfilesGeoDataMap& theMap );
65   void                       getData( ProfilesGeoDataMap& theMap );
66
67 protected slots:
68   void                       onModeActivated( int );
69   void                       onProfilesSelectionChanged();
70
71 signals:
72   void                       modeActivated( int );
73
74 private:
75   QButtonGroup* myModeButtons;
76   QTableWidget* myTable;
77 };
78
79 #endif