Salome HOME
0014047: EDF PAL 334 : Problem to select merged face with Create group window
[modules/geom.git] / src / GEOMBase / GEOMBase_Skeleton.h
1 // GEOM GEOMGUI : GUI for Geometry component
2 //
3 // Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 // This library is free software; you can redistribute it and/or 
7 // modify it under the terms of the GNU Lesser General Public 
8 // License as published by the Free Software Foundation; either 
9 // version 2.1 of the License. 
10 // 
11 // This library is distributed in the hope that it will be useful, 
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 // Lesser General Public License for more details. 
15 // 
16 // You should have received a copy of the GNU Lesser General Public 
17 // License along with this library; if not, write to the Free Software 
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // File   : GEOMBase_Skeleton.h
23 // Author : Damine COQUERET, Open CASCADE S.A.S.
24 //
25
26 #ifndef GEOMBASE_SKELETON_H
27 #define GEOMBASE_SKELETON_H
28
29 #include "GEOM_GEOMBase.hxx"
30 #include "GEOMBase_Helper.h"
31
32 #include <QDialog>
33
34 class GeometryGUI;
35 class DlgRef_Skeleton;
36 class QSpinBox;
37 class QDoubleSpinBox;
38 class QLineEdit;
39 class QButtonGroup;
40 class QPushButton;
41
42 #ifndef COORD_MIN
43 #  define COORD_MIN -1e+15
44 #  define COORD_MAX +1e+15
45 #  define MAX_NUMBER 100000
46 #  define DBL_DIGITS_DISPLAY 16
47 #endif // COORD_MIN
48
49 class GEOMBASE_EXPORT GEOMBase_Skeleton : public QDialog, public GEOMBase_Helper
50 {
51   Q_OBJECT
52
53 public:
54     GEOMBase_Skeleton( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
55     ~GEOMBase_Skeleton();
56
57 private:
58     void Init();
59
60 protected:
61     void                initSpinBox( QSpinBox*, int, int, int = 1 );
62     void                initSpinBox( QDoubleSpinBox*, double, double, double = 0.1, int = 3 );
63     
64     void                closeEvent( QCloseEvent* );
65     void                keyPressEvent( QKeyEvent* );
66
67     /*! initialize "Name" field with a string "thePrefix_X" (Vertex_3)
68      */
69     void                initName( const QString& = QString() );
70
71     /*! returns contents of "Name" field
72      */
73     virtual QString getNewObjectName() const;
74
75     /*! returns id of a selected "constructor" radio button or '-1' in case of error
76      */
77     int                 getConstructorId() const;
78     /*! set selected "constructor" radio button id
79      */
80     void                setConstructorId( const int );
81
82     void                setHelpFileName( const QString& );
83
84     DlgRef_Skeleton*    mainFrame();
85     QWidget*            centralWidget();
86     QPushButton*        buttonCancel() const;
87     QPushButton*        buttonOk() const;
88     QPushButton*        buttonApply() const;
89     QPushButton*        buttonHelp() const;
90
91 protected:
92     QLineEdit*          myEditCurrentArgument; //!< Current LineEdit
93     GeometryGUI*        myGeomGUI;             //!< reference GEOM GUI
94     QString             myHelpFileName;        //!< Associated HTML help file name
95     
96     QButtonGroup*       myRBGroup;             //!< radio button group
97     DlgRef_Skeleton*    myMainFrame;           //!< dialog box's mainframe widgetx
98
99 protected slots:
100     virtual void        ClickOnCancel();
101     void                LineEditReturnPressed();
102     void                DeactivateActiveDialog();
103     void                ActivateThisDialog();
104     void                ClickOnHelp();
105
106 signals:
107     void                constructorsClicked( int );
108 };
109
110 #endif // GEOMBASE_SKELETON_H