QtCanpool 3.3.0
载入中...
搜索中...
未找到
QxApp::QxPluginManagerDialog类 参考

Lists the plugins the manager found and lets their switches be set. 更多...

#include <qxapp/qxpluginmanagerdialog.h>

类 QxApp::QxPluginManagerDialog 继承关系图:

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.

// at start-up, before loadPlugins()
// later, from a menu entry
QxPluginManagerDialog dialog(&manager, settings, &shell);
dialog.exec();
Lists the plugins the manager found and lets their switches be set.
static QStringList enabledPlugins(QxCore ::QxSettings *settings)
Ids stored as switched on even though their metadata says they are off by default.
::QxPlugin::QxPluginManager * manager() const
static QStringList disabledPlugins(QxCore ::QxSettings *settings)
Ids stored as switched off; empty for a null settings.
void loadPlugins()
Scans the paths (or the registered static plugins), resolves dependencies and loads in order.
void setEnabledPlugins(const QStringList &ids)
Ids to start even though their metadata says EnabledByDefault is false.
void setDisabledPlugins(const QStringList &ids)
Ids that never start, whatever their metadata says.

在文件 qxpluginmanagerdialog.h 第 60 行定义.

构造及析构函数说明

◆ QxPluginManagerDialog()

QxApp::QxPluginManagerDialog::QxPluginManagerDialog ( ::QxPlugin::QxPluginManager *  manager,
QxCore ::QxSettings *  settings = 0,
QWidget *  parent = 0 
)
explicit

在文件 qxpluginmanagerdialog.cpp 第 352 行定义.

◆ ~QxPluginManagerDialog()

QxApp::QxPluginManagerDialog::~QxPluginManagerDialog ( )
override

在文件 qxpluginmanagerdialog.cpp 第 366 行定义.

成员函数说明

◆ accept()

void QxApp::QxPluginManagerDialog::accept ( )
override

Applies and closes.

在文件 qxpluginmanagerdialog.cpp 第 530 行定义.

◆ applied()

void QxApp::QxPluginManagerDialog::applied ( )

The switches have been written and synced.

◆ apply()

void QxApp::QxPluginManagerDialog::apply ( )

Writes the switches to the settings.

在文件 qxpluginmanagerdialog.cpp 第 496 行定义.

◆ count()

int QxApp::QxPluginManagerDialog::count ( ) const

Number of rows, one per plugin the manager knows about.

在文件 qxpluginmanagerdialog.cpp 第 423 行定义.

◆ diagnostics()

QString QxApp::QxPluginManagerDialog::diagnostics ( ) const

The manager's errorString(), or a placeholder when there is none.

在文件 qxpluginmanagerdialog.cpp 第 462 行定义.

◆ disabledPlugins()

QStringList QxApp::QxPluginManagerDialog::disabledPlugins ( QxCore ::QxSettings *  settings)
static

Ids stored as switched off; empty for a null settings.

在文件 qxpluginmanagerdialog.cpp 第 377 行定义.

◆ enabledPlugins()

QStringList QxApp::QxPluginManagerDialog::enabledPlugins ( QxCore ::QxSettings *  settings)
static

Ids stored as switched on even though their metadata says they are off by default.

在文件 qxpluginmanagerdialog.cpp 第 392 行定义.

◆ isChecked()

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 行定义.

◆ isModified()

bool QxApp::QxPluginManagerDialog::isModified ( ) const

Whether the switches on screen differ from the ones the settings hold.

在文件 qxpluginmanagerdialog.cpp 第 468 行定义.

◆ manager()

QxPluginManager * QxApp::QxPluginManagerDialog::manager ( ) const

在文件 qxpluginmanagerdialog.cpp 第 407 行定义.

◆ reject()

void QxApp::QxPluginManagerDialog::reject ( )
override

Discards and closes.

在文件 qxpluginmanagerdialog.cpp 第 536 行定义.

◆ reload()

void QxApp::QxPluginManagerDialog::reload ( )

Rebuilds the list from the manager and the switches from the settings.

在文件 qxpluginmanagerdialog.cpp 第 474 行定义.

◆ revert()

void QxApp::QxPluginManagerDialog::revert ( )

Puts every switch back to what the settings hold.

在文件 qxpluginmanagerdialog.cpp 第 482 行定义.

◆ rowOf()

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 行定义.

◆ setChecked()

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 行定义.

◆ setCurrentPlugin()

void QxApp::QxPluginManagerDialog::setCurrentPlugin ( const QString &  id)

Brings the row of the plugin id into view and shows its details.

在文件 qxpluginmanagerdialog.cpp 第 451 行定义.

◆ setDisabledPlugins()

void QxApp::QxPluginManagerDialog::setDisabledPlugins ( QxCore ::QxSettings *  settings,
const QStringList &  ids 
)
static

Stores the ids that must not start; an empty list takes the key out again.

在文件 qxpluginmanagerdialog.cpp 第 382 行定义.

◆ setEnabledPlugins()

void QxApp::QxPluginManagerDialog::setEnabledPlugins ( QxCore ::QxSettings *  settings,
const QStringList &  ids 
)
static

Stores the ids that must start; an empty list takes the key out again.

在文件 qxpluginmanagerdialog.cpp 第 397 行定义.

◆ showEvent()

void QxApp::QxPluginManagerDialog::showEvent ( QShowEvent *  event)
overrideprotected

在文件 qxpluginmanagerdialog.cpp 第 542 行定义.


该类的文档由以下文件生成: