2014-02-18 12:44:41 +06:00
|
|
|
// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// 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
|
2014-02-18 12:44:41 +06:00
|
|
|
// version 2.1 of the License, or (at your option) any later version.
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// 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.
|
2009-02-13 17:16:39 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// 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
|
2009-02-13 17:16:39 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2013-04-01 18:25:01 +06:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
// GEOM GEOMGUI : GUI for Geometry component
|
|
|
|
// File : GEOMBase_Skeleton.h
|
|
|
|
// Author : Damine COQUERET, Open CASCADE S.A.S.
|
2013-02-12 17:35:16 +06:00
|
|
|
|
2004-01-07 20:46:21 +05:00
|
|
|
#ifndef GEOMBASE_SKELETON_H
|
|
|
|
#define GEOMBASE_SKELETON_H
|
|
|
|
|
2008-03-07 12:45:34 +05:00
|
|
|
#include "GEOM_GEOMBase.hxx"
|
2004-12-01 15:39:14 +05:00
|
|
|
#include "GEOMBase_Helper.h"
|
2004-01-07 20:46:21 +05:00
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
#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
|
2006-05-06 14:44:32 +06:00
|
|
|
{
|
2009-02-13 17:16:39 +05:00
|
|
|
Q_OBJECT
|
2004-01-07 20:46:21 +05:00
|
|
|
|
|
|
|
public:
|
2009-02-13 17:16:39 +05:00
|
|
|
GEOMBase_Skeleton( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
|
2004-01-07 20:46:21 +05:00
|
|
|
~GEOMBase_Skeleton();
|
|
|
|
|
2006-05-06 14:44:32 +06:00
|
|
|
private:
|
2005-06-02 13:17:09 +06:00
|
|
|
void Init();
|
2004-01-07 20:46:21 +05:00
|
|
|
|
|
|
|
protected:
|
2009-02-13 17:16:39 +05:00
|
|
|
void initSpinBox( QSpinBox*, int, int, int = 1 );
|
2012-08-09 13:58:02 +06:00
|
|
|
void initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.1, const char* = "length_precision" );
|
2009-02-13 17:16:39 +05:00
|
|
|
|
|
|
|
void updateAttributes( GEOM::GEOM_Object_ptr, const QStringList& );
|
|
|
|
|
|
|
|
void closeEvent( QCloseEvent* );
|
|
|
|
void keyPressEvent( QKeyEvent* );
|
2004-01-07 20:46:21 +05:00
|
|
|
|
2006-05-06 14:44:32 +06:00
|
|
|
/*! initialize "Name" field with a string "thePrefix_X" (Vertex_3)
|
|
|
|
*/
|
2009-02-13 17:16:39 +05:00
|
|
|
void initName( const QString& = QString() );
|
2004-12-01 15:39:14 +05:00
|
|
|
|
2006-05-06 14:44:32 +06:00
|
|
|
/*! returns contents of "Name" field
|
|
|
|
*/
|
2013-02-12 17:35:16 +06:00
|
|
|
virtual QString getNewObjectName (int CurrObj = -1) const;
|
2006-05-06 14:44:32 +06:00
|
|
|
|
|
|
|
/*! returns id of a selected "constructor" radio button or '-1' in case of error
|
|
|
|
*/
|
2009-02-13 17:16:39 +05:00
|
|
|
int getConstructorId() const;
|
|
|
|
/*! set selected "constructor" radio button id
|
|
|
|
*/
|
|
|
|
void setConstructorId( const int );
|
2012-08-09 13:58:02 +06:00
|
|
|
/*! unset selection on all "constructor" radio buttons
|
|
|
|
*/
|
|
|
|
void unsetConstructorId();
|
2006-05-06 14:44:32 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
void showOnlyPreviewControl();
|
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
void setHelpFileName( const QString& );
|
2006-05-06 14:44:32 +06:00
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
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
|
2004-01-07 20:46:21 +05:00
|
|
|
|
|
|
|
protected slots:
|
2009-02-13 17:16:39 +05:00
|
|
|
virtual void ClickOnCancel();
|
2012-08-09 13:58:02 +06:00
|
|
|
virtual void processPreview();
|
2009-02-13 17:16:39 +05:00
|
|
|
void LineEditReturnPressed();
|
|
|
|
void DeactivateActiveDialog();
|
|
|
|
void ActivateThisDialog();
|
|
|
|
void ClickOnHelp();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void constructorsClicked( int );
|
2004-01-07 20:46:21 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GEOMBASE_SKELETON_H
|