Developer Documentation

OpenFunctionThread.hh
1 #ifndef __OPENFUNCTIONSLOADFROMPLUGINTHREAD_HH__
2 #define __OPENFUNCTIONSLOADFROMPLUGINTHREAD_HH__
3
4 #include <OpenFlipper/threads/OpenFlipperThread.hh>
5 #include <OpenFlipper/common/DataTypes.hh>
6 #include <OpenFlipper/BasePlugin/FileInterface.hh>
7 #include <QString>
8
9
10
11 class LoadFromPluginThread : public OpenFlipperThread
12 {
13 Q_OBJECT
14
15 public:
16 struct LoadInfos
17 {
18 FileInterface* plugin;
19 DataType type;
20 QString filename;
21 LoadInfos():plugin(0),type(DATA_UNKNOWN),filename(){}//c'tor for QVector
22 LoadInfos(FileInterface* _plugin, const QString& _filename):plugin(_plugin),type(DATA_UNKNOWN),filename(_filename){}
23 LoadInfos(FileInterface* _plugin, DataType _type, const QString& _filename):plugin(_plugin),type(_type),filename(_filename){}
24 };
25
26 signals:
27 void updateView();
28
29 private:
30 const QVector<LoadInfos>& infos_;
31 QVector<int> loadedIds_;
32
33 public slots:
34 void loadFromPlugin();
35
36 public:
37
38 ~LoadFromPluginThread();
39 LoadFromPluginThread(const QVector<LoadInfos>& _loadInfos, const QString& _jobName);
40
41
42 int getObjId(int index)const;
43 const QString& getFilename(int index) const;
44
45 };
46
47 #endif //__OPENFUNCTIONSLOADFROMPLUGINTHREAD_HH__
LoadFromPluginThread
Definition: OpenFunctionThread.hh:11
DataType
Predefined datatypes.
Definition: DataTypes.hh:83
LoadFromPluginThread::LoadInfos
Definition: OpenFunctionThread.hh:16
FileInterface.hh
OpenFlipperThread
Thread handling class for OpenFlipper.
Definition: OpenFlipperThread.hh:77
DataTypes.hh
DATA_UNKNOWN
const DataType DATA_UNKNOWN(0)
None of the other Objects.
FileInterface
Interface class for file handling.
Definition: FileInterface.hh:63