Back to index

salome-geom  6.5.0
GEOMBase_Skeleton.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // GEOM GEOMGUI : GUI for Geometry component
00024 // File   : GEOMBase_Skeleton.h
00025 // Author : Damine COQUERET, Open CASCADE S.A.S.
00026 //
00027 #ifndef GEOMBASE_SKELETON_H
00028 #define GEOMBASE_SKELETON_H
00029 
00030 #include "GEOM_GEOMBase.hxx"
00031 #include "GEOMBase_Helper.h"
00032 
00033 #include <QDialog>
00034 
00035 class SalomeApp_DoubleSpinBox;
00036 class GeometryGUI;
00037 class DlgRef_Skeleton;
00038 class QSpinBox;
00039 class QDoubleSpinBox;
00040 class QLineEdit;
00041 class QButtonGroup;
00042 class QPushButton;
00043 
00044 #ifndef COORD_MIN
00045 #  define COORD_MIN -1e+15
00046 #  define COORD_MAX +1e+15
00047 #  define MAX_NUMBER 100000
00048 #  define DBL_DIGITS_DISPLAY 16
00049 #endif // COORD_MIN
00050 
00051 class GEOMBASE_EXPORT GEOMBase_Skeleton : public QDialog, public GEOMBase_Helper
00052 {
00053   Q_OBJECT
00054 
00055 public:
00056     GEOMBase_Skeleton( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
00057     ~GEOMBase_Skeleton();
00058 
00059 private:
00060     void Init();
00061 
00062 protected:
00063     void                initSpinBox( QSpinBox*, int, int, int = 1 );
00064     void                initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.1, const char* = "length_precision" );
00065     
00066     void                updateAttributes( GEOM::GEOM_Object_ptr, const QStringList& );
00067 
00068     void                closeEvent( QCloseEvent* );
00069     void                keyPressEvent( QKeyEvent* );
00070 
00073     void                initName( const QString& = QString() );
00074 
00077     virtual QString getNewObjectName() const;
00078 
00081     int                 getConstructorId() const;
00084     void                setConstructorId( const int );
00087     void                unsetConstructorId();
00088 
00089     void                showOnlyPreviewControl();
00090     
00091     void                setHelpFileName( const QString& );
00092 
00093     DlgRef_Skeleton*    mainFrame();
00094     QWidget*            centralWidget();
00095     QPushButton*        buttonCancel() const;
00096     QPushButton*        buttonOk() const;
00097     QPushButton*        buttonApply() const;
00098     QPushButton*        buttonHelp() const;
00099 
00100 protected:
00101     QLineEdit*          myEditCurrentArgument; 
00102     GeometryGUI*        myGeomGUI;             
00103     QString             myHelpFileName;        
00104     
00105     QButtonGroup*       myRBGroup;             
00106     DlgRef_Skeleton*    myMainFrame;           
00107 
00108 protected slots:
00109     virtual void        ClickOnCancel();
00110     virtual void        processPreview();
00111     void                LineEditReturnPressed();
00112     void                DeactivateActiveDialog();
00113     void                ActivateThisDialog();
00114     void                ClickOnHelp();
00115 
00116 signals:
00117     void                constructorsClicked( int );
00118 };
00119 
00120 #endif // GEOMBASE_SKELETON_H