Salome HOME
Update copyright information
[modules/filter.git] / src / FILTERGUI / SelectField.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef SELECTFIELD_HEADER
20 #define SELECTFIELD_HEADER
21
22 #include "utilities.h"
23 #include "SalomeApp_Application.h"
24 #include <SalomeApp_Module.h>
25 #include <SUIT_Desktop.h>
26 #include <qdialog.h>
27 #include "FilterGUI.h"
28 #include "FILTERGUI_Utils.h"
29 #include CORBA_SERVER_HEADER(FILTER_Gen)
30
31 #include <SALOMEconfig.h>
32 class QListView;
33 class QListViewItem;
34 class QFrame;
35 class QSlider;
36 class QGridLayout;
37 class QGroupBox;
38 class QLabel;
39 class QPushButton;
40
41 class SelectField: public QDialog
42 {
43   Q_OBJECT
44
45 public:
46   SelectField(FilterGUI*,
47               const QString& file,
48               const char* name = 0,
49               bool modal = FALSE,
50               WFlags fl = 0);
51   virtual ~SelectField();
52
53   QString getFile() { return _file; }
54   QString getMesh() { return _mesh; }
55   QString getField() { return _field; }
56   int getTimeStep() { return _ts; }
57   SALOME_FILTER::FILTER_Gen_ptr getFilter() {return _filter;} /* current filter object */
58   FilterGUI* myFilterGUI;              /* Current FilterGUI object */
59
60 protected:
61
62 protected slots:
63   virtual void     fieldSelected(QListViewItem *lvi);
64   virtual void     tsSelected();
65   virtual void     ClickOnOk();
66   virtual void     ClickOnCancel();
67   virtual void     ClickOnHelp();
68
69 private:
70   int _ts, _dimMesh;
71   QGridLayout *_myGroupLayout, *_GroupButtonsLayout, *_lay;
72   QGroupBox* _GroupC1, *_GroupButtons;
73   QFrame *_fr;
74   QString _file, _mesh, _field;
75   QListView *_myList;
76   QLabel *_myLab;
77   QSlider *_mySlider;
78   QPushButton* _buttonCancel, * _buttonHelp, * _buttonOk;
79   SALOME_FILTER::FILTER_Gen_ptr _filter;
80 };
81
82 #endif