LogWindow Class Reference

An extended QTextEdit suitable for capturing log output. More...

#include <logwindow.h>

List of all members.

Public Slots

void log (QString logname)
 Start logging all messages that go through a particular named logger.
void append (QString str)
 Extended from the base class to be a slot, and also to perform some scrollbar maintenance.
void checkScroll (int newValue)
 Check the position of the scrollbar - if it's at the bottom, resume scrolling.

Public Member Functions

 LogWindow (QString logName="debug", QWidget *parent=0)
 Create a LogWindow (QTextEdit).


Detailed Description

An extended QTextEdit suitable for capturing log output.

Each LogWindow is attached to a logger of the same name, and will monitor messages that go through the named Logger.

Contains a smart scrollbar that won't keep scrolling if you are dragging it.

This class adds an "append" slot to QTextEdit, which also sends the scrollbar down to the bottom.

Author:
Alan Ezust see class Logger

Definition at line 21 of file logwindow.h.


Constructor & Destructor Documentation

LogWindow::LogWindow ( QString  logName = "debug",
QWidget *  parent = 0 
)

Create a LogWindow (QTextEdit).

Parameters:
logname - the name of a logger instance to connect to. if logname=="debug", then this window monitors qDebug() messages.
See also:
Logger

Definition at line 6 of file logwindow.cpp.

References log().


Member Function Documentation

void LogWindow::log ( QString  logname  )  [slot]

Start logging all messages that go through a particular named logger.

Parameters:
logname - the name of a Logger instance to monitor
See also:
Logger

Definition at line 15 of file logwindow.cpp.

References append(), checkScroll(), and Logger::getLogger().

Referenced by LogWindow().


The documentation for this class was generated from the following files:
Generated on Wed Sep 30 01:15:44 2009 for oopapidocs by  doxygen 1.5.1