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"
25 #include "HEXABLOCKGUI_OccGraphicView.hxx"
26 #include "HEXABLOCKGUI.hxx"
30 class SalomeApp_DoubleSpinBox;
32 class MyDlgRef_Skeleton;
40 # define COORD_MIN -1e+15
41 # define COORD_MAX +1e+15
42 # define MAX_NUMBER 100000
43 # define DBL_DIGITS_DISPLAY 16
46 class GEOMBASE_EXPORT MyGEOMBase_Skeleton : public QDialog, public MyGEOMBase_Helper
51 MyGEOMBase_Skeleton( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
52 ~MyGEOMBase_Skeleton();
58 void initSpinBox( QSpinBox*, int, int, int = 1 );
59 void initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.1, const char* = "length_precision" );
61 void updateAttributes( GEOM::GEOM_Object_ptr, const QStringList& );
63 void closeEvent( QCloseEvent* );
64 void keyPressEvent( QKeyEvent* );
66 /*! initialize "Name" field with a string "thePrefix_X" (Vertex_3)
68 void initName( const QString& = QString() );
70 /*! returns contents of "Name" field
72 virtual QString getNewObjectName() const;
74 /*! returns id of a selected "constructor" radio button or '-1' in case of error
76 int getConstructorId() const;
77 /*! set selected "constructor" radio button id
79 void setConstructorId( const int );
80 /*! unset selection on all "constructor" radio buttons
82 void unsetConstructorId();
84 void showOnlyPreviewControl();
86 void setHelpFileName( const QString& );
88 MyDlgRef_Skeleton* mainFrame();
89 QWidget* centralWidget();
90 QPushButton* buttonCancel() const;
91 //QPushButton* buttonOk() const;
92 QPushButton* buttonApply() const;
93 QPushButton* buttonHelp() const;
96 QLineEdit* myEditCurrentArgument; //!< Current LineEdit
97 GeometryGUI* myGeomGUI; //!< reference GEOM GUI
98 QString myHelpFileName; //!< Associated HTML help file name
100 QButtonGroup* myRBGroup; //!< radio button group
101 MyDlgRef_Skeleton* myMainFrame; //!< dialog box's mainframe widgetx
104 virtual void close();
107 virtual void processPreview();
108 void LineEditReturnPressed();
109 void DeactivateActiveDialog();
110 void ActivateThisDialog();
114 void constructorsClicked( int );
117 #endif // MYGEOMBASE_SKELETON_H