iVS3D v2.0.9
Loading...
Searching...
No Matches
pluginhandle.h
1#pragma once
2
3#include <QString>
4#include <QPluginLoader>
5#include <QObject>
6#include <memory>
7#include <optional>
8
9#include "ibase.h"
10#include "ipreview.h"
11#include "imask.h"
12#include "iselection.h"
13
15 QPluginLoader* loader = nullptr;
16 PLUG::IBase* base = nullptr;
17 QObject* qobject = nullptr;
18 PLUG::IPreview* preview = nullptr;
19 PLUG::IMask* mask = nullptr;
20 PLUG::ISelection* selection = nullptr;
21 std::shared_ptr<QWidget> settingsWidget = nullptr;
22 std::optional<PLUG::Error> settingsWidgetError = std::nullopt;
23
24 QString name() const { return base ? base->getName() : QString(); }
25
26 bool hasPreview() const { return preview != nullptr; }
27
28 bool hasMask() const { return mask != nullptr; }
29
30 bool hasSelection() const { return selection != nullptr; }
31};
32
33#define TRY_ASSIGN(lhs, expr) \
34 auto _tmp_##lhs = (expr); \
35 if (!_tmp_##lhs) return tl::unexpected(_tmp_##lhs.error()); \
36 lhs = std::move(*_tmp_##lhs)
The IBase interface provides a base class for all plugin interfaces in iVS3D. It inherits from QObjec...
Definition ibase.h:102
virtual QString getName() const =0
getName returns the name of the plugin which will be displayed in the iVS3D interface.
Interface for mask generation plugins in iVS3D.
Definition imask.h:46
The IPreview interface defines the contract for preview plugins in iVS3D. Plugins implementing this i...
Definition ipreview.h:41
Interface for keyframe/image-selection plugins in iVS3D.
Definition iselection.h:53
Definition pluginhandle.h:14