Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
IvtShell.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Tristan Mehamli (Sep 2011)
22**=======================================================================*/
23#ifndef IVT_SHELL_H
24#define IVT_SHELL_H
25
27//
28// Class: IvtShell
29//
31
32#include <IvTune/IvTuneExtender/IvtLibName.h>
33
34#include <Inventor/nodes/SoNode.h>
35
36#include <QObject>
37
38#ifdef _WIN32
39# if !defined(IvTuneExtenderAPI_EXPORTS)
40# ifndef OIV_DISABLE_AUTOLINK
41# pragma comment(lib,__IVTUNEEXTENDERAPILIB)
42# endif
43# endif
44#endif //win
45
46class QDockWidget;
47class QMenu;
48class QString;
49class QToolBar;
50class QTreeWidget;
51class QWidget;
52
53class IvtExtension;
54class IvtEditor;
55
56class SoField;
57class SoType;
58
75class IvtShell: public QObject
76{
77 Q_OBJECT
78
79public:
80
81 // MainWindow
88 virtual void registerDock( QDockWidget* dock, Qt::DockWidgetArea area ) = 0;
89
95 virtual void unregisterDock( QDockWidget* dock ) = 0;
96
97 // Menus
104 virtual std::vector<QMenu*> getContextualMenus( const SoType& type ) = 0;
105
113 virtual void registerContextualMenu( const SoType& type, bool strict, QMenu* newMenu ) = 0;
114
120 virtual void registerMenu( QMenu* newMenu ) = 0;
121
129 virtual void registerViewMenu( IvtExtension* extension, SbBool visibilityOnActivate = true ) = 0;
130
137 virtual void unregisterContextualMenu( QMenu* menu ) = 0;
138
144 virtual void unregisterMenu( QMenu* menu ) = 0;
145
151 virtual void unregisterViewMenu( IvtExtension* extension ) = 0;
152
153 // Preferences
163 virtual void registerPreferencePanel( IvtExtension* extension, QWidget* panel, const char* slotInitialized, const char* slotAccept ) = 0;
164
171 virtual void unregisterPreferencePanel( IvtExtension* extension ) = 0;
172
173 // Status bar
177 virtual void clearStatusBarMessage() = 0;
178
191 virtual void regiterStatusBarWidget( QWidget* widget, SbBool isPermanent = false, int stretch = 0 ) = 0;
192
201 virtual void showStatusBarMessage( const SbString& newMessage, int timeout = 2000 ) = 0;
202
208 virtual void unregiterStatusBarWidget( QWidget* widget ) = 0;
209
210 // Tool bar
217 virtual void registerToolBar( QToolBar* tb, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0;
218
224 virtual void unregisterToolBar( QToolBar* tb ) = 0;
225
230
231private:
232
234 IvtShell();
235
239 virtual ~IvtShell();
240
242 static IvtShell* m_instance;
243};
244
245#endif // IVT_SHELL_H
246
247
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Base class for i...
Definition IvtEditor.h:67
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Base class to im...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class to registe...
Definition IvtShell.h:76
virtual std::vector< QMenu * > getContextualMenus(const SoType &type)=0
Returns the list of menus that are registered with the provided type and its derived types.
static IvtShell * getInstance()
Returns an instance of this class.
virtual void unregisterContextualMenu(QMenu *menu)=0
Unregister the context menu given as parameter.
virtual void registerMenu(QMenu *newMenu)=0
Register the menu and add it before the help menu of IvTune.
virtual void unregisterViewMenu(IvtExtension *extension)=0
Unregister the extension from the view menu.
virtual void unregisterDock(QDockWidget *dock)=0
Unregister the provided dock widget.
virtual void unregisterToolBar(QToolBar *tb)=0
Unregister a tool bar from the main window.
virtual void unregisterPreferencePanel(IvtExtension *extension)=0
Unregister the extension from the the panel and remove the associated entry in the preferences menu.
virtual void clearStatusBarMessage()=0
Clear the message in the status bar.
virtual void registerViewMenu(IvtExtension *extension, SbBool visibilityOnActivate=true)=0
Register an extension in the view menu of IvTune.
virtual void showStatusBarMessage(const SbString &newMessage, int timeout=2000)=0
Show a messsage in the Status bar.
virtual void unregisterMenu(QMenu *menu)=0
Unregister the specified menu.
virtual void registerDock(QDockWidget *dock, Qt::DockWidgetArea area)=0
Register the provided dock widget and sets it to the designated area.
virtual void registerToolBar(QToolBar *tb, Qt::ToolBarArea area=Qt::TopToolBarArea)=0
Register the provided dock widget and set it in the designated area.
virtual void registerPreferencePanel(IvtExtension *extension, QWidget *panel, const char *slotInitialized, const char *slotAccept)=0
Register the extension with the specified panel and add an entry to the preferences menu.
virtual void regiterStatusBarWidget(QWidget *widget, SbBool isPermanent=false, int stretch=0)=0
Register a widget in the status bar of IvTune.
virtual void unregiterStatusBarWidget(QWidget *widget)=0
Unregister a widget from the status bar.
virtual void registerContextualMenu(const SoType &type, bool strict, QMenu *newMenu)=0
Register the menu and add it before the help menu of IvTune.
Class for smart character strings.
Definition SbString.h:202
Base class for all fields.
Definition SoField.h:234
Stores runtime type information.
Definition SoType.h:98
int SbBool
Boolean type.
Definition SbBase.h:87