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 void setSelectionMode( const Selection_Mode );
55 void highlight( const Handle( SALOME_InteractiveObject )&,
56 const bool, const bool = true );
57 void addOrRemoveIndex( const Handle( SALOME_InteractiveObject )&,
58 const TColStd_MapOfInteger&, const bool );
60 virtual void startOperation();
61 virtual void commitOperation();
62 virtual void abortOperation();
63 virtual bool isReadyToStart();
65 SMESHGUI* getSMESHGUI() const;
66 SVTK_ViewWindow* viewWindow() const;
67 SVTK_Selector* selector() const;
69 _PTR(Study) studyDS() const;
72 //! Get names, types and ids of selected objects
73 virtual void selected( QStringList&, SMESHGUI_Dialog::TypesList&, QStringList& ) const;
76 virtual int typeById( const QString&, const SelectedObjectType ) const;
78 //! Char using to divide <entry> and <id> in string id representation. By default, '#'
79 virtual QChar idChar() const;
81 //! Set accroding dialog active or inactive
82 virtual void setDialogActive( const bool );
86 virtual bool onApply();
87 virtual void onCancel();