]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_VectorsDlg.h
Salome HOME
sources v1.2c
[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 "QAD_SpinBoxDbl.h"
33
34 #include <qdialog.h>
35 #include <qbuttongroup.h>
36 #include <qgroupbox.h>
37 #include <qradiobutton.h>
38 #include <qcheckbox.h>
39 #include <qlabel.h>
40 #include <qspinbox.h>
41 #include <qpushbutton.h>
42
43 #include "SALOMEconfig.h"
44 #include CORBA_CLIENT_HEADER(VISU_Gen)
45 namespace VISU{
46   class Vectors_i;
47 }
48
49 class VisuGUI_VectorsDlg : public QDialog
50
51     Q_OBJECT
52
53 public:
54     VisuGUI_VectorsDlg();
55     ~VisuGUI_VectorsDlg();
56
57     void   setScaleFactor( double sf );
58     double getScaleFactor();
59     void   setLineWidth( int lw );
60     int    getLineWidth();
61     void   setUseMagnColor( bool on );
62     bool   getUseMagnColor();
63     void   setUseGlyphs( bool on );
64     bool   getUseGlyphs();
65     void   setColor( QColor color);
66     QColor getColor();
67
68     void   setGlyphType(VISU::Vectors::GlyphType type );
69     VISU::Vectors::GlyphType  getGlyphType();
70
71     void   setGlyphPos(VISU::Vectors::GlyphPos pos);
72     VISU::Vectors::GlyphPos getGlyphPos();
73     void   enableMagnColor( bool enable );
74
75     void initFromPrsObject(VISU::Vectors_i* thePrs);
76     void storeToPrsObject(VISU::Vectors_i* thePrs);
77
78
79 private:
80     QGroupBox*      TopGroup;
81     QCheckBox*      UseMagn;
82     //QLabel*         ColorLab;
83     QPushButton*    SelColor;
84     QLabel*         LineWidLabel;
85     QSpinBox*       LinWid;
86     QLabel*         ScaleLabel;
87     QAD_SpinBoxDbl* ScalFact;
88     QCheckBox*      UseGlyph;
89     QButtonGroup*   TypeGlyph;
90     QRadioButton*   RBCones6;
91     QRadioButton*   RBCones2;
92     QRadioButton*   RBArrows;
93     QButtonGroup*   PosGlyph;
94     QRadioButton*   RBTail;
95     QRadioButton*   RBCent;
96     QRadioButton*   RBHead;
97     QGroupBox*      GroupButtons;
98     QPushButton*    buttonOk;
99     QPushButton*    buttonCancel;
100
101     QColor          myColor;
102
103 private slots:
104     void enableGlyphType();
105  void setVColor();
106  void enableSetColor();
107 };
108
109 #endif // VISUGUI_VECTORSDLG_H