Version: 6.3.1

src/VISUGUI/VisuGUI_GaussPointsDlg.h

Go to the documentation of this file.
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 //  VISU VISUGUI : GUI of VISU component
00024 //  File   : VisuGUI_GaussPointsDlg.h
00025 //  Author : Oleg UVAROV
00026 //  Module : VISU
00027 //
00028 #ifndef VISUGUI_GAUSSPOINTSDLS_H
00029 #define VISUGUI_GAUSSPOINTSDLS_H
00030 
00031 #include "VisuGUI_Prs3dDlg.h"
00032 #include "VISU_GaussPoints_i.hh"
00033 
00034 class SalomeApp_DoubleSpinBox;
00035 
00036 class SalomeApp_Module;
00037 class SalomeApp_IntSpinBox;
00038 class VisuGUI_PrimitiveBox;
00039 class VisuGUI_SizeBox;
00040 class VisuGUI_TextPrefDlg;
00041 class VisuGUI_InputPane;
00042 
00043 
00045 
00046 class VisuGUI_GaussScalarBarPane : public QWidget//QVBox
00047 {
00048   Q_OBJECT
00049 
00050  public:
00051   VisuGUI_GaussScalarBarPane(QWidget* parent);
00052   ~VisuGUI_GaussScalarBarPane() {};
00053 
00054   int     getOrientation();
00055   void    setPosAndSize( double x, double y, double w, double h, bool vert );
00056   void    setScalarBarData( int colors, int labels );
00057   double  getX();
00058   double  getY();
00059   double  getWidth();
00060   double  getHeight();
00061   int     getNbColors();
00062   int     getNbLabels();
00063 
00064   void    initFromPrsObject(VISU::GaussPoints_i* thePrs, bool theInit);
00065   int     storeToPrsObject(VISU::GaussPoints_i* thePrs);
00066 
00067  protected:
00068   QButtonGroup*   RangeGroup;
00069   QRadioButton*   RBFieldRange;
00070   QRadioButton*   RBImposedRange;
00071   QLineEdit*      MinEdit;
00072   QLineEdit*      MaxEdit;
00073   SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
00074 
00075   QRadioButton*   RBhori;
00076   QRadioButton*   RBvert;
00077 
00078   SalomeApp_DoubleSpinBox*  XSpin;
00079   SalomeApp_DoubleSpinBox*  YSpin;
00080 
00081   SalomeApp_DoubleSpinBox*  WidthSpin;
00082   SalomeApp_DoubleSpinBox*  HeightSpin;
00083   SalomeApp_DoubleSpinBox*  SpacingSpin;
00084 
00085   QRadioButton*   BicolorButton;
00086   QRadioButton*   RainbowButton;
00087   QLabel*         ColorLabel;
00088   SalomeApp_IntSpinBox* ColorSpin;
00089   QLabel*         LabelLabel;
00090   SalomeApp_IntSpinBox* LabelSpin;
00091 
00092   QLabel*         myModeLbl;
00093   QComboBox*      myModeCombo;
00094   QPushButton*    myTextBtn;
00095   QPushButton*    myBarBtn;
00096   VisuGUI_TextPrefDlg* myTextDlg;
00097   VisuGUI_BarPrefDlg* myBarDlg;
00098   QRadioButton*   myRBLocal;
00099   QRadioButton*   myRBGlobal;
00100   QCheckBox*      myCBDisplayed;
00101   QCheckBox*      myHideBar;
00102 
00103   double          Imin,   Imax;
00104   double          myHorX, myHorY, myHorW, myHorH;
00105   double          myVerX, myVerY, myVerW, myVerH;
00106   int             myHorTS, myHorLS, myHorBW, myHorBH;
00107   int             myVerTS, myVerLS, myVerBW, myVerBH;
00108   int             myRangeMode;
00109   bool myIsStoreTextProp;
00110 
00111   bool UseFieldRange( bool theInit = true );
00112 
00113  private slots:
00114   void onGlobalScalarBar();
00115   void onLocalScalarBar();
00116 
00117   void fieldRangeClicked();
00118   void imposedRangeClicked();
00119   void changeScalarMode( int );
00120 
00121   void changeDefaults( int );
00122   void XYChanged( double );
00123   void onTextPref();
00124   void onBarPref();
00125 };
00126 
00128 
00132 class VisuGUI_GaussPointsDlg : public VisuGUI_Prs3dDlg
00133 {
00134   Q_OBJECT
00135 
00136 public:
00137   VisuGUI_GaussPointsDlg (SalomeApp_Module* theModule);
00138   ~VisuGUI_GaussPointsDlg();
00139 
00141   virtual void    initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
00142                                      bool theInit );
00143 
00145   virtual int     storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
00146 
00147 protected:
00148   virtual QString GetContextHelpFilePath();
00149  
00150 protected slots:
00151   void    onToggleDefShape( bool );
00152   void    accept();
00153 
00154 private:
00155   QTabWidget*              myTabBox;
00156   VisuGUI_GaussScalarBarPane* myScalarPane;
00157   VisuGUI_InputPane*       myInputPane;
00158 
00159   QRadioButton*            myResultsButton;
00160   QRadioButton*            myGeometryButton;
00161   QRadioButton*            myDefShapeButton;
00162 
00163   VisuGUI_PrimitiveBox*    myPrimitiveBox;
00164   VisuGUI_SizeBox*         mySizeBox;
00165 
00166   QGroupBox*               myDefShapeBox;
00167   SalomeApp_DoubleSpinBox* myScaleSpinBox;
00168 
00169   SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
00170   SalomeApp_Module*        myModule;
00171 };
00172 
00173 #endif // VISUGUI_GAUSSPOINTSDLS_H
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS