Salome HOME
second version of select parameters IHM
[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 "SelectField.h"
25 #include <qwt_plot.h>
26 #include <vector>
27 #include <SalomeApp_Module.h>
28 #include <SUIT_Desktop.h>
29
30 #include <SALOMEconfig.h>
31 /* #include CORBA_CLIENT_HEADER(MED_Gen) */
32
33 class QLineEdit;
34 class QLabel;
35 class QButtonGroup;
36 class QGridLayout;
37 class QRadioButton;
38 class QPushButton;
39 class QGroupBox;
40 class QFrame;
41
42 class SelectParams: public QObject
43 {
44   Q_OBJECT
45
46 public:
47   SelectParams(SelectField *sel);
48   virtual ~SelectParams();
49
50   virtual QFrame*  buildFrame();
51
52 protected:
53   virtual void     calcHisto();
54   virtual void     displayHisto();
55   virtual void     calcRateRed();
56   virtual void     clearSThresh();
57
58 protected slots:
59   virtual void     updateHisto();
60   virtual void     scaleSelected();
61   virtual void     nbThreshSelected();
62   virtual void     areaSelected();
63   virtual void     displayFThresh();
64   virtual void     displaySThresh();
65   virtual void     moveThresh(const QMouseEvent &e);
66   virtual void     getOutFileName();
67   virtual void     process();
68
69 private:
70
71 private:
72   int _size;
73   long _myHistoCurve, _myHistoFThresh, _myHistoSThresh;
74   double _xmin, _xmax, _ymin, _ymax;
75   double _fthresh, _sthresh;
76   double *_x, *_y;
77   double _xft[100], _yft[100], _xst[100], _yst[100];
78
79   QLineEdit *_myFThresh, *_myExpr, *_myLEST, *_myLEFT, *_myOFN;
80   QButtonGroup *_myFunc, *_myFScale, *_myNbThresh, *_myArea, *_myVThresh, *_myOutFile;
81   QGridLayout *_myGroupLayout, *_myGroupLayout2, *_lay;
82   QRadioButton *_myCutNeg, *_myInt, *_myExt, *_myOneThresh, *_myTwoThresh, *_myFieldB, *_myLinear, *_myLog;
83   QPushButton *_myHisto, *_myOFB, *_myProc;
84   QGroupBox* _GroupC1, *_GroupC2;
85   QwtPlot *_myPlot;
86   QLabel *_myLFT, *_myLST, *_myLRR;
87   QwtDiMap _qmap;
88   QFrame *_fr;
89   QString _inputFile, _inputMesh, _inputField;
90   int _inputTS;
91
92 };
93
94 #endif