1 // Copyright (C) 2009-2013 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __HEXABLOCKGUI_DOCUMENTPANEL_HXX_
20 #define __HEXABLOCKGUI_DOCUMENTPANEL_HXX_
24 # if defined HEXABLOCKGUI_DOCUMENTPANEL_EXPORT || defined HexablockGui_DocumentPanel_EXPORTS
25 # define HEXABLOCKGUI_DOCUMENTPANEL_EXPORT __declspec( dllexport )
27 # define HEXABLOCKGUI_DOCUMENTPANEL_EXPORT __declspec( dllimport )
30 # define HEXABLOCKGUI_DOCUMENTPANEL_EXPORT
34 #define MAX_WIDTH 16777215
35 #define MAX_HEIGHT 16777215
40 #include <QDockWidget>
42 #include "ui_Vertex_QTD.h"
43 #include "ui_Quad_QTD.h"
44 #include "ui_Edge_QTD.h"
45 #include "ui_Hexa_QTD.h"
47 #include "ui_Vector_QTD.h"
48 #include "ui_Cylinder_QTD.h"
49 #include "ui_Pipe_QTD.h"
50 #include "ui_MakeGrid_QTD.h"
51 #include "ui_MakePipe_QTD.h"
52 #include "ui_MakeCylinder_QTD.h"
53 #include "ui_MakeCylinders_QTD.h"
54 #include "ui_MakePipes_QTD.h"
55 #include "ui_RemoveHexa_QTD.h"
56 #include "ui_PrismQuad_QTD.h"
57 #include "ui_JoinQuad_QTD.h"
58 #include "ui_Merge_QTD.h"
59 #include "ui_Disconnect_QTD.h"
60 #include "ui_CutEdge_QTD.h"
61 #include "ui_Transformation_QTD.h"
62 #include "ui_Symmetry_QTD.h"
64 #include "ui_EdgeAssoc_QTD.h"
65 #include "ui_QuadAssoc_QTD.h"
67 #include "ui_Group_QTD.h"
68 #include "ui_Law_QTD.h"
69 #include "ui_Propagation_QTD.h"
72 #include "ui_QuadRevolution_QTD.h"
73 #include "ui_MakeRind_QTD.h"
74 #include "ui_ReplaceHexa_QTD.h"
75 #include "ui_MakeHemiSphere_QTD.h"
76 #include "ui_ModelInfo_QTD.h"
77 #include "ui_AddShapeDialog_QTD.h"
80 #include "MyGEOMBase_Helper.hxx"
84 #include "HexVertex.hxx"
85 #include "HexEdge.hxx"
86 #include "HexQuad.hxx"
87 #include "HexHexa.hxx"
90 #include "HEXABLOCKGUI_DocumentSelectionModel.hxx"
91 #include "HEXABLOCKGUI_DocumentModel.hxx"
92 #include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx"
93 // #include "HEXABLOCKGUI_SalomeTools.hxx"
94 #include "HEXABLOCKGUI.hxx"
96 #include "klinkitemselectionmodel.hxx"
99 Q_DECLARE_METATYPE(QModelIndex);
100 Q_DECLARE_METATYPE(HEXABLOCK::GUI::DocumentModel::GeomObj);
101 Q_DECLARE_METATYPE(GEOM::GeomObjPtr);
103 // class MyBasicGUI_PointDlg;
109 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT HexaBaseDialog : public QDialog, public MyGEOMBase_Helper
120 // define input widget type => usefull for selection
121 typedef HexaTreeRole HexaWidgetType;
122 typedef TopAbs_ShapeEnum/*int */GeomWidgetType; //CS_TODO
124 // TopAbs_ShapeEnum aType = TopAbs_EDGE;
128 LW_QMODELINDEX_ROLE = Qt::UserRole + 1,
134 HexaBaseDialog( QWidget * parent = 0, Mode editmode = NEW_MODE, Qt::WindowFlags f = 0 );
135 virtual ~HexaBaseDialog(){};
137 // clear all input widget
138 virtual void clear(){};
140 void connectDocumentGraphicView(VtkDocumentGraphicView* docGView = NULL);
141 void disconnectDocumentGraphicView(VtkDocumentGraphicView* docGView = NULL);
143 SVTK_ViewWindow* getCurrentVtkView() const {
144 return HEXABLOCKGUI::currentDocGView->getViewWindow();
148 DocumentModel* getDocumentModel() const {
149 return HEXABLOCKGUI::currentDocGView->getDocumentModel();
152 PatternDataModel* getPatternDataModel() const {
153 return HEXABLOCKGUI::currentDocGView->getPatternDataModel();
156 PatternGeomModel* getPatternGeomModel() const {
157 return HEXABLOCKGUI::currentDocGView->getPatternGeomModel();
160 PatternBuilderModel* getPatternBuilderModel() const {
161 return HEXABLOCKGUI::currentDocGView->getPatternBuilderModel();
164 GroupsModel* getGroupsModel() const {
165 return HEXABLOCKGUI::currentDocGView->getGroupsModel();
168 MeshModel* getMeshModel() const {
169 return HEXABLOCKGUI::currentDocGView->getMeshModel();
172 //get selection patterns from the current graphic view
173 PatternDataSelectionModel* getPatternDataSelectionModel() const {
174 return HEXABLOCKGUI::currentDocGView->getPatternDataSelectionModel();
177 PatternBuilderSelectionModel* getPatternBuilderSelectionModel() const {
178 return HEXABLOCKGUI::currentDocGView->getPatternBuilderSelectionModel();
181 PatternGeomSelectionModel* getPatternGeomSelectionModel() const {
182 return HEXABLOCKGUI::currentDocGView->getPatternGeomSelectionModel();
185 GroupsSelectionModel* getGroupsSelectionModel() const {
186 return HEXABLOCKGUI::currentDocGView->getGroupsSelectionModel();
189 MeshSelectionModel* getMeshSelectionModel() const {
190 return HEXABLOCKGUI::currentDocGView->getMeshSelectionModel();
193 HEXABLOCKGUI::ViewType getObjectViewType(QObject* obj);
194 void modelUnregister(QWidget* widget); //unlink the widget from the model
195 void resetSizeAndShow(QDockWidget* parent);
196 void lockSizeToSizeHint();
197 void unlockSizeModification();
198 virtual QModelIndexList getAssocsVTK()
200 QModelIndexList assocs;
203 virtual QMultiMap<QString, int> getAssocsGEOM()
205 QMultiMap<QString, int> assocs;
208 virtual void setCurrentGeomObj(DocumentModel::GeomObj* geomObj) {}
210 bool debugEdgeAssoc; //Temporary
211 bool autoFocusSwitch;
214 //virtual void accept();
215 virtual bool apply();
216 virtual void close();
217 virtual void onHelpRequested();
218 void highlightSelectedAssocs();
219 void refreshHighlight();
220 virtual void onWindowActivated(SUIT_ViewManager*){};
221 void clearVTKSelection();
222 void clearOCCSelection();
223 void clearCurrentObjectFocus();
226 virtual bool eventFilter(QObject *obj, QEvent *event);
227 virtual void hideEvent ( QHideEvent * event );
228 virtual void showEvent ( QShowEvent * event );
229 virtual bool apply(QModelIndex& result) = 0;
231 //Gives a default name to an element according to the last created
232 void updateDefaultName(QLineEdit* name_field, HEXA_NS::EnumElt type);
233 DocumentModel::GeomObj* getGeomObj(const QModelIndex& index);
235 virtual void _initInputWidget( Mode editmode )=0; //must be implemented on inherited dialog box
236 virtual QGroupBox* _initButtonBox( Mode editmode );
237 void _initWidget( Mode editmode ); // call _initInputWidget() & _initButtonBox()
238 QModelIndexList getIndexList(QListWidget* itemsList);
240 void _initViewManager();
242 void _allowSelection();
243 void _disallowSelection();
244 QItemSelectionModel* _allowSelection( HexaWidgetType wtype );
246 bool _allowVTKSelection( QObject* obj );
247 bool _allowOCCSelection( QObject* obj );
248 QItemSelectionModel* _getSelector( QObject* obj );
251 bool _onSelectionChanged( const QItemSelection& sel, QLineEdit* le );
252 bool _onSelectionChanged( const QItemSelection& sel, QListWidget* lw );
254 void _selectAndHighlight( const QModelIndex& i );
256 void _highlightWidget(QObject* obj, Qt::GlobalColor clr);
258 void setFocusToNextField();
260 void _updateCurrentObject(QObject*);
264 QMap<QObject*, QModelIndex> _index;
265 QObject* _currentObj;
267 int _expectedSelection;
268 bool _selectionMutex;
270 QMap<HexaWidgetType, QString> _strHexaWidgetType;
272 //QPushButton* _applyCloseButton;
273 QPushButton* _applyButton;
275 QString _helpFileName;
278 bool _isLineOrListWidget(QObject*);
281 virtual void onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel ); //from qt model/view selectionManager
282 virtual void onCurrentSelectionChanged();//from salome selectionManager
283 virtual void updateButtonBox();
285 virtual void selectElementOfModel();
291 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT VertexDialog : public HexaBaseDialog,
292 public Ui::VertexDialog
297 VertexDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
298 virtual ~VertexDialog();
302 void setValue(HEXA_NS::Vertex* v);
303 HEXA_NS::Vertex* getValue();
305 void setIndex(const QModelIndex& i);
308 virtual bool apply(QModelIndex& result);
309 // void updateName();
312 void _initInputWidget( Mode editmode );
315 HEXA_NS::Vertex *_value;
320 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT EdgeDialog : public HexaBaseDialog,
321 public Ui::EdgeDialog
326 EdgeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
327 virtual ~EdgeDialog();
331 void setValue(HEXA_NS::Edge* e);
332 HEXA_NS::Edge* getValue();
335 void _initInputWidget( Mode editmode );
338 virtual bool apply(QModelIndex& result);
339 // void updateName();
342 HEXA_NS::Edge *_value;
347 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT QuadDialog : public HexaBaseDialog,
348 public Ui::QuadDialog
353 QuadDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
354 virtual ~QuadDialog();
358 void setValue(HEXA_NS::Quad* v);
359 HEXA_NS::Quad* getValue();
362 virtual bool apply(QModelIndex& result);
363 // void updateName();
366 void _initInputWidget( Mode editmode );
369 HEXA_NS::Quad *_value;
375 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT HexaDialog : public HexaBaseDialog,
376 public Ui::HexaDialog
381 HexaDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
382 virtual ~HexaDialog();
385 virtual QModelIndexList getAssocsVTK();
387 void setValue(HEXA_NS::Hexa* v);
388 HEXA_NS::Hexa* getValue();
391 virtual bool apply(QModelIndex& result);
394 void _initInputWidget( Mode editmode );
397 void deleteQuadItem();
398 void deleteVertexItem();
399 void updateButtonBox();
402 void _setValueQuads( HEXA_NS::Hexa* h );
403 void _setValueVertices( HEXA_NS::Hexa* h );
405 HEXA_NS::Hexa *_value;
410 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT VectorDialog : public HexaBaseDialog,
411 public Ui::VectorDialog
416 VectorDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
417 virtual ~VectorDialog();
421 void setValue(HEXA_NS::Vector* v);
422 HEXA_NS::Vector* getValue();
425 virtual bool apply(QModelIndex& result);
426 // void updateName();
429 void _initInputWidget( Mode editmode );
432 HEXA_NS::Vector *_value;
438 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT CylinderDialog : public HexaBaseDialog,
439 public Ui::CylinderDialog
444 CylinderDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
445 virtual ~CylinderDialog();
449 void setValue( HEXA_NS::Cylinder* v );
450 HEXA_NS::Cylinder* getValue();
453 virtual bool apply(QModelIndex& result);
454 // void updateName();
457 void _initInputWidget( Mode editmode );
460 HEXA_NS::Cylinder *_value;
466 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PipeDialog : public HexaBaseDialog,
467 public Ui::PipeDialog
472 PipeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
473 virtual ~PipeDialog();
477 void setValue( HEXA_NS::Pipe* p );
478 HEXA_NS::Pipe* getValue();
481 virtual bool apply(QModelIndex& result);
482 // void updateName();
485 void _initInputWidget( Mode editmode );
488 HEXA_NS::Pipe *_value;
495 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeGridDialog : public HexaBaseDialog,
496 public Ui::MakeGridDialog
501 MakeGridDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
502 virtual ~MakeGridDialog();
507 virtual bool apply(QModelIndex& result);
510 void _initInputWidget( Mode editmode );
513 void addRadiusItem();
514 void delRadiusItem();
517 void addHeightItem();
518 void delHeightItem();
519 void updateButtonBox();
520 void updateHelpFileName();
527 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeCylinderDialog : public HexaBaseDialog,
528 public Ui::MakeCylinderDialog
533 MakeCylinderDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
534 virtual ~MakeCylinderDialog();
539 void _initInputWidget( Mode editmode );
542 virtual bool apply(QModelIndex& result);
546 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakePipeDialog : public HexaBaseDialog,
547 public Ui::MakePipeDialog
552 MakePipeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
553 virtual ~MakePipeDialog();
558 virtual bool apply(QModelIndex& result);
561 void _initInputWidget( Mode editmode );
565 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeCylindersDialog : public HexaBaseDialog,
566 public Ui::MakeCylindersDialog
571 MakeCylindersDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
572 virtual ~MakeCylindersDialog();
577 virtual bool apply(QModelIndex& result);
580 void _initInputWidget( Mode editmode );
584 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakePipesDialog : public HexaBaseDialog,
585 public Ui::MakePipesDialog
590 MakePipesDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
591 virtual ~MakePipesDialog();
596 virtual bool apply(QModelIndex& result);
599 void _initInputWidget( Mode editmode );
604 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT RemoveHexaDialog : public HexaBaseDialog,
605 public Ui::RemoveHexaDialog
610 RemoveHexaDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
611 virtual ~RemoveHexaDialog();
616 virtual bool apply(QModelIndex& result);
619 void _initInputWidget( Mode editmode );
623 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PrismQuadDialog : public HexaBaseDialog,
624 public Ui::PrismQuadDialog
629 PrismQuadDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
630 virtual ~PrismQuadDialog();
632 virtual QModelIndexList getAssocsVTK();
635 virtual bool apply(QModelIndex& result);
638 void _initInputWidget( Mode editmode );
641 void addHeightItem();
642 void delHeightItem();
651 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT JoinQuadDialog : public HexaBaseDialog,
652 public Ui::JoinQuadDialog
657 JoinQuadDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
658 virtual ~JoinQuadDialog();
661 virtual QModelIndexList getAssocsVTK();
664 virtual bool apply(QModelIndex& result);
667 void _initInputWidget( Mode editmode );
677 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MergeDialog : public HexaBaseDialog,
678 public Ui::MergeDialog
683 MergeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
684 virtual ~MergeDialog();
689 virtual bool apply(QModelIndex& result);
692 void _initInputWidget( Mode editmode );
695 void updateHelpFileName();
702 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT DisconnectDialog : public HexaBaseDialog,
703 public Ui::DisconnectDialog
708 DisconnectDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
709 virtual ~DisconnectDialog();
712 virtual QModelIndexList getAssocsVTK();
715 virtual bool apply(QModelIndex& result);
718 void _initInputWidget( Mode editmode );
721 void updateHelpFileName();
722 void deleteEdgeItem();
723 void deleteHexaItem();
728 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT CutEdgeDialog : public HexaBaseDialog,
729 public Ui::CutEdgeDialog
734 CutEdgeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
735 virtual ~CutEdgeDialog();
740 virtual bool apply(QModelIndex& result);
743 void _initInputWidget( Mode editmode );
747 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeTransformationDialog : public HexaBaseDialog,
748 public Ui::TransformationDialog
753 MakeTransformationDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
754 virtual ~MakeTransformationDialog ();
759 virtual bool apply(QModelIndex& result);
762 void _initInputWidget( Mode editmode );
765 void updateHelpFileName();
769 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeSymmetryDialog : public HexaBaseDialog,
770 public Ui::SymmetryDialog
775 MakeSymmetryDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
776 virtual ~MakeSymmetryDialog();
781 virtual bool apply(QModelIndex& result);
784 void _initInputWidget( Mode editmode );
787 void updateHelpFileName();
793 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PerformTransformationDialog : public HexaBaseDialog,
794 public Ui::TransformationDialog
799 PerformTransformationDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
800 virtual ~PerformTransformationDialog ();
805 virtual bool apply(QModelIndex& result);
808 void _initInputWidget( Mode editmode );
811 void updateHelpFileName();
815 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PerformSymmetryDialog : public HexaBaseDialog,
816 public Ui::SymmetryDialog
821 PerformSymmetryDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
822 virtual ~PerformSymmetryDialog();
827 virtual bool apply(QModelIndex& result);
830 void _initInputWidget( Mode editmode );
833 void updateHelpFileName();
837 // typedef class MyBasicGUI_PointDlg VertexAssocDialog;
841 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT EdgeAssocDialog : public HexaBaseDialog,
842 public Ui::EdgeAssocDialog
847 EdgeAssocDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
848 virtual ~EdgeAssocDialog();
850 virtual QModelIndexList getAssocsVTK();
851 virtual QMultiMap<QString, int> getAssocsGEOM();
852 virtual void setCurrentGeomObj(DocumentModel::GeomObj* geomObj) { myLine = geomObj; }
853 void setGeomEngine( GEOM::GEOM_Gen_var geomEngine );
857 virtual bool apply(QModelIndex& result);
858 virtual void close();
859 virtual void onWindowActivated(SUIT_ViewManager*);
862 virtual void _initInputWidget( Mode editmode );
863 // virtual void hideEvent ( QHideEvent * event );
864 // virtual void showEvent ( QShowEvent * event );
865 virtual GEOM::GEOM_IOperations_ptr createOperation();
866 virtual bool execute( ObjectList& );
869 virtual void onCurrentSelectionChanged();
870 // void onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel );
871 virtual void selectElementOfGeom();
872 void updateHelpFileName();
874 void deleteEdgeItem();
875 void deleteLineItem();
878 void pstartChanged( double val );
879 void pendChanged( double val );
882 // QModelIndexList currentAssocList;
884 // GEOM::GeomObjPtr _firstLine;
885 // GEOM::GeomObjPtr _lastLine;
886 GEOM::GeomObjPtr _currentLine;
887 // GEOM::GeomObjPtr myLine;
888 DocumentModel::GeomObj* myLine;
889 double _currentParameter;
890 GEOM::GEOM_Gen_var _geomEngine ;
895 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT QuadAssocDialog : public HexaBaseDialog,
896 public Ui::QuadAssocDialog
901 QuadAssocDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
902 virtual ~QuadAssocDialog();
904 virtual QModelIndexList getAssocsVTK();
905 virtual QMultiMap<QString, int> getAssocsGEOM();
908 virtual bool apply(QModelIndex& result);
909 virtual void close();
910 virtual void onWindowActivated(SUIT_ViewManager*);
913 virtual void _initInputWidget( Mode editmode );
914 // virtual void hideEvent ( QHideEvent * event );
915 // virtual void showEvent ( QShowEvent * event );
918 virtual void onCurrentSelectionChanged();
919 void deleteFaceItem();
920 virtual void selectElementOfGeom();
923 QList<DocumentModel::GeomObj> _assocs;
924 QShortcut* _delFaceShortcut;
929 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT GroupDialog : public HexaBaseDialog,
930 public Ui::GroupDialog
934 QMap<DocumentModel::Group, QString> strKind;
937 GroupDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
938 virtual ~GroupDialog();
940 virtual QModelIndexList getAssocsVTK();
942 void setValue(HEXA_NS::Group* v);
943 HEXA_NS::Group* getValue();
946 virtual bool apply(QModelIndex& result);
949 void _initInputWidget( Mode editmode );
952 // void addEltBase();
953 void removeEltBase();
954 // void clearEltBase();
955 void onKindChanged( int index );
958 HEXA_NS::Group *_value;
963 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT LawDialog : public HexaBaseDialog,
968 QMap<DocumentModel::KindLaw, QString> strKind;
971 LawDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
972 virtual ~LawDialog();
975 void setValue(HEXA_NS::Law* v);
976 HEXA_NS::Law* getValue();
979 virtual bool apply(QModelIndex& result);
982 void _initInputWidget( Mode editmode );
985 HEXA_NS::Law *_value;
991 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT PropagationDialog : public HexaBaseDialog,
992 public Ui::PropagationDialog
997 PropagationDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
998 virtual ~PropagationDialog();
1001 void setValue(HEXA_NS::Propagation* v);
1002 HEXA_NS::Propagation* getValue();
1005 virtual bool apply(QModelIndex& result);
1008 void _initInputWidget( Mode editmode );
1011 void updateHelpFileName();
1012 void deletePropagationItem();
1013 virtual void selectElementOfModel();
1016 HEXA_NS::Propagation *_value;
1021 // Define the compute mesh dialog box
1022 // ----------------------------------
1024 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT ComputeMeshDialog : public HexaBaseDialog
1029 ComputeMeshDialog( QWidget* parent = 0, Mode editmode = NEW_MODE, Qt::WindowFlags f = Qt::SubWindow );
1030 virtual ~ComputeMeshDialog();
1033 void setDocumentModel(DocumentModel* m);
1036 virtual bool apply(QModelIndex& result);
1037 // virtual void accept();
1038 // virtual void reject();
1041 void _initInputWidget( Mode editmode );
1051 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT ReplaceHexaDialog : public HexaBaseDialog,
1052 public Ui::ReplaceHexaDialog
1057 ReplaceHexaDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
1058 virtual ~ReplaceHexaDialog();
1060 virtual QModelIndexList getAssocsVTK();
1064 virtual bool apply(QModelIndex& result);
1067 void _initInputWidget( Mode editmode );
1070 void deleteQuadItem();
1071 void updateButtonBox();
1074 HEXA_NS::Elements *_value;
1081 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT QuadRevolutionDialog : public HexaBaseDialog,
1082 public Ui::QuadRevolutionDialog
1087 QuadRevolutionDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
1088 virtual ~QuadRevolutionDialog();
1090 virtual QModelIndexList getAssocsVTK();
1093 virtual bool apply(QModelIndex& result);
1096 void _initInputWidget( Mode editmode );
1099 void addAngleItem();
1100 void delAngleItem();
1102 void updateButtonBox();
1105 HEXA_NS::Elements *_value;
1110 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeHemiSphereDialog : public HexaBaseDialog,
1111 public Ui::MakeHemiSphereDialog
1116 MakeHemiSphereDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
1117 virtual ~MakeHemiSphereDialog();
1120 // void setValue(HEXA_NS::Propagation* v);
1121 // HEXA_NS::Propagation* getValue();
1124 virtual bool apply(QModelIndex& result);
1127 void _initInputWidget( Mode editmode );
1130 HEXA_NS::Elements *_value;
1133 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT ModelInfoDialog : public HexaBaseDialog,
1134 public Ui::ModelInfoDialog
1139 ModelInfoDialog( QWidget* parent = NULL, Qt::WindowFlags wf = Qt::SubWindow );
1140 virtual ~ModelInfoDialog(){}
1146 virtual void hideEvent ( QHideEvent * event );
1147 virtual void showEvent ( QShowEvent * event );
1148 virtual bool apply(QModelIndex& result){ return true;}
1149 virtual void _initInputWidget( Mode editmode ){}
1152 class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT AddShapeDialog : public HexaBaseDialog,
1153 public Ui::AddShapeDialog
1158 AddShapeDialog( QWidget* parent = NULL, Mode editmode = NEW_MODE, Qt::WindowFlags wf = Qt::SubWindow );
1159 virtual ~AddShapeDialog();
1163 virtual bool apply(QModelIndex& result);
1164 virtual void close();
1165 virtual void onWindowActivated(SUIT_ViewManager*);
1168 virtual void _initInputWidget( Mode editmode );
1171 virtual void onCurrentSelectionChanged();
1174 GEOM::GeomObjPtr currentGeomObj;
1178 // class HEXABLOCKGUI_DOCUMENTPANEL_EXPORT MakeRindDialog : public HexaBaseDialog,
1179 // public Ui::MakeRindDialog
1184 // MakeRindDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
1185 // virtual ~MakeRindDialog();
1188 // virtual bool apply(QModelIndex& result);
1191 // // HEXA_NS::Propagation *_value;:q