#include <PluginsModel.h>
Public Types | |
enum | PluginStatus { No_operation = 0, To_add = 1, To_remove = 2, To_enable = 4, To_disable = 8, Loaded = 16, Unloaded = 32, Broked = 64 } |
Define possible states for the plugin. More... | |
Public Member Functions | |
void | addPlugin (const te::plugin::PluginInfo *info, const PluginsStatus &status) |
Adds information about plugin. More... | |
void | clear () |
Clear the list of plugins and status. More... | |
void | getPluginsInfo (std::vector< te::plugin::PluginInfo * > &plgs, std::vector< PluginsStatus > &status) |
Returns plugins informations. More... | |
void | removePlugins (const QModelIndexList &plgs) |
Remove the selected plugins. More... | |
Constructor and destructor. | |
Methods used to construct and destruct the object. | |
PluginsModel (QObject *parent=0) | |
Constructor. More... | |
virtual | ~PluginsModel () |
Destructor. More... | |
QAbstractTableModel re-implementation methods. | |
Re-implementation of QAbstractTableModel methods. | |
int | rowCount (const QModelIndex &parent) const |
Returns the number of plugins regitered in plugins manager. More... | |
int | columnCount (const QModelIndex &parent) const |
Returns the number of columns. More... | |
QVariant | data (const QModelIndex &index, int role) const |
Returns data identified by index. More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
Returns the data to be presented as header. More... | |
Qt::ItemFlags | flags (const QModelIndex &index) const |
Returns the flags associated with a given item. More... | |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
Protected Attributes | |
std::vector< te::plugin::PluginInfo * > | m_plugins |
List of informations about plugins. More... | |
std::vector< PluginsStatus > | m_pluginsStatus |
List of status of each plugin. More... | |
Definition at line 48 of file PluginsModel.h.
Define possible states for the plugin.
Definition at line 57 of file PluginsModel.h.
te::qt::widgets::PluginsModel::PluginsModel | ( | QObject * | parent = 0 | ) |
Constructor.
parent | Qt object parent. |
|
virtual |
Destructor.
void te::qt::widgets::PluginsModel::addPlugin | ( | const te::plugin::PluginInfo * | info, |
const PluginsStatus & | status | ||
) |
Adds information about plugin.
info | Information of the plugin. |
status | Status of plugin. |
void te::qt::widgets::PluginsModel::clear | ( | ) |
Clear the list of plugins and status.
int te::qt::widgets::PluginsModel::columnCount | ( | const QModelIndex & | parent | ) | const |
Returns the number of columns.
parent | Parent index. (For this model it is not used) |
QVariant te::qt::widgets::PluginsModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Returns data identified by index.
index | Data index. |
role | Data role. |
Qt::ItemFlags te::qt::widgets::PluginsModel::flags | ( | const QModelIndex & | index | ) | const |
Returns the flags associated with a given item.
index | Index of the cell. |
void te::qt::widgets::PluginsModel::getPluginsInfo | ( | std::vector< te::plugin::PluginInfo * > & | plgs, |
std::vector< PluginsStatus > & | status | ||
) |
Returns plugins informations.
[out] | plgs | List of plugins. |
[out] | status | List of the status of the plugins. |
QVariant te::qt::widgets::PluginsModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role | ||
) | const |
Returns the data to be presented as header.
section | Column / Row number. |
orientation | Horizontal / Vertical orientation options. |
role | Data role. |
void te::qt::widgets::PluginsModel::removePlugins | ( | const QModelIndexList & | plgs | ) |
Remove the selected plugins.
plgs | Indexes of the plugins to be removed. |
int te::qt::widgets::PluginsModel::rowCount | ( | const QModelIndex & | parent | ) | const |
Returns the number of plugins regitered in plugins manager.
parent | Parent. (This is not used for this model). |
bool te::qt::widgets::PluginsModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role = Qt::EditRole |
||
) |
|
protected |
List of informations about plugins.
Definition at line 171 of file PluginsModel.h.
|
protected |
List of status of each plugin.
Definition at line 172 of file PluginsModel.h.