00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // SMESH SMESHGUI : GUI for SMESH component 00024 // File : SMESHGUI_Preferences_ColorDlg.h 00025 // Author : Nicolas REJNERI, Open CASCADE S.A.S. 00026 // 00027 #ifndef SMESHGUI_PREFERENCES_COLORDLG_H 00028 #define SMESHGUI_PREFERENCES_COLORDLG_H 00029 00030 // SMESH includes 00031 #include "SMESH_SMESHGUI.hxx" 00032 00033 // SALOME GUI includes 00034 #include <VTKViewer_MarkerDef.h> 00035 00036 // Qt includes 00037 #include <QDialog> 00038 00039 class QCheckBox; 00040 class SMESHGUI; 00041 class SMESHGUI_SpinBox; 00042 class SalomeApp_IntSpinBox; 00043 class QtxColorButton; 00044 class VTKViewer_MarkerWidget; 00045 00046 class SMESHGUI_EXPORT SMESHGUI_Preferences_ColorDlg : public QDialog 00047 { 00048 Q_OBJECT 00049 00050 public: 00051 SMESHGUI_Preferences_ColorDlg( SMESHGUI* ); 00052 ~SMESHGUI_Preferences_ColorDlg(); 00053 00054 void SetColor( int, const QColor& ); 00055 QColor GetColor( int ); 00056 void SetIntValue( int, int ); 00057 int GetIntValue( int ); 00058 void SetDoubleValue( int, double ); 00059 double GetDoubleValue( int ); 00060 void SetBooleanValue( int, bool ); 00061 bool GetBooleanValue( int ); 00062 00063 void setCustomMarkerMap( VTK::MarkerMap ); 00064 VTK::MarkerMap getCustomMarkerMap(); 00065 00066 void setStandardMarker( VTK::MarkerType, VTK::MarkerScale ); 00067 void setCustomMarker( int ); 00068 VTK::MarkerType getMarkerType() const; 00069 VTK::MarkerScale getStandardMarkerScale() const; 00070 int getCustomMarkerID() const; 00071 00072 protected: 00073 void closeEvent( QCloseEvent* ); 00074 void keyPressEvent( QKeyEvent* ); 00075 00076 private slots: 00077 void ClickOnOk(); 00078 void ClickOnCancel(); 00079 void ClickOnHelp(); 00080 void DeactivateActiveDialog(); 00081 void ActivateThisDialog(); 00082 00083 private: 00084 SMESHGUI* mySMESHGUI; 00085 00086 QtxColorButton* btnFillColor; 00087 QtxColorButton* btnBackFaceColor; 00088 QtxColorButton* btnOutlineColor; 00089 QtxColorButton* btn0DElementsColor; 00090 SalomeApp_IntSpinBox* SpinBox_0DElements_Size; 00091 SalomeApp_IntSpinBox* SpinBox_Width; 00092 SalomeApp_IntSpinBox* SpinBox_Shrink; 00093 QtxColorButton* btnNodeColor; 00094 VTKViewer_MarkerWidget* MarkerWidget; 00095 QtxColorButton* btnOrientationColor; 00096 SMESHGUI_SpinBox* SpinBox_Orientation_Scale; 00097 QCheckBox* CheckBox_Orientation_3DVectors; 00098 00099 QString myHelpFileName; 00100 }; 00101 00102 #endif // SMESHGUI_PREFERENCES_COLORDLG_H