X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSVTK%2FSVTK_CubeAxesDlg.h;h=a2fc6f618f47f1a35993f576251354d1ea62ce29;hb=4444aae1f5322eae93be1257dcad646596a4b032;hp=642306084f6c0e935ffa8ebbe7d57a7b05d0da43;hpb=101fd10f1e736daa5d7f0f0ee5499b951460832a;p=modules%2Fgui.git diff --git a/src/SVTK/SVTK_CubeAxesDlg.h b/src/SVTK/SVTK_CubeAxesDlg.h index 642306084..a2fc6f618 100644 --- a/src/SVTK/SVTK_CubeAxesDlg.h +++ b/src/SVTK/SVTK_CubeAxesDlg.h @@ -1,142 +1,84 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SVTK_CubeAxesDlg.h // Author : Sergey LITONIN // Module : VISU - - +// #ifndef SVTK_CubeAxesDlg_H #define SVTK_CubeAxesDlg_H -#include -#include +#include "SVTK.h" -class QWidget; -class QFrame; -class QPushButton; -class QTabWidget; -class QCheckBox; -class QLineEdit; -class QGroupBox; +#include -class QtxAction; -class QtxIntSpinBox; - -class vtkAxisActor2D; +class SVTK_ViewWindow; class SVTK_CubeAxesActor2D; -class SVTK_FontWidget; -class SVTK_AxisWidget; -class SVTK_MainWindow; +class vtkAxisActor2D; /*! - * Class : SVTK_CubeAxesDlg - * Description : Dialog for specifynig cube axes properties - */ -class SVTK_CubeAxesDlg : public QDialog + * Class : SVTK_AxisWidget + * Description : Axis tab widget of the "Graduated axis" dialog box +*/ +class SVTK_EXPORT SVTK_AxisWidget : public ViewerTools_AxisWidgetBase { - Q_OBJECT - public: - SVTK_CubeAxesDlg(SVTK_MainWindow* theParent, - const char* theName, - QtxAction* theAction); - virtual ~SVTK_CubeAxesDlg(); + SVTK_AxisWidget( QWidget* ); + ~SVTK_AxisWidget(); - void Update(); - -private slots: - void onOk(); - bool onApply(); - void onClose(); - - virtual void done( int ); - -private: - QWidget* createButtonFrame( QWidget* ); - QWidget* createMainFrame ( QWidget* ); - bool isValid() const; - -private: - SVTK_MainWindow *myMainWindow; - SVTK_CubeAxesActor2D* myActor; - QtxAction* myAction; - - QTabWidget* myTabWg; - QCheckBox* myIsVisible; +public: + bool ReadData( vtkAxisActor2D* ); + bool Apply( vtkAxisActor2D* ); - QPushButton* myOkBtn; - QPushButton* myApplyBtn; - QPushButton* myCloseBtn; - SVTK_AxisWidget* myAxes[ 3 ]; +protected: + virtual ViewerTools_FontWidgetBase* createFontWidget( QWidget* ); }; /*! - * Class : SVTK_AxisWidget - * Description : Tab of dialog + * Class : SVTK_CubeAxesDlg + * Description : Dialog for specifynig cube axes properties */ -class SVTK_AxisWidget : public QFrame +class SVTK_EXPORT SVTK_CubeAxesDlg : public ViewerTools_CubeAxesDlgBase { Q_OBJECT public: - SVTK_AxisWidget( QWidget* ); - ~SVTK_AxisWidget(); + SVTK_CubeAxesDlg(QtxAction* theAction, + SVTK_ViewWindow* theParent, + const char* theName); + virtual ~SVTK_CubeAxesDlg(); - void UseName( const bool ); - void SetName( const QString& ); - void SetNameFont( const QColor&, const int, const bool, const bool, const bool ); - bool ReadData( vtkAxisActor2D* ); - bool Apply( vtkAxisActor2D* ); + virtual void Update(); private slots: - void onNameChecked(); - void onLabelsChecked(); - void onTicksChecked(); + virtual bool onApply(); private: - void updateControlState(); - void setEnabled( QGroupBox*, const bool ); + virtual ViewerTools_AxisWidgetBase* createAxisWidget( QWidget* ); private: - // name - QGroupBox* myNameGrp; - QCheckBox* myIsNameVisible; - QLineEdit* myAxisName; - SVTK_FontWidget* myNameFont; - - // labels - QGroupBox* myLabelsGrp; - QCheckBox* myIsLabelsVisible; - QtxIntSpinBox* myLabelNumber; - QtxIntSpinBox* myLabelOffset; - SVTK_FontWidget* myLabelsFont; - - // tick marks - QGroupBox* myTicksGrp; - QCheckBox* myIsTicksVisible; - QtxIntSpinBox* myTickLength; - - friend class SVTK_CubeAxesDlg; + SVTK_ViewWindow* myMainWindow; + SVTK_CubeAxesActor2D* myActor; }; #endif