A model for displaying all available signal spies. More...
#include <SignalSpy.h>
Public Types | |
enum | Columns { kSignature, kObject, kAddress, kSuperClass, kColumnCount } |
Public Member Functions | |
SignalSpyModel (QObject *inParent=0) | |
virtual | ~SignalSpyModel () |
SignalLogger & | GetLogger () |
bool | ContainsSignalSpy (const QObject *inObject, const QString &inSignal) const |
Returns true when a signal spy exists that monitors the given signal (normalized signature). | |
void | CreateSignalSpy (const QObject *inObject, const QString &inSignal) |
Creates a signal spy that monitors the given signal (normalized signature). | |
void | DestroySignalSpy (const QObject *inObject, const QString &inSignal) |
Destroyes the signal spy that monitors the given signal (normalized signature). | |
virtual int | rowCount (const QModelIndex &inParent=QModelIndex()) const |
Returns the number of signal spies. | |
virtual int | columnCount (const QModelIndex &inParent=QModelIndex()) const |
Returns the number of columns for the children of the given parent. | |
virtual Qt::ItemFlags | flags (const QModelIndex &inIndex) const |
Returns the item flags for the spy referred to by the index. | |
virtual QVariant | data (const QModelIndex &inIndex, int inRole) const |
Returns the data stored under the given role for the spy referred to by the index. | |
virtual QVariant | headerData (int inSection, Qt::Orientation inOrientation, int inRole=Qt::DisplayRole) const |
Returns the data for the given role and section in the header with the specified orientation. | |
virtual bool | removeRows (int inRow, int inCount, const QModelIndex &inParent=QModelIndex()) |
Removes count spies starting with the given row. Returns true if the spies were successfully removed; otherwise returns false. | |
Private Attributes | |
QVector< SignalSpy * > | mSignalSpies |
Contains all created signal spies. | |
SignalLogger | mLogger |
Used by all signal spies for consistent log formatting. |
A model for displaying all available signal spies.
Provides functions for creating and destroying SignalSpy objects. In addition all created spies will share the same SignalLogger, thus providing consistent logging across all spies.
conan::SignalSpyModel::SignalSpyModel | ( | QObject * | inParent = 0 |
) |
conan::SignalSpyModel::~SignalSpyModel | ( | ) | [virtual] |
int conan::SignalSpyModel::columnCount | ( | const QModelIndex & | inParent = QModelIndex () |
) | const [virtual] |
Returns the number of columns for the children of the given parent.
bool conan::SignalSpyModel::ContainsSignalSpy | ( | const QObject * | inObject, | |
const QString & | inSignal | |||
) | const |
Returns true when a signal spy exists that monitors the given signal (normalized signature).
void conan::SignalSpyModel::CreateSignalSpy | ( | const QObject * | inObject, | |
const QString & | inSignal | |||
) |
Creates a signal spy that monitors the given signal (normalized signature).
QVariant conan::SignalSpyModel::data | ( | const QModelIndex & | inIndex, | |
int | inRole | |||
) | const [virtual] |
Returns the data stored under the given role for the spy referred to by the index.
void conan::SignalSpyModel::DestroySignalSpy | ( | const QObject * | inObject, | |
const QString & | inSignal | |||
) |
Destroyes the signal spy that monitors the given signal (normalized signature).
Qt::ItemFlags conan::SignalSpyModel::flags | ( | const QModelIndex & | inIndex | ) | const [virtual] |
Returns the item flags for the spy referred to by the index.
SignalLogger & conan::SignalSpyModel::GetLogger | ( | ) |
QVariant conan::SignalSpyModel::headerData | ( | int | inSection, | |
Qt::Orientation | inOrientation, | |||
int | inRole = Qt::DisplayRole | |||
) | const [virtual] |
Returns the data for the given role and section in the header with the specified orientation.
bool conan::SignalSpyModel::removeRows | ( | int | inRow, | |
int | inCount, | |||
const QModelIndex & | inParent = QModelIndex () | |||
) | [virtual] |
Removes count spies starting with the given row. Returns true if the spies were successfully removed; otherwise returns false.
int conan::SignalSpyModel::rowCount | ( | const QModelIndex & | inParent = QModelIndex () |
) | const [virtual] |
Returns the number of signal spies.
SignalLogger conan::SignalSpyModel::mLogger [private] |
Used by all signal spies for consistent log formatting.
QVector<SignalSpy*> conan::SignalSpyModel::mSignalSpies [private] |
Contains all created signal spies.