|
QtCanpool 3.3.0
|
Lists the plugins the manager found and lets their switches be set. 更多...
#include <qxapp/qxpluginmanagerdialog.h>

Public 成员函数 | |
| QxPluginManagerDialog (::QxPlugin::QxPluginManager *manager, QxCore ::QxSettings *settings=0, QWidget *parent=0) | |
| ~QxPluginManagerDialog () override | |
| ::QxPlugin::QxPluginManager * | manager () const |
| int | rowOf (const QString &id) const |
| Row of the plugin id, or -1 when the list does not hold it. | |
| int | count () const |
| Number of rows, one per plugin the manager knows about. | |
| bool | isChecked (const QString &id) const |
| The switch of the plugin id as it is on screen; false for an unknown id. | |
| void | setChecked (const QString &id, bool checked) |
| Sets the switch of the plugin id on screen; unknown id: no-op. | |
| void | setCurrentPlugin (const QString &id) |
| Brings the row of the plugin id into view and shows its details. | |
| QString | diagnostics () const |
| The manager's errorString(), or a placeholder when there is none. | |
| bool | isModified () const |
| Whether the switches on screen differ from the ones the settings hold. | |
| void | reload () |
| Rebuilds the list from the manager and the switches from the settings. | |
| void | revert () |
| Puts every switch back to what the settings hold. | |
| void | apply () |
| Writes the switches to the settings. | |
| void | accept () override |
| Applies and closes. | |
| void | reject () override |
| Discards and closes. | |
| void | applied () |
| The switches have been written and synced. | |
静态 Public 成员函数 | |
| static QStringList | disabledPlugins (QxCore ::QxSettings *settings) |
| Ids stored as switched off; empty for a null settings. | |
| static void | setDisabledPlugins (QxCore ::QxSettings *settings, const QStringList &ids) |
| Stores the ids that must not start; an empty list takes the key out again. | |
| static QStringList | enabledPlugins (QxCore ::QxSettings *settings) |
| Ids stored as switched on even though their metadata says they are off by default. | |
| static void | setEnabledPlugins (QxCore ::QxSettings *settings, const QStringList &ids) |
| Stores the ids that must start; an empty list takes the key out again. | |
Protected 成员函数 | |
| void | showEvent (QShowEvent *event) override |
Lists the plugins the manager found and lets their switches be set.
A row per plugin with its place in the load order, its version and its state; the row selected shows what that plugin depends on, what depends on it and - when it did not start - why. The diagnostics area below carries the manager's errorString(), which is where a failure that belongs to more than one plugin (a cycle, a cascade) arrives in one piece.
A switch is stored as a deviation from the metadata rather than as an absolute state: a plugin that agrees with its EnabledByDefault goes into neither list, so switching off one the metadata turned on and enabling one it switched off both survive a restart. Comparing against the metadata is also what keeps this honest for a plugin that is off by default - the plugin is only off until it is asked for by name.
The change takes effect the next time the application starts: the dialog never loads or unloads anything. It writes the two lists, and the host reads them before calling loadPlugins() - which is what the four static helpers are for.
在文件 qxpluginmanagerdialog.h 第 60 行定义.
|
explicit |
在文件 qxpluginmanagerdialog.cpp 第 352 行定义.
|
override |
在文件 qxpluginmanagerdialog.cpp 第 366 行定义.
|
override |
Applies and closes.
在文件 qxpluginmanagerdialog.cpp 第 530 行定义.
| void QxApp::QxPluginManagerDialog::applied | ( | ) |
The switches have been written and synced.
| void QxApp::QxPluginManagerDialog::apply | ( | ) |
Writes the switches to the settings.
在文件 qxpluginmanagerdialog.cpp 第 496 行定义.
| int QxApp::QxPluginManagerDialog::count | ( | ) | const |
Number of rows, one per plugin the manager knows about.
在文件 qxpluginmanagerdialog.cpp 第 423 行定义.
| QString QxApp::QxPluginManagerDialog::diagnostics | ( | ) | const |
The manager's errorString(), or a placeholder when there is none.
在文件 qxpluginmanagerdialog.cpp 第 462 行定义.
|
static |
Ids stored as switched off; empty for a null settings.
在文件 qxpluginmanagerdialog.cpp 第 377 行定义.
|
static |
Ids stored as switched on even though their metadata says they are off by default.
在文件 qxpluginmanagerdialog.cpp 第 392 行定义.
| bool QxApp::QxPluginManagerDialog::isChecked | ( | const QString & | id | ) | const |
The switch of the plugin id as it is on screen; false for an unknown id.
在文件 qxpluginmanagerdialog.cpp 第 429 行定义.
| bool QxApp::QxPluginManagerDialog::isModified | ( | ) | const |
Whether the switches on screen differ from the ones the settings hold.
在文件 qxpluginmanagerdialog.cpp 第 468 行定义.
| QxPluginManager * QxApp::QxPluginManagerDialog::manager | ( | ) | const |
在文件 qxpluginmanagerdialog.cpp 第 407 行定义.
|
override |
Discards and closes.
在文件 qxpluginmanagerdialog.cpp 第 536 行定义.
| void QxApp::QxPluginManagerDialog::reload | ( | ) |
Rebuilds the list from the manager and the switches from the settings.
在文件 qxpluginmanagerdialog.cpp 第 474 行定义.
| void QxApp::QxPluginManagerDialog::revert | ( | ) |
Puts every switch back to what the settings hold.
在文件 qxpluginmanagerdialog.cpp 第 482 行定义.
| int QxApp::QxPluginManagerDialog::rowOf | ( | const QString & | id | ) | const |
Row of the plugin id, or -1 when the list does not hold it.
在文件 qxpluginmanagerdialog.cpp 第 413 行定义.
| void QxApp::QxPluginManagerDialog::setChecked | ( | const QString & | id, |
| bool | checked | ||
| ) |
Sets the switch of the plugin id on screen; unknown id: no-op.
在文件 qxpluginmanagerdialog.cpp 第 438 行定义.
| void QxApp::QxPluginManagerDialog::setCurrentPlugin | ( | const QString & | id | ) |
Brings the row of the plugin id into view and shows its details.
在文件 qxpluginmanagerdialog.cpp 第 451 行定义.
|
static |
Stores the ids that must not start; an empty list takes the key out again.
在文件 qxpluginmanagerdialog.cpp 第 382 行定义.
|
static |
Stores the ids that must start; an empty list takes the key out again.
在文件 qxpluginmanagerdialog.cpp 第 397 行定义.
|
overrideprotected |
在文件 qxpluginmanagerdialog.cpp 第 542 行定义.