]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_VectorsDlg.h
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / VISUGUI / VisuGUI_VectorsDlg.h
1 //  VISU VISUGUI : GUI of VISU component
2 //
3 //  Copyright (C) 2003  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 //
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 #include "QtxDblSpinBox.h"
34
35 #include <qdialog.h>
36 #include <qbuttongroup.h>
37 #include <qgroupbox.h>
38 #include <qradiobutton.h>
39 #include <qcheckbox.h>
40 #include <qlabel.h>
41 #include <qspinbox.h>
42 #include <qpushbutton.h>
43 #include <qtabwidget.h>
44
45 #include "SALOMEconfig.h"
46 #include CORBA_CLIENT_HEADER(VISU_Gen)
47
48 class SalomeApp_Module;
49 class VisuGUI_InputPane;
50
51 namespace VISU
52 {
53   class Vectors_i;
54 }
55
56 class VisuGUI_VectorsDlg : public VisuGUI_ScalarBarBaseDlg
57 {
58     Q_OBJECT
59
60 public:
61     VisuGUI_VectorsDlg (SalomeApp_Module* theModule);
62     ~VisuGUI_VectorsDlg();
63
64     void   setScaleFactor( double sf );
65     double getScaleFactor();
66     void   setLineWidth( int lw );
67     int    getLineWidth();
68     void   setUseMagnColor( bool on );
69     bool   getUseMagnColor();
70     void   setUseGlyphs( bool on );
71     bool   getUseGlyphs();
72     void   setColor( QColor color);
73     QColor getColor();
74
75     void   setGlyphType(VISU::Vectors::GlyphType type );
76     VISU::Vectors::GlyphType  getGlyphType();
77
78     void   setGlyphPos(VISU::Vectors::GlyphPos pos);
79     VISU::Vectors::GlyphPos getGlyphPos();
80     void   enableMagnColor( bool enable );
81
82     virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
83                                     bool theInit );
84
85     virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
86
87 protected slots:
88   virtual QString GetContextHelpFilePath();
89
90 private:
91     QGroupBox*      TopGroup;
92     QCheckBox*      UseMagn;
93     //QLabel*         ColorLab;
94     QPushButton*    SelColor;
95     QLabel*         LineWidLabel;
96     QSpinBox*       LinWid;
97     QLabel*         ScaleLabel;
98     QtxDblSpinBox*  ScalFact;
99     QCheckBox*      UseGlyph;
100     QButtonGroup*   TypeGlyph;
101     QRadioButton*   RBCones6;
102     QRadioButton*   RBCones2;
103     QRadioButton*   RBArrows;
104     QButtonGroup*   PosGlyph;
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