Konsole
Konsole::SessionListModel Class Reference
Item-view model which contains a flat list of sessions. More...
#include <SessionManager.h>

Public Member Functions | |
virtual int | columnCount (const QModelIndex &parent) const |
virtual QVariant | data (const QModelIndex &index, int role) const |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent) const |
virtual QModelIndex | parent (const QModelIndex &index) const |
virtual int | rowCount (const QModelIndex &parent) const |
SessionListModel (QObject *parent=0) | |
void | setSessions (const QList< Session * > &sessions) |
Protected Member Functions | |
virtual void | sessionRemoved (Session *) |
Detailed Description
Item-view model which contains a flat list of sessions.After constructing the model, call setSessions() to set the sessions displayed in the list. When a session ends (after emitting the finished() signal) it is automatically removed from the list.
The internal pointer for each item in the model (index.internalPointer()) is the associated Session*
Definition at line 394 of file SessionManager.h.
Constructor & Destructor Documentation
SessionListModel::SessionListModel | ( | QObject * | parent = 0 |
) |
Definition at line 802 of file SessionManager.cpp.
Member Function Documentation
int SessionListModel::columnCount | ( | const QModelIndex & | parent | ) | const [virtual] |
Definition at line 865 of file SessionManager.cpp.
QVariant SessionListModel::data | ( | const QModelIndex & | index, | |
int | role | |||
) | const [virtual] |
QVariant SessionListModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role | |||
) | const [virtual] |
Definition at line 843 of file SessionManager.cpp.
QModelIndex SessionListModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent | |||
) | const [virtual] |
Definition at line 890 of file SessionManager.cpp.
QModelIndex SessionListModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 873 of file SessionManager.cpp.
int SessionListModel::rowCount | ( | const QModelIndex & | parent | ) | const [virtual] |
Definition at line 869 of file SessionManager.cpp.
virtual void Konsole::SessionListModel::sessionRemoved | ( | Session * | ) | [inline, protected, virtual] |
Sets the list of sessions displayed in the model.
To display all sessions that are currently running in the list, call setSessions(SessionManager::instance()->sessions())
Definition at line 807 of file SessionManager.cpp.
The documentation for this class was generated from the following files: