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