Back to index

salome-smesh  6.5.0
SMESHGUI_Preferences_ScalarBarDlg.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_ScalarBarDlg.h
00025 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_PREFERENCES_SCALARBARDLG_H
00028 #define SMESHGUI_PREFERENCES_SCALARBARDLG_H
00029 
00030 // SMESH includes
00031 #include "SMESH_SMESHGUI.hxx"
00032 
00033 // Qt includes
00034 #include <QDialog>
00035 
00036 class QCheckBox;
00037 class QComboBox;
00038 class QGroupBox;
00039 class QLineEdit;
00040 class QPushButton;
00041 class QToolButton;
00042 class QRadioButton;
00043 class QButtonGroup;
00044 class QLabel;
00045 
00046 class SMESHGUI;
00047 class SMESH_Actor;
00048 class SMESHGUI_SpinBox;
00049 class SalomeApp_IntSpinBox;
00050 class QtxColorButton;
00051 class LightApp_SelectionMgr;
00052 
00053 class SMESHGUI_EXPORT SMESHGUI_Preferences_ScalarBarDlg : public QDialog
00054 { 
00055   Q_OBJECT
00056 
00057 private:
00058   SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI* );
00059 
00060   static SMESHGUI_Preferences_ScalarBarDlg* myDlg;
00061 
00062 public:
00063   ~SMESHGUI_Preferences_ScalarBarDlg();
00064 
00065   static void              ScalarBarProperties( SMESHGUI* );
00066 
00067   void                     closeEvent( QCloseEvent* );
00068   void                     setOriginAndSize( const double,
00069                                              const double,
00070                                              const double,
00071                                              const double );
00072   void                     initScalarBarFromResources();
00073 
00074 protected slots:
00075   void                     onOk();
00076   bool                     onApply();
00077   void                     onCancel();
00078   void                     onHelp();
00079   void                     onSelectionChanged();
00080   void                     onXYChanged();
00081   void                     onOrientationChanged();
00082   void                     onDistributionChanged( int );
00083   void                     onDistributionActivated( bool );
00084 
00085 private:
00086   SMESHGUI*                mySMESHGUI;
00087   LightApp_SelectionMgr*   mySelectionMgr;
00088   SMESH_Actor*             myActor;
00089   double                   myIniX, myIniY, myIniW, myIniH;
00090   int                      myIniOrientation;
00091   double                   DEF_VER_X, DEF_VER_Y, DEF_VER_H, DEF_VER_W;
00092   double                   DEF_HOR_X, DEF_HOR_Y, DEF_HOR_H, DEF_HOR_W;
00093 
00094   QGroupBox*               myRangeGrp;
00095   QLineEdit*               myMinEdit;
00096   QLineEdit*               myMaxEdit;
00097 
00098   QGroupBox*               myFontGrp;
00099   QtxColorButton*          myTitleColorBtn;
00100   QComboBox*               myTitleFontCombo;
00101   QCheckBox*               myTitleBoldCheck;
00102   QCheckBox*               myTitleItalicCheck;
00103   QCheckBox*               myTitleShadowCheck;
00104   QtxColorButton*          myLabelsColorBtn;
00105   QComboBox*               myLabelsFontCombo;
00106   QCheckBox*               myLabelsBoldCheck;
00107   QCheckBox*               myLabelsItalicCheck;
00108   QCheckBox*               myLabelsShadowCheck;
00109   
00110   QGroupBox*               myLabColorGrp;
00111   SalomeApp_IntSpinBox*    myColorsSpin;
00112   SalomeApp_IntSpinBox*    myLabelsSpin;
00113 
00114   QGroupBox*               myOrientationGrp;
00115   QRadioButton*            myVertRadioBtn;
00116   QRadioButton*            myHorizRadioBtn;
00117 
00118   QGroupBox*               myOriginDimGrp;
00119   SMESHGUI_SpinBox*        myXSpin;
00120   SMESHGUI_SpinBox*        myYSpin;
00121   SMESHGUI_SpinBox*        myWidthSpin;
00122   SMESHGUI_SpinBox*        myHeightSpin;
00123 
00124   QGroupBox*               myDistributionGrp;
00125   QRadioButton*            myDMonoColor;
00126   QRadioButton*            myDMultiColor;
00127   QtxColorButton*          myMonoColorBtn;
00128   QLabel*                  myDistributionColorLbl;
00129 
00130   QGroupBox*               myButtonGrp;
00131   QButtonGroup*            myDistribColorGrp;
00132   QPushButton*             myOkBtn;
00133   QPushButton*             myApplyBtn;
00134   QPushButton*             myCancelBtn;
00135   QPushButton*             myHelpBtn;
00136 
00137   QString                  myHelpFileName;
00138 };
00139 
00140 #endif // SMESHGUI_PREFERENCES_SCALARBARDLG_H