te::qt::af::MenuBarModel Class Reference

Defines a model, based on a QMenuBar, to present all system buttons as a table. More...

#include <MenuBarModel.h>

Inheritance diagram for te::qt::af::MenuBarModel:

Signals

void updateAction (QAction *, const bool &)
 

Public Member Functions

int columnCount (const QModelIndex &parent=QModelIndex()) const
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
 MenuBarModel (QMenuBar *mnuBar, QObject *parent=0)
 Constructor. More...
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
void setMenuBar (QMenuBar *mnuBar)
 Sets the menu bar to be used in the model. More...
 
void updateActionsState (const QList< QAction * > &acts)
 Check the actions contained in acts. More...
 
 ~MenuBarModel ()
 Destructor. More...
 

Protected Attributes

std::vector< QAction * > m_actions
 System buttons. More...
 
std::vector< bool > m_actionsActivation
 State of each system button. (True insert, False do nothing). More...
 

Detailed Description

Defines a model, based on a QMenuBar, to present all system buttons as a table.

Definition at line 50 of file MenuBarModel.h.

Constructor & Destructor Documentation

te::qt::af::MenuBarModel::MenuBarModel ( QMenuBar *  mnuBar,
QObject *  parent = 0 
)

Constructor.

Parameters
mnuBarThe menu bar to be used.
parentParent object.
te::qt::af::MenuBarModel::~MenuBarModel ( )

Destructor.

Member Function Documentation

int te::qt::af::MenuBarModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
QVariant te::qt::af::MenuBarModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual Qt::ItemFlags te::qt::af::MenuBarModel::flags ( const QModelIndex &  index) const
virtual
QVariant te::qt::af::MenuBarModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
int te::qt::af::MenuBarModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
bool te::qt::af::MenuBarModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
void te::qt::af::MenuBarModel::setMenuBar ( QMenuBar *  mnuBar)

Sets the menu bar to be used in the model.

void te::qt::af::MenuBarModel::updateAction ( QAction *  ,
const bool &   
)
signal
void te::qt::af::MenuBarModel::updateActionsState ( const QList< QAction * > &  acts)

Check the actions contained in acts.

Parameters
actsList of the actions.

Member Data Documentation

std::vector<QAction*> te::qt::af::MenuBarModel::m_actions
protected

System buttons.

Definition at line 100 of file MenuBarModel.h.

std::vector<bool> te::qt::af::MenuBarModel::m_actionsActivation
protected

State of each system button. (True insert, False do nothing).

Definition at line 101 of file MenuBarModel.h.


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