itom  3.0.0
uiOrganizer.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2016, Institut fuer Technische Optik (ITO),
5  Universitaet Stuttgart, Germany
6 
7  This file is part of itom.
8 
9  itom is free software; you can redistribute it and/or modify it
10  under the terms of the GNU Library General Public Licence as published by
11  the Free Software Foundation; either version 2 of the Licence, or (at
12  your option) any later version.
13 
14  itom is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17  General Public Licence for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with itom. If not, see <http://www.gnu.org/licenses/>.
21 *********************************************************************** */
22 
23 #ifndef UIORGANIZER_H
24 #define UIORGANIZER_H
25 
26 //#include "../python/pythonQtConversion.h"
27 #include "../python/pythonItomMetaObject.h"
28 
29 #include <qwidget.h>
30 
31 #include "../common/sharedStructuresQt.h"
32 #include "../DataObject/dataobj.h"
33 #if ITOM_POINTCLOUDLIBRARY > 0
34 #include "../../PointCloud/pclStructures.h"
35 #endif
36 
37 #include "../widgets/userUiDialog.h"
38 #include "../widgets/figureWidget.h"
39 
40 #include "../global.h"
41 #include "../common/sharedStructuresGraphics.h"
42 #include "../common/addInInterface.h"
43 #include "../common/shape.h"
44 
45 #include "../../plot/AbstractFigure.h"
46 
47 #include <qmap.h>
48 #include <qsharedpointer.h>
49 #include <qstring.h>
50 #include <qvariant.h>
51 #include <qhash.h>
52 #include <qtimer.h>
53 #include <qfiledialog.h>
54 #include <qmainwindow.h>
55 #include <qthread.h>
56 #include <qtranslator.h>
57 #include <qpoint.h>
58 #include <qsize.h>
59 
60 class QUiLoader; //forward declaration
61 
62 namespace ito
63 {
64 class WidgetWrapper; //forward declaration
65 
72 {
73 public:
74  enum tUiType
75  {
76  uiTypeUiDialog = 0x0001,
77  uiTypeQDialog = 0x0002,
78  uiTypeQMainWindow = 0x0003,
79  uiTypeQDockWidget = 0x0004,
80  uiTypeFigure = 0x0005
81  };
82 
84 
89  UiContainer(UserUiDialog *uiDialog) :
90  m_type(uiTypeUiDialog)
91  {
92  m_weakDialog = QPointer<QWidget>(uiDialog);
93  }
94 
96 
101  UiContainer(QDialog *dialog) :
102  m_type(uiTypeQDialog)
103  {
104  m_weakDialog = QPointer<QDialog>(dialog);
105  }
106 
108 
113  UiContainer(QMainWindow *mainWindow) :
114  m_type(uiTypeQMainWindow)
115  {
116  m_weakDialog = QPointer<QWidget>(mainWindow);
117  }
118 
120 
125  UiContainer(FigureWidget *figureWidget) :
126  m_type(uiTypeFigure)
127  {
128  m_weakDialog = QPointer<QWidget>(figureWidget);
129  }
130 
132 
137  UiContainer(QDockWidget *dockWidget) :
138  m_type(uiTypeQDockWidget)
139  {
140  m_weakDialog = QPointer<QWidget>(dockWidget);
141  }
142 
144 
150  UiContainer(QWidget *widget, tUiType type) :
151  m_type(type)
152  {
153  m_weakDialog = QPointer<QWidget>(widget);
154  }
155 
158  {
159  m_weakDialog = QPointer<QWidget>(cpy.getUiWidget());
160  m_type = cpy.m_type;
161  }
162 
163 
164  ~UiContainer(); //comment in source file
165 
166 
168  inline UserUiDialog *getUiDialog() const
169  {
170  if(m_type == uiTypeUiDialog)
171  {
172  if(m_weakDialog.isNull()) return NULL;
173  return qobject_cast<UserUiDialog*>(m_weakDialog.data());
174  }
175  return NULL;
176  }
177 
179 
183  inline QWidget *getUiWidget() const
184  {
185  if(m_weakDialog.isNull()) return NULL;
186  return m_weakDialog.data();
187  }
188 
190  inline tUiType getType() const { return m_type; }
191 
192 private:
193  QPointer<QWidget> m_weakDialog;
195 };
196 
198 {
199 public:
200  UiContainerItem() : container(NULL) {}
201 
202  UiContainerItem(const UiContainerItem &cpy)
203  {
204  guardedHandle = cpy.guardedHandle;
205  container = cpy.container;
206  }
207 
208  QWeakPointer< unsigned int > guardedHandle;
209  UiContainer *container;
210 };
211 
213 {
214 private:
215  ito::ParamBase::Type m_dataType;
216  QSharedPointer<ito::DataObject> m_dObjPtr;
217 #if ITOM_POINTCLOUDLIBRARY > 0
218  QSharedPointer<ito::PCLPointCloud> m_dPCPtr;
219  QSharedPointer<ito::PCLPolygonMesh> m_dPMPtr;
220 #endif
221 
222 public:
223  UiDataContainer() : m_dataType(ito::ParamBase::DObjPtr) {};
224  ~UiDataContainer() {};
225  UiDataContainer(const QSharedPointer<ito::DataObject> &sharedDataObject) : m_dataType(ito::ParamBase::DObjPtr), m_dObjPtr(sharedDataObject) {}
226 #if ITOM_POINTCLOUDLIBRARY > 0
227  UiDataContainer(const QSharedPointer<ito::PCLPointCloud> &sharedPointCloud) : m_dataType(ito::ParamBase::PointCloudPtr), m_dPCPtr(sharedPointCloud) {}
228  UiDataContainer(const QSharedPointer<ito::PCLPolygonMesh> &sharedPolygonMesh) : m_dataType(ito::ParamBase::PolygonMeshPtr), m_dPMPtr(sharedPolygonMesh) {}
229 
230  inline UiDataContainer & operator = (QSharedPointer<ito::PCLPointCloud> sharedPointCloud)
231  {
232  m_dataType = ito::ParamBase::PointCloudPtr;
233  m_dPCPtr = sharedPointCloud;
234  m_dObjPtr.clear();
235  m_dPMPtr.clear();
236  return *this;
237  }
238 
239  inline UiDataContainer & operator = (QSharedPointer<ito::PCLPolygonMesh> sharedPolygonMesh)
240  {
241  m_dataType = ito::ParamBase::PolygonMeshPtr;
242  m_dPMPtr = sharedPolygonMesh;
243  m_dObjPtr.clear();
244  m_dPCPtr.clear();
245  return *this;
246  }
247 #endif
248 
249  inline UiDataContainer & operator = (QSharedPointer<ito::DataObject> sharedDataObject)
250  {
251  m_dataType = ito::ParamBase::DObjPtr;
252  m_dObjPtr = sharedDataObject;
253 #if ITOM_POINTCLOUDLIBRARY > 0
254  m_dPCPtr.clear();
255  m_dPMPtr.clear();
256 #endif
257  return *this;
258  }
259 
260  inline ito::ParamBase::Type getType() const { return m_dataType; }
261  inline QSharedPointer<ito::DataObject> getDataObject() const { return m_dObjPtr; }
262 #if ITOM_POINTCLOUDLIBRARY > 0
263  inline QSharedPointer<ito::PCLPointCloud> getPointCloud() const { return m_dPCPtr; }
264  inline QSharedPointer<ito::PCLPolygonMesh> getPolygonMesh() const { return m_dPMPtr; }
265 #endif
266 };
267 
269 {
270  enum Type {TypeClassInfo, TypeSlot, TypeSignal, TypeProperty, TypeEnum, TypeFlag, TypeInheritance};
271  ClassInfoContainer(Type type, const QString &name, const QString &shortDescription = "", const QString &description = "") :
272  m_type(type), m_name(name), m_shortDescription(shortDescription), m_description(description)
273  {
274  if (m_description == "")
275  {
276  m_description = m_shortDescription;
277  }
278  }
279 
280  Type m_type;
281  QString m_name;
282  QString m_shortDescription;
283  QString m_description;
284 };
285 
287 {
288  QPointer<QTimer> timer;
289  QString name;
290 };
291 
292 class UiOrganizer : public QObject
293 {
294  Q_OBJECT
295 public:
297  {
298  propValid = 0x0001,
299  propConstant = 0x0002,
300  propFinal = 0x0004,
301  propReadable = 0x0008,
302  propWritable = 0x0010,
303  propResettable = 0x0020
304  };
305 
307  {
308  errorUiHandleInvalid = 0x1001,
309  errorObjDoesNotExist = 0x1002,
310  errorObjPropWrite = 0x1003,
311  errorObjPropRead = 0x1004,
312  errorObjPropDoesNotExist = 0x1005,
313  errorUnregisteredType = 0x1006,
314  errorSlotDoesNotExist = 0x1007,
315  errorSignalDoesNotExist = 0x1008,
316  errorConnectionError = 0x1009
317  };
318 
319  enum tWinType
320  {
321  typeDialog = 0x0000,
322  typeMainWindow = 0x0001,
323  typeDockWidget = 0x0002
324  };
325 
326  enum tObjectInfo
327  {
328  infoShowNoInheritance = 0x0001,
329  infoShowItomInheritance = 0x0002,
330  infoShowInheritanceUpToWidget = 0x0004,
331  infoShowAllInheritance =0x0008
332  };
333 
334  typedef QList<ClassInfoContainer> ClassInfoContainerList;
335 
336  UiOrganizer(ito::RetVal &retval);
337  ~UiOrganizer();
338 
339  void showDialog(QWidget *parent);
340  inline QObject *getPluginReference(unsigned int objectID) { return getWeakObjectReference(objectID); }
341 
342  static inline void parseUiDescription(int uiDescription, int* uiType = NULL, int* buttonBarType = NULL, bool* childOfMainWindow = NULL, bool* deleteOnClose = NULL, int* dockWidgetArea = NULL)
343  {
344  if(uiType) *uiType = (uiDescription & 0x000000FF); //bits 1-8
345  if(buttonBarType) *buttonBarType = ((uiDescription & 0x0000FF00) >> 8); //bits 9-16
346  if(childOfMainWindow) *childOfMainWindow = ((uiDescription & 0x000F0000) > 0); //bits 17-20
347  if(deleteOnClose) *deleteOnClose = ((uiDescription & 0x00F00000) > 0); //bits 21-24
348  if(dockWidgetArea) *dockWidgetArea = ((uiDescription & 0xFF000000) >> 24); //bits 25-32
349  }
350 
351  static inline int createUiDescription(int uiType, int buttonBarType, bool childOfMainWindow, bool deleteOnClose, int dockWidgetArea)
352  {
353  int v = uiType & 0x000000FF; //bits 1-8
354  v += (buttonBarType << 8); //bits 9-16
355  if(childOfMainWindow) v += (1 << 16); //bits 17-24
356  if(deleteOnClose) v+= (1 << 20); //bits 21-24
357  v += (dockWidgetArea << 24); //bits 25-32
358 
359  return v;
360  }
361 
362  RetVal getNewPluginWindow(const QString &pluginName, unsigned int &objectID, QWidget** newWidget, QWidget *parent = NULL);
363 
364  QWidget* loadDesignerPluginWidget(const QString &name, RetVal &retValue, AbstractFigure::WindowMode winMode, QWidget *parent = NULL);
365 
366  QList<TimerContainer> getRegisteredTimers();
367 
368 protected:
369 
370  //static void threadSafeDeleteUi(unsigned int *handle);
371 
372  void startGarbageCollectorTimer();
373 
374  RetVal addWidgetToOrganizer(QWidget *widget, int uiDescription, const StringMap &dialogButtons, QSharedPointer<unsigned int>dialogHandle, QSharedPointer<unsigned int>initSlotCount, QSharedPointer<unsigned int> objectID, QSharedPointer<QByteArray> className);
375 
376 private:
377  void execGarbageCollection();
378 
379  unsigned int addObjectToList(QObject* objPtr);
380  QObject *getWeakObjectReference(unsigned int objectID);
381 
382  QByteArray getReadableMethodSignature(const QMetaMethod &method, bool pythonNotCStyle, QByteArray *methodName = NULL, bool *valid = NULL);
383  QByteArray getReadableParameter(const QByteArray &parameter, bool pythonNotCStyle, bool *valid = NULL);
384  ito::UiOrganizer::ClassInfoContainerList::Iterator parseMetaPropertyForEnumerationTypes(const QMetaProperty &meth, ClassInfoContainerList &currentPropList);
385 
386  void timerEvent(QTimerEvent *event);
387 
390  QHash<unsigned int, UiContainerItem> m_dialogList;
391  QHash<unsigned int, QPointer<QObject> > m_objectList;
393  QMap<QObject*, QThread*> m_watcherThreads;
395  static unsigned int autoIncUiDialogCounter;
396  static unsigned int autoIncObjectCounter;
398  void setApiPointersToWidgetAndChildren(QWidget *widget);
399  //moved the uiLoader object to here from loadDesignerPluginWidget and createNewDialog methods as according
400  //to valgrind it causes memory leaks. So better have only one instance created and maintain mem leaks low ;-)
401  QUiLoader *m_pUiLoader;
402  QHash<QString, QTranslator*> m_transFiles;
403  QList<TimerContainer> m_timers;
404 
405 signals:
406 
407 public slots:
408  void pythonKeyboardInterrupt(bool checked);
409 
410  RetVal loadPluginWidget(void* algoWidgetFunc, int uiDescription, const StringMap &dialogButtons, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt, QSharedPointer<unsigned int>dialogHandle, QSharedPointer<unsigned int>initSlotCount, QSharedPointer<unsigned int> objectID, QSharedPointer<QByteArray> className, ItomSharedSemaphore *semaphore = NULL);
411  RetVal createNewDialog(const QString &filename, int uiDescription, const StringMap &dialogButtons, QSharedPointer<unsigned int> dialogHandle, QSharedPointer<unsigned int> initSlotCount, QSharedPointer<unsigned int> objectID, QSharedPointer<QByteArray> className, ItomSharedSemaphore *semaphore = NULL);
412  RetVal deleteDialog(unsigned int handle, ItomSharedSemaphore *semaphore = NULL);
413  RetVal showDialog(unsigned int handle, int modalLevel, QSharedPointer<int> retCodeIfModal, ItomSharedSemaphore *semaphore = NULL);
414  RetVal hideDialog(unsigned int handle, ItomSharedSemaphore *semaphore = NULL);
415  RetVal setAttribute(unsigned int handle, Qt::WidgetAttribute attribute, bool on = true, ItomSharedSemaphore *semaphore = NULL);
416  RetVal isVisible(unsigned int handle, QSharedPointer<bool> visible, ItomSharedSemaphore *semaphore = NULL);
417  RetVal handleExist(unsigned int handle, QSharedPointer<bool> exist, ItomSharedSemaphore *semaphore = NULL);
418 
419  UiContainer* getUiDialogByHandle(unsigned int uiHandle);
420 
421  RetVal getDockedStatus(unsigned int uiHandle, QSharedPointer<bool> docked, ItomSharedSemaphore *semaphore = NULL);
422  RetVal setDockedStatus(unsigned int uiHandle, bool docked, ItomSharedSemaphore *semaphore = NULL);
423 
424  RetVal showInputDialogGetDouble(unsigned int objectID, const QString &title, const QString &label, double defaultValue, QSharedPointer<bool> ok, QSharedPointer<double> value, double min = -2147483647, double max = 2147483647, int decimals = 1, ItomSharedSemaphore *semaphore = NULL );
425  RetVal showInputDialogGetInt(unsigned int objectID, const QString &title, const QString &label, int defaultValue, QSharedPointer<bool> ok, QSharedPointer<int> value, int min = -2147483647, int max = 2147483647, int step = 1, ItomSharedSemaphore *semaphore = NULL );
426  RetVal showInputDialogGetItem(unsigned int objectID, const QString &title, const QString &label, const QStringList &stringList, QSharedPointer<bool> ok, QSharedPointer<QString> value, int currentIndex = 0, bool editable = false, ItomSharedSemaphore *semaphore = NULL );
427  RetVal showInputDialogGetText(unsigned int objectID, const QString &title, const QString &label, const QString &defaultString, QSharedPointer<bool> ok, QSharedPointer<QString> value, ItomSharedSemaphore *semaphore = NULL );
428  RetVal showMessageBox(unsigned int objectID, int type, const QString &title, const QString &text, int buttons, int defaultButton, QSharedPointer<int> retButton, QSharedPointer<QString> retButtonText, ItomSharedSemaphore *semaphore = NULL );
429 
430  RetVal showFileDialogExistingDir(unsigned int objectID, const QString &caption, QSharedPointer<QString> directory, int options = QFileDialog::ShowDirsOnly, ItomSharedSemaphore *semaphore = NULL); //options are of type QFileDialog::Options
431  RetVal showFileOpenDialog(unsigned int objectID, const QString &caption, const QString &directory, const QString &filter, QSharedPointer<QString> file, int selectedFilterIndex = 0, int options = 0, ItomSharedSemaphore *semaphore = NULL);
432  RetVal showFilesOpenDialog(unsigned int objectID, const QString &caption, const QString &directory, const QString &filter, QSharedPointer<QStringList> files, int selectedFilterIndex = 0, int options = 0, ItomSharedSemaphore *semaphore = NULL);
433  RetVal showFileSaveDialog(unsigned int objectID, const QString &caption, const QString &directory, const QString &filter, QSharedPointer<QString> file, int selectedFilterIndex = 0, int options = 0, ItomSharedSemaphore *semaphore = NULL);
434 
435  RetVal exists(unsigned int objectID, QSharedPointer<bool> exists, ItomSharedSemaphore *semaphore = NULL);
436  RetVal getPropertyInfos(unsigned int objectID, QSharedPointer<QVariantMap> retPropertyMap, ItomSharedSemaphore *semaphore = NULL);
437  RetVal readProperties(unsigned int objectID, QSharedPointer<QVariantMap> properties, ItomSharedSemaphore *semaphore = NULL);
438  RetVal writeProperties(unsigned int objectID, const QVariantMap &properties, ItomSharedSemaphore *semaphore = NULL);
439  RetVal readProperties(unsigned int handle, const QString &widgetName, QSharedPointer<QVariantMap> properties, ItomSharedSemaphore *semaphore = NULL);
440  RetVal writeProperties(unsigned int handle, const QString &widgetName, const QVariantMap &properties, ItomSharedSemaphore *semaphore = NULL);
441  RetVal getAttribute(unsigned int objectID, int attributeNumber, QSharedPointer<bool> value, ItomSharedSemaphore *semaphore = NULL);
442  RetVal setAttribute(unsigned int objectID, int attributeNumber, bool value, ItomSharedSemaphore *semaphore = NULL);
443  RetVal getWindowFlags(unsigned int objectID, QSharedPointer<int> flags, ItomSharedSemaphore *semaphore = NULL);
444  RetVal setWindowFlags(unsigned int objectID, int flags, ItomSharedSemaphore *semaphore = NULL);
445  RetVal widgetMetaObjectCounts(unsigned int objectID, QSharedPointer<int> classInfoCount, QSharedPointer<int> enumeratorCount, QSharedPointer<int> methodCount, QSharedPointer<int> propertyCount, ItomSharedSemaphore *semaphore = NULL );
446 
447  RetVal getChildObject(unsigned int uiHandle, const QString &objectName, QSharedPointer<unsigned int> objectID, ItomSharedSemaphore *semaphore = NULL);
448  RetVal getChildObject2(unsigned int parentObjectID, const QString &objectName, QSharedPointer<unsigned int> objectID, ItomSharedSemaphore *semaphore = NULL);
449  RetVal getChildObject3(unsigned int parentObjectID, const QString &objectName, QSharedPointer<unsigned int> objectID, QSharedPointer<QByteArray> widgetClassName, ItomSharedSemaphore *semaphore = NULL);
450  RetVal getSignalIndex(unsigned int objectID, const QByteArray &signalSignature, QSharedPointer<int> signalIndex, QSharedPointer<QObject*> objPtr, QSharedPointer<IntList> argTypes, ItomSharedSemaphore *semaphore = NULL);
451  RetVal callSlotOrMethod(bool slotNotMethod, unsigned int objectID, int slotOrMethodIndex, QSharedPointer<FctCallParamContainer> args, ItomSharedSemaphore *semaphore = NULL);
452 
453  RetVal getObjectInfo(const QString &classname, bool pythonNotCStyle, ito::UiOrganizer::ClassInfoContainerList *objectInfo, ItomSharedSemaphore *semaphore = NULL);
454  RetVal getObjectInfo(const QObject *obj, int type, bool pythonNotCStyle, ito::UiOrganizer::ClassInfoContainerList* objectInfo, ItomSharedSemaphore *semaphore = NULL);
455  inline RetVal getObjectInfo(unsigned int objectID, int type, bool pythonNotCStyle, ito::UiOrganizer::ClassInfoContainerList *objectInfo, ItomSharedSemaphore *semaphore = NULL)
456  {
457  return getObjectInfo(getWeakObjectReference(objectID), type, pythonNotCStyle, objectInfo, semaphore);
458  }
459 
460  RetVal getObjectAndWidgetName(unsigned int objectID, QSharedPointer<QByteArray> objectName, QSharedPointer<QByteArray> widgetClassName, ItomSharedSemaphore *semaphore = NULL);
461  RetVal getObjectChildrenInfo(unsigned int objectID, bool recursive, QSharedPointer<QStringList> objectNames, QSharedPointer<QStringList> classNames, ItomSharedSemaphore *semaphore = NULL);
462 
463  RetVal getObjectID(const QObject *obj, QSharedPointer<unsigned int> objectID, ItomSharedSemaphore *semaphore = NULL);
464 
465  RetVal connectWithKeyboardInterrupt(unsigned int objectID, const QByteArray &signalSignature, ItomSharedSemaphore *semaphore = NULL);
466  RetVal getMethodDescriptions(unsigned int objectID, QSharedPointer<MethodDescriptionList> methodList, ItomSharedSemaphore *semaphore = NULL);
467 
468  RetVal createFigure(QSharedPointer< QSharedPointer<unsigned int> > guardedFigureHandle, QSharedPointer<unsigned int> initSlotCount, QSharedPointer<unsigned int> objectID, QSharedPointer<int> rows, QSharedPointer<int> cols, QPoint offset = QPoint(), QSize size = QSize(), ItomSharedSemaphore *semaphore = NULL);
469  RetVal getSubplot(QSharedPointer<unsigned int> figHandle, unsigned int subplotIndex, QSharedPointer<unsigned int> objectID, QSharedPointer<QByteArray> objectName, QSharedPointer<QByteArray> widgetClassName, ItomSharedSemaphore *semaphore = NULL);
470 
471  RetVal figurePlot(ito::UiDataContainer &dataCont, QSharedPointer<unsigned int> figHandle, QSharedPointer<unsigned int> objectID, int areaRow, int areaCol, QString className, QVariantMap properties, ItomSharedSemaphore *semaphore = NULL);
472  RetVal figureLiveImage(AddInDataIO* dataIO, QSharedPointer<unsigned int> figHandle, QSharedPointer<unsigned int> objectID, int areaRow, int areaCol, QString className, QVariantMap properties, ItomSharedSemaphore *semaphore = NULL);
473  RetVal figureDesignerWidget(QSharedPointer<unsigned int> figHandle, QSharedPointer<unsigned int> objectID, int areaRow, int areaCol, QString className, QVariantMap properties, ItomSharedSemaphore *semaphore = NULL);
474 
475  RetVal figureClose(unsigned int figHandle, ItomSharedSemaphore *semaphore = NULL);
476  RetVal figurePickPoints(unsigned int objectID, QSharedPointer<QVector<ito::Shape> > shapes, int maxNrPoints, ItomSharedSemaphore *semaphore);
477  RetVal figureDrawGeometricShapes(unsigned int objectID, QSharedPointer<QVector<ito::Shape> > shapes, int shapeType, int maxNrElements, ItomSharedSemaphore *semaphore);
478  RetVal figurePickPointsInterrupt(unsigned int objectID);
479  RetVal isFigureItem(unsigned int objectID, QSharedPointer<unsigned int> isFigureItem, ItomSharedSemaphore *semaphore);
480 
481  RetVal getAvailableWidgetNames(QSharedPointer<QStringList> widgetNames, ItomSharedSemaphore *semaphore);
482 
483  RetVal registerActiveTimer(const QPointer<QTimer> &timer, const QString &name, ItomSharedSemaphore *semaphore = NULL);
484 
485 
486 
487  void figureDestroyed(QObject *obj);
488 
489 private slots:
490  void watcherThreadFinished();
491  RetVal unregisterActiveTimer(ItomSharedSemaphore *semaphore = NULL);
492 
493 };
494 
495 } //namespace ito
496 
497 Q_DECLARE_METATYPE(ito::UiOrganizer::ClassInfoContainerList*)
498 
499 #endif
tUiType m_type
Definition: uiOrganizer.h:194
The UiOrganizer is started as singleton instance within itom and organizes all main windows...
Definition: uiOrganizer.h:292
tPropertyFlags
Definition: uiOrganizer.h:296
Definition: uiOrganizer.h:286
Definition: figureWidget.h:45
UiContainer(QMainWindow *mainWindow)
creates new UiContainer from instance of QMainWindow
Definition: uiOrganizer.h:113
tUiType
Definition: uiOrganizer.h:74
Class for managing status values (like errors or warning)
Definition: retVal.h:54
tErrorCode
Definition: uiOrganizer.h:306
base class for all dataIO plugin classes
Definition: addInInterface.h:633
~UiContainer()
destructor
Definition: uiOrganizer.cpp:73
UiContainer(QWidget *widget, tUiType type)
general constructor to create an instance of UiContainer from given QWidget*-pointer and type ...
Definition: uiOrganizer.h:150
static unsigned int autoIncUiDialogCounter
Definition: uiOrganizer.h:395
UserUiDialog * getUiDialog() const
returns instance of UiDialog or NULL, if the widget is not longer available of the type is not uiType...
Definition: uiOrganizer.h:168
UiContainer(QDialog *dialog)
creates new UiContainer from instance of QDialog
Definition: uiOrganizer.h:101
UiContainer(FigureWidget *figureWidget)
creates new UiContainer from instance of QMainWindow
Definition: uiOrganizer.h:125
Definition: apiFunctionsGraph.cpp:39
QHash< unsigned int, UiContainerItem > m_dialogList
Definition: uiOrganizer.h:390
semaphore which can be used for asychronous thread communication. By using this class it is possible ...
Definition: sharedStructuresQt.h:57
QPointer< QWidget > m_weakDialog
Definition: uiOrganizer.h:193
Definition: uiOrganizer.h:268
One instance of this class acts as wrapper for several import public methods of classes, derived from QObject, which should be made available by the call-method in python.
Definition: widgetWrapper.h:36
tWinType
Definition: uiOrganizer.h:319
tUiType getType() const
returns type of the guarded user interface
Definition: uiOrganizer.h:190
WidgetWrapper * m_widgetWrapper
Definition: uiOrganizer.h:388
Definition: uiOrganizer.h:197
Definition: userUiDialog.h:44
QMap< QObject *, QThread * > m_watcherThreads
Definition: uiOrganizer.h:393
QHash< unsigned int, QPointer< QObject > > m_objectList
Definition: uiOrganizer.h:391
UiContainer(const UiContainer &cpy)
copy constructor
Definition: uiOrganizer.h:157
static unsigned int autoIncObjectCounter
Definition: uiOrganizer.h:396
Every instance of this class contains information about one user interface (main window, dialog, dock widget...) which is organized by UiOrganizer.
Definition: uiOrganizer.h:71
Definition: uiOrganizer.h:212
int m_garbageCollectorTimer
Definition: uiOrganizer.h:392
QWidget * getUiWidget() const
returns instance of Widget or NULL, if the widget is not longer available.
Definition: uiOrganizer.h:183
UiContainer(QDockWidget *dockWidget)
creates new UiContainer from instance of QDockWidget
Definition: uiOrganizer.h:137
UiContainer(UserUiDialog *uiDialog)
creates new UiContainer from instance of dialog-widget UserUiDialog
Definition: uiOrganizer.h:89