1 // Copyright (C) 2009-2014 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, or (at your option) any later version.
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 "HEXABLOCKGUI_Export.hxx"
\r
25 #include "HEXABLOCKGUI_OccGraphicView.hxx"
26 #include "HEXABLOCKGUI.hxx"
27 #include "HEXABLOCKGUI_DocumentPanel.hxx"
31 class SalomeApp_DoubleSpinBox;
32 class MyDlgRef_Skeleton;
40 # define COORD_MIN -1e+12
41 # define COORD_MAX +1e+12
42 # define MAX_NUMBER 100000
43 # define DBL_DIGITS_DISPLAY 13
51 class HEXABLOCK_EXPORT MyGEOMBase_Skeleton : public HexaBaseDialog
56 MyGEOMBase_Skeleton( QWidget* = 0, Qt::WindowFlags = 0 );
57 ~MyGEOMBase_Skeleton();
63 virtual bool apply(QModelIndex& result) = 0;
64 virtual void _initInputWidget( Mode editmode ) = 0;
65 void initSpinBox( QSpinBox*, int, int, int = 1 );
66 void initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.01,
67 const char* = "length_precision", unsigned int decimals = 6 );
69 void closeEvent( QCloseEvent* );
71 /*! returns id of a selected "constructor" radio button or '-1' in case of error
73 int getConstructorId() const;
74 /*! set selected "constructor" radio button id
76 void setConstructorId( const int );
77 /*! unset selection on all "constructor" radio buttons
79 void unsetConstructorId();
81 void showOnlyPreviewControl();
83 MyDlgRef_Skeleton* mainFrame();
84 QWidget* centralWidget();
87 QLineEdit* myEditCurrentArgument; //!< Current LineEdit
89 QButtonGroup* myRBGroup; //!< radio button group
90 MyDlgRef_Skeleton* myMainFrame; //!< dialog box's mainframe widgetx
93 void constructorsClicked( int );
99 #endif // MYGEOMBASE_SKELETON_H