5#ifndef QXPLUGINCONTEXT_H
6#define QXPLUGINCONTEXT_H
12#include <QtCore/QString>
13#include <QtCore/QStringList>
15#include <QtWidgets/QWidget>
62 virtual void addPage(
const QString &
id,
const QIcon &icon,
const QString &title, QWidget *page) = 0;
74 virtual QWidget *
addDock(
DockArea area,
const QString &
id,
const QString &title, QWidget *widget) = 0;
The thin surface a plugin programs against.
virtual void setStatusMessage(const QString &message)=0
Replaces the host's persistent status-line message.
ToastLevel
Toast severity understood by every host.
virtual QString currentPageId() const =0
Id of the page currently on screen, or an empty string when there is none.
DockArea
Where a newly added dock lands.
virtual void setProgress(int value)=0
Shows how far the work has got, clamped to the range set by setProgressRange().
virtual void setBusy(bool busy)=0
Shows or hides the host's indeterminate "working" indicator.
virtual void showToast(const QString &text, ToastLevel level=ToastLevel::Information, int timeoutMs=-1)=0
Shows a toast over the host; timeoutMs < 0 means the host's default.
virtual ~QxPluginContext()
virtual QxCore::QxSettings * settings() const =0
The settings object backing persistence; never null.
virtual void addPage(const QString &id, const QIcon &icon, const QString &title, QWidget *page)=0
Adds a page to the host's central workspace and registers it under id, which must be stable and uniqu...
virtual void setProgressRange(int minimum, int maximum)=0
Sets the range the progress runs in; maximum must be above minimum.
virtual QWidget * addDock(DockArea area, const QString &id, const QString &title, QWidget *widget)=0
Creates a dock widget named id, titled title, filled with widget and dropped in area.
virtual void clearProgress()=0
Hides the progress or busy indicator and resets it to the minimum.
virtual void setCurrentPage(const QString &id)=0
Brings the page registered under id to the front.
#define QX_CORE_PREPEND_NAMESPACE(name)
#define QX_PLUGIN_BEGIN_NAMESPACE
#define QX_PLUGIN_END_NAMESPACE