Back to index

salome-gui  6.5.0
Plot2d_SetupViewDlg.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 // File   : Plot2d_SetupViewDlg.cxx
00024 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
00025 //
00026 #ifndef PLOT2D_SETUPVIEWDLG_H
00027 #define PLOT2D_SETUPVIEWDLG_H
00028 
00029 #include "Plot2d.h"
00030 
00031 #include <QDialog>
00032 
00033 class QSpinBox;
00034 class QCheckBox;
00035 class QLineEdit;
00036 class QComboBox;
00037 class QPushButton;
00038 class QtxColorButton;
00039 class QtxFontEdit;
00040 
00041 class PLOT2D_EXPORT Plot2d_SetupViewDlg : public QDialog
00042 { 
00043   Q_OBJECT
00044 
00045 public:
00046   Plot2d_SetupViewDlg( QWidget* = 0, bool = false, bool = false );
00047   ~Plot2d_SetupViewDlg();
00048 
00049   void            setMainTitle( bool, const QString& = QString() );
00050   bool            isMainTitleEnabled();
00051   QString         getMainTitle();
00052 
00053   void            setXTitle( bool, const QString& = QString() );
00054   bool            isXTitleEnabled();
00055   QString         getXTitle();
00056 
00057   void            setYTitle( bool, const QString& = QString() );
00058   void            setY2Title( bool, const QString& = QString() );
00059   bool            isYTitleEnabled();
00060   bool            isY2TitleEnabled();
00061   QString         getYTitle();
00062   QString         getY2Title();
00063 
00064   void            setCurveType( const int );
00065   int             getCurveType();
00066 
00067   bool            getLMaxNormMode();
00068   void            setLMaxNormMode(const bool);
00069   bool            getLMinNormMode();
00070   void            setLMinNormMode(const bool);
00071   bool            getRMaxNormMode();
00072   void            setRMaxNormMode(const bool);
00073   bool            getRMinNormMode();
00074   void            setRMinNormMode(const bool);
00075 
00076   void            setLegend( bool, int, const QFont&, const QColor& );
00077   bool            isLegendEnabled();
00078   int             getLegendPos();
00079   QFont           getLegendFont();
00080   QColor          getLegendColor();
00081   
00082   void            setMarkerSize( const int );
00083   int             getMarkerSize();
00084 
00085   void            setBackgroundColor( const QColor& );
00086   QColor          getBackgroundColor();
00087 
00088   void            setMajorGrid( bool, const int, bool, const int, bool, const int );
00089   void            getMajorGrid( bool&, int&, bool&, int&, bool&, int& );
00090   void            setMinorGrid( bool, const int, bool, const int, bool, const int );
00091   void            getMinorGrid( bool&, int&, bool&, int&, bool&, int& );
00092 
00093   void            setScaleMode( const int, const int );
00094   int             getXScaleMode();
00095   int             getYScaleMode();
00096 
00097   void            setDeviationMarkerLw( const int);
00098   int             getDeviationMarkerLw() const;
00099 
00100   void            setDeviationMarkerTs( const int);
00101   int             getDeviationMarkerTs() const;
00102 
00103   void            setDeviationMarkerCl( const QColor&);
00104   QColor          getDeviationMarkerCl() const;
00105 
00106   bool            isSetAsDefault();
00107 
00108 protected slots:
00109   void            onMainTitleChecked();
00110   void            onXTitleChecked();
00111   void            onYTitleChecked();
00112   void            onY2TitleChecked();
00113   void            onLegendChecked();
00114   void            onXGridMajorChecked();
00115   void            onYGridMajorChecked();
00116   void            onY2GridMajorChecked();
00117   void            onXGridMinorChecked();
00118   void            onYGridMinorChecked();
00119   void            onY2GridMinorChecked();
00120   void            onNormLMaxChecked();
00121   void            onNormLMinChecked();
00122   void            onNormRMaxChecked();
00123   void            onNormRMinChecked();
00124   void            onHelp();
00125 
00126 private:
00127   QCheckBox*      myTitleCheck;
00128   QLineEdit*      myTitleEdit;
00129   QCheckBox*      myTitleXCheck;
00130   QLineEdit*      myTitleXEdit;
00131   QCheckBox*      myTitleYCheck;
00132   QCheckBox*      myTitleY2Check;
00133   QLineEdit*      myTitleYEdit;
00134   QLineEdit*      myTitleY2Edit;
00135   QtxColorButton* myBackgroundBtn;
00136   QtxColorButton* myLegendColor;
00137   QtxFontEdit*    myLegendFont;
00138   QCheckBox*      myXGridCheck;
00139   QSpinBox*       myXGridSpin;
00140   QCheckBox*      myYGridCheck;
00141   QCheckBox*      myY2GridCheck;
00142   QSpinBox*       myYGridSpin;
00143   QSpinBox*       myY2GridSpin;
00144   QCheckBox*      myXMinGridCheck;
00145   QSpinBox*       myXMinGridSpin;
00146   QCheckBox*      myYMinGridCheck;
00147   QCheckBox*      myY2MinGridCheck;
00148   QSpinBox*       myYMinGridSpin;
00149   QSpinBox*       myY2MinGridSpin;
00150   QComboBox*      myCurveCombo;
00151   QCheckBox*      myLegendCheck;
00152   QComboBox*      myLegendCombo;
00153   QSpinBox*       myMarkerSpin;
00154   QComboBox*      myXModeCombo;
00155   QComboBox*      myYModeCombo;
00156   QCheckBox*      myNormLMaxCheck;
00157   QCheckBox*      myNormLMinCheck;
00158   QCheckBox*      myNormRMaxCheck;
00159   QCheckBox*      myNormRMinCheck;
00160   QComboBox*      myY2ModeCombo;
00161   QCheckBox*      myDefCheck;
00162   QPushButton*    myOkBtn;
00163   QPushButton*    myCancelBtn;
00164   QPushButton*    myHelpBtn;
00165   QSpinBox*       myDeviationLw;
00166   QSpinBox*       myDeviationTs;
00167   QtxColorButton* myDeviationCl;
00168   bool            mySecondAxisY;
00169 };
00170 
00171 #endif // PLOT2D_SETUPVIEWDLG_H