Version: 9.16.0
StdMeshersGUI_FixedPointsParamWdg.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20// File : StdMeshersGUI_FixedPointsParamWdg.h
21// Author : Open CASCADE S.A.S. (dmv)
22//
23#ifndef STDMESHERSGUI_FIXEDPOINTSPARAMWGD_H
24#define STDMESHERSGUI_FIXEDPOINTSPARAMWGD_H
25
26// SMESH includes
27#include <SMESHGUI.h>
29
30#include <smIdType.hxx>
31
32// Qt includes
33#include <QWidget>
34#include <QStringList>
35
36class SMESHGUI;
38class QPushButton;
39class QLineEdit;
40class QCheckBox;
41class QListWidget;
42class QListWidgetItem;
43class QTreeWidget;
44class QTreeWidgetItem;
45
47{
48 Q_OBJECT
49
50 class LineDelegate;
51
52public:
55
56 bool eventFilter( QObject*, QEvent* );
57
58 SMESH::double_array_var GetListOfPoints();
59 void SetListOfPoints( SMESH::double_array_var );
60
61 SMESH::smIdType_array_var GetListOfSegments();
62 void SetListOfSegments( SMESH::smIdType_array_var );
63
64 QString GetValue() const { return myParamValue; }
65
66private slots:
67 void onAdd();
68 void onRemove();
69 void onCheckBoxChanged();
70 void updateState();
71
72private:
73 void clear();
74 void addPoint( double );
75 void removePoints();
76 double point( int ) const;
77 void setNbSegments( int, SMESH::smIdType );
78 smIdType nbSegments( int ) const;
79
80 static QTreeWidgetItem* newTreeItem( double v1, double v2 );
81 static QListWidgetItem* newListItem( double v1 );
82 static QString treeItemText( double v1, double v2 );
83 static int getParametricPrecision();
84 static bool equalDbl(double a, double b);
85 static bool ltDbl(double a, double b);
86 static bool gtDbl(double a, double b);
87
88private:
89 QListWidget* myListWidget;
92 QPushButton* myAddButton;
93 QPushButton* myRemoveButton;
94 QCheckBox* mySameValues;
95 QString myParamValue;
96};
97
98#endif // STDMESHERSGUI_FIXEDPOINTSPARAMWGD_H
#define STDMESHERSGUI_EXPORT
Definition: SMESH_StdMeshersGUI.hxx:36
Definition: SMESHGUI_SpinBox.h:48
Definition: SMESHGUI.h:84
Definition: StdMeshersGUI_FixedPointsParamWdg.cxx:78
Definition: StdMeshersGUI_FixedPointsParamWdg.h:47
QString GetValue() const
Definition: StdMeshersGUI_FixedPointsParamWdg.h:64
QPushButton * myRemoveButton
Definition: StdMeshersGUI_FixedPointsParamWdg.h:93
QTreeWidget * myTreeWidget
Definition: StdMeshersGUI_FixedPointsParamWdg.h:90
SMESHGUI_SpinBox * mySpinBox
Definition: StdMeshersGUI_FixedPointsParamWdg.h:91
QCheckBox * mySameValues
Definition: StdMeshersGUI_FixedPointsParamWdg.h:94
QString myParamValue
Definition: StdMeshersGUI_FixedPointsParamWdg.h:95
QListWidget * myListWidget
Definition: StdMeshersGUI_FixedPointsParamWdg.h:89
QPushButton * myAddButton
Definition: StdMeshersGUI_FixedPointsParamWdg.h:92