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
45 class SVTK_CubeAxesActor2D;
47 class SVTK_FontWidget;
48 class SVTK_AxisWidget;
49 class SVTK_MainWindow;
52 * Class : SVTK_CubeAxesDlg
53 * Description : Dialog for specifynig cube axes properties
55 class SVTK_CubeAxesDlg : public QDialog
60 SVTK_CubeAxesDlg(SVTK_MainWindow* theParent,
62 QtxAction* theAction);
63 virtual ~SVTK_CubeAxesDlg();
72 virtual void done( int );
75 QWidget* createButtonFrame( QWidget* );
76 QWidget* createMainFrame ( QWidget* );
80 SVTK_MainWindow *myMainWindow;
81 SVTK_CubeAxesActor2D* myActor;
85 QCheckBox* myIsVisible;
88 QPushButton* myApplyBtn;
89 QPushButton* myCloseBtn;
90 SVTK_AxisWidget* myAxes[ 3 ];
94 * Class : SVTK_AxisWidget
95 * Description : Tab of dialog
97 class SVTK_AxisWidget : public QFrame
102 SVTK_AxisWidget( QWidget* );
105 void UseName( const bool );
106 void SetName( const QString& );
107 void SetNameFont( const QColor&, const int, const bool, const bool, const bool );
108 bool ReadData( vtkAxisActor2D* );
109 bool Apply( vtkAxisActor2D* );
112 void onNameChecked();
113 void onLabelsChecked();
114 void onTicksChecked();
117 void updateControlState();
118 void setEnabled( QGroupBox*, const bool );
122 QGroupBox* myNameGrp;
123 QCheckBox* myIsNameVisible;
124 QLineEdit* myAxisName;
125 SVTK_FontWidget* myNameFont;
128 QGroupBox* myLabelsGrp;
129 QCheckBox* myIsLabelsVisible;
130 QtxIntSpinBox* myLabelNumber;
131 QtxIntSpinBox* myLabelOffset;
132 SVTK_FontWidget* myLabelsFont;
135 QGroupBox* myTicksGrp;
136 QCheckBox* myIsTicksVisible;
137 QtxIntSpinBox* myTickLength;
139 friend class SVTK_CubeAxesDlg;