-// GEOM GEOMGUI : GUI for Geometry component
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File : GEOMBase_Skeleton.h
-// Author : Damine COQUERET
-// Module : GEOM
-// $Header$
+// GEOM GEOMGUI : GUI for Geometry component
+// File : GEOMBase_Skeleton.h
+// Author : Damine COQUERET, Open CASCADE S.A.S.
+//
#ifndef GEOMBASE_SKELETON_H
#define GEOMBASE_SKELETON_H
-#include "DlgRef_Skeleton_QTD.h"
-
-#include "GEOMBase.h"
+#include "GEOM_GEOMBase.hxx"
#include "GEOMBase_Helper.h"
-#include "GeometryGUI.h"
-
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMBASE_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMBASE_WNT_EXPORT
-#endif
-
-class GEOMBASE_WNT_EXPORT GEOMBase_Skeleton : public DlgRef_Skeleton_QTD, public GEOMBase_Helper
-{
- Q_OBJECT
+
+#include <QDialog>
+
+class SalomeApp_DoubleSpinBox;
+class GeometryGUI;
+class DlgRef_Skeleton;
+class QSpinBox;
+class QDoubleSpinBox;
+class QLineEdit;
+class QButtonGroup;
+class QPushButton;
+
+#ifndef COORD_MIN
+# define COORD_MIN -1e+15
+# define COORD_MAX +1e+15
+# define MAX_NUMBER 100000
+# define DBL_DIGITS_DISPLAY 16
+#endif // COORD_MIN
+
+class GEOMBASE_EXPORT GEOMBase_Skeleton : public QDialog, public GEOMBase_Helper
+{
+ Q_OBJECT
public:
- GEOMBase_Skeleton(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+ GEOMBase_Skeleton( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
~GEOMBase_Skeleton();
-// int getConstructorId() const; // returns id of a selected "constructor" radio button or '-1' in case of error
-private :
+private:
void Init();
protected:
- void closeEvent(QCloseEvent* e);
+ void initSpinBox( QSpinBox*, int, int, int = 1 );
+ void initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.1, const char* = "length_precision" );
+
+ void updateAttributes( GEOM::GEOM_Object_ptr, const QStringList& );
+
+ void closeEvent( QCloseEvent* );
+ void keyPressEvent( QKeyEvent* );
+
+ /*! initialize "Name" field with a string "thePrefix_X" (Vertex_3)
+ */
+ void initName( const QString& = QString() );
+
+ /*! returns contents of "Name" field
+ */
+ virtual QString getNewObjectName() const;
- void initName( const char* thePrefix = 0 ); // initialize "Name" field with a string "thePrefix_X" (Vertex_3)
- virtual const char* getNewObjectName() const; // returns contents of "Name" field
- int getConstructorId() const; // returns id of a selected "constructor" radio button or '-1' in case of error
+ /*! returns id of a selected "constructor" radio button or '-1' in case of error
+ */
+ int getConstructorId() const;
+ /*! set selected "constructor" radio button id
+ */
+ void setConstructorId( const int );
+ /*! unset selection on all "constructor" radio buttons
+ */
+ void unsetConstructorId();
- QLineEdit* myEditCurrentArgument; /* Current LineEdit */
- GEOMBase* myGeomBase; // SAN -- TO BE REMOVED !!!
- GeometryGUI* myGeomGUI; /* reference GEOM GUI */
+ void showOnlyPreviewControl();
+
+ void setHelpFileName( const QString& );
+
+ DlgRef_Skeleton* mainFrame();
+ QWidget* centralWidget();
+ QPushButton* buttonCancel() const;
+ QPushButton* buttonOk() const;
+ QPushButton* buttonApply() const;
+ QPushButton* buttonHelp() const;
+
+protected:
+ QLineEdit* myEditCurrentArgument; //!< Current LineEdit
+ GeometryGUI* myGeomGUI; //!< reference GEOM GUI
+ QString myHelpFileName; //!< Associated HTML help file name
+
+ QButtonGroup* myRBGroup; //!< radio button group
+ DlgRef_Skeleton* myMainFrame; //!< dialog box's mainframe widgetx
protected slots:
- void ClickOnCancel();
- void LineEditReturnPressed();
- void DeactivateActiveDialog();
- void ActivateThisDialog();
+ virtual void ClickOnCancel();
+ virtual void processPreview();
+ void LineEditReturnPressed();
+ void DeactivateActiveDialog();
+ void ActivateThisDialog();
+ void ClickOnHelp();
+signals:
+ void constructorsClicked( int );
};
#endif // GEOMBASE_SKELETON_H