te::qt::widgets::PluginsModel Class Reference

#include <PluginsModel.h>

Inheritance diagram for te::qt::widgets::PluginsModel:

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...
 

Detailed Description

Definition at line 48 of file PluginsModel.h.

Member Enumeration Documentation

Define possible states for the plugin.

Enumerator
No_operation 

No operation.

To_add 

Plugin to be added.

To_remove 

Plugin to be removed.

To_enable 

Plugin to be loaded.

To_disable 

Plugin to be unloaded.

Loaded 

Plugin is loaded.

Unloaded 

Plugin is unloaded.

Broked 

Plugin haas missed dependencies.

Definition at line 57 of file PluginsModel.h.

Constructor & Destructor Documentation

te::qt::widgets::PluginsModel::PluginsModel ( QObject *  parent = 0)

Constructor.

Parameters
parentQt object parent.
virtual te::qt::widgets::PluginsModel::~PluginsModel ( )
virtual

Destructor.

Member Function Documentation

void te::qt::widgets::PluginsModel::addPlugin ( const te::plugin::PluginInfo info,
const PluginsStatus &  status 
)

Adds information about plugin.

Parameters
infoInformation of the plugin.
statusStatus of plugin.
See also
PluginStatus
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.

Parameters
parentParent index. (For this model it is not used)
Returns
8.
QVariant te::qt::widgets::PluginsModel::data ( const QModelIndex &  index,
int  role 
) const

Returns data identified by index.

Parameters
indexData index.
roleData role.
Returns
Data as QVariant object.
Qt::ItemFlags te::qt::widgets::PluginsModel::flags ( const QModelIndex &  index) const

Returns the flags associated with a given item.

Parameters
indexIndex of the cell.
Returns
Flags related to the item.
void te::qt::widgets::PluginsModel::getPluginsInfo ( std::vector< te::plugin::PluginInfo * > &  plgs,
std::vector< PluginsStatus > &  status 
)

Returns plugins informations.

Parameters
[out]plgsList of plugins.
[out]statusList 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.

Parameters
sectionColumn / Row number.
orientationHorizontal / Vertical orientation options.
roleData role.
Returns
Data to be presented as header.
void te::qt::widgets::PluginsModel::removePlugins ( const QModelIndexList &  plgs)

Remove the selected plugins.

Parameters
plgsIndexes 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.

Parameters
parentParent. (This is not used for this model).
Returns
8.
bool te::qt::widgets::PluginsModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

Member Data Documentation

std::vector<te::plugin::PluginInfo*> te::qt::widgets::PluginsModel::m_plugins
protected

List of informations about plugins.

Definition at line 171 of file PluginsModel.h.

std::vector<PluginsStatus> te::qt::widgets::PluginsModel::m_pluginsStatus
protected

List of status of each plugin.

Definition at line 172 of file PluginsModel.h.


The documentation for this class was generated from the following file: