![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/Widgets/ctkErrorLogModel.h>
Public Types | |
enum | ColumnsIds { TimeColumn = 0, ThreadIdColumn, LogLevelColumn, OriginColumn, DescriptionColumn, MaxColumn = DescriptionColumn } |
enum | ItemDataRole { DescriptionTextRole = Qt::UserRole + 1 } |
typedef ctkErrorLogModel | Self |
typedef QSortFilterProxyModel | Superclass |
Public Slots | |
void | addEntry (const QDateTime ¤tDateTime, const QString &threadId, ctkErrorLogLevel::LogLevel logLevel, const QString &origin, const ctkErrorLogContext &context, const QString &text) |
void | clear () |
Remove all log entries from model. More... | |
Signals | |
void | entryAdded (ctkErrorLogLevel::LogLevel logLevel) |
void | logLevelFilterChanged () |
Public Member Functions | |
bool | asynchronousLogging () const |
ctkErrorLogModel (QObject *parentObject=0) | |
void | disableAllMsgHandler () |
void | enableAllMsgHandler () |
bool | fileLoggingEnabled () const |
QString | fileLoggingPattern () const |
QString | filePath () const |
void | filterEntry (const ctkErrorLogLevel::LogLevels &logLevel=ctkErrorLogLevel::Unknown, bool disableFilter=false) |
Q_INVOKABLE int | logEntryCount () const |
QVariant | logEntryData (int row, int column=ctkErrorLogModel::DescriptionColumn, int role=Qt::DisplayRole) const |
Q_INVOKABLE QString | logEntryDescription (int row) const |
bool | logEntryGrouping () const |
ctkErrorLogLevel::LogLevels | logLevelFilter () const |
bool | msgHandlerEnabled (const QString &handlerName) const |
Return True if the handler identified by handlerName is enabled. More... | |
QStringList | msgHandlerEnabled () const |
Return names of the enabled message handlers. More... | |
QStringList | msgHandlerNames () const |
int | numberOfFilesToKeep () const |
bool | registerMsgHandler (ctkErrorLogAbstractMessageHandler *msgHandler) |
Register a message handler. More... | |
void | setAllMsgHandlerEnabled (bool enabled) |
void | setAsynchronousLogging (bool value) |
void | setFileLoggingEnabled (bool value) |
void | setFileLoggingPattern (const QString &value) |
void | setFilePath (const QString &filePath) |
void | setLogEntryGrouping (bool value) |
void | setMsgHandlerEnabled (const QString &handlerName, bool enabled) |
Enable a specific handler given its name. More... | |
void | setMsgHandlerEnabled (const QStringList &handlerNames) |
Enable handler identified by their names. More... | |
void | setNumberOfFilesToKeep (int value) |
void | setTerminalOutputs (const ctkErrorLogTerminalOutput::TerminalOutputs &terminalOutput) |
ctkErrorLogTerminalOutput::TerminalOutputs | terminalOutputs () const |
virtual | ~ctkErrorLogModel () |
Protected Attributes | |
QScopedPointer< ctkErrorLogModelPrivate > | d_ptr |
Properties | |
bool | asynchronousLogging |
bool | fileLoggingEnabled |
QString | fileLoggingPattern |
QString | filePath |
bool | logEntryGrouping |
int | numberOfFilesToKeep |
ctkErrorLogTerminalOutput::TerminalOutputs | terminalOutputs |
Definition at line 39 of file ctkErrorLogModel.h.
Definition at line 51 of file ctkErrorLogModel.h.
typedef QSortFilterProxyModel ctkErrorLogModel::Superclass |
Definition at line 50 of file ctkErrorLogModel.h.
Enumerator | |
---|---|
TimeColumn | |
ThreadIdColumn | |
LogLevelColumn | |
OriginColumn | |
DescriptionColumn | |
MaxColumn |
Definition at line 55 of file ctkErrorLogModel.h.
Enumerator | |
---|---|
DescriptionTextRole |
Definition at line 65 of file ctkErrorLogModel.h.
|
explicit |
|
virtual |
|
slot |
bool ctkErrorLogModel::asynchronousLogging | ( | ) | const |
|
slot |
Remove all log entries from model.
void ctkErrorLogModel::disableAllMsgHandler | ( | ) |
void ctkErrorLogModel::enableAllMsgHandler | ( | ) |
|
signal |
bool ctkErrorLogModel::fileLoggingEnabled | ( | ) | const |
QString ctkErrorLogModel::fileLoggingPattern | ( | ) | const |
QString ctkErrorLogModel::filePath | ( | ) | const |
void ctkErrorLogModel::filterEntry | ( | const ctkErrorLogLevel::LogLevels & | logLevel = ctkErrorLogLevel::Unknown , |
bool | disableFilter = false |
||
) |
Q_INVOKABLE int ctkErrorLogModel::logEntryCount | ( | ) | const |
Return current number of log entries.
QVariant ctkErrorLogModel::logEntryData | ( | int | row, |
int | column = ctkErrorLogModel::DescriptionColumn , |
||
int | role = Qt::DisplayRole |
||
) | const |
Return log entry information associated with row and column.
Q_INVOKABLE QString ctkErrorLogModel::logEntryDescription | ( | int | row | ) | const |
Return log entry information associated with Description column.
bool ctkErrorLogModel::logEntryGrouping | ( | ) | const |
ctkErrorLogLevel::LogLevels ctkErrorLogModel::logLevelFilter | ( | ) | const |
|
signal |
bool ctkErrorLogModel::msgHandlerEnabled | ( | const QString & | handlerName | ) | const |
Return True if the handler identified by handlerName is enabled.
QStringList ctkErrorLogModel::msgHandlerEnabled | ( | ) | const |
Return names of the enabled message handlers.
QStringList ctkErrorLogModel::msgHandlerNames | ( | ) | const |
int ctkErrorLogModel::numberOfFilesToKeep | ( | ) | const |
bool ctkErrorLogModel::registerMsgHandler | ( | ctkErrorLogAbstractMessageHandler * | msgHandler | ) |
Register a message handler.
void ctkErrorLogModel::setAllMsgHandlerEnabled | ( | bool | enabled | ) |
void ctkErrorLogModel::setAsynchronousLogging | ( | bool | value | ) |
void ctkErrorLogModel::setFileLoggingEnabled | ( | bool | value | ) |
void ctkErrorLogModel::setFileLoggingPattern | ( | const QString & | value | ) |
void ctkErrorLogModel::setFilePath | ( | const QString & | filePath | ) |
void ctkErrorLogModel::setLogEntryGrouping | ( | bool | value | ) |
void ctkErrorLogModel::setMsgHandlerEnabled | ( | const QString & | handlerName, |
bool | enabled | ||
) |
Enable a specific handler given its name.
void ctkErrorLogModel::setMsgHandlerEnabled | ( | const QStringList & | handlerNames | ) |
Enable handler identified by their names.
void ctkErrorLogModel::setNumberOfFilesToKeep | ( | int | value | ) |
void ctkErrorLogModel::setTerminalOutputs | ( | const ctkErrorLogTerminalOutput::TerminalOutputs & | terminalOutput | ) |
Set terminal output mode
ctkErrorLogTerminalOutput::TerminalOutputs ctkErrorLogModel::terminalOutputs | ( | ) | const |
Return if messages are both printed into the terminal and added to ctkErrorLogModel.
|
protected |
Definition at line 152 of file ctkErrorLogModel.h.
|
readwrite |
Definition at line 44 of file ctkErrorLogModel.h.
|
readwrite |
Definition at line 47 of file ctkErrorLogModel.h.
|
readwrite |
Definition at line 48 of file ctkErrorLogModel.h.
|
readwrite |
Definition at line 45 of file ctkErrorLogModel.h.
|
readwrite |
Definition at line 42 of file ctkErrorLogModel.h.
|
readwrite |
Definition at line 46 of file ctkErrorLogModel.h.
|
readwrite |
Definition at line 43 of file ctkErrorLogModel.h.