Salome HOME
Improve Actors auto-arrangement
[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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
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_ScalarBarDlg.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
44 #include "SALOMEconfig.h"
45 #include CORBA_CLIENT_HEADER(VISU_Gen)
46
47 class SalomeApp_Module;
48
49 namespace VISU{
50   class Vectors_i;
51 }
52
53 class VisuGUI_VectorsDlg : public QDialog
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     void initFromPrsObject(VISU::Vectors_i* thePrs);
80     int storeToPrsObject(VISU::Vectors_i* thePrs);
81
82 protected slots:
83   void accept();
84
85 private:
86     QGroupBox*      TopGroup;
87     QCheckBox*      UseMagn;
88     //QLabel*         ColorLab;
89     QPushButton*    SelColor;
90     QLabel*         LineWidLabel;
91     QSpinBox*       LinWid;
92     QLabel*         ScaleLabel;
93     QtxDblSpinBox*  ScalFact;
94     QCheckBox*      UseGlyph;
95     QButtonGroup*   TypeGlyph;
96     QRadioButton*   RBCones6;
97     QRadioButton*   RBCones2;
98     QRadioButton*   RBArrows;
99     QButtonGroup*   PosGlyph;
100     QRadioButton*   RBTail;
101     QRadioButton*   RBCent;
102     QRadioButton*   RBHead;
103     QGroupBox*      GroupButtons;
104     QPushButton*    buttonOk;
105     QPushButton*    buttonCancel;
106
107     QColor          myColor;
108     VisuGUI_ScalarBarPane* myScalarPane;
109
110 private slots:
111     void enableGlyphType();
112     void setVColor();
113     void enableSetColor();
114 };
115
116 #endif // VISUGUI_VECTORSDLG_H