1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SVTK_CubeAxesDlg.h
23 // Author : Sergey LITONIN
27 #ifndef SVTK_CubeAxesDlg_H
28 #define SVTK_CubeAxesDlg_H
44 class SVTK_CubeAxesActor2D;
46 class SVTK_FontWidget;
47 class SVTK_AxisWidget;
48 class SVTK_MainWindow;
51 * Class : SVTK_CubeAxesDlg
52 * Description : Dialog for specifynig cube axes properties
54 class SVTK_CubeAxesDlg : public QDialog
59 SVTK_CubeAxesDlg(SVTK_MainWindow* theParent,
61 QtxAction* theAction);
62 virtual ~SVTK_CubeAxesDlg();
71 virtual void done( int );
74 QWidget* createButtonFrame( QWidget* );
75 QWidget* createMainFrame ( QWidget* );
79 SVTK_MainWindow *myMainWindow;
80 SVTK_CubeAxesActor2D* myActor;
84 QCheckBox* myIsVisible;
87 QPushButton* myApplyBtn;
88 QPushButton* myCloseBtn;
89 SVTK_AxisWidget* myAxes[ 3 ];
93 * Class : SVTK_AxisWidget
94 * Description : Tab of dialog
96 class SVTK_AxisWidget : public QFrame
101 SVTK_AxisWidget( QWidget* );
104 void UseName( const bool );
105 void SetName( const QString& );
106 void SetNameFont( const QColor&, const int, const bool, const bool, const bool );
107 bool ReadData( vtkAxisActor2D* );
108 bool Apply( vtkAxisActor2D* );
111 bool eventFilter(QObject*, QEvent*);
114 void onNameChecked();
115 void onLabelsChecked();
116 void onTicksChecked();
119 void updateControlState();
120 void setEnabled( QGroupBox*, const bool );
124 QGroupBox* myNameGrp;
125 QCheckBox* myIsNameVisible;
126 QLineEdit* myAxisName;
127 SVTK_FontWidget* myNameFont;
130 QGroupBox* myLabelsGrp;
131 QCheckBox* myIsLabelsVisible;
132 QLineEdit* myLabelNumber;
133 QLineEdit* myLabelOffset;
134 SVTK_FontWidget* myLabelsFont;
137 QGroupBox* myTicksGrp;
138 QCheckBox* myIsTicksVisible;
139 QLineEdit* myTickLength;
141 friend class SVTK_CubeAxesDlg;