1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef HYDROGUI_PROFILEDLG_H
20 #define HYDROGUI_PROFILEDLG_H
22 #include "HYDROGUI_ViewerDlg.h"
24 #include <AIS_InteractiveContext.hxx>
27 class CurveCreator_Widget;
28 class CurveCreator_ICurve;
29 class OCCViewer_ViewManager;
30 class SUIT_ViewWindow;
35 class HYDROGUI_CurveCreatorProfile;
36 class HYDROData_SequenceOfObjects;
37 class QListWidgetItem;
39 class HYDROGUI_ProfileDlg : public HYDROGUI_ViewerDlg
44 HYDROGUI_ProfileDlg( HYDROGUI_Module* theModule, const QString& theTitle, bool theSingleProfileMode );
45 virtual ~HYDROGUI_ProfileDlg();
47 void setProfileName( const QString& theName );
48 void addProfileName( const QString& theName, const QColor& theColor );
49 void eraseProfile( int index );
50 QStringList getProfileNames() const;
52 void setProfile( CurveCreator_ICurve* theProfile );
53 void setProfilesPointer(std::vector<HYDROGUI_CurveCreatorProfile*>* theProfilesPointer);
54 void switchToFirstProfile();
55 //void SetSingleProfileMode(bool SingleMode);
56 //bool GetSingleProfileMode() const;
57 void SwitchToProfile(int theIndex);
58 void BlockProfileNameSignals(bool state);
59 int GetProfileSelectionIndex();
63 QList<int> getSelectedSections();
65 void deleteSelected();
69 void processStartedSubOperation( QWidget*, bool );
70 void processFinishedSubOperation( QWidget* );
71 void ProfileNameChanged(QString);
72 void onProfileIndexChanged();
73 void onAddBtnPressed(bool);
74 void onRemoveBtnPressed(bool);
75 void onProfileNameChanged(QListWidgetItem* item);
78 void createPreview( QString );
79 void selectionChanged();
80 void widgetCreated(QWidget*);
81 void subOperationStarted(QWidget*);
82 void subOperationFinished(QWidget*);
84 void RemoveProfile(int);
87 virtual Handle(AIS_Trihedron) trihedron();
91 QListWidget* myProfileNames;
92 QPushButton* myAddProfBtn;
93 QPushButton* myRemProfBtn;
95 CurveCreator_Widget* myEditorWidget;
96 QGroupBox* myAddElementBox;
97 std::vector<HYDROGUI_CurveCreatorProfile*>* myProfilesPointer;
100 QString myCurrentName;