Salome HOME
c21a9943a469f4a6df28f32a9ed17c7226b60227
[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 QtxDblSpinBox;
19 class MyThread;
20 class QProgressBar;
21 class SierpinskyGUI;
22
23 class SierpinskyGUI_RunDlg : public QDialog
24 {
25   Q_OBJECT
26
27 public:
28   // Constructor
29   SierpinskyGUI_RunDlg( QWidget*, SierpinskyGUI* );
30   // Destructor
31   ~SierpinskyGUI_RunDlg();
32
33   // Progress thread calls this method to update progress bar state
34   void nextStep( const int );
35
36 protected:
37   // process progress event
38   void customEvent( QCustomEvent* );
39
40 protected slots:
41   void accept();          // Called when user presses 'Start' button
42   void stop();            // Called when user presses 'Stop' button
43   void onBrowse();        // Browse file
44   void updateState();     // Update widgets state
45   void toggled();         // Toggle 'Base points' mode
46
47 private:
48   // module
49   SierpinskyGUI*  myModule;
50   
51   // widgets
52   QGroupBox*      box1;
53   QtxDblSpinBox*  myStartX;
54   QtxDblSpinBox*  myStartY;
55   QCheckBox*      myStartRandom;
56
57   QGroupBox*      box2;
58   QtxDblSpinBox*  myX1;
59   QtxDblSpinBox*  myY1;
60   QtxDblSpinBox*  myX2;
61   QtxDblSpinBox*  myY2;
62   QtxDblSpinBox*  myX3;
63   QtxDblSpinBox*  myY3;
64   QCheckBox*      myBaseRandom;
65   QCheckBox*      myBaseDefault;
66
67   QSpinBox*       myIter;
68
69   QGroupBox*      box3;
70   QCheckBox*      myJpegCheck;
71   QLineEdit*      myJpegFile;
72   QPushButton*    myJpegBtn;
73   QSpinBox*       myJpegSize;
74   QCheckBox*      myMedCheck;
75   QLineEdit*      myMedFile;
76   QPushButton*    myMedBtn;
77   QtxDblSpinBox*  myMedSize;
78   QCheckBox*      myVisuCheck;
79
80   QPushButton*    myStartBtn;
81   QPushButton*    myCancelBtn;
82
83   QProgressBar*   myProgress;
84
85   // progress thread
86   MyThread*       myThread;
87 };
88
89 #endif // __SIERPINSKYGUI_RUNDLG_H