Class QfPluginModel
Inherits the following classes: QAbstractListModel
Public Types
| Type | Name |
|---|---|
| enum | PluginRoles |
Public Properties
| Type | Name |
|---|---|
| property bool | isRefreshing |
Public Signals
| Type | Name |
|---|---|
| signal void | isRefreshingChanged |
| signal void | remoteFetched |
Public Functions
| Type | Name |
|---|---|
| QfPluginModel (QfPluginManager * manager, QObject * parent=nullptr) |
|
| QList< QfPluginInformation > | availableAppPlugins () const |
| QVariant | data (const QModelIndex & index, int role=Qt::DisplayRole) override const |
| bool | hasPluginInformation (const QString & uuid) const |
| bool | isRefreshing () const |
| QfPluginInformation | pluginInformation (const QString & uuid) const |
| Q_INVOKABLE void | refresh (bool fetchRemote=false) |
| QHash< int, QByteArray > | roleNames () override const |
| int | rowCount (const QModelIndex & parent=QModelIndex()) override const |
| bool | setData (const QModelIndex & index, const QVariant & value, int role) override |
| Q_INVOKABLE void | updatePluginEnabledStateByUuid (const QString & uuid, bool enabled, bool configurable) |
Public Types Documentation
enum PluginRoles
enum QfPluginModel::PluginRoles {
UuidRole = Qt::UserRole + 1,
TrustedRole,
BundledRole,
EnabledRole,
ConfigurableRole,
NameRole,
DescriptionRole,
AuthorRole,
HomepageRole,
IconRole,
VersionRole,
InstalledLocallyRole,
AvailableRemotelyRole,
AvailableUpdateRole
};
Public Properties Documentation
property isRefreshing [1/2]
bool QfPluginModel::isRefreshing;
Public Signals Documentation
signal isRefreshingChanged
void QfPluginModel::isRefreshingChanged;
signal remoteFetched
void QfPluginModel::remoteFetched;
Public Functions Documentation
function QfPluginModel
explicit QfPluginModel::QfPluginModel (
QfPluginManager * manager,
QObject * parent=nullptr
)
Constructs a PluginModel.
function availableAppPlugins
QList< QfPluginInformation > QfPluginModel::availableAppPlugins () const
Returns the list of available app plugins installed locally.
function data
QVariant QfPluginModel::data (
const QModelIndex & index,
int role=Qt::DisplayRole
) override const
Returns the data for index and role.
function hasPluginInformation
bool QfPluginModel::hasPluginInformation (
const QString & uuid
) const
Returns true if the model contains a plugin with the given uuid.
function isRefreshing [2/2]
bool QfPluginModel::isRefreshing () const
Returns true if the model is currently fetching remote plugins.
function pluginInformation
QfPluginInformation QfPluginModel::pluginInformation (
const QString & uuid
) const
Returns the pluginInformation information for the pluginInformation identified by uuid.
function refresh
Q_INVOKABLE void QfPluginModel::refresh (
bool fetchRemote=false
)
Refreshes the model.
Parameters:
fetchRemoteset to TRUE to fetch remotely available plugins
function roleNames
QHash< int, QByteArray > QfPluginModel::roleNames () override const
Returns the role names used by this model.
function rowCount
int QfPluginModel::rowCount (
const QModelIndex & parent=QModelIndex()
) override const
Returns the number of plugins in the model.
function setData
bool QfPluginModel::setData (
const QModelIndex & index,
const QVariant & value,
int role
) override
Sets the data for index and role to value.
function updatePluginEnabledStateByUuid
Q_INVOKABLE void QfPluginModel::updatePluginEnabledStateByUuid (
const QString & uuid,
bool enabled,
bool configurable
)
Updates the enabled and configurable state of the plugin with uuid.
The documentation for this class was generated from the following file src/app/qfpluginmodel.h