itom 2.2.1
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2016, Institut fuer Technische Optik (ITO), 00005 Universitaet Stuttgart, Germany 00006 00007 This file is part of itom. 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 itom is distributed in the hope that it will be useful, but 00015 WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00017 General Public Licence for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with itom. If not, see <http://www.gnu.org/licenses/>. 00021 *********************************************************************** */ 00022 00023 #ifndef UIORGANIZER_H 00024 #define UIORGANIZER_H 00025 00026 //#include "../python/pythonQtConversion.h" 00027 #include "../python/pythonItomMetaObject.h" 00028 00029 #include <qwidget.h> 00030 00031 #include "../common/sharedStructuresQt.h" 00032 #include "../DataObject/dataobj.h" 00033 #if ITOM_POINTCLOUDLIBRARY > 0 00034 #include "../../PointCloud/pclStructures.h" 00035 #endif 00036 00037 #include "../widgets/userUiDialog.h" 00038 #include "../widgets/figureWidget.h" 00039 00040 #include "../global.h" 00041 #include "../common/sharedStructuresGraphics.h" 00042 #include "../common/addInInterface.h" 00043 #include "../common/shape.h" 00044 00045 #include "../../plot/AbstractFigure.h" 00046 00047 #include <qmap.h> 00048 #include <qsharedpointer.h> 00049 #include <qstring.h> 00050 #include <qvariant.h> 00051 #include <qhash.h> 00052 #include <qtimer.h> 00053 #include <qfiledialog.h> 00054 #include <qmainwindow.h> 00055 #include <qthread.h> 00056 #include <qtranslator.h> 00057 #include <qpoint.h> 00058 #include <qsize.h> 00059 00060 class QUiLoader; //forward declaration 00061 00062 namespace ito 00063 { 00064 class WidgetWrapper; //forward declaration 00065 00071 struct UiContainer 00072 { 00073 public: 00074 enum tUiType 00075 { 00076 uiTypeUiDialog = 0x0001, 00077 uiTypeQDialog = 0x0002, 00078 uiTypeQMainWindow = 0x0003, 00079 uiTypeQDockWidget = 0x0004, 00080 uiTypeFigure = 0x0005 00081 }; 00082 00084 00089 UiContainer(UserUiDialog *uiDialog) : 00090 m_type(uiTypeUiDialog) 00091 { 00092 m_weakDialog = QPointer<QWidget>(uiDialog); 00093 } 00094 00096 00101 UiContainer(QDialog *dialog) : 00102 m_type(uiTypeQDialog) 00103 { 00104 m_weakDialog = QPointer<QDialog>(dialog); 00105 } 00106 00108 00113 UiContainer(QMainWindow *mainWindow) : 00114 m_type(uiTypeQMainWindow) 00115 { 00116 m_weakDialog = QPointer<QWidget>(mainWindow); 00117 } 00118 00120 00125 UiContainer(FigureWidget *figureWidget) : 00126 m_type(uiTypeFigure) 00127 { 00128 m_weakDialog = QPointer<QWidget>(figureWidget); 00129 } 00130 00132 00137 UiContainer(QDockWidget *dockWidget) : 00138 m_type(uiTypeQDockWidget) 00139 { 00140 m_weakDialog = QPointer<QWidget>(dockWidget); 00141 } 00142 00144 00150 UiContainer(QWidget *widget, tUiType type) : 00151 m_type(type) 00152 { 00153 m_weakDialog = QPointer<QWidget>(widget); 00154 } 00155 00157 UiContainer(const UiContainer &cpy) 00158 { 00159 m_weakDialog = QPointer<QWidget>(cpy.getUiWidget()); 00160 m_type = cpy.m_type; 00161 } 00162 00163 00164 ~UiContainer(); //comment in source file 00165 00166 00168 inline UserUiDialog *getUiDialog() const 00169 { 00170 if(m_type == uiTypeUiDialog) 00171 { 00172 if(m_weakDialog.isNull()) return NULL; 00173 return qobject_cast<UserUiDialog*>(m_weakDialog.data()); 00174 } 00175 return NULL; 00176 } 00177 00179 00183 inline QWidget *getUiWidget() const 00184 { 00185 if(m_weakDialog.isNull()) return NULL; 00186 return m_weakDialog.data(); 00187 } 00188 00190 inline tUiType getType() const { return m_type; } 00191 00192 private: 00193 QPointer<QWidget> m_weakDialog; 00194 tUiType m_type; 00195 }; 00196 00197 struct UiContainerItem 00198 { 00199 public: 00200 UiContainerItem() : container(NULL) {} 00201 00202 UiContainerItem(const UiContainerItem &cpy) 00203 { 00204 guardedHandle = cpy.guardedHandle; 00205 container = cpy.container; 00206 } 00207 00208 QWeakPointer< unsigned int > guardedHandle; 00209 UiContainer *container; 00210 }; 00211 00212 class UiDataContainer 00213 { 00214 private: 00215 ito::ParamBase::Type m_dataType; 00216 QSharedPointer<ito::DataObject> m_dObjPtr; 00217 #if ITOM_POINTCLOUDLIBRARY > 0 00218 QSharedPointer<ito::PCLPointCloud> m_dPCPtr; 00219 QSharedPointer<ito::PCLPolygonMesh> m_dPMPtr; 00220 #endif 00221 00222 public: 00223 UiDataContainer() : m_dataType(ito::ParamBase::DObjPtr) {}; 00224 ~UiDataContainer() {}; 00225 UiDataContainer(const QSharedPointer<ito::DataObject> &sharedDataObject) : m_dataType(ito::ParamBase::DObjPtr), m_dObjPtr(sharedDataObject) {} 00226 #if ITOM_POINTCLOUDLIBRARY > 0 00227 UiDataContainer(const QSharedPointer<ito::PCLPointCloud> &sharedPointCloud) : m_dataType(ito::ParamBase::PointCloudPtr), m_dPCPtr(sharedPointCloud) {} 00228 UiDataContainer(const QSharedPointer<ito::PCLPolygonMesh> &sharedPolygonMesh) : m_dataType(ito::ParamBase::PolygonMeshPtr), m_dPMPtr(sharedPolygonMesh) {} 00229 00230 inline UiDataContainer & operator = (QSharedPointer<ito::PCLPointCloud> sharedPointCloud) 00231 { 00232 m_dataType = ito::ParamBase::PointCloudPtr; 00233 m_dPCPtr = sharedPointCloud; 00234 m_dObjPtr.clear(); 00235 m_dPMPtr.clear(); 00236 return *this; 00237 } 00238 00239 inline UiDataContainer & operator = (QSharedPointer<ito::PCLPolygonMesh> sharedPolygonMesh) 00240 { 00241 m_dataType = ito::ParamBase::PolygonMeshPtr; 00242 m_dPMPtr = sharedPolygonMesh; 00243 m_dObjPtr.clear(); 00244 m_dPCPtr.clear(); 00245 return *this; 00246 } 00247 #endif 00248 00249 inline UiDataContainer & operator = (QSharedPointer<ito::DataObject> sharedDataObject) 00250 { 00251 m_dataType = ito::ParamBase::DObjPtr; 00252 m_dObjPtr = sharedDataObject; 00253 #if ITOM_POINTCLOUDLIBRARY > 0 00254 m_dPCPtr.clear(); 00255 m_dPMPtr.clear(); 00256 #endif 00257 return *this; 00258 } 00259 00260 inline ito::ParamBase::Type getType() const { return m_dataType; } 00261 inline QSharedPointer<ito::DataObject> getDataObject() const { return m_dObjPtr; } 00262 #if ITOM_POINTCLOUDLIBRARY > 0 00263 inline QSharedPointer<ito::PCLPointCloud> getPointCloud() const { return m_dPCPtr; } 00264 inline QSharedPointer<ito::PCLPolygonMesh> getPolygonMesh() const { return m_dPMPtr; } 00265 #endif 00266 }; 00267 00268 struct ClassInfoContainer 00269 { 00270 enum Type {TypeClassInfo, TypeSlot, TypeSignal, TypeProperty, TypeEnum, TypeFlag, TypeInheritance}; 00271 ClassInfoContainer(Type type, const QString &name, const QString &shortDescription = "", const QString &description = "") : 00272 m_type(type), m_name(name), m_shortDescription(shortDescription), m_description(description) 00273 { 00274 if (m_description == "") 00275 { 00276 m_description = m_shortDescription; 00277 } 00278 } 00279 00280 Type m_type; 00281 QString m_name; 00282 QString m_shortDescription; 00283 QString m_description; 00284 }; 00285 00286 struct TimerContainer 00287 { 00288 QPointer<QTimer> timer; 00289 QString name; 00290 }; 00291 00292 class UiOrganizer : public QObject 00293 { 00294 Q_OBJECT 00295 public: 00296 enum tPropertyFlags 00297 { 00298 propValid = 0x0001, 00299 propConstant = 0x0002, 00300 propFinal = 0x0004, 00301 propReadable = 0x0008, 00302 propWritable = 0x0010, 00303 propResettable = 0x0020 00304 }; 00305 00306 enum tErrorCode 00307 { 00308 errorUiHandleInvalid = 0x1001, 00309 errorObjDoesNotExist = 0x1002, 00310 errorObjPropWrite = 0x1003, 00311 errorObjPropRead = 0x1004, 00312 errorObjPropDoesNotExist = 0x1005, 00313 errorUnregisteredType = 0x1006, 00314 errorSlotDoesNotExist = 0x1007, 00315 errorSignalDoesNotExist = 0x1008, 00316 errorConnectionError = 0x1009 00317 }; 00318 00319 enum tWinType 00320 { 00321 typeDialog = 0x0000, 00322 typeMainWindow = 0x0001, 00323 typeDockWidget = 0x0002 00324 }; 00325 00326 enum tObjectInfo 00327 { 00328 infoShowNoInheritance = 0x0001, 00329 infoShowItomInheritance = 0x0002, 00330 infoShowInheritanceUpToWidget = 0x0004, 00331 infoShowAllInheritance =0x0008 00332 }; 00333 00334 typedef QList<ClassInfoContainer> ClassInfoContainerList; 00335 00336 UiOrganizer(ito::RetVal &retval); 00337 ~UiOrganizer(); 00338 00339 void showDialog(QWidget *parent); 00340 inline QObject *getPluginReference(unsigned int objectID) { return getWeakObjectReference(objectID); } 00341 00342 static inline void parseUiDescription(int uiDescription, int* uiType = NULL, int* buttonBarType = NULL, bool* childOfMainWindow = NULL, bool* deleteOnClose = NULL, int* dockWidgetArea = NULL) 00343 { 00344 if(uiType) *uiType = (uiDescription & 0x000000FF); //bits 1-8 00345 if(buttonBarType) *buttonBarType = ((uiDescription & 0x0000FF00) >> 8); //bits 9-16 00346 if(childOfMainWindow) *childOfMainWindow = ((uiDescription & 0x000F0000) > 0); //bits 17-20 00347 if(deleteOnClose) *deleteOnClose = ((uiDescription & 0x00F00000) > 0); //bits 21-24 00348 if(dockWidgetArea) *dockWidgetArea = ((uiDescription & 0xFF000000) >> 24); //bits 25-32 00349 } 00350 00351 static inline int createUiDescription(int uiType, int buttonBarType, bool childOfMainWindow, bool deleteOnClose, int dockWidgetArea) 00352 { 00353 int v = uiType & 0x000000FF; //bits 1-8 00354 v += (buttonBarType << 8); //bits 9-16 00355 if(childOfMainWindow) v += (1 << 16); //bits 17-24 00356 if(deleteOnClose) v+= (1 << 20); //bits 21-24 00357 v += (dockWidgetArea << 24); //bits 25-32 00358 00359 return v; 00360 } 00361 00362 RetVal getNewPluginWindow(const QString &pluginName, unsigned int &objectID, QWidget** newWidget, QWidget *parent = NULL); 00363 00364 QWidget* loadDesignerPluginWidget(const QString &name, RetVal &retValue, AbstractFigure::WindowMode winMode, QWidget *parent = NULL); 00365 00366 QList<TimerContainer> getRegisteredTimers(); 00367 00368 protected: 00369 00370 //static void threadSafeDeleteUi(unsigned int *handle); 00371 00372 void startGarbageCollectorTimer(); 00373 00374 RetVal addWidgetToOrganizer(QWidget *widget, int uiDescription, const StringMap &dialogButtons, QSharedPointer<unsigned int>dialogHandle, QSharedPointer<unsigned int>initSlotCount, QSharedPointer<unsigned int> objectID, QSharedPointer<QByteArray> className); 00375 00376 private: 00377 void execGarbageCollection(); 00378 00379 unsigned int addObjectToList(QObject* objPtr); 00380 QObject *getWeakObjectReference(unsigned int objectID); 00381 00382 QByteArray getReadableMethodSignature(const QMetaMethod &method, bool pythonNotCStyle, QByteArray *methodName = NULL, bool *valid = NULL); 00383 QByteArray getReadableParameter(const QByteArray ¶meter, bool pythonNotCStyle, bool *valid = NULL); 00384 ito::UiOrganizer::ClassInfoContainerList::Iterator parseMetaPropertyForEnumerationTypes(const QMetaProperty &meth, ClassInfoContainerList ¤tPropList); 00385 00386 void timerEvent(QTimerEvent *event); 00387 00388 WidgetWrapper *m_widgetWrapper; 00390 QHash<unsigned int, UiContainerItem> m_dialogList; 00391 QHash<unsigned int, QPointer<QObject> > m_objectList; 00392 int m_garbageCollectorTimer; 00393 QMap<QObject*, QThread*> m_watcherThreads; 00395 static unsigned int autoIncUiDialogCounter; 00396 static unsigned int autoIncObjectCounter; 00398 void setApiPointersToWidgetAndChildren(QWidget *widget); 00399 //moved the uiLoader object to here from loadDesignerPluginWidget and createNewDialog methods as according 00400 //to valgrind it causes memory leaks. So better have only one instance created and maintain mem leaks low ;-) 00401 QUiLoader *m_pUiLoader; 00402 QHash<QString, QTranslator*> m_transFiles; 00403 QList<TimerContainer> m_timers; 00404 00405 signals: 00406 00407 public slots: 00408 void pythonKeyboardInterrupt(bool checked); 00409 00410 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); 00411 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); 00412 RetVal deleteDialog(unsigned int handle, ItomSharedSemaphore *semaphore = NULL); 00413 RetVal showDialog(unsigned int handle, int modalLevel, QSharedPointer<int> retCodeIfModal, ItomSharedSemaphore *semaphore = NULL); 00414 RetVal hideDialog(unsigned int handle, ItomSharedSemaphore *semaphore = NULL); 00415 RetVal setAttribute(unsigned int handle, Qt::WidgetAttribute attribute, bool on = true, ItomSharedSemaphore *semaphore = NULL); 00416 RetVal isVisible(unsigned int handle, QSharedPointer<bool> visible, ItomSharedSemaphore *semaphore = NULL); 00417 RetVal handleExist(unsigned int handle, QSharedPointer<bool> exist, ItomSharedSemaphore *semaphore = NULL); 00418 00419 UiContainer* getUiDialogByHandle(unsigned int uiHandle); 00420 00421 RetVal getDockedStatus(unsigned int uiHandle, QSharedPointer<bool> docked, ItomSharedSemaphore *semaphore = NULL); 00422 RetVal setDockedStatus(unsigned int uiHandle, bool docked, ItomSharedSemaphore *semaphore = NULL); 00423 00424 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 ); 00425 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 ); 00426 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 ); 00427 RetVal showInputDialogGetText(unsigned int objectID, const QString &title, const QString &label, const QString &defaultString, QSharedPointer<bool> ok, QSharedPointer<QString> value, ItomSharedSemaphore *semaphore = NULL ); 00428 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 ); 00429 00430 RetVal showFileDialogExistingDir(unsigned int objectID, const QString &caption, QSharedPointer<QString> directory, int options = QFileDialog::ShowDirsOnly, ItomSharedSemaphore *semaphore = NULL); //options are of type QFileDialog::Options 00431 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); 00432 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); 00433 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); 00434 00435 RetVal exists(unsigned int objectID, QSharedPointer<bool> exists, ItomSharedSemaphore *semaphore = NULL); 00436 RetVal getPropertyInfos(unsigned int objectID, QSharedPointer<QVariantMap> retPropertyMap, ItomSharedSemaphore *semaphore = NULL); 00437 RetVal readProperties(unsigned int objectID, QSharedPointer<QVariantMap> properties, ItomSharedSemaphore *semaphore = NULL); 00438 RetVal writeProperties(unsigned int objectID, const QVariantMap &properties, ItomSharedSemaphore *semaphore = NULL); 00439 RetVal readProperties(unsigned int handle, const QString &widgetName, QSharedPointer<QVariantMap> properties, ItomSharedSemaphore *semaphore = NULL); 00440 RetVal writeProperties(unsigned int handle, const QString &widgetName, const QVariantMap &properties, ItomSharedSemaphore *semaphore = NULL); 00441 RetVal getAttribute(unsigned int objectID, int attributeNumber, QSharedPointer<bool> value, ItomSharedSemaphore *semaphore = NULL); 00442 RetVal setAttribute(unsigned int objectID, int attributeNumber, bool value, ItomSharedSemaphore *semaphore = NULL); 00443 RetVal getWindowFlags(unsigned int objectID, QSharedPointer<int> flags, ItomSharedSemaphore *semaphore = NULL); 00444 RetVal setWindowFlags(unsigned int objectID, int flags, ItomSharedSemaphore *semaphore = NULL); 00445 RetVal widgetMetaObjectCounts(unsigned int objectID, QSharedPointer<int> classInfoCount, QSharedPointer<int> enumeratorCount, QSharedPointer<int> methodCount, QSharedPointer<int> propertyCount, ItomSharedSemaphore *semaphore = NULL ); 00446 00447 RetVal getChildObject(unsigned int uiHandle, const QString &objectName, QSharedPointer<unsigned int> objectID, ItomSharedSemaphore *semaphore = NULL); 00448 RetVal getChildObject2(unsigned int parentObjectID, const QString &objectName, QSharedPointer<unsigned int> objectID, ItomSharedSemaphore *semaphore = NULL); 00449 RetVal getChildObject3(unsigned int parentObjectID, const QString &objectName, QSharedPointer<unsigned int> objectID, QSharedPointer<QByteArray> widgetClassName, ItomSharedSemaphore *semaphore = NULL); 00450 RetVal getSignalIndex(unsigned int objectID, const QByteArray &signalSignature, QSharedPointer<int> signalIndex, QSharedPointer<QObject*> objPtr, QSharedPointer<IntList> argTypes, ItomSharedSemaphore *semaphore = NULL); 00451 RetVal callSlotOrMethod(bool slotNotMethod, unsigned int objectID, int slotOrMethodIndex, QSharedPointer<FctCallParamContainer> args, ItomSharedSemaphore *semaphore = NULL); 00452 00453 RetVal getObjectInfo(const QString &classname, bool pythonNotCStyle, ito::UiOrganizer::ClassInfoContainerList *objectInfo, ItomSharedSemaphore *semaphore = NULL); 00454 RetVal getObjectInfo(const QObject *obj, int type, bool pythonNotCStyle, ito::UiOrganizer::ClassInfoContainerList* objectInfo, ItomSharedSemaphore *semaphore = NULL); 00455 inline RetVal getObjectInfo(unsigned int objectID, int type, bool pythonNotCStyle, ito::UiOrganizer::ClassInfoContainerList *objectInfo, ItomSharedSemaphore *semaphore = NULL) 00456 { 00457 return getObjectInfo(getWeakObjectReference(objectID), type, pythonNotCStyle, objectInfo, semaphore); 00458 } 00459 00460 RetVal getObjectAndWidgetName(unsigned int objectID, QSharedPointer<QByteArray> objectName, QSharedPointer<QByteArray> widgetClassName, ItomSharedSemaphore *semaphore = NULL); 00461 RetVal getObjectChildrenInfo(unsigned int objectID, bool recursive, QSharedPointer<QStringList> objectNames, QSharedPointer<QStringList> classNames, ItomSharedSemaphore *semaphore = NULL); 00462 00463 RetVal getObjectID(const QObject *obj, QSharedPointer<unsigned int> objectID, ItomSharedSemaphore *semaphore = NULL); 00464 00465 RetVal connectWithKeyboardInterrupt(unsigned int objectID, const QByteArray &signalSignature, ItomSharedSemaphore *semaphore = NULL); 00466 RetVal getMethodDescriptions(unsigned int objectID, QSharedPointer<MethodDescriptionList> methodList, ItomSharedSemaphore *semaphore = NULL); 00467 00468 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); 00469 RetVal getSubplot(QSharedPointer<unsigned int> figHandle, unsigned int subplotIndex, QSharedPointer<unsigned int> objectID, QSharedPointer<QByteArray> objectName, QSharedPointer<QByteArray> widgetClassName, ItomSharedSemaphore *semaphore = NULL); 00470 00471 RetVal figurePlot(ito::UiDataContainer &dataCont, QSharedPointer<unsigned int> figHandle, QSharedPointer<unsigned int> objectID, int areaRow, int areaCol, QString className, QVariantMap properties, ItomSharedSemaphore *semaphore = NULL); 00472 RetVal figureLiveImage(AddInDataIO* dataIO, QSharedPointer<unsigned int> figHandle, QSharedPointer<unsigned int> objectID, int areaRow, int areaCol, QString className, QVariantMap properties, ItomSharedSemaphore *semaphore = NULL); 00473 RetVal figureDesignerWidget(QSharedPointer<unsigned int> figHandle, QSharedPointer<unsigned int> objectID, int areaRow, int areaCol, QString className, QVariantMap properties, ItomSharedSemaphore *semaphore = NULL); 00474 00475 RetVal figureClose(unsigned int figHandle, ItomSharedSemaphore *semaphore = NULL); 00476 RetVal figurePickPoints(unsigned int objectID, QSharedPointer<QVector<ito::Shape> > shapes, int maxNrPoints, ItomSharedSemaphore *semaphore); 00477 RetVal figureDrawGeometricShapes(unsigned int objectID, QSharedPointer<QVector<ito::Shape> > shapes, int shapeType, int maxNrElements, ItomSharedSemaphore *semaphore); 00478 RetVal figurePickPointsInterrupt(unsigned int objectID); 00479 RetVal isFigureItem(unsigned int objectID, QSharedPointer<unsigned int> isFigureItem, ItomSharedSemaphore *semaphore); 00480 00481 RetVal getAvailableWidgetNames(QSharedPointer<QStringList> widgetNames, ItomSharedSemaphore *semaphore); 00482 00483 RetVal registerActiveTimer(const QPointer<QTimer> &timer, const QString &name, ItomSharedSemaphore *semaphore = NULL); 00484 00485 00486 00487 void figureDestroyed(QObject *obj); 00488 00489 private slots: 00490 void watcherThreadFinished(); 00491 RetVal unregisterActiveTimer(ItomSharedSemaphore *semaphore = NULL); 00492 00493 }; 00494 00495 } //namespace ito 00496 00497 Q_DECLARE_METATYPE(ito::UiOrganizer::ClassInfoContainerList*) 00498 00499 #endif