3 // Copyright (C) 2005 CEA/DEN, EDF R&D
7 // File : SMESHGUI_Operation.h
8 // Author : Sergey LITONIN
12 #ifndef SMESHGUI_Operation_H
13 #define SMESHGUI_Operation_H
15 #include <SalomeApp_Operation.h>
16 #include <SMESHGUI_Dialog.h>
17 #include <SALOME_InteractiveObject.hxx>
18 #include <SVTK_Selection.h>
20 #include <SALOMEDSClient.hxx>
23 class SVTK_ViewWindow;
25 class TColStd_MapOfInteger;
29 Class : SMESHGUI_Operation
30 Description : Base class for all SMESH operations
33 class SMESHGUI_Operation : public SalomeApp_Operation
39 virtual ~SMESHGUI_Operation();
41 static int prefix( const QString& );
42 // Return hard-coded prefix using to differ intersecting types
54 Selection_Mode selectionMode() const;
55 void setSelectionMode( const Selection_Mode );
56 void highlight( const Handle( SALOME_InteractiveObject )&,
57 const bool, const bool = true );
58 void addOrRemoveIndex( const Handle( SALOME_InteractiveObject )&,
59 const TColStd_MapOfInteger&, const bool );
61 //! sets the dialog widgets to state just after operation start
62 virtual void initDialog();
64 virtual void startOperation();
65 virtual bool isReadyToStart();
67 SMESHGUI* getSMESHGUI() const;
68 SVTK_ViewWindow* viewWindow() const;
69 SVTK_Selector* selector() const;
71 _PTR(Study) studyDS() const;
74 //! Get names, types and ids of selected objects
75 virtual void selected( QStringList&, SMESHGUI_Dialog::TypesList&, QStringList& ) const;
78 virtual int typeById( const QString&, const SelectedObjectType ) const;
80 //! Char using to divide <entry> and <id> in string id representation. By default, '#'
81 virtual QChar idChar() const;
83 //! Set accroding dialog active or inactive
84 virtual void setDialogActive( const bool );
88 virtual bool onApply();
89 virtual void onCancel();