Salome HOME
13cef05b8033236b29017f16f668e85231d17159
[modules/visu.git] / src / VISUGUI / VisuGUI_VectorsDlg.h
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  VISU VISUGUI : GUI of VISU component
24 //  File   : VisuGUI_VectorsDlg.h
25 //  Author : Laurent CORNABE & Hubert ROLLAND
26 //  Module : VISU
27 //  $Header$
28 //
29 #ifndef VISUGUI_VECTORSDLG_H
30 #define VISUGUI_VECTORSDLG_H
31
32 #include "VisuGUI_Prs3dDlg.h"
33
34 class QGroupBox;
35 class QTabWidget;
36 class QRadioButton;
37 class QButtonGroup;
38 class QCheckBox;
39 class QPushButton;
40 class QtxColorButton;
41
42 #include "SALOMEconfig.h"
43 #include CORBA_CLIENT_HEADER(VISU_Gen)
44
45 class SalomeApp_Module;
46 class SalomeApp_IntSpinBox;
47 class VisuGUI_InputPane;
48 class SalomeApp_DoubleSpinBox;
49
50 namespace VISU
51 {
52   class Vectors_i;
53 }
54
55 class VisuGUI_VectorsDlg : public VisuGUI_ScalarBarBaseDlg
56 {
57     Q_OBJECT
58
59 public:
60     VisuGUI_VectorsDlg (SalomeApp_Module* theModule);
61     ~VisuGUI_VectorsDlg();
62
63     void   setScaleFactor( double sf );
64     double getScaleFactor();
65     void   setLineWidth( int lw );
66     int    getLineWidth();
67     void   setUseMagnColor( bool on );
68     bool   getUseMagnColor();
69     void   setUseGlyphs( bool on );
70     bool   getUseGlyphs();
71     void   setColor( QColor color);
72     QColor getColor();
73
74     void   setGlyphType(VISU::Vectors::GlyphType type );
75     VISU::Vectors::GlyphType  getGlyphType();
76
77     void   setGlyphPos(VISU::Vectors::GlyphPos pos);
78     VISU::Vectors::GlyphPos getGlyphPos();
79     void   enableMagnColor( bool enable );
80
81     virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
82                                     bool theInit );
83
84     virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
85
86 protected slots:
87   virtual QString GetContextHelpFilePath();
88
89 private:
90     QGroupBox*      TopGroup;
91     QCheckBox*      UseMagn;
92     QtxColorButton* SelColor;
93     QLabel*         LineWidLabel;
94     SalomeApp_IntSpinBox* LinWid;
95     QLabel*         ScaleLabel;
96     SalomeApp_DoubleSpinBox* ScalFact;
97     QCheckBox*      UseGlyph;
98     QButtonGroup*   TypeGlyph;
99     QGroupBox*      TypeGB;
100     QRadioButton*   RBCones6;
101     QRadioButton*   RBCones2;
102     QRadioButton*   RBArrows;
103     QButtonGroup*   PosGlyph;
104     QGroupBox*      PosGB;
105     QRadioButton*   RBTail;
106     QRadioButton*   RBCent;
107     QRadioButton*   RBHead;
108     QGroupBox*      GroupButtons;
109     QPushButton*    buttonOk;
110     QPushButton*    buttonCancel;
111     QPushButton*    buttonHelp;
112
113     QColor          myColor;
114     QTabWidget*            myTabBox;
115
116     VisuGUI_ScalarBarPane* myScalarPane;
117     VisuGUI_InputPane*     myInputPane;
118
119     SALOME::GenericObjPtr<VISU::Vectors_i> myPrsCopy;
120
121 private slots:
122     void enableGlyphType();
123 //void setVColor();
124     void enableSetColor();
125 };
126
127 #endif // VISUGUI_VECTORSDLG_H