smesh/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.h

101 lines
2.8 KiB
C
Raw Normal View History

2008-11-27 18:08:54 +05:00
// 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.
2004-06-18 14:34:31 +06:00
//
2008-11-27 18:08:54 +05: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.
2004-06-18 14:34:31 +06:00
//
2008-11-27 18:08:54 +05: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
2004-06-18 14:34:31 +06:00
//
2008-11-27 18:08:54 +05:00
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
2004-06-18 14:34:31 +06:00
//
2008-11-27 18:08:54 +05:00
// SMESH SMESHGUI : GUI for SMESH component
2004-06-18 14:34:31 +06:00
// File : SMESHGUI_Preferences_SelectionDlg.h
// Author : Natalia KOPNOVA
// Module : SMESH
// $Header$
2008-11-27 18:08:54 +05:00
//
2004-06-18 14:34:31 +06:00
#ifndef SMESHGUI_PREFERENCES_SELECTIONDLG_H
#define SMESHGUI_PREFERENCES_SELECTIONDLG_H
#include "SMESH_SMESHGUI.hxx"
2004-06-18 14:34:31 +06:00
// QT Includes
#include <qdialog.h>
#include <qlineedit.h>
#include <qvalidator.h>
class QPushButton;
class QSpinBox;
class QColor;
2005-06-08 16:45:19 +06:00
class SMESHGUI;
2004-06-18 14:34:31 +06:00
class SMESHGUI_EXPORT SMESHGUI_LineEdit : public QLineEdit
2004-06-18 14:34:31 +06:00
{
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
2004-06-18 14:34:31 +06:00
{
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
2004-06-18 14:34:31 +06:00
{
Q_OBJECT
public:
2005-06-08 16:45:19 +06:00
SMESHGUI_Preferences_SelectionDlg( SMESHGUI*, const char* name = 0 );
2004-06-18 14:34:31 +06:00
~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:
2005-06-08 16:45:19 +06:00
SMESHGUI* mySMESHGUI;
2004-06-18 14:34:31 +06:00
QPushButton* myColor[3];
QSpinBox* myWidth[2];
QLineEdit* myPrecision[2];
};
#endif // SMESHGUI_PREFERENCES_SELECTIONDLG_H