iVS3D v2.0.0
Loading...
Searching...
No Matches
transformmanager.h
1#ifndef TRANSFORMMANAGER_H
2#define TRANSFORMMANAGER_H
3
4#include "itransform.h"
5#include "itransformrequestdequeue.h"
6#include "stringcontainer.h"
7#include <QWidget>
8
9
10#include <QObject>
11#include <QDir>
12#include <QCoreApplication>
13#include <QPluginLoader>
14
15
27class TransformManager : public QObject
28{
29 Q_OBJECT
30public:
35 static TransformManager& instance();
36
43 QWidget *getSettingsWidget(QWidget* parent, uint idx);
44
49 QStringList getTransformList();
50
56
63
68 void selectTransform(uint id);
69
70 void deactivateTransform(uint id);
71
77 void setTransformationEnabled(bool enabled);
78
83 bool isTransformEnabled();
84
88 void exit();
89
94 void enableCuda(bool enabled);
95
101 void setSettings(QMap<QString, QVariant> settings, uint idx);
102
108 QMap<QString, QVariant> getSettings(uint idx);
109
110signals:
111 void sig_selectedTransformChanged(uint id);
112 void sig_transformEnabledChanged(bool enabled);
113
114private:
121 ITransformRequestDequeue *transform;
122 QPluginLoader *loader;
123 };
124
126 std::vector<TransformPlugin> m_transformList;
127 void loadPlugins();
128 void cleanup();
129 bool m_transformationEnabled;
130 QThread *m_transformThread;
131};
132
133#endif // TRANSFORMMANAGER_H
The ITransformRequestDequeue class is a proxy for an ITransform. It is used to run ITransform::transf...
Definition itransformrequestdequeue.h:30
The TransformManager class manages transformation-plugins and provides them to the core application.
Definition transformmanager.h:28
void setTransformationEnabled(bool enabled)
setTransformationEnabled signals that the user wants to activate the transformation preview on the gu...
Definition transformmanager.cpp:93
static TransformManager & instance()
instance returns the singelton of this class
Definition transformmanager.cpp:4
void selectTransform(uint id)
selectTransform signals that the selected plugin has changed
Definition transformmanager.cpp:73
QMap< QString, QVariant > getSettings(uint idx)
getter for plugin's settings
Definition transformmanager.cpp:116
QWidget * getSettingsWidget(QWidget *parent, uint idx)
getSettingsWidget returns the settings-widget for the settings configuration
Definition transformmanager.cpp:27
void exit()
exit ends excecution of the thread that is excecuting the plugin and frees the plugins resources
Definition transformmanager.cpp:32
void enableCuda(bool enabled)
enableCuda enables or disables the usage of CUDA for the transformation plugins
Definition transformmanager.cpp:104
void setSettings(QMap< QString, QVariant > settings, uint idx)
setter for plugin's settings
Definition transformmanager.cpp:111
QStringList getTransformList()
getTransformList gets a list of names all availabe transformation-plugins
Definition transformmanager.cpp:51
ITransformRequestDequeue * getTransform(uint id)
getTransform gets a desyncroniced version of the plugin
Definition transformmanager.cpp:65
bool isTransformEnabled()
isTransformEnabled returns if the transformaiton is currently active
Definition transformmanager.cpp:99
int getTransformCount()
getTransformCount gets the amount of available transformation-plugins
Definition transformmanager.cpp:60
Definition transformmanager.h:120