00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2018 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Tristan Mehamli (Sep 2011) 00022 **=======================================================================*/ 00023 #ifndef IVT_SERVICES_H 00024 #define IVT_SERVICES_H 00025 00027 // 00028 // Class: IvtServices 00029 // 00031 00032 #include <IvTune/IvTuneExtender/IvtLibName.h> 00033 00034 #include <Inventor/SbBase.h> 00035 00036 #include <QObject> 00037 00038 #ifdef _WIN32 00039 # if !defined(IvTuneExtenderAPI_EXPORTS) 00040 # ifndef OIV_DISABLE_AUTOLINK 00041 # pragma comment(lib,__IVTUNEEXTENDERAPILIB) 00042 # endif 00043 # endif 00044 #endif //win 00045 00046 class IvtEditor; 00047 class IvtCommand; 00048 00049 class SbName; 00050 class SoField; 00051 class SoFieldContainer; 00052 class SoNode; 00053 class SoType; 00054 class SoGuiRenderArea; 00055 class SoSceneManager; 00056 00072 class IvtServices : public QObject 00073 { 00074 Q_OBJECT 00075 00076 public: 00077 00083 virtual void execute( IvtCommand* command ) = 0; 00084 00088 virtual SoNode* getSceneGraph() const = 0; 00089 00093 virtual SoField* getSelectedField() const = 0; 00094 00098 virtual SoFieldContainer* getSelectedNode() const = 0; 00099 00103 virtual void redo() = 0; 00104 00110 virtual void setSceneGraph( SoNode* sg ) =0; 00111 00117 virtual void setSelectedField( SoField* field ) = 0; 00118 00124 virtual void setSelectedNode( SoFieldContainer* node ) = 0; 00125 00129 virtual void undo() = 0; 00130 00134 static IvtServices* getInstance(); 00135 00140 virtual SoSceneManager* getSceneManager() const = 0; 00141 00145 virtual SbBool isStandaloneApplication() const = 0; 00146 00147 Q_SIGNALS: 00148 00154 void sceneGraphChanged( SoNode* sg ); 00155 00161 void selectedNodeChanged( SoFieldContainer* node ); 00162 00168 void selectedFieldChanged( SoField* field ); 00169 00170 private: 00171 00173 IvtServices(); 00174 00178 virtual ~IvtServices(); 00179 00181 static IvtServices* m_instance; 00182 00183 private: 00187 virtual SoGuiRenderArea* getRenderArea() const = 0; 00188 }; 00189 00190 #endif // IVT_SERVICES_H 00191 00192 00193