Salome HOME
Merge with branch V2_2_0_VISU_improvement
[modules/visu.git] / src / VISUGUI / VisuGUI_OffsetDlg.h
1
2 #ifndef DIALOGBOX_OFFSET_H
3 #define DIALOGBOX_OFFSET_H
4
5 #include "VISU_Prs3d_i.hh"
6
7 // QT Includes
8 #include <qdialog.h>
9 #include <qptrlist.h>
10
11 class QCheckBox;
12 class QtxDblSpinBox;
13 class VisuGUI;
14
15 struct OffsetStruct {
16   float myOffset[3];
17 };
18
19 class VisuGUI_OffsetDlg: public QDialog
20 {
21   Q_OBJECT
22  public:
23   VisuGUI_OffsetDlg (VisuGUI* theModule);
24   ~VisuGUI_OffsetDlg() {};
25
26   void addPresentation (VISU::Prs3d_i* thePrs);
27   int getPrsCount() const { return myPrsList.count(); }
28
29   void setOffset (const float* theOffset);
30   void getOffset (float* theOffset) const;
31   bool isToSave() const;
32
33  public slots:
34   void onReset();
35
36  protected slots:
37   virtual void accept();
38   virtual void reject();
39   void onApply();
40
41  private:
42   void updateOffset (VISU::Prs3d_i* thePrs, float* theOffset);
43
44   VisuGUI * myModule;
45
46   QtxDblSpinBox * myDxEdt;
47   QtxDblSpinBox * myDyEdt;
48   QtxDblSpinBox * myDzEdt;
49   QCheckBox     * mySaveChk;
50
51   QPtrList<VISU::Prs3d_i>  myPrsList;
52   QValueList<OffsetStruct> myOldOffsets;
53 };
54
55 #endif // DIALOGBOX_OFFSET_H