• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
ScriptLogger Class Reference

#include <scriptlogger.h>

Inheritance diagram for ScriptLogger:
Inheritance graph
[legend]

Classes

struct  Data
 

Public Types

enum  Columns { ColumnTime = 0, ColumnOrigin, ColumnMessage, COLUMN_COUNT }
 
enum  LogLevel { LogInvalid = 0, LogInfo = 1, LogWarning = 2, LogError = 3 }
 

Public Member Functions

 ScriptLogger ()
 
virtual ~ScriptLogger ()
 
void clear ()
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
QDebug error (const DataInformation *origin)
 
QDebug error (const QString &origin=QString())
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
QDebug info (const DataInformation *origin)
 
QDebug info (const QString &origin=QString())
 
QDebug log (LogLevel level, const DataInformation *origin)
 
QDebug log (LogLevel level, const QString &origin)
 
QStringList messages (LogLevel minLevel=LogInfo) const
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
void setLogToStdOut (bool val)
 
QDebug warn (const DataInformation *origin)
 
QDebug warn (const QString &origin=QString())
 

Static Public Member Functions

static KIcon iconForLevel (LogLevel level)
 

Detailed Description

NOT THREAD SAFE!

Definition at line 35 of file scriptlogger.h.

Member Enumeration Documentation

enum ScriptLogger::Columns
Enumerator
ColumnTime 
ColumnOrigin 
ColumnMessage 
COLUMN_COUNT 

Definition at line 42 of file scriptlogger.h.

enum ScriptLogger::LogLevel
Enumerator
LogInvalid 
LogInfo 
LogWarning 
LogError 

Definition at line 46 of file scriptlogger.h.

Constructor & Destructor Documentation

ScriptLogger::ScriptLogger ( )
explicit

Definition at line 126 of file scriptlogger.cpp.

ScriptLogger::~ScriptLogger ( )
virtual

Definition at line 131 of file scriptlogger.cpp.

Member Function Documentation

void ScriptLogger::clear ( )

Definition at line 119 of file scriptlogger.cpp.

int ScriptLogger::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Definition at line 74 of file scriptlogger.cpp.

QVariant ScriptLogger::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Definition at line 40 of file scriptlogger.cpp.

QDebug ScriptLogger::error ( const DataInformation *  origin)
inline

Definition at line 68 of file scriptlogger.h.

QDebug ScriptLogger::error ( const QString &  origin = QString())
inline

Definition at line 71 of file scriptlogger.h.

QVariant ScriptLogger::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
virtual

Definition at line 80 of file scriptlogger.cpp.

KIcon ScriptLogger::iconForLevel ( ScriptLogger::LogLevel  level)
static

Definition at line 29 of file scriptlogger.cpp.

QDebug ScriptLogger::info ( const DataInformation *  origin)
inline

Definition at line 66 of file scriptlogger.h.

QDebug ScriptLogger::info ( const QString &  origin = QString())
inline

Definition at line 69 of file scriptlogger.h.

QDebug ScriptLogger::log ( LogLevel  level,
const DataInformation *  origin 
)
Returns
a QDebug to write the message to. Do NOT save this object, since the string it writes to may become invalid! Just write the message using the << operators and do not touch it anymore after the line ends

Definition at line 99 of file scriptlogger.cpp.

QDebug ScriptLogger::log ( LogLevel  level,
const QString &  origin 
)

Definition at line 107 of file scriptlogger.cpp.

QStringList ScriptLogger::messages ( LogLevel  minLevel = LogInfo) const
Parameters
infothe minimum level that the messages must have
Returns
all the messages, mainly used for testing

Definition at line 135 of file scriptlogger.cpp.

int ScriptLogger::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Definition at line 67 of file scriptlogger.cpp.

void ScriptLogger::setLogToStdOut ( bool  val)
inline

whether to log to stdout instead of saving the messages

Definition at line 86 of file scriptlogger.h.

QDebug ScriptLogger::warn ( const DataInformation *  origin)
inline

Definition at line 67 of file scriptlogger.h.

QDebug ScriptLogger::warn ( const QString &  origin = QString())
inline

Definition at line 70 of file scriptlogger.h.


The documentation for this class was generated from the following files:
  • scriptlogger.h
  • scriptlogger.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal