summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-12-16 13:04:49 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-12-16 15:32:04 +0100
commit69555ddc87fe727d59385e1752d3ba66aa5549ee (patch)
treedd711aa12ae9a2255cb62674f1109115938aa58e /api
parent8a0ce309c485e47a09e2fbc918d9653dc42c7fb2 (diff)
api, gui, opentrack: allow embedding proto, filter dialogs
Diffstat (limited to 'api')
-rw-r--r--api/plugin-api.cpp9
-rw-r--r--api/plugin-api.hpp9
2 files changed, 10 insertions, 8 deletions
diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp
index b6de3b16..3bfe9855 100644
--- a/api/plugin-api.cpp
+++ b/api/plugin-api.cpp
@@ -24,6 +24,9 @@ void BaseDialog::done(int)
}
bool BaseDialog::embeddable() noexcept { return false; }
+void BaseDialog::save() {}
+void BaseDialog::reload() {}
+void BaseDialog::set_buttons_visible(bool x) {}
} // ns plugin_api::detail
@@ -38,10 +41,14 @@ IFilter::IFilter() = default;
IFilter::~IFilter() = default;
IFilterDialog::IFilterDialog() = default;
IFilterDialog::~IFilterDialog() = default;
+void IFilterDialog::register_filter(IFilter* filter) {}
+void IFilterDialog::unregister_filter() {}
IProtocol::IProtocol() = default;
IProtocol::~IProtocol() = default;
IProtocolDialog::IProtocolDialog() = default;
IProtocolDialog::~IProtocolDialog() = default;
+void IProtocolDialog::register_protocol(IProtocol* protocol){}
+void IProtocolDialog::unregister_protocol() {}
ITracker::ITracker() = default;
ITracker::~ITracker() = default;
bool ITracker::center() { return false; }
@@ -49,7 +56,6 @@ ITrackerDialog::ITrackerDialog() = default;
ITrackerDialog::~ITrackerDialog() = default;
void ITrackerDialog::register_tracker(ITracker*) {}
void ITrackerDialog::unregister_tracker() {}
-void ITrackerDialog::set_buttons_visible(bool) {}
IExtension::~IExtension() = default;
IExtensionDialog::~IExtensionDialog() = default;
@@ -57,7 +63,6 @@ bool module_status::is_ok() const
{
return error.isNull();
}
-
module_status_mixin::~module_status_mixin() = default;
module_status::module_status(const QString& error) : error(error) {}
module_status::module_status() = default;
diff --git a/api/plugin-api.hpp b/api/plugin-api.hpp
index ab43884a..9cc87f82 100644
--- a/api/plugin-api.hpp
+++ b/api/plugin-api.hpp
@@ -43,6 +43,9 @@ protected:
public:
void closeEvent(QCloseEvent *) override;
virtual bool embeddable() noexcept;
+ virtual void set_buttons_visible(bool x); // XXX TODO remove it once all modules are converted
+ virtual void save(); // XXX HACK should be pure virtual
+ virtual void reload(); // XXX HACK should be pure virtual -sh 20211214
signals:
void closing();
private slots:
@@ -216,17 +219,11 @@ struct OTR_API_EXPORT ITrackerDialog : public plugin_api::detail::BaseDialog
virtual void register_tracker(ITracker *tracker);
// received tracker pointer is about to get deleted
virtual void unregister_tracker();
- virtual void set_buttons_visible(bool x); // XXX TODO remove it once all modules are converted
- virtual void save(); // XXX HACK should be pure virtual
- virtual void reload(); // XXX HACK should be pure virtual -sh 20211214
ITrackerDialog();
~ITrackerDialog() override;
};
-inline void ITrackerDialog::save() {}
-inline void ITrackerDialog::reload() {}
-
// call once with your chosen class names in the plugin
#define OPENTRACK_DECLARE_TRACKER(tracker_class, dialog_class, metadata_class) \
OPENTRACK_DECLARE_PLUGIN_INTERNAL(tracker_class, ITracker, metadata_class, dialog_class, ITrackerDialog)