1 // Copyright (C) 2009-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef MYGEOMBASE_SKELETON_H
21 #define MYGEOMBASE_SKELETON_H
23 #include "GEOM_GEOMBase.hxx"
24 #include "MyGEOMBase_Helper.hxx"
28 class SalomeApp_DoubleSpinBox;
30 class MyDlgRef_Skeleton;
38 # define COORD_MIN -1e+15
39 # define COORD_MAX +1e+15
40 # define MAX_NUMBER 100000
41 # define DBL_DIGITS_DISPLAY 16
44 class GEOMBASE_EXPORT MyGEOMBase_Skeleton : public QDialog, public MyGEOMBase_Helper
49 MyGEOMBase_Skeleton( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
50 ~MyGEOMBase_Skeleton();
56 void initSpinBox( QSpinBox*, int, int, int = 1 );
57 void initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.1, const char* = "length_precision" );
59 void updateAttributes( GEOM::GEOM_Object_ptr, const QStringList& );
61 void closeEvent( QCloseEvent* );
62 void keyPressEvent( QKeyEvent* );
64 /*! initialize "Name" field with a string "thePrefix_X" (Vertex_3)
66 void initName( const QString& = QString() );
68 /*! returns contents of "Name" field
70 virtual QString getNewObjectName() const;
72 /*! returns id of a selected "constructor" radio button or '-1' in case of error
74 int getConstructorId() const;
75 /*! set selected "constructor" radio button id
77 void setConstructorId( const int );
78 /*! unset selection on all "constructor" radio buttons
80 void unsetConstructorId();
82 void showOnlyPreviewControl();
84 void setHelpFileName( const QString& );
86 MyDlgRef_Skeleton* mainFrame();
87 QWidget* centralWidget();
88 QPushButton* buttonCancel() const;
89 //QPushButton* buttonOk() const;
90 QPushButton* buttonApply() const;
91 QPushButton* buttonHelp() const;
94 QLineEdit* myEditCurrentArgument; //!< Current LineEdit
95 GeometryGUI* myGeomGUI; //!< reference GEOM GUI
96 QString myHelpFileName; //!< Associated HTML help file name
98 QButtonGroup* myRBGroup; //!< radio button group
99 MyDlgRef_Skeleton* myMainFrame; //!< dialog box's mainframe widgetx
102 virtual void ClickOnCancel();
103 virtual void processPreview();
104 void LineEditReturnPressed();
105 void DeactivateActiveDialog();
106 void ActivateThisDialog();
110 void constructorsClicked( int );
113 #endif // MYGEOMBASE_SKELETON_H