Back to index

salome-gui  6.5.0
Plot2d_FitDataDlg.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 #ifndef PLOT2D_FITDATADLG_H
00024 #define PLOT2D_FITDATADLG_H
00025 
00026 #include "Plot2d.h"
00027 #include <QDialog>
00028 
00029 class QGroupBox;
00030 class QRadioButton;
00031 class QLineEdit;
00032 class QPushButton;
00033 
00034 class PLOT2D_EXPORT Plot2d_FitDataDlg : public QDialog
00035 {
00036   Q_OBJECT
00037 
00038 public:
00039 // constuctor
00040   Plot2d_FitDataDlg( QWidget* parent, bool secondAxisY );
00041 
00042 // sets range
00043   void setRange(const double xMin, 
00044                 const double xMax,
00045                 const double yMin,
00046                 const double yMax,
00047                 const double y2Min = 0,
00048                 const double y2Max = 0);
00049 // gets range, returns mode (see getMode())
00050   int getRange(double& xMin, 
00051                double& xMax,
00052                double& yMin,
00053                double& yMax,
00054                double& y2Min,
00055                double& y2Max);
00056 // gets mode : 0 - Fit all; 1 - Fit horizontal, 2 - Fit vertical
00057   int getMode();
00058 
00059 protected slots:
00060 // called when range mode changed
00061   void onModeChanged(int);
00062 
00063 private:
00064   QGroupBox*              myRangeGrp;
00065   QRadioButton*           myModeAllRB;
00066   QRadioButton*           myModeHorRB;
00067   QRadioButton*           myModeVerRB;
00068   QLineEdit*              myXMinEdit;
00069   QLineEdit*              myYMinEdit;
00070   QLineEdit*              myY2MinEdit;
00071   QLineEdit*              myXMaxEdit;
00072   QLineEdit*              myYMaxEdit;
00073   QLineEdit*              myY2MaxEdit;
00074   QPushButton*            myOkBtn;
00075   QPushButton*            myCancelBtn;
00076   bool                    mySecondAxisY;
00077 };
00078 
00079 #endif