Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Core.hh
Go to the documentation of this file.
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4 * Copyright (C) 2001-2014 by Computer Graphics Group, RWTH Aachen *
5 * www.openflipper.org *
6 * *
7 *--------------------------------------------------------------------------- *
8 * This file is part of OpenFlipper. *
9 * *
10 * OpenFlipper is free software: you can redistribute it and/or modify *
11 * it under the terms of the GNU Lesser General Public License as *
12 * published by the Free Software Foundation, either version 3 of *
13 * the License, or (at your option) any later version with the *
14 * following exceptions: *
15 * *
16 * If other files instantiate templates or use macros *
17 * or inline functions from this file, or you compile this file and *
18 * link it with other files to produce an executable, this file does *
19 * not by itself cause the resulting executable to be covered by the *
20 * GNU Lesser General Public License. This exception does not however *
21 * invalidate any other reasons why the executable file might be *
22 * covered by the GNU Lesser General Public License. *
23 * *
24 * OpenFlipper is distributed in the hope that it will be useful, *
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
27 * GNU Lesser General Public License for more details. *
28 * *
29 * You should have received a copy of the GNU LesserGeneral Public *
30 * License along with OpenFlipper. If not, *
31 * see <http://www.gnu.org/licenses/>. *
32 * *
33 \*===========================================================================*/
34 
35 /*===========================================================================*\
36 * *
37 * $Revision: 19717 $ *
38 * $LastChangedBy: campen $ *
39 * $Date: 2014-10-17 17:06:56 +0200 (Fri, 17 Oct 2014) $ *
40 * *
41 \*===========================================================================*/
42 
43 
44 
45 
46 //=============================================================================
47 //
48 // CLASS Core
49 //
50 //=============================================================================
51 
57 #ifndef MVIEWWIDGET_HH
58 #define MVIEWWIDGET_HH
59 
60 
61 //== INCLUDES =================================================================
62 
63 #include <OpenFlipper/widgets/glWidget/QtBaseViewer.hh>
64 
65 // QT INCLUDES
66 #include <QVariant>
67 #include <QMainWindow>
68 #include <QToolBox>
69 #include <QStackedWidget>
70 #include <QSplashScreen>
71 
72 #include <QDockWidget>
73 #include <QVector>
74 #include <QProgressDialog>
75 
76 #include <QtScript/QScriptEngine>
77 #include <QtScript/QtScript>
78 
79 #include "OpenFlipper/INIFile/INIFile.hh"
80 
83 
84 // Prototypes for scripting
85 #include "OpenFlipper/Scripting/scriptPrototypes/prototypeVec3d.hh"
86 #include "OpenFlipper/Scripting/scriptPrototypes/prototypeVec4d.hh"
87 #include "OpenFlipper/Scripting/scriptPrototypes/prototypeMatrix4x4.hh"
88 #include "OpenFlipper/Scripting/scriptPrototypes/prototypeDataType.hh"
89 #include <OpenFlipper/Scripting/scriptWrappers/vec3dWrapper.hh>
90 #include <OpenFlipper/Scripting/scriptWrappers/vec4dWrapper.hh>
91 #include <OpenFlipper/Scripting/scriptWrappers/matrix4x4Wrapper.hh>
92 #include <OpenFlipper/Scripting/scriptWrappers/DataTypeWrapper.hh>
93 // #include <OpenFlipper/Scripting/scriptWrappers/ObjectIdWrapper.hh>
94 
95 // Required Interface definition ( Some variables were defined there )
101 #include "OpenFlipper/BasePlugin/SelectionInterface.hh" // -> for SelectionInterface::PrimitiveType
103 
105 
106 // Process manager widget
107 #include <OpenFlipper/widgets/processManagerWidget/processManagerWidget.hh>
108 
110 
111 #include <OpenFlipper/Core/PluginInfo.hh>
112 
113 #include <ACG/Scenegraph/CoordsysNode.hh>
114 
115 #include <OpenFlipper/threads/JobInfo.hh>
116 
118 #include <OpenFlipper/common/InformationPlugins.hh>
119 #include "SpinBoxEventFilter.hh"
120 
121 //== CLASS DEFINITION =========================================================
122 
123 
124 struct dataTypes {
125  QString name;
126  DataType type;
127  TypeInterface* plugin;
128 };
129 
132 class Core : public QObject
133 {
134  Q_OBJECT
135 
136 public:
137 
139  Core();
140 
141  void init();
142 
144  ~Core();
145 
147  bool add_sync_host(const QString& _name);
148 
149 
150 private slots:
151 
153  void slotMouseEventIdentify( QMouseEvent* _event );
154 
156  void slotMouseEventLight( QMouseEvent* _event );
157 
158 protected:
159 
160  //===========================================================================
163  //===========================================================================
164 signals:
166  void allCleared();
167 
169  void signalObjectUpdated(int);
170 
172  void signalObjectUpdated(int, const UpdateType&);
173 
175  void PluginWheelEvent(QWheelEvent * , const std::string & );
176 
178  void PluginMouseEvent(QMouseEvent* );
179 
181  void PluginMouseEventLight( QMouseEvent* );
182 
184  void objectSelectionChanged( int );
185 
187  void pluginViewChanged();
188 
190  void pluginSceneDrawn();
191 
193  void addTexture( QString, QString , uint, int );
194 
196  void addTexture( QString, QString , uint );
197 
199  void addMultiTexture( QString _textureGroup , QString _name , QString _filename , int _id , int& _textureId );
200 
202  void updateTexture( QString , int );
203 
205  void updateAllTextures( );
206 
208  void updatedTextures( QString , int );
209 
211  void setTextureMode(QString _textureName ,QString _mode, int _id);
212 
214  void setTextureMode(QString _textureName ,QString _mode);
215 
217  void switchTexture( QString, int );
218 
220  void switchTexture( QString );
221 
223  void textureChangeImage( QString _textureName , QImage& _image );
224 
226  void textureChangeImage( QString _textureName , QImage& _image , int _id );
227 
229  void textureGetImage( QString _textureName , QImage& _image );
230 
232  void textureGetImage( QString _textureName , QImage& _image , int _id );
233 
235  void textureIndex( QString _textureName, int _id, int& _index);
236 
238  void textureIndexPropertyName( int _id, QString& _propertyName);
239 
241  void textureName( int _id, int _textureIndex, QString& _textureName);
242 
244  void textureFilename( int _id, QString _textureName, QString& _textureFilename);
245 
247  void getCurrentTexture( int _id, QString& _textureName );
248 
250  void getSubTextures( int _id, QString _multiTextureName, QStringList& _subTextures );
251 
253  void addSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString& _handleName);
254 
256  void registerType(QString _handleName, DataType _type);
257 
259  void addPrimitiveType(QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType& _typeHandle);
260 
262  void addCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon,
263  SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier);
264  void addCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon,
265  SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier,
266  DataType _objectTypeRestriction);
267 
269  void addSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type);
270 
272  void selectionOperation(QString _operation);
273 
275  void showToggleSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
276 
278  void showLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
279 
281  void showVolumeLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
282 
284  void showSurfaceLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
285 
287  void showSphereSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
288 
290  void showClosestBoundarySelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
291 
293  void showFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
294 
296  void showComponentsSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
297 
299  void toggleSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
300 
302  void lassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
303 
305  void volumeLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
306 
308  void surfaceLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
309 
311  void sphereSelection(QMouseEvent* _event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect);
312 
314  void closestBoundarySelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
315 
317  void floodFillSelection(QMouseEvent* _event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect);
318 
320  void componentsSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
321 
323  void customSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect);
324 
326  void getActiveDataTypes(SelectionInterface::TypeList& _types);
327 
329  void getActivePrimitiveType(SelectionInterface::PrimitiveType& _type);
330 
332  void targetObjectsOnly(bool& _targetsOnly);
333 
335  void loadSelection(const INIFile& _file);
336 
338  void saveSelection(INIFile& _file);
339 
341  void registerKeyShortcut(int _key, Qt::KeyboardModifiers _modifiers);
342 
344  void keyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers = Qt::NoModifier);
345 
347  void iniLoad( INIFile&, int );
348 
350  void iniSave( INIFile& _ini ,int _id );
351 
353  void iniSaveOptions( INIFile& _ini );
354 
356  void iniLoadOptions( INIFile& _ini );
357 
359  void iniLoadOptionsLast( INIFile& _ini );
360 
362  void saveOnExit( INIFile& _ini );
363 
365  void createBackup( int _objectid, QString _name, UpdateType _type = UPDATE_ALL);
366  void createBackup( IdList _objectids, QString _name, std::vector<UpdateType> _types);
367 
369  void undo(int _objectid);
370  void redo(int _objectid);
371  void undo();
372  void redo();
373 
375  void aboutToRestore(int _objectId);
376 
378  void restored( int _objectId);
379 
381  void openedFile( int _id );
382 
384  void emptyObjectAdded( int _id);
385 
387  void pluginsInitialized();
388 
390  void visibilityChanged(int _id);
391 
393  void objectPropertiesChanged( int _id );
394 
396  void objectDeleted( int );
397 
400  //===========================================================================
403  //===========================================================================
404  private slots :
405 
407  void slotObjectUpdated(int _identifier, const UpdateType& _type = UPDATE_ALL);
408 
410  void slotVisibilityChanged(int _id);
411 
413  void slotObjectPropertiesChanged( int _id );
414 
416  void slotObjectSelectionChanged( int _id);
417 
419  void slotAddPickMode( const std::string& _mode );
420 
422  void slotAddHiddenPickMode( const std::string& _mode );
423 
425  void slotAddTexture( QString _textureName , QString _filename , uint _dimension , int _id );
426 
428  void slotAddTexture( QString _textureName , QString _filename , uint _dimension );
429 
431  void slotMultiTextureAdded( QString _textureGroup , QString _name , QString _filename , int _id , int& _textureId );
432 
434  void slotUpdateTexture( QString _name , int _identifier);
435 
437  void slotUpdateAllTextures( );
438 
440  void slotTextureUpdated( QString _textureName , int _identifier );
441 
443  void slotSetTextureMode(QString _textureName ,QString _mode, int _id);
444 
446  void slotSetTextureMode(QString _textureName ,QString _mode);
447 
449  void slotSwitchTexture( QString _textureName, int _id );
450 
452  void slotSwitchTexture( QString _textureName );
453 
455  void slotTextureChangeImage( QString _textureName , QImage& _image );
456 
458  void slotTextureChangeImage( QString _textureName , QImage& _image , int _id );
459 
461  void slotTextureGetImage( QString _textureName , QImage& _image );
462 
464  void slotTextureGetImage( QString _textureName , QImage& _image , int _id );
465 
467  void slotTextureIndex( QString _textureName, int _id, int& _index);
468 
470  void slotTextureIndexPropertyName( int _id, QString& _propertyName);
471 
473  void slotTextureName( int _id, int _textureIndex, QString& _textureName);
474 
476  void slotTextureFilename( int _id, QString _textureName, QString& _textureFilename);
477 
479  void slotGetCurrentTexture( int _id, QString& _textureName );
480 
482  void slotGetSubTextures( int _id, QString _multiTextureName, QStringList& _subTextures );
483 
485  void slotLoad(QString _filename, DataType _type, int& _id);
486 
488  void slotLoad(QString _filename, int _pluginID);
489 
491  void slotFileOpened ( int _id );
492 
494  void slotEmptyObjectAdded ( int _id );
495 
497  void slotAddSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString& _handleName);
498 
500  void slotRegisterType(QString _handleName, DataType _type);
501 
503  void slotAddPrimitiveType(QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType& _typeHandle);
504 
514  void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon,
515  SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier);
516 
527  void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon,
528  SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier,
529  DataType _objectTypeRestriction);
530 
532  void slotAddSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type);
533 
535  void slotSelectionOperation(QString _operation);
536 
538  void slotShowToggleSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
539 
541  void slotShowLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
542 
544  void slotShowVolumeLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
545 
547  void slotShowSurfaceLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
548 
550  void slotShowSphereSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
551 
553  void slotShowClosestBoundarySelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
554 
556  void slotShowFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
557 
559  void slotShowComponentsSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
560 
562  void slotToggleSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
563 
565  void slotLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
566 
568  void slotVolumeLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
569 
571  void slotSurfaceLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
572 
574  void slotSphereSelection(QMouseEvent* _event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect);
575 
577  void slotClosestBoundarySelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
578 
580  void slotFloodFillSelection(QMouseEvent* _event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect);
581 
583  void slotComponentsSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
584 
586  void slotCustomSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect);
587 
589  void slotGetActiveDataTypes(SelectionInterface::TypeList& _types);
590 
592  void slotGetActivePrimitiveType(SelectionInterface::PrimitiveType& _type);
593 
595  void slotTargetObjectsOnly(bool& _targetsOnly);
596 
598  void slotLoadSelection(const INIFile& _file);
599 
601  void slotSaveSelection(INIFile& _file);
602 
604  void slotRegisterKeyShortcut(int _key, Qt::KeyboardModifiers _modifiers);
605 
607  void slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers);
608 
616  void slotGetAllFilters ( QStringList& _list);
617 
618 
620  void slotDeleteAllObjects( );
621 
623  void slotCrossPluginConnect( QString _pluginName1, const char* _signal, QString _pluginName2, const char* _slot);
624 
626  void slotSetRenderer(unsigned int _viewer, QString _rendererName);
627 
629  void slotGetCurrentRenderer(unsigned int _viewer, QString& _rendererName);
630 
632  // void slotGetPlugin(QString _name, QObject* & _plugin );
633 
636  //===========================================================================
639  //===========================================================================
640 public slots:
641 
643  void updateView();
644 
646  void updateUI();
647 
649  void clearAll();
650 
652  void deleteObject( int _id );
653 
654  void setObjectComment(int objId, QString key, QString comment);
655  void clearObjectComment(int objId, QString key);
656  void clearAllComments(int objId);
657 
659  void fullscreen( bool _state );
660 
662  void showViewModeControls( bool _show );
663 
665  void loggerState(int _state);
666 
668  void enableOpenMeshErrorLog(bool _state);
669 
671  void showToolbox( bool _state );
672 
674  void showStatusBar( bool _state );
675 
677  void multiViewMode( int _mode );
678 
680  void restrictFrameRate( bool _enable );
681 
683  void setMaxFrameRate( int _rate );
684 
687  void snapshotBaseFileName(QString _fname, unsigned int _viewerId = 0);
688 
690  void snapshotFileType(QString _type, unsigned int _viewerId = 0);
691 
693  void snapshotCounterStart(const int _counter, unsigned int _viewerId = 0);
694 
700  void snapshot(unsigned int _viewerId = 0, int _width = 0, int _height = 0, bool _alpha = false, bool _hideCoordsys = false, int _numSamples = 1);
701 
703  void applicationSnapshot();
704 
706  void applicationSnapshotName(QString _name);
707 
709  void viewerSnapshot();
710 
712  void resizeViewers(int _width, int _height );
713 
715  void resizeApplication(int _width, int _height );
716 
718  void writeVersionNumbers(QString _filename);
719 
721  QList<int> objectList (QString _selection, QStringList _types);
722 
724  void blockSceneGraphUpdates();
725 
728 
729  void setView(QString view);
730  void setViewAndWindowGeometry(QString view);
731 
732  //===========================================================================
735  //===========================================================================
736 
737 public slots:
743  void addViewModeToolboxes(QString _modeName, QString _toolboxList);
744 
751  void addViewModeToolbars(QString _modeName, QString _toolbarList);
752 
758  void addViewModeContextMenus(QString _modeName, QString _contextMenuList);
759 
764  void addViewModeIcon(QString _modeName, QString _iconName);
765 
770  void setToolBoxSide(QString _side);
771 
777  void setToolBoxActive(QString _toolBoxName, bool _active);
778 
781  //===========================================================================
784  //===========================================================================
785 public slots:
794  int loadObject ( QString _filename );
795 
796 private slots:
801  void resetScenegraph( bool _resetTrackBall );
802 
803  public :
804 
816  void commandLineOpen(const char* _filename, bool _asPolyMesh );
817 
828  void commandLineScript(const char* _filename );
829 
830  private slots:
831 
839 
840  private:
842  std::vector< std::pair < std::string , bool > > commandLineFileNames_;
843 
845  std::vector< std::string > commandLineScriptNames_;
846 
847  public:
848 
852  int addEmptyObject( DataType _type );
853 
861  int loadObject( DataType _type, QString _filename);
862 
865  //===========================================================================
868  //===========================================================================
869  private slots:
871  void viewUpdated();
872 
874  void captureVideo();
875 
876  public slots:
877 
879  void startVideoCapture(QString _baseName, int _fps, bool _captureViewers);
880 
882  void stopVideoCapture();
883 
884  private:
885  QTimer videoTimer_;
887 
889 
890  bool capture_;
891 
894 
896  //===========================================================================
899  //===========================================================================
900 
901  public slots:
902 
906  bool saveObject( int _id, QString _filename );
907 
908  void saveObject( int _id, QString _filename, int _pluginID );
909 
910  void saveObjects( IdList _ids, QString _filename, int _pluginID );
911 
916  bool saveObjectTo( int _id, QString _filename );
917 
918  bool saveObjectsTo( IdList _ids, QString _filename );
919 
921  void saveAllObjects();
922 
924  void saveAllObjectsTo();
925 
927  void saveSettings();
928 
930  void saveSettings(QString filePath, bool is_saveObjectInfo, bool is_targetOnly, bool is_saveAll,
931  bool is_askOverwrite, bool is_saveProgramSettings, bool is_savePluginSettings);
932 
934  void loadObject();
935 
937  void loadSettings();
938 
940  void loadSettings(QString _filename);
941 
943  int getObjectId(QString _filename);
944 
950  void deserializeMaterialProperties(int _objId, QString _props);
951 
957  QString serializeMaterialProperties(int _objId);
958 
961  //===========================================================================
964  //===========================================================================
965  private slots :
966 
968  void slotMouseEvent( QMouseEvent* _event );
969 
971  void slotWheelEvent( QWheelEvent * _event, const std::string & _mode);
972 
977  void slotAddEmptyObjectMenu();
978 
980  void slotAddEmptyObject( DataType _type , int& _id );
981 
983  void slotCopyObject( int _oldId , int& _newId );
984 
986  void slotExit();
987 
989  void slotRecentOpen(QAction* _action);
990 
992  void slotGenerateBackup( int _id, QString _name, UpdateType _type );
993 
994  public slots:
995 
997  void addToolbox(QString _name ,QWidget* _widget);
998 
1000  void addToolbox(QString _name ,QWidget* _widget, QIcon* _icon);
1001 
1009  QWidget *getToolbox(QString _pluginName, QString _toolboxName);
1010 
1011  void activateToolbox(QString _pluginName, QString _toolboxName, bool activate);
1012 
1013  private :
1014 
1015  //===========================================================================
1018  //===========================================================================
1019 
1020  private:
1023 
1026 
1029 
1030 
1033 
1036 
1039 
1042 
1045  //===========================================================================
1048  //===========================================================================
1049 
1051  void setupOptions();
1052 
1054  void readGUIOptions(INIFile& _ini);
1055 
1057  void readApplicationOptions(INIFile& _ini);
1058 
1060  void writeApplicationOptions(INIFile& _ini);
1061 
1063  void restoreKeyBindings();
1064 
1065  public slots:
1066 
1068  void saveOptions();
1069 
1071  void applyOptions();
1072 
1083  void openIniFile( QString _filename,
1084  bool _coreSettings ,
1085  bool _perPluginSettings,
1086  bool _loadObjects );
1087 
1088  private:
1089 
1102  void writeIniFile( QString _filename,
1103  bool _relativePaths,
1104  bool _targetOnly,
1105  bool _saveSystemSettings,
1106  bool _savePluginSettings ,
1107  bool _saveObjectInfo,
1108  std::map<int,QString>& _fileMapping);
1109 
1114  void writeObjFile(QString _filename, bool _relativePaths, bool _targetOnly, std::map<int,QString>& _fileMapping);
1115 
1117  void writeOnExit();
1118 
1122  //===========================================================================
1125  //===========================================================================
1126 
1127  signals:
1129  void log(Logtype _type , QString _message );
1130 
1132  void log(QString _message );
1133 
1135  void scriptLog(QString _message);
1136 
1138  void externalLog(Logtype _type , QString _message);
1139 
1140  private slots:
1141 
1143  void slotLog(Logtype _type, QString _message);
1144 
1146  void slotLogToFile(Logtype _type, QString _message);
1147 
1148  private:
1150  QTextStream* logStream_;
1151 
1153  QFile* logFile_;
1154 
1155  public :
1156  void scriptLogFunction( QString _output);
1157 
1161  //===========================================================================
1164  //===========================================================================
1165 
1166  private :
1168  bool checkSlot(QObject* _plugin , const char* _slotSignature);
1169 
1171  bool checkSignal(QObject* _plugin , const char* _signalSignature);
1172 
1175  //===========================================================================
1178  //===========================================================================
1179 
1180  public :
1181  const std::vector<PluginInfo> plugins() const {return plugins_; };
1182 
1183  private:
1185  std::vector<PluginInfo> plugins_;
1186 
1189 
1191  void loadPlugins();
1192  private slots:
1194  void slotShowPlugins();
1195 
1197  void loadPlugin(const QString& _filename,const bool _silent, QString& _licenseErrors , QObject* _plugin = 0 );
1198 
1200  void slotLoadPlugin();
1201 
1203  void slotBlockPlugin(const QString &_rpcName);
1204 
1206  void slotUnBlockPlugin(const QString &_rpcName);
1207 
1211  //===========================================================================
1214  //===========================================================================
1215 
1216  signals:
1217 
1218  void scriptInfo( QString _pluginName , QString _functionName );
1219 
1220  void executeScript( QString _script );
1221 
1222  void executeFileScript( QString _filename );
1223 
1224  void setSlotDescription(QString _slotName, QString _slotDescription,
1225  QStringList _parameters, QStringList _descriptions);
1226 
1227  public slots:
1235  void createWidget(QString _objectName, QString _uiFilename, bool _show = true);
1236 
1238  void setViewMode(QString _viewMode);
1239 
1241  QString getCurrentViewMode();
1242 
1244  void setViewModeIcon(QString _mode, QString _iconName);
1245 
1247  void moveToolBoxToTop(QString _name);
1248 
1250  void moveToolBoxToBottom(QString _name);
1251 
1252  void showReducedMenuBar(bool reduced);
1253 
1254  private :
1256  QScriptEngine scriptEngine_;
1257 
1259  std::vector<ScriptingWrapper*> scriptingWrappers_;
1260 
1262  QStringList scriptingFunctions_;
1263 
1266 
1269 
1272 
1275 
1276 
1277  private slots:
1278  void slotScriptInfo( QString _pluginName , QString _functionName );
1279 
1280 
1285  void slotExecuteScript( QString _script );
1286 
1291  void slotExecuteFileScript( QString _filename );
1292 
1293  void slotGetScriptingEngine( QScriptEngine*& _engine );
1294 
1295  void slotGetAllAvailableFunctions( QStringList& _functions );
1296 
1298  void slotSetSlotDescription(QString _slotName, QString _slotDescription,
1299  QStringList _parameters, QStringList _descriptions);
1300 
1302  void slotSetSlotDescriptionGlobalFunction(QString _functionName, QString _slotDescription,
1303  QStringList _parameters, QStringList _descriptions);
1304 
1306  void slotGetDescription(QString _function, QString& _fnDescription,
1307  QStringList& _parameters, QStringList& _descriptions );
1308 
1309  void slotScriptError(const QScriptValue &error);
1310 
1311  private:
1312 
1313  QList< SlotInfo > coreSlots_;
1314  QList< SlotInfo > globalFunctions_;
1315 
1316  void setDescriptions();
1317 
1320  //===========================================================================
1323  //===========================================================================
1324  private slots:
1325 
1331  void slotPluginExists( QString _pluginName , bool& _exists );
1332 
1339  void slotFunctionExists( QString _pluginName , QString _functionName , bool& _exists );
1340 
1347  void slotCall( QString _pluginName , QString _functionName , bool& _success );
1348 
1354  void slotCall( QString _expression , bool& _success );
1355 
1366  void slotGetValue(QString _expression, QVariant& _result );
1367 
1370  //===========================================================================
1373  //===========================================================================
1374 
1375  private slots:
1376 
1378  void checkScenegraphDirty();
1379 
1380  private:
1381 
1384 
1386  QTime *redrawTime_;
1387 
1391  //===========================================================================
1394  //===========================================================================
1395 
1396  private:
1397 
1398  QList< JobInfo* > currentJobs;
1399 
1401 
1403  bool getJob(QString _jobId, int& _index);
1404 
1405  private slots:
1406 
1408  void slotStartJob( QString _jobId, QString _description , int _min , int _max,bool _blocking );
1409 
1411  void slotSetJobState(QString _jobId, int _value );
1412 
1414  void slotSetJobName(QString _jobId, QString _name );
1415 
1417  void slotSetJobDescription(QString _jobId, QString _text );
1418 
1420  void slotCancelJob(QString _jobId );
1421 
1423  void slotFinishJob(QString _jobId );
1424 
1426  void slotJobCancelRequested(QString _jobId);
1427 
1428  signals:
1429 
1430  void jobCanceled( QString _jobId );
1431 
1434  //===========================================================================
1437  //===========================================================================
1438 
1439  private slots:
1440 
1442  void newObject(int _objectId);
1443 
1445  void deletedObject(int _objectId);
1446 
1449  //===========================================================================
1452  //===========================================================================
1453 
1454  public slots:
1455 
1457  void exitApplication();
1458 
1464  void exitFailure();
1465 
1466  void finishSplash();
1467 
1468 
1471  private:
1477  bool checkOpenGLCapabilities();
1478 
1483  bool checkLibraryVersions();
1484 
1485  void hookUpEventFilter(QWidget *widget);
1486 
1487 
1488  private :
1489 
1492 
1495 
1497  std::vector<PluginLogger*> loggers_;
1498 
1500  std::vector<dataTypes> supportedDataTypes_;
1501 
1502  private :
1505 
1508 
1510  QSplashScreen* splash_;
1511 
1514 
1516  QVector<ViewMode*> viewModes_;
1517 
1519  QTimer* redrawTimer_;
1520 
1521  SpinBoxEventFilter spinBoxEventFilter_;
1522 
1523 
1524 };
1525 
1527 QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine);
1528 
1530 QScriptValue printToFileFunction(QScriptContext *context, QScriptEngine *engine);
1531 
1533 QScriptValue helpFunction(QScriptContext *context, QScriptEngine *engine);
1534 
1535 //=============================================================================
1536 #endif // MVIEWWIDGET_HH defined
1537 //=============================================================================
1538 
void slotLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when lasso selection operation has been performed.
void slotSphereSelection(QMouseEvent *_event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when sphere selection operation has been performed.
void snapshotFileType(QString _type, unsigned int _viewerId=0)
Set the file type for snapshots.
Definition: Core.cc:1409
void slotCall(QString _pluginName, QString _functionName, bool &_success)
Definition: RPC.cc:94
QString getCurrentViewMode()
Get current view mode.
Definition: scripting.cc:141
void slotJobCancelRequested(QString _jobId)
Called by dialogs if cancel button is pressed.
Definition: process.cc:265
void componentsSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard connected components selection has been perf...
void slotLogToFile(Logtype _type, QString _message)
log to file
Definition: Core.cc:1233
void setObjectComment(int objId, QString key, QString comment)
Called when a plugin requests an update in the viewer.
Definition: Core.cc:1776
void updateUI()
process events during script execution to keep the ui alive
Definition: Core.cc:948
void showComponentsSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard connected components selection is required...
QList< JobInfo * > currentJobs
A job has been started by a plugin.
Definition: Core.hh:1398
void iniLoadOptionsLast(INIFile &_ini)
This signal is used to tell the plugins to load their new status after objects are loaded...
void slotGetDescription(QString _function, QString &_fnDescription, QStringList &_parameters, QStringList &_descriptions)
get available descriptions for a given public slot
Definition: Core.cc:1327
void slotMultiTextureAdded(QString _textureGroup, QString _name, QString _filename, int _id, int &_textureId)
Called by a plugin if it creates a multitexture.
void PluginWheelEvent(QWheelEvent *, const std::string &)
When this Signal is emitted when a Wheel Event occures.
void slotShowSphereSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide sphere selection operation for specific selection mode.
ACG::SceneGraph::MaterialNode * coordsysMaterialNode_
Node for coordsys Material.
Definition: Core.hh:1038
void setSlotDescription(QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
Core scripting engine.
void addViewModeContextMenus(QString _modeName, QString _contextMenuList)
Scripting function to set context menus in a view mode.
Definition: scripting.cc:201
QTimer * scenegraphCheckTimer_
Timer that starts scenegraph check.
Definition: Core.hh:1383
void slotGetCurrentTexture(int _id, QString &_textureName)
Called by plugins if current texture should be retrieved.
void signalObjectUpdated(int)
When this Signal is emitted all Plugins are informed that the object list changed.
Interface class for type definitions.
void slotFloodFillSelection(QMouseEvent *_event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when flood fill selection operation has been performed.
void keyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
SelectionInterface: This signal is emitted when a key shortcut has been pressed.
void addViewModeIcon(QString _modeName, QString _iconName)
Scripting function to set an icon for a view mode.
Definition: scripting.cc:207
void updateAllTextures()
Update all textures in the plugins.
void showVolumeLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard volume lasso selection is required...
void showToggleSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard toggle selection is required.
void viewerSnapshot()
Take a snapshot from all viewers.
Definition: Core.cc:1461
void visibilityChanged(int _id)
Tell plugins that the visibility of an object has changed.
ACG::SceneGraph::CoordsysNode * coordsysNode_
Node for the coordinate system.
Definition: Core.hh:1041
void viewUpdated()
Slot called everytime the view is updated.
Definition: Video.cc:117
void saveSettings()
Save current status to a settings file. Solicit file name through dialog.
Definition: saveSettings.cc:63
void loadSettings()
Load status from file.
void slotFileOpened(int _id)
Called when a file has been opened.
void slotCopyObject(int _oldId, int &_newId)
Slot copying an object.
void slotShowPlugins()
Show Plugins Dialog.
void slotPluginExists(QString _pluginName, bool &_exists)
Check if a plugin exists.
Definition: RPC.cc:63
QString splashMessage_
Last Splash message;.
Definition: Core.hh:1513
void pluginViewChanged()
This signal is emitted if one of the viewers updated its view.
void slotExecuteFileScript(QString _filename)
Definition: scripting.cc:71
SeparatorNode * core_nodes_
Separator Node holding all core scenegraph nodes.
Definition: Core.hh:1028
bool capture_
Slot called everytime the view is updated.
Definition: Core.hh:890
void slotCancelJob(QString _jobId)
A job state has been canceled by a plugin.
Definition: process.cc:209
void slotDeleteAllObjects()
Called when a plugin wants to delete all objects.
Definition: Core.cc:1816
void multiViewMode(int _mode)
Switch the multiView Mode.
Definition: Core.cc:1078
void slotUpdateAllTextures()
Update all textures in the plugins.
int addEmptyObject(DataType _type)
void clearAll()
Clear all data objects.
Definition: Core.cc:990
void targetObjectsOnly(bool &_targetsOnly)
SelectionInterface: This signal is emitted if the current target restriction state is requested...
void deleteObject(int _id)
Called to delete an object.
Definition: Core.cc:1708
void iniSave(INIFile &_ini, int _id)
This signal is used to tell the plugins to save the data of _id to the given file.
int toolboxindex_
Index of Plugins toolbox widget.
Definition: Core.hh:1188
int captureType_
Slot called everytime the view is updated.
Definition: Core.hh:888
void slotGetActiveDataTypes(SelectionInterface::TypeList &_types)
SelectionInterface: Called when active (selected) data types should be fetched.
void resizeViewers(int _width, int _height)
resize the examinerViewer
Definition: Core.cc:1467
void resizeApplication(int _width, int _height)
resize the whole Application
Definition: Core.cc:1478
std::vector< PluginInfo > plugins_
List of all loaded plugins_.
Definition: Core.hh:1181
const std::vector< PluginInfo > plugins() const
List of all loaded plugins_.
Definition: Core.hh:1181
void slotUpdateTexture(QString _name, int _identifier)
Tell the plugins to update the given texture.
void checkScenegraphDirty()
Called to check if the scenegraph needs to be redrawn.
Definition: Core.cc:958
void writeApplicationOptions(INIFile &_ini)
Write Application options to ini file.
Definition: ParseIni.cc:291
int getObjectId(QString _filename)
Get object id from filename.
Definition: scripting.cc:126
void setTextureMode(QString _textureName, QString _mode, int _id)
A texture mode should be changed.
void clearObjectComment(int objId, QString key)
Called when a plugin requests an update in the viewer.
Definition: Core.cc:1789
void setViewModeIcon(QString _mode, QString _iconName)
Set the icon of a viewMode.
Definition: scripting.cc:147
void slotAddEmptyObject(DataType _type, int &_id)
Slot adding empty object of a given type.
void iniLoadOptions(INIFile &_ini)
This signal is used to tell the plugins to load their new status.
void addToolbox(QString _name, QWidget *_widget)
Add a Toolbox from a plugin or from scripting.
Definition: scripting.cc:249
void textureGetImage(QString _textureName, QImage &_image)
fetch texture image
void updateView()
Called when a plugin requests an update in the viewer.
Definition: Core.cc:897
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
void addSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type)
SelectionInterface: This signal is used to add non-interactive operations for a specific primitive ty...
prototypeDataType DataTypePrototype_
Prototype for the DataType.
Definition: Core.hh:1271
void addViewModeToolbars(QString _modeName, QString _toolbarList)
Scripting function to set toolbars in a view mode.
Definition: scripting.cc:193
void captureVideo()
Function called for every frame when capturing video.
Definition: Video.cc:86
void slotGetAllAvailableFunctions(QStringList &_functions)
Core scripting engine.
Definition: scripting.cc:79
void PluginMouseEventLight(QMouseEvent *)
Emitted when an light event occurs.
void showLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard lasso selection is required.
void toggleSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard toggle selection has been performed...
void slotTextureName(int _id, int _textureIndex, QString &_textureName)
Called by plugins if texture name should be fetched.
void scriptLog(QString _message)
Logging signal for ScriptEngine.
void openIniFile(QString _filename, bool _coreSettings, bool _perPluginSettings, bool _loadObjects)
Load information from an ini file.
Definition: ParseIni.cc:406
void slotSetRenderer(unsigned int _viewer, QString _rendererName)
called to switch the renderer for a specific viewer
bool add_sync_host(const QString &_name)
Synchronise two viewers.
QScriptValue printToFileFunction(QScriptContext *context, QScriptEngine *engine)
Special print function for sending output to a file.
Definition: scripting.cc:382
BaseObject * objectRoot_
Pointer to the data rootNode;.
Definition: Core.hh:1504
void getActiveDataTypes(SelectionInterface::TypeList &_types)
SelectionInterface: This signal is emitted when the active (selected) data types should be fetched...
void addSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString &_handleName)
SelectionInterface: This signal is emitted when a new toolbutton should be added. ...
void saveAllObjectsTo()
Slot for saving objects to a new location.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Definition: DataTypes.hh:184
void createWidget(QString _objectName, QString _uiFilename, bool _show=true)
Create an script object from a ui file.
Definition: scripting.cc:87
prototypeVec3d vec3dPrototype_
Prototype for the Vector type.
Definition: Core.hh:1265
void loadObject()
Open Load Widget.
void slotClosestBoundarySelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when closest boundary selection operation has been performed.
void slotExecuteAfterStartup()
Executed after loading core completly to load files from commandline.
void slotFinishJob(QString _jobId)
A job state has been finished by a plugin.
Definition: process.cc:235
void registerType(QString _handleName, DataType _type)
SelectionInterface: This signal is emitted when a data type should be registered for a selection mode...
QScriptValue helpFunction(QScriptContext *context, QScriptEngine *engine)
Function to print help about scripting functions.
Definition: scripting.cc:408
void slotAddEmptyObjectMenu()
Open the add Empty dialog.
void slotGetActivePrimitiveType(SelectionInterface::PrimitiveType &_type)
SelectionInterface: Called when active primitive type should be fetched.
void slotGetValue(QString _expression, QVariant &_result)
Definition: RPC.cc:146
void setView(QString view)
Called when a plugin requests an update in the viewer.
Definition: scripting.cc:348
void slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers)
SelectionInterface: Called when a key event occurred.
bool saveObject(int _id, QString _filename)
Save an object.
void addMultiTexture(QString _textureGroup, QString _name, QString _filename, int _id, int &_textureId)
The texture with the given name and filename has been added.
std::vector< std::string > commandLineScriptNames_
Vector storing filenames from commandline to be opened after application startup (script files) ...
Definition: Core.hh:845
void saveAllObjects()
Slot for saving objects from Menu.
void setToolBoxSide(QString _side)
Scripting function to set the side of the main window on which the toolbox should be displayed...
Definition: scripting.cc:213
void slotShowLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide lasso selection operation for specific selection mode.
void objectSelectionChanged(int)
This signal is emitted if the object has been changed (source/target)
void readGUIOptions(INIFile &_ini)
Read Options that needs the GUI to be set up completely.
void slotShowSurfaceLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide surface lasso selection operation for specific selection mode...
void slotWheelEvent(QWheelEvent *_event, const std::string &_mode)
Gets called by examiner widget when Wheel is moved in picking mode.
Definition: Core.cc:852
std::vector< ScriptingWrapper * > scriptingWrappers_
Wrappers for plugin scripting.
Definition: Core.hh:1259
prototypeVec4d vec4dPrototype_
Prototype for the Vector type.
Definition: Core.hh:1268
void textureIndexPropertyName(int _id, QString &_propertyName)
get the texture index property name
void deletedObject(int _objectId)
This slot is called by the object manager when an object is deleted.
Class for the handling of simple configuration files.
Definition: INIFile.hh:98
void setViewMode(QString _viewMode)
Set the active ViewMode.
Definition: scripting.cc:133
void pluginSceneDrawn()
This signal is emitted after the scene has been drawn.
void executeScript(QString _script)
Core scripting engine.
void textureFilename(int _id, QString _textureName, QString &_textureFilename)
get the texture's filename
void slotGenerateBackup(int _id, QString _name, UpdateType _type)
Slot for generating type specific backups.
void showSphereSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard sphere selection is required.
QList< SlotInfo > globalFunctions_
Core scripting engine.
Definition: Core.hh:1314
void slotTargetObjectsOnly(bool &_targetsOnly)
SelectionInterface: Called when target restriction state should be fetched.
void writeObjFile(QString _filename, bool _relativePaths, bool _targetOnly, std::map< int, QString > &_fileMapping)
Write current status to obj file (Application and File Options)
Definition: ParseObj.cc:72
void slotSelectionOperation(QString _operation)
SelectionInterface: Called when a non-interactive operation has been performed.
void saveOptions()
Save the current options to the standard ini file.
QScriptEngine scriptEngine_
Core scripting engine.
Definition: Core.hh:1256
void slotStartJob(QString _jobId, QString _description, int _min, int _max, bool _blocking)
A job has been started by a plugin.
Definition: process.cc:63
int nextBackupId_
Id for the next backup.
Definition: Core.hh:1491
void slotComponentsSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when connected components selection operation has been performed...
void customSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect)
SelectionInterface: This signal is emitted when a custom selection operation has been performed...
void objectPropertiesChanged(int _id)
Tell plugins that object properties such as object names have been changed.
QTextStream * logStream_
stream for logging to file
Definition: Core.hh:1150
void applyOptions()
after ini-files have been loaded and core is up or if options have been changed -> apply Options ...
void restored(int _objectId)
Backup Plugin tells other Plugins that a restore has happened.
void slotAddSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type)
SelectionInterface: Called in order to add non-interactive operations for a specific primitive type...
void startVideoCapture(QString _baseName, int _fps, bool _captureViewers)
Start video capturing.
Definition: Video.cc:62
Predefined datatypes.
Definition: DataTypes.hh:88
void updatedTextures(QString, int)
This Signal is send to the plugins if a texture has been updated.
void slotAddPickMode(const std::string &_mode)
Add a new picking mode to the examiner_widget_.
Definition: Core.cc:877
void slotTextureUpdated(QString _textureName, int _identifier)
A Texture has been updated.
int lastHeight_
Slot called everytime the view is updated.
Definition: Core.hh:893
void selectionOperation(QString _operation)
SelectionInterface: This signal is emitted when a non-interactive operation has been performed...
void activateToolbox(QString _pluginName, QString _toolboxName, bool activate)
Gets called by examiner widget when mouse is moved in picking mode.
Definition: scripting.cc:244
void slotShowFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide flood fill selection operation for specific selection mode...
void pluginsInitialized()
Called after all plugins are loaded.
void setToolBoxActive(QString _toolBoxName, bool _active)
Scripting function to activate or deactivate a toolbox.
Definition: scripting.cc:331
void setDescriptions()
set the descriptions for scriptable slots of the core
Definition: Core.cc:1536
bool checkLibraryVersions()
Checks for library inconsistencies.
Definition: Core.cc:1842
void readApplicationOptions(INIFile &_ini)
Get and set Application options from ini file.
Definition: ParseIni.cc:78
void slotTextureChangeImage(QString _textureName, QImage &_image)
Called by plugins if texture image should be changed.
void slotSetSlotDescription(QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
set a description for one of the plugin's public slots
Definition: Core.cc:1275
void restoreKeyBindings()
Restore key assignments from configs files.
void lassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard lasso selection has been performed...
void exitApplication()
exit the current application
Definition: Core.cc:1003
void slotShowComponentsSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide connected components selection operation for specific selection mode...
QTimer videoTimer_
Slot called everytime the view is updated.
Definition: Core.hh:885
std::vector< PluginLogger * > loggers_
Logger interfaces between plugins and core logger.
Definition: Core.hh:1497
void exitFailure()
Aborts the application with an error code.
Definition: Core.cc:1210
void applicationSnapshot()
Take a snapshot from the whole app.
Definition: Core.cc:1449
void slotAddHiddenPickMode(const std::string &_mode)
Add a new and invisible picking mode to the examiner_widget_.
Definition: Core.cc:886
QWidget * getToolbox(QString _pluginName, QString _toolboxName)
Definition: scripting.cc:226
void slotCustomSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect)
SelectionInterface: Called when custom selection operation has been performed.
void saveOnExit(INIFile &_ini)
This signal is emitted before the core deletes its data and exits.
void slotRegisterType(QString _handleName, DataType _type)
SelectionInterface: Called when a data type is added for a specific selection type.
void openedFile(int _id)
Tell the plugins that a file has been opened ( -> Database)
SeparatorNode * dataSeparatorNode_
Toplevel Nodes for data objects.
Definition: Core.hh:1032
void objectDeleted(int)
Called after an object has been deleted.
void surfaceLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard surface lasso selection has been performed...
Update type class.
Definition: UpdateType.hh:62
void slotGetAllFilters(QStringList &_list)
Called when a plugin requests a list of file-filters.
QStringList scriptingFunctions_
List of all registered scripting functions.
Definition: Core.hh:1262
bool saveObjectTo(int _id, QString _filename)
void slotLoadSelection(const INIFile &_file)
SelectionInterface: Called when a selection should be loaded from a file.
void slotShowToggleSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide toggle selection operation for specific selection mode.
void commandLineScript(const char *_filename)
Load a script from the commandline on application start.
void loadSelection(const INIFile &_file)
SelectionInterface: This signal is emitted when a selection should be loaded from a file...
QTimer * redrawTimer_
If enabled, this timer will block screen refresh if done more then 30 times per second.
Definition: Core.hh:1519
void slotAddSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString &_handleName)
SelectionInterface: Called when a new selection type button should be added to the toolbar...
void slotUnBlockPlugin(const QString &_rpcName)
Function for UnBlocking Plugins. Plugins will not loaded automatically.
void showViewModeControls(bool _show)
Show or Hide the viewmode control widget.
Definition: Core.cc:1022
void writeOnExit()
Called if app is closed and writes all information to ini file.
Definition: Core.cc:1123
void slotObjectPropertiesChanged(int _id)
Called by plugins if object properties like names have changed.
void slotAddTexture(QString _textureName, QString _filename, uint _dimension, int _id)
Called by a plugin if it creates a texture.
void slotFunctionExists(QString _pluginName, QString _functionName, bool &_exists)
Check if a function exists.
Definition: RPC.cc:75
void slotSetJobName(QString _jobId, QString _name)
A job's widget caption has been updated by a plugin.
Definition: process.cc:162
int nextBackupGroupId_
Id for the next backup group.
Definition: Core.hh:1494
void addViewModeToolboxes(QString _modeName, QString _toolboxList)
Scripting function to set toolboxes in a view mode.
Definition: scripting.cc:185
void scriptInfo(QString _pluginName, QString _functionName)
Core scripting engine.
void showToolbox(bool _state)
Show or hide toolbox.
Definition: Core.cc:1064
void slotShowVolumeLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide volume lasso selection operation for specific selection mode...
void closestBoundarySelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard closest boundary selection has been performe...
void blockSceneGraphUpdates()
Block the scenegraph updates.
Definition: scripting.cc:339
QList< SlotInfo > coreSlots_
Core scripting engine.
Definition: Core.hh:1313
QTime * redrawTime_
Holds the time since last redraw.
Definition: Core.hh:1386
SeparatorNode * dataRootNode_
Root Node for data objects.
Definition: Core.hh:1035
void showFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard flood fill selection is required.
void loadPlugins()
Load all plugins from default plugin directory and from INI-File.
void slotSetSlotDescriptionGlobalFunction(QString _functionName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
set a description for a global scripting function
Definition: Core.cc:1314
bool checkSignal(QObject *_plugin, const char *_signalSignature)
Check if a plugin has a signal.
void setViewAndWindowGeometry(QString view)
Called when a plugin requests an update in the viewer.
Definition: scripting.cc:352
void slotAddPrimitiveType(QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType &_typeHandle)
SelectionInterface: Called when a new, non-standard primitive type should be handled.
void slotRecentOpen(QAction *_action)
Open Recent file.
Definition: Core.cc:1092
void addTexture(QString, QString, uint, int)
The texture with the given name and filename has been added.
void slotSetTextureMode(QString _textureName, QString _mode, int _id)
A texture mode should be changed.
void stopVideoCapture()
Stop video capturing.
Definition: Video.cc:103
void slotGetCurrentRenderer(unsigned int _viewer, QString &_rendererName)
called to get the currently active renderer renderer for a specific viewer
void fullscreen(bool _state)
set fullscreen mode
Definition: Core.cc:1015
void slotVolumeLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when volume lasso selection operation has been performed.
void addPrimitiveType(QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType &_typeHandle)
SelectionInterface: This signal is emitted when a selection plugin should handle a new primitive type...
void slotVisibilityChanged(int _id)
Called when a plugin changes the visibility of an object.
void iniSaveOptions(INIFile &_ini)
This signal is used to tell the plugins to save their current status.
void slotLoad(QString _filename, DataType _type, int &_id)
A plugin wants to load a given file.
void slotEmptyObjectAdded(int _id)
Called when an empty object has been Added.
QTime lastVideoTime_
Slot called everytime the view is updated.
Definition: Core.hh:886
void slotTextureIndexPropertyName(int _id, QString &_propertyName)
Called by plugins if texture index property name should be fetched.
void slotExit()
Exit Application.
Definition: Core.cc:1159
bool checkOpenGLCapabilities()
OpenGL capability check.
Definition: Core.cc:1905
void registerKeyShortcut(int _key, Qt::KeyboardModifiers _modifiers)
SelectionInterface: This signal is emitted when a type selection plugin wants to listen to a key even...
void getCurrentTexture(int _id, QString &_textureName)
get current texture
void scriptLogFunction(QString _output)
stream for logging to file
Definition: scripting.cc:83
void redo()
Signal send to plugins when whole scene is cleared.
void finishSplash()
exit the current application
Definition: Core.cc:1997
void getSubTextures(int _id, QString _multiTextureName, QStringList &_subTextures)
get a multi-texture's sub textures
QFile * logFile_
logfile
Definition: Core.hh:1153
QSplashScreen * splash_
SplashScreen, only used in gui mode.
Definition: Core.hh:1510
void slotSurfaceLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when surface lasso selection operation has been performed.
void jobCanceled(QString _jobId)
A job has been started by a plugin.
void slotToggleSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when toggle selection operation has been performed.
void loadPlugin(const QString &_filename, const bool _silent, QString &_licenseErrors, QObject *_plugin=0)
Function for loading Plugins.
void floodFillSelection(QMouseEvent *_event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard flood fill selection has been performed...
void resetScenegraph(bool _resetTrackBall)
void saveSelection(INIFile &_file)
SelectionInterface: This signal is emitted when a selection should be written into a file...
SeparatorNode * root_node_scenegraph_global_
Seperator node for global nodes.
Definition: Core.hh:1025
void aboutToRestore(int _objectId)
Backup Plugin tells other Plugins that a restore will happen.
void iniLoad(INIFile &, int)
If an ini File is opened, this signal is send to Plugins capable of handling ini files.
SeparatorNode * root_node_scenegraph_
Scenegraphs root node.
Definition: Core.hh:1022
bool saveObjectsTo(IdList _ids, QString _filename)
void slotTextureGetImage(QString _textureName, QImage &_image)
Called by plugins if texture image should be fetched.
void slotTextureIndex(QString _textureName, int _id, int &_index)
Called by plugins if texture index should be fetched.
void slotScriptError(const QScriptValue &error)
Core scripting engine.
Definition: scripting.cc:360
void loggerState(int _state)
Change the logging window state.
Definition: Core.cc:1030
void textureIndex(QString _textureName, int _id, int &_index)
get the texture index
Core()
constructor
Definition: Core.cc:125
int lastWidth_
Slot called everytime the view is updated.
Definition: Core.hh:892
prototypeMatrix4x4 matrix4x4Prototype_
Prototype for the Matrix type.
Definition: Core.hh:1274
void slotExecuteScript(QString _script)
Definition: scripting.cc:67
std::vector< dataTypes > supportedDataTypes_
Type-Plugins.
Definition: Core.hh:1500
void textureChangeImage(QString _textureName, QImage &_image)
Change the image for a given texture.
void slotRegisterKeyShortcut(int _key, Qt::KeyboardModifiers _modifiers)
SelectionInterface: Called when a key shortcut is to be registered.
void emptyObjectAdded(int _id)
Tell the plugins that an empty object has been added.
std::vector< std::pair< std::string, bool > > commandLineFileNames_
Vector storing filenames from commandline to be opened after application startup (objects) ...
Definition: Core.hh:842
void slotShowClosestBoundarySelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide closest boundary selection operation for specific selection mode...
void volumeLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard volume lasso selection has been performed...
CoreWidget * coreWidget_
The main applications widget ( only created in gui mode )
Definition: Core.hh:1507
bool getJob(QString _jobId, int &_index)
Find a job in the jobslist.
Definition: process.cc:121
void setMaxFrameRate(int _rate)
set the maximal framerate ( automatically enables framerate restriction )
Definition: Core.cc:979
QList< int > objectList(QString _selection, QStringList _types)
return the list of available object that has the given selection and type
Definition: Core.cc:1515
void restrictFrameRate(bool _enable)
Enable or disable framerate restriction.
Definition: Core.cc:973
void slotLog(Logtype _type, QString _message)
Console logger.
Definition: Logging.cc:93
void slotSaveSelection(INIFile &_file)
SelectionInterface: Called when a selection should be stored into a file.
QString serializeMaterialProperties(int _objId)
Serialize material properties.
Definition: Core.cc:1756
void showSurfaceLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard surface lasso selection is required...
void undo()
Signal send to plugins when whole scene is cleared.
void slotObjectSelectionChanged(int _id)
Called by Plugins if they changed the active object.
void addCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon, SelectionInterface::PrimitiveType _associatedTypes, QString &_customIdentifier)
SelectionInterface: This signal is emitted when a custom selection mode is added. ...
Logtype
Log types for Message Window.
void slotSetJobDescription(QString _jobId, QString _text)
A job's widget's status text has been updated by a plugin.
Definition: process.cc:185
void setupOptions()
Get all ini files and set basic paths and options.
Definition: Core.hh:132
void createBackup(int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
Tell backup-plugin to create a backup.
void moveToolBoxToTop(QString _name)
Move selected toolbox to top of side area.
Definition: scripting.cc:167
void PluginMouseEvent(QMouseEvent *)
When this Signal is emitted when a Mouse Event occures.
QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine)
Special print function for core logger.
Definition: scripting.cc:364
void showReducedMenuBar(bool reduced)
Core scripting engine.
Definition: Core.cc:1993
void unblockSceneGraphUpdates()
Unblock the scenegraph updates.
Definition: scripting.cc:344
void slotCrossPluginConnect(QString _pluginName1, const char *_signal, QString _pluginName2, const char *_slot)
Called to create inter plugin connections.
bool checkSlot(QObject *_plugin, const char *_slotSignature)
Check if a plugin has a slot.
void slotGetScriptingEngine(QScriptEngine *&_engine)
Core scripting engine.
Definition: scripting.cc:75
void slotMouseEvent(QMouseEvent *_event)
Gets called by examiner widget when mouse is moved in picking mode.
Definition: Core.cc:805
void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon, SelectionInterface::PrimitiveType _associatedTypes, QString &_customIdentifier)
SelectionInterface: Add new selection mode for specified type.
void moveToolBoxToBottom(QString _name)
Move selected toolbox to bottom of side area.
Definition: scripting.cc:176
void allCleared()
Signal send to plugins when whole scene is cleared.
void sphereSelection(QMouseEvent *_event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard sphere selection has been performed...
void switchTexture(QString, int)
Switch Texture Plugins to a given Mode.
void textureName(int _id, int _textureIndex, QString &_textureName)
get the texture name
void slotSetJobState(QString _jobId, int _value)
A job state has been updated by a plugin.
Definition: process.cc:138
void slotMouseEventLight(QMouseEvent *_event)
Handle Mouse events when in Light mode.
Definition: Core.cc:775
void slotLoadPlugin()
Load Plugins from menu.
void showStatusBar(bool _state)
Show or hide Status Bar.
Definition: Core.cc:1071
void snapshot(unsigned int _viewerId=0, int _width=0, int _height=0, bool _alpha=false, bool _hideCoordsys=false, int _numSamples=1)
Definition: Core.cc:1436
ProcessManagerWidget * processManager_
A job has been started by a plugin.
Definition: Core.hh:1400
void getActivePrimitiveType(SelectionInterface::PrimitiveType &_type)
SelectionInterface: This signal is emitted when the active (selected) primitive type should be fetche...
void slotBlockPlugin(const QString &_rpcName)
Function for Blocking Plugins. Blocked plugins will unloaded and not loaded wthin the next starts...
void slotScriptInfo(QString _pluginName, QString _functionName)
Core scripting engine.
Definition: scripting.cc:63
void saveObjects(IdList _ids, QString _filename, int _pluginID)
void commandLineOpen(const char *_filename, bool _asPolyMesh)
Load an object from the commandline on application start.
~Core()
destructor
Definition: Core.cc:707
void clearAllComments(int objId)
Called when a plugin requests an update in the viewer.
Definition: Core.cc:1802
void enableOpenMeshErrorLog(bool _state)
Enable or disable OpenMesh error logging.
Definition: Core.cc:1041
void externalLog(Logtype _type, QString _message)
This signal is emitted to send log data to a plugin.
void executeFileScript(QString _filename)
Core scripting engine.
void newObject(int _objectId)
This slot is called by the object manager when a new object is created.
void slotObjectUpdated(int _identifier, const UpdateType &_type=UPDATE_ALL)
Called by the plugins if they changed something in the object list (deleted, added, or other property changes)
void writeVersionNumbers(QString _filename)
write the current versions of all plugins to ini file
Definition: Core.cc:1488
void init()
Second initialization stage.
Definition: Core.cc:208
void updateTexture(QString, int)
Tell the plugins to update the given texture.
void snapshotCounterStart(const int _counter, unsigned int _viewerId=0)
Set the start index for the snapshot counter.
Definition: Core.cc:1423
void showClosestBoundarySelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard closest boundary selection is required...
void slotMouseEventIdentify(QMouseEvent *_event)
Handle Mouse events when in Identifier mode.
Definition: Core.cc:726
QVector< ViewMode * > viewModes_
List of available draw modes.
Definition: Core.hh:1516
void slotTextureFilename(int _id, QString _textureName, QString &_textureFilename)
Called by plugins if texture name should be fetched.
void writeIniFile(QString _filename, bool _relativePaths, bool _targetOnly, bool _saveSystemSettings, bool _savePluginSettings, bool _saveObjectInfo, std::map< int, QString > &_fileMapping)
Write current status to ini file (Application and File Options)
Definition: ParseIni.cc:546
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
void applicationSnapshotName(QString _name)
Set the baseName for the application snapshot.
Definition: Core.cc:1455
void slotGetSubTextures(int _id, QString _multiTextureName, QStringList &_subTextures)
Called by plugins if a multi-texture's sub textures should be fetched.
void snapshotBaseFileName(QString _fname, unsigned int _viewerId=0)
Definition: Core.cc:1396
void slotSwitchTexture(QString _textureName, int _id)
Tells Plugins to switch to the given Texture.
void deserializeMaterialProperties(int _objId, QString _props)
Serialize material properties.
Definition: Core.cc:1737