forked from albertlauncher/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpythonmodulev1.h
More file actions
53 lines (36 loc) · 1002 Bytes
/
Copy pathpythonmodulev1.h
File metadata and controls
53 lines (36 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) 2017-2018 Manuel Schneider
#pragma once
#include <QLoggingCategory>
#include <QStringList>
#include <memory>
Q_DECLARE_LOGGING_CATEGORY(qlc_python_modulev1)
namespace Core {
class Query;
}
namespace Python {
class PythonModuleV1Private;
class PythonModuleV1 final
{
public:
enum class State { InvalidMetadata, Unloaded, Loaded, Error };
PythonModuleV1(const QString &path);
~PythonModuleV1();
void load();
void unload();
void handleQuery(Core::Query * query) const;
const QString &path() const;
const QString &sourcePath() const;
const QString &id() const;
const QString &name() const;
const QString &author() const;
const QString &version() const;
const QString &description() const;
const QString &trigger() const;
const QStringList &dependencies() const;
const QString &errorString() const;
State state() const;
private:
void readMetadata();
std::unique_ptr<PythonModuleV1Private> d;
};
}