Back to index

salome-smesh  6.5.0
SMESHGUI_Preferences_ColorDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 #include <QtxBiColorTool.h>
00036 
00037 // Qt includes
00038 #include <QDialog>
00039 
00040 class QCheckBox;
00041 class SMESHGUI;
00042 class SMESHGUI_SpinBox;
00043 class SalomeApp_IntSpinBox;
00044 class QtxColorButton;
00045 class VTKViewer_MarkerWidget;
00046 
00047 class SMESHGUI_EXPORT SMESHGUI_Preferences_ColorDlg : public QDialog
00048 { 
00049   Q_OBJECT
00050     
00051 public:
00052   SMESHGUI_Preferences_ColorDlg( SMESHGUI* );
00053   ~SMESHGUI_Preferences_ColorDlg();
00054 
00055   void                  SetColor( int, const QColor& );
00056   QColor                GetColor( int );
00057   void                  SetIntValue( int, int );
00058   int                   GetIntValue( int );
00059   void                  SetDoubleValue( int, double );
00060   double                GetDoubleValue( int );
00061   void                  SetBooleanValue( int, bool );
00062   bool                  GetBooleanValue( int );
00063 
00064   void                  setCustomMarkerMap( VTK::MarkerMap );
00065   VTK::MarkerMap        getCustomMarkerMap();
00066 
00067   void                  SetDeltaBrightness(int);
00068   int                   GetDeltaBrightness();
00069 
00070   void                  setStandardMarker( VTK::MarkerType, VTK::MarkerScale );
00071   void                  setCustomMarker( int );
00072   VTK::MarkerType       getMarkerType() const;
00073   VTK::MarkerScale      getStandardMarkerScale() const;
00074   int                   getCustomMarkerID() const;
00075 
00076 protected:
00077   void                  closeEvent( QCloseEvent* );
00078   void                  keyPressEvent( QKeyEvent* );
00079 
00080 private slots:
00081   void                  ClickOnOk();
00082   void                  ClickOnCancel();
00083   void                  ClickOnHelp();
00084   void                  DeactivateActiveDialog();
00085   void                  ActivateThisDialog();
00086   
00087 private:
00088   SMESHGUI*             mySMESHGUI;            
00089 
00090   QtxBiColorTool*       toolSurfColor; 
00091   QtxColorButton*       btnWireframeColor;
00092   QtxColorButton*       btnOutlineColor;
00093   QtxColorButton*       btn0DElementsColor;
00094   SalomeApp_IntSpinBox* SpinBox_0DElements_Size;
00095   SalomeApp_IntSpinBox* SpinBox_Width;
00096   SalomeApp_IntSpinBox* SpinBox_Shrink;
00097   QtxColorButton*       btnNodeColor;
00098   VTKViewer_MarkerWidget* MarkerWidget;
00099   QtxColorButton*       btnOrientationColor;
00100   SMESHGUI_SpinBox*     SpinBox_Orientation_Scale;
00101   QCheckBox*            CheckBox_Orientation_3DVectors;
00102   QtxColorButton*       btnPreselectionColor;
00103   QtxColorButton*       btnSelectionColor;
00104 
00105   QString               myHelpFileName;
00106 };
00107 
00108 #endif // SMESHGUI_PREFERENCES_COLORDLG_H