Developer documentation | Axl-2.5.1

axlInspectorToolFactory.h
Go to the documentation of this file.
1 /* axlInspectorToolFactory.h ---
2  *
3  * Author: Meriadeg Perrinel
4  * Copyright (C) 2008 - Julien Wintz, Inria.
5  * Created: mar. mars 29 12:29:01 2011 (+0200)
6  * Version: $Id$
7  * Last-Updated: Wed Apr 20 13:59:01 2011 (+0200)
8  * By: Julien Wintz
9  * Update #: 31
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 
21 #ifndef AXLINSPECTORTOOLFACTORY_H
22 #define AXLINSPECTORTOOLFACTORY_H
23 
24 #include "axlGuiExport.h"
25 
26 #include <QtCore>
27 #include <QtGui>
28 #include <QtWidgets>
29 
30 class dtkAbstractData;
31 class dtkAbstractProcess;
32 
33 class axlAbstractData;
34 class axlAbstractView;
37 
38 // /////////////////////////////////////////////////////////////////
39 //
40 // /////////////////////////////////////////////////////////////////
41 
43 {
44  Q_OBJECT
45 public:
46  axlInspectorToolInterface(QWidget *parent = 0);
47  virtual ~axlInspectorToolInterface(void);
48 
49  virtual void setController(axlInspectorObjectController *controller);
50  void setImplementation(const QString& implementation);
51  void setView(axlAbstractView *view);
52 
53  void setToolFactorySingleton(axlInspectorToolFactory *toolFactorySingleton);
54  axlInspectorToolFactory *toolFactorySingleton(void);
55 
56 signals:
57  void update(void);
58  void modifiedProperty(dtkAbstractData* data,int);
59  void dataChanged(dtkAbstractData *data);
60  void dataChangedByControlPoints(dtkAbstractData*);
61  void dataChangedByShader(dtkAbstractData *data, QString isophoteShaderXml);
62  void dataChangedByShaderFromString(dtkAbstractData *data, QString isophoteShaderXml);
63  void dataSetToRemove(QList<dtkAbstractData *> data);
64 
65 signals:
66  void dataSetFieldsChanged(QList<axlAbstractData *> dataSet, QString fieldName);
67  void finished(void);
68 
69 protected:
72  dtkAbstractProcess *m_process;
73  QList<dtkAbstractData *> dataSet;
74 
75 private:
76  axlInspectorToolFactory *m_toolFactorySingleton;
77 };
78 
79 // /////////////////////////////////////////////////////////////////
80 //
81 // /////////////////////////////////////////////////////////////////
82 
83 class axlInspectorToolFactoryPrivate;
84 
85 class AXLGUI_EXPORT axlInspectorToolFactory : public QObject
86 {
87  Q_OBJECT
88 
89 public:
90  typedef axlInspectorToolInterface *(*axlInspectorToolCreator)(void);
91 
92  typedef QHash<QString, axlInspectorToolCreator> axlInspectorToolCreatorHash;
93 
94 public:
95  static axlInspectorToolFactory *instance(void);
96 
97  bool registerInspectorTool(const QString& type, axlInspectorToolCreator func);
98 
99  axlInspectorToolInterface *create(const QString& type);
100  void initialize(void);
101 
102 protected:
104 
105 private:
108 
109 private:
110  axlInspectorToolFactoryPrivate *d;
111 };
112 
113 #endif
#define AXLGUI_EXPORT
Definition: axlGuiExport2.h:15
static axlInspectorToolFactory * s_instance
QList< dtkAbstractData * > dataSet
QHash< QString, axlInspectorToolCreator > axlInspectorToolCreatorHash
axlInspectorObjectController * m_controller
Class axlAbstractData defines an API for all type of axel data.