Salome HOME
a0af7f0b2603450e782519075f5fc573b3520f32
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Operation.h
1 //  SALOME SMESHGUI
2 //
3 //  Copyright (C) 2005  CEA/DEN, EDF R&D
4 //
5 //
6 //
7 //  File   : SMESHGUI_Operation.h
8 //  Author : Sergey LITONIN
9 //  Module : SALOME
10
11
12 #ifndef SMESHGUI_Operation_H
13 #define SMESHGUI_Operation_H
14
15 #include <SalomeApp_Operation.h>
16 #include <SALOME_InteractiveObject.hxx>
17 #include <SVTK_Selection.h>
18
19 class SMESHGUI;
20 class SVTK_ViewWindow;
21 class SVTK_Selector;
22 class TColStd_MapOfInteger;
23
24
25 /*
26   Class       : SMESHGUI_Operation
27   Description : Base class for all SMESH operations
28 */
29
30 class SMESHGUI_Operation : public SalomeApp_Operation
31 {
32   Q_OBJECT
33
34 public:
35   SMESHGUI_Operation( SalomeApp_Application* );
36   virtual ~SMESHGUI_Operation();
37
38 protected:
39   typedef enum
40   {
41     Object,
42     MeshNode,
43     MeshElement
44
45   } SelectedObjectType;
46
47 protected:
48   void              setSelectionMode( const Selection_Mode );
49   void              highlight( const Handle( SALOME_InteractiveObject )&,
50                                const bool, const bool = true );
51   void              addOrRemoveIndex( const Handle( SALOME_InteractiveObject )&,
52                                       const TColStd_MapOfInteger&, const bool );
53
54   virtual void      startOperation();
55   virtual bool      isReadyToStart();
56
57   SMESHGUI*         getSMESHGUI() const;
58   SVTK_ViewWindow*  viewWindow() const;
59   SVTK_Selector*    selector() const;
60
61
62
63   virtual int       prefix( const QString& ) const;
64   // Return hard-coded prefix using to differ intersecting types
65
66   virtual void      selected( QStringList&, SalomeApp_Dialog::TypesList&, QStringList& ) const;
67   // Get names, types and ids of selected objects
68
69   virtual int       typeById( const QString&, const SelectedObjectType ) const;
70   // Find type by id
71
72   virtual QChar     idChar() const;
73   // Char using to divide <entry> and <id> in string id representation
74   // By default, '#'
75   
76 };
77
78 #endif
79
80
81
82
83
84