Salome HOME
Sierpinsky sample module
[samples/sierpinsky.git] / src / SierpinskyGUI / SierpinskyGUI_RunDlg.h
1 ///////////////////////////////////////////////////////////
2 // File    : SierpinskyGUI_RunDlg.h
3 // Author  : Vadim SANDLER (OCN)
4 // Created : 13/07/05
5 // Copyright (C) 2005 Open CASCADE
6 ///////////////////////////////////////////////////////////
7
8 #ifndef __SIERPINSKYGUI_RUNDLG_H
9 #define __SIERPINSKYGUI_RUNDLG_H
10
11 #include <qdialog.h>
12
13 class QLineEdit;
14 class QCheckBox;
15 class QSpinBox;
16 class QPushButton;
17 class QGroupBox;
18 class QAD_SpinBoxDbl;
19 class MyThread;
20 class QProgressBar;
21
22 class SierpinskyGUI_RunDlg : public QDialog
23 {
24   Q_OBJECT
25
26 public:
27   // Constructor
28   SierpinskyGUI_RunDlg( QWidget* );
29   // Destructor
30   ~SierpinskyGUI_RunDlg();
31
32   // Progress thread calls this method to update progress bar state
33   void nextStep( const int );
34
35 protected:
36   // process progress event
37   void customEvent( QCustomEvent* );
38
39 protected slots:
40   void accept();          // Called when user presses 'Start' button
41   void stop();            // Called when user presses 'Stop' button
42   void onBrowse();        // Browse file
43   void updateState();     // Update widgets state
44   void toggled();         // Toggle 'Base points' mode
45
46 private:
47   // widgets
48   QGroupBox*      box1;
49   QAD_SpinBoxDbl* myStartX;
50   QAD_SpinBoxDbl* myStartY;
51   QCheckBox*      myStartRandom;
52
53   QGroupBox*      box2;
54   QAD_SpinBoxDbl* myX1;
55   QAD_SpinBoxDbl* myY1;
56   QAD_SpinBoxDbl* myX2;
57   QAD_SpinBoxDbl* myY2;
58   QAD_SpinBoxDbl* myX3;
59   QAD_SpinBoxDbl* myY3;
60   QCheckBox*      myBaseRandom;
61   QCheckBox*      myBaseDefault;
62
63   QSpinBox*       myIter;
64
65   QGroupBox*      box3;
66   QCheckBox*      myJpegCheck;
67   QLineEdit*      myJpegFile;
68   QPushButton*    myJpegBtn;
69   QSpinBox*       myJpegSize;
70   QCheckBox*      myMedCheck;
71   QLineEdit*      myMedFile;
72   QPushButton*    myMedBtn;
73   QAD_SpinBoxDbl* myMedSize;
74   QCheckBox*      myVisuCheck;
75
76   QPushButton*    myStartBtn;
77   QPushButton*    myCancelBtn;
78
79   QProgressBar*   myProgress;
80
81   // progress thread
82   MyThread*       myThread;
83 };
84
85 #endif // __SIERPINSKYGUI_RUNDLG_H