Salome HOME
IPAL21035 It's impossible to hide scalar bar for gauss points
[modules/visu.git] / src / VISUGUI / VisuGUI_VectorsDlg.h
1 //  Copyright (C) 2007-2008  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 //  VISU VISUGUI : GUI of VISU component
23 //  File   : VisuGUI_VectorsDlg.h
24 //  Author : Laurent CORNABE & Hubert ROLLAND
25 //  Module : VISU
26 //  $Header$
27 //
28 #ifndef VISUGUI_VECTORSDLG_H
29 #define VISUGUI_VECTORSDLG_H
30
31 #include "VisuGUI_Prs3dDlg.h"
32 #include "QtxDoubleSpinBox.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 VisuGUI_InputPane;
47
48 namespace VISU
49 {
50   class Vectors_i;
51 }
52
53 class VisuGUI_VectorsDlg : public VisuGUI_ScalarBarBaseDlg
54 {
55     Q_OBJECT
56
57 public:
58     VisuGUI_VectorsDlg (SalomeApp_Module* theModule);
59     ~VisuGUI_VectorsDlg();
60
61     void   setScaleFactor( double sf );
62     double getScaleFactor();
63     void   setLineWidth( int lw );
64     int    getLineWidth();
65     void   setUseMagnColor( bool on );
66     bool   getUseMagnColor();
67     void   setUseGlyphs( bool on );
68     bool   getUseGlyphs();
69     void   setColor( QColor color);
70     QColor getColor();
71
72     void   setGlyphType(VISU::Vectors::GlyphType type );
73     VISU::Vectors::GlyphType  getGlyphType();
74
75     void   setGlyphPos(VISU::Vectors::GlyphPos pos);
76     VISU::Vectors::GlyphPos getGlyphPos();
77     void   enableMagnColor( bool enable );
78
79     virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
80                                     bool theInit );
81
82     virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
83
84 protected slots:
85   virtual QString GetContextHelpFilePath();
86
87 private:
88     QGroupBox*      TopGroup;
89     QCheckBox*      UseMagn;
90     QtxColorButton* SelColor;
91     QLabel*         LineWidLabel;
92     QSpinBox*       LinWid;
93     QLabel*         ScaleLabel;
94     QtxDoubleSpinBox*  ScalFact;
95     QCheckBox*      UseGlyph;
96     QButtonGroup*   TypeGlyph;
97     QGroupBox*      TypeGB;
98     QRadioButton*   RBCones6;
99     QRadioButton*   RBCones2;
100     QRadioButton*   RBArrows;
101     QButtonGroup*   PosGlyph;
102     QGroupBox*      PosGB;
103     QRadioButton*   RBTail;
104     QRadioButton*   RBCent;
105     QRadioButton*   RBHead;
106     QGroupBox*      GroupButtons;
107     QPushButton*    buttonOk;
108     QPushButton*    buttonCancel;
109     QPushButton*    buttonHelp;
110
111     QColor          myColor;
112     QTabWidget*            myTabBox;
113
114     VisuGUI_ScalarBarPane* myScalarPane;
115     VisuGUI_InputPane*     myInputPane;
116
117     SALOME::GenericObjPtr<VISU::Vectors_i> myPrsCopy;
118
119 private slots:
120     void enableGlyphType();
121 //void setVColor();
122     void enableSetColor();
123 };
124
125 #endif // VISUGUI_VECTORSDLG_H