Salome HOME
Merging with WPdev
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Preferences_ColorDlg.h
1 //  SMESH SMESHGUI : GUI for SMESH 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   : SMESHGUI_Preferences_ColorDlg.h
25 //  Author : Nicolas REJNERI
26 //  Module : SMESH
27 //  $Header$
28
29 #ifndef SMESHGUI_PREFERENCES_COLORDLG_H
30 #define SMESHGUI_PREFERENCES_COLORDLG_H
31
32 #include "SMESH_SMESHGUI.hxx"
33
34 // SALOME Includes
35 //#include "SUIT_Config.h"
36 //#include "SUIT_Settings.h"
37
38 // IDL Headers
39 #include <SALOMEconfig.h>
40 #include CORBA_SERVER_HEADER(SMESH_Gen)
41
42 // QT Includes
43 #include <qdialog.h>
44
45 class QButtonGroup;
46 class QFrame;
47 class QLabel;
48 class QPushButton;
49 class QSpinBox;
50 class QColor;
51 class SMESHGUI;
52
53 class SMESHGUI_EXPORT SMESHGUI_Preferences_ColorDlg : public QDialog
54
55     Q_OBJECT
56
57 public:
58     SMESHGUI_Preferences_ColorDlg( SMESHGUI*, const char* name = 0 );
59     ~SMESHGUI_Preferences_ColorDlg();
60
61     void   SetColor(int type, QColor color);
62     QColor GetColor(int type);
63     void   SetIntValue(int type, int value);
64     int    GetIntValue(int type);
65
66 private:
67     void closeEvent( QCloseEvent* e ) ;
68     void Init();
69
70 private slots:
71 //  void RadioButtonClicked(int radioButtonId);
72     void ClickOnOk();
73     void ClickOnCancel();
74     void DeactivateActiveDialog() ;
75     void ActivateThisDialog() ;
76
77     void SelectFillColor();
78     void SelectBackFaceColor();
79     void SelectOutlineColor();
80     void SelectNodeColor();
81
82 private:
83     SMESH::SMESH_Gen_var  myCompMesh ;                
84     SMESHGUI*             mySMESHGUI ;            
85
86     QButtonGroup*         ButtonGroup1;
87     QLabel*               TextLabel_Fill;
88     QPushButton*          btnFillColor;
89     QLabel*               TextLabel_Outine;
90     QPushButton*          btnOutlineColor;
91     QLabel*               TextLabel_Width;
92     QSpinBox*             SpinBox_Width;
93     QLabel*               TextLabel_BackFace;
94     QPushButton*          btnBackFaceColor;
95     QLabel*               TextLabel_ShrinkCoeff;
96     QSpinBox*             SpinBox_Shrink;
97     QButtonGroup*         ButtonGroup2;
98     QLabel*               TextLabel_Nodes_Color;
99     QPushButton*          btnNodeColor;
100     QLabel*               TextLabel_Nodes_Size;
101     QSpinBox*             SpinBox_Nodes_Size;
102     QButtonGroup*         GroupButtons;
103     QPushButton*          buttonOk;
104     QPushButton*          buttonCancel;
105 };
106
107 #endif // SMESHGUI_PREFERENCES_COLORDLG_H