1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: CurveCreator_Widget.h
24 // Created: Mon Jul 01 12:49:21 2013
25 // Author: Sergey KHROMOV
28 #ifndef _CurveCreator_Widget_HeaderFile
29 #define _CurveCreator_Widget_HeaderFile
33 #include <CurveCreator_CurveEditor.hxx>
35 class CurveCreator_Curve;
43 class QListWidgetItem;
44 class CurveCreator_EditPntsWidget;
45 class CurveCreator_EditPntDlg;
46 class CurveCreator_UndoOptsDlg;
49 class CurveCreator_Widget : public QWidget
55 CurveCreator_Widget(QWidget* parent,
56 CurveCreator_Curve *theCurve,
57 Qt::WindowFlags fl = 0);
65 void addSectionItem(const CurveCreator::Type theType, const bool isClosed);
67 void updateSectionItem(const int theRow, const CurveCreator::Type theType,
70 void sectionMove(const int theShift);
72 void initPoints(const int theSectionIndex);
74 int getCurrentSectionIndex();
76 void updateUndoRedo();
78 void updateUndoRedoButtons();
84 void undoOptionsChanged();
86 void sectionAddOrModify();
88 void addModifChanged(int theId);
90 void changeSecSelection();
96 void sectionJoinAll();
104 void onNumberOfItemsChanged(QListWidget *theListWidget);
106 void changePntsSelection();
108 void editPnt(QListWidgetItem *theItem);
122 void numberOfItemsChanged(QListWidget *theListWidget);
126 CurveCreator_CurveEditor myEditor;
127 CurveCreator::Dimension myDimension;
129 QLabel *myEnabledUndoLbl;
130 QLabel *myBufSizeUndoLbl;
131 QPushButton *myUndoBtn;
132 QPushButton *myRedoBtn;
133 QPushButton *myUndoOptsBtn;
134 CurveCreator_UndoOptsDlg *myUndoOptsDlg;
136 QGroupBox *myAddSecGrp;
137 QButtonGroup *mySecBtnGrp;
138 QComboBox *mySecTypeCmbBox;
139 QCheckBox *mySecCloseChkBox;
140 QPushButton *mySecAddModifBtn;
141 QPushButton *mySecRmBtn;
142 QPushButton *mySecJoinBtn;
143 QPushButton *mySecJoinAllBtn;
144 QPushButton *mySecClearBtn;
145 QPushButton *mySecUpBtn;
146 QPushButton *mySecDownBtn;
147 QListWidget *mySecList;
148 CurveCreator_EditPntsWidget *myEditSecPnts;
150 QGroupBox *myPntsGrp;
151 QListWidget *myPntsList;
152 CurveCreator_EditPntDlg *myPntEditDlg;
153 CurveCreator_EditPntsWidget *myEditPnts;
154 QPushButton *myAddPntsBtn;
155 QPushButton *myInsertPntsBtn;
156 QPushButton *myRmPntsBtn;