Salome HOME
Update copyright information
[modules/filter.git] / src / FILTERGUI / SelectParams.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 SELECTPARAMS_HEADER
20 #define SELECTPARAMS_HEADER
21
22 #include "utilities.h"
23
24 #include "SelectField.h"
25 #include <qwt_plot.h>
26 #include <vector>
27 #include <SalomeApp_Module.h>
28 #include <SUIT_Desktop.h>
29 #include <qdialog.h>
30
31 #include <SALOMEconfig.h>
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 QDialog
43 {
44   Q_OBJECT
45
46 public:
47   SelectParams(FilterGUI*,SelectField *sel,
48                const char* name = 0,
49                bool modal = FALSE,
50                WFlags fl = 0) throw(SALOME_Exception);
51   virtual ~SelectParams();
52
53 protected:
54   virtual void     buildFrame();
55   virtual void     calcHisto();
56   virtual void     displayHisto();
57   virtual void     calcRateRed();
58   virtual void     clearSThresh();
59   virtual void     displayFThresh();
60   virtual void     displaySThresh();
61   virtual void     enableWidgets();
62
63 protected slots:
64   virtual void     gradSelected();
65   virtual void     enterSHisto();
66   virtual void     updateHisto();
67   virtual void     scaleSelected();
68   virtual void     nbThreshSelected();
69   virtual void     areaSelected();
70   virtual void     enterFThresh();
71   virtual void     enterSThresh();
72   virtual void     moveThresh(const QMouseEvent &e);
73   virtual void     getOutFileName();
74   virtual void     process() throw(SALOME_Exception);
75   virtual void     ClickOnCancel();
76   virtual void     ClickOnHelp();
77
78 private:
79   int _size;
80   long _myHistoCurve, _myHistoFThresh, _myHistoSThresh;
81   double _xmin, _xmax, _ymin, _ymax;
82   double _fthresh, _sthresh;
83   double *_x, *_y;
84   double _xft[100], _yft[100], _xst[100], _yst[100];
85
86   QLineEdit *_myLESH, *_myFThresh, *_myExpr, *_myLEST, *_myLEFT, *_myOFN;
87   QButtonGroup *_myHSize, *_myFunc, *_myFScale, *_myNbThresh, *_myArea, *_myVThresh, *_myOutFile;
88   QGridLayout *_myGroupLayout, *_myGroupLayout2, *_lay, *_GroupButtonsLayout;
89   QRadioButton *_myFieldB, *_myGradB, *_myInt, *_myExt, *_myOneThresh, *_myTwoThresh, *_myLinear, *_myLog;
90   QPushButton *_myHisto, *_myOFB, *_myProc, * _buttonCancel, * _buttonHelp;
91   QGroupBox* _GroupC1, *_GroupC2, *_GroupButtons;
92   QwtPlot *_myPlot;
93   QLabel *_myLSH, *_myLFT, *_myLST, *_myLRR;
94   QwtDiMap _qmap;
95   QFrame *_fr;
96   QString _inputFile, _inputMesh, _inputField;
97   int _inputTS;
98   SelectField *_sel;
99   SALOME_FILTER::FILTER_Gen_ptr _filter;
100 };
101
102 #endif