Salome HOME
This commit was generated by cvs2git to create tag 'V4_1_0a3'.
[modules/filter.git] / src / FILTERGUI / SelectParams.h
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 //
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
8 //
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20
21 #ifndef SELECTPARAMS_HEADER
22 #define SELECTPARAMS_HEADER
23
24 #include "utilities.h"
25
26 #include "SelectField.h"
27 #include <qwt_plot.h>
28 #include <vector>
29 #include <SalomeApp_Module.h>
30 #include <SUIT_Desktop.h>
31 #include <qdialog.h>
32
33 #include <SALOMEconfig.h>
34
35 class QLineEdit;
36 class QLabel;
37 class QButtonGroup;
38 class QGridLayout;
39 class QRadioButton;
40 class QPushButton;
41 class QGroupBox;
42 class QFrame;
43
44 class SelectParams: public QDialog
45 {
46   Q_OBJECT
47
48 public:
49   SelectParams(FilterGUI*,SelectField *sel,
50                const char* name = 0,
51                bool modal = FALSE,
52                WFlags fl = 0) throw(SALOME_Exception);
53   virtual ~SelectParams();
54
55 protected:
56   virtual void     buildFrame();
57   virtual void     calcHisto();
58   virtual void     displayHisto();
59   virtual void     calcRateRed();
60   virtual void     clearSThresh();
61   virtual void     displayFThresh();
62   virtual void     displaySThresh();
63   virtual void     enableWidgets();
64
65 protected slots:
66   virtual void     gradSelected();
67   virtual void     enterSHisto();
68   virtual void     updateHisto();
69   virtual void     scaleSelected();
70   virtual void     nbThreshSelected();
71   virtual void     areaSelected();
72   virtual void     enterFThresh();
73   virtual void     enterSThresh();
74   virtual void     moveThresh(const QMouseEvent &e);
75   virtual void     getOutFileName();
76   virtual void     process() throw(SALOME_Exception);
77   virtual void     ClickOnCancel();
78   virtual void     ClickOnHelp();
79
80 private:
81   int _size;
82   long _myHistoCurve, _myHistoFThresh, _myHistoSThresh;
83   double _xmin, _xmax, _ymin, _ymax;
84   double _fthresh, _sthresh;
85   double *_x, *_y;
86   double _xft[100], _yft[100], _xst[100], _yst[100];
87
88   QLineEdit *_myLESH, *_myFThresh, *_myExpr, *_myLEST, *_myLEFT, *_myOFN;
89   QButtonGroup *_myHSize, *_myFunc, *_myFScale, *_myNbThresh, *_myArea, *_myVThresh, *_myOutFile;
90   QGridLayout *_myGroupLayout, *_myGroupLayout2, *_lay, *_GroupButtonsLayout;
91   QRadioButton *_myFieldB, *_myGradB, *_myInt, *_myExt, *_myOneThresh, *_myTwoThresh, *_myLinear, *_myLog;
92   QPushButton *_myHisto, *_myOFB, *_myProc, * _buttonCancel, * _buttonHelp;
93   QGroupBox* _GroupC1, *_GroupC2, *_GroupButtons;
94   QwtPlot *_myPlot;
95   QLabel *_myLSH, *_myLFT, *_myLST, *_myLRR;
96   QwtDiMap _qmap;
97   QFrame *_fr;
98   QString _inputFile, _inputMesh, _inputField;
99   int _inputTS;
100   SelectField *_sel;
101   SALOME_FILTER::FILTER_Gen_ptr _filter;
102 };
103
104 #endif