Salome HOME
IPAL9283,9286,9295,9296,9297; some icons restored
[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 namespace VISU{
47   class Vectors_i;
48 }
49
50 class VisuGUI_VectorsDlg : public QDialog
51
52     Q_OBJECT
53
54 public:
55     VisuGUI_VectorsDlg(QWidget* parent);
56     ~VisuGUI_VectorsDlg() {};
57
58     void   setScaleFactor( double sf );
59     double getScaleFactor();
60     void   setLineWidth( int lw );
61     int    getLineWidth();
62     void   setUseMagnColor( bool on );
63     bool   getUseMagnColor();
64     void   setUseGlyphs( bool on );
65     bool   getUseGlyphs();
66     void   setColor( QColor color);
67     QColor getColor();
68
69     void   setGlyphType(VISU::Vectors::GlyphType type );
70     VISU::Vectors::GlyphType  getGlyphType();
71
72     void   setGlyphPos(VISU::Vectors::GlyphPos pos);
73     VISU::Vectors::GlyphPos getGlyphPos();
74     void   enableMagnColor( bool enable );
75
76     void initFromPrsObject(VISU::Vectors_i* thePrs);
77     int storeToPrsObject(VISU::Vectors_i* thePrs);
78
79 protected slots:
80   void accept();
81    
82 private:
83     QGroupBox*      TopGroup;
84     QCheckBox*      UseMagn;
85     //QLabel*         ColorLab;
86     QPushButton*    SelColor;
87     QLabel*         LineWidLabel;
88     QSpinBox*       LinWid;
89     QLabel*         ScaleLabel;
90     QtxDblSpinBox*  ScalFact;
91     QCheckBox*      UseGlyph;
92     QButtonGroup*   TypeGlyph;
93     QRadioButton*   RBCones6;
94     QRadioButton*   RBCones2;
95     QRadioButton*   RBArrows;
96     QButtonGroup*   PosGlyph;
97     QRadioButton*   RBTail;
98     QRadioButton*   RBCent;
99     QRadioButton*   RBHead;
100     QGroupBox*      GroupButtons;
101     QPushButton*    buttonOk;
102     QPushButton*    buttonCancel;
103
104     QColor          myColor;
105     VisuGUI_ScalarBarPane* myScalarPane;
106
107 private slots:
108     void enableGlyphType();
109     void setVColor();
110     void enableSetColor();
111 };
112
113 #endif // VISUGUI_VECTORSDLG_H