mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-16 01:10:32 +05:00
101 lines
2.8 KiB
C++
101 lines
2.8 KiB
C++
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
|
//
|
|
// 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
|
|
//
|
|
// SMESH SMESHGUI : GUI for SMESH component
|
|
// File : SMESHGUI_Preferences_SelectionDlg.h
|
|
// Author : Natalia KOPNOVA
|
|
// Module : SMESH
|
|
// $Header$
|
|
//
|
|
#ifndef SMESHGUI_PREFERENCES_SELECTIONDLG_H
|
|
#define SMESHGUI_PREFERENCES_SELECTIONDLG_H
|
|
|
|
#include "SMESH_SMESHGUI.hxx"
|
|
|
|
|
|
// QT Includes
|
|
#include <qdialog.h>
|
|
#include <qlineedit.h>
|
|
#include <qvalidator.h>
|
|
|
|
class QPushButton;
|
|
class QSpinBox;
|
|
class QColor;
|
|
class SMESHGUI;
|
|
|
|
class SMESHGUI_EXPORT SMESHGUI_LineEdit : public QLineEdit
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SMESHGUI_LineEdit(QWidget* parent, const char* name = 0);
|
|
SMESHGUI_LineEdit(const QString& text, QWidget* parent, const char* name = 0);
|
|
|
|
~SMESHGUI_LineEdit() {};
|
|
|
|
protected:
|
|
void focusOutEvent(QFocusEvent* e);
|
|
};
|
|
|
|
class SMESHGUI_EXPORT SMESHGUI_DoubleValidator : public QDoubleValidator
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SMESHGUI_DoubleValidator(QObject* parent, const char* name = 0);
|
|
SMESHGUI_DoubleValidator(double bottom, double top, int decimals,
|
|
QObject* parent, const char* name = 0);
|
|
|
|
~SMESHGUI_DoubleValidator() {};
|
|
|
|
void fixup(QString& text) const;
|
|
};
|
|
|
|
class SMESHGUI_EXPORT SMESHGUI_Preferences_SelectionDlg : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SMESHGUI_Preferences_SelectionDlg( SMESHGUI*, const char* name = 0 );
|
|
~SMESHGUI_Preferences_SelectionDlg();
|
|
|
|
void SetColor(int type, QColor color);
|
|
QColor GetColor(int type);
|
|
void SetWidth(int type, int value);
|
|
int GetWidth(int type);
|
|
void SetPrecision(int type, double value);
|
|
double GetPrecision(int type);
|
|
|
|
private:
|
|
void closeEvent( QCloseEvent* e ) ;
|
|
|
|
private slots:
|
|
void onSelectColor();
|
|
|
|
private:
|
|
SMESHGUI* mySMESHGUI;
|
|
QPushButton* myColor[3];
|
|
QSpinBox* myWidth[2];
|
|
QLineEdit* myPrecision[2];
|
|
};
|
|
|
|
#endif // SMESHGUI_PREFERENCES_SELECTIONDLG_H
|