kleopatra
#include <kdlogtextwidget.h>
Public Slots | |
void | clear () |
void | message (const QString &msg, const QColor &color) |
void | message (const QString &msg) |
Public Member Functions | |
KDLogTextWidget (QWidget *parent=0) | |
~KDLogTextWidget () | |
bool | alternatingRowColors () const |
unsigned int | historySize () const |
QStringList | lines () const |
QSize | minimumSizeHint () const |
unsigned int | minimumVisibleColumns () const |
unsigned int | minimumVisibleLines () const |
void | setAlternatingRowColors (bool on) |
void | setHistorySize (unsigned int size) |
void | setLines (const QStringList &list) |
void | setMinimumVisibleColumns (unsigned int num) |
void | setMinimumVisibleLines (unsigned int num) |
QSize | sizeHint () const |
QString | text () const |
Protected Member Functions | |
void | changeEvent (QEvent *) |
void | paintEvent (QPaintEvent *) |
void | resizeEvent (QResizeEvent *) |
void | timerEvent (QTimerEvent *) |
Properties | |
bool | alternatingRowColors |
uint | historySize |
QStringList | lines |
uint | minimumVisibleColumns |
uint | minimumVisibleLines |
QString | text |
Detailed Description
A high-speed text display widget.
This widget provides very fast display of large amounts of line-oriented text, as commonly found in application log viewers. The feature set and implementation are optimized for frequent appends.
You can set initial text using setLines(), and append lines with calls to message(). You can limit the number of lines kept in the view using setHistorySize().
Text formatting is currently limited to per-line text color, but is expected to be enhanced on client request in upcoming versions. You can pass the color to use to calls to message().
Definition at line 34 of file kdlogtextwidget.h.
Constructor & Destructor Documentation
|
explicit |
Constructor. Creates an empty KDLogTextWidget.
Definition at line 138 of file kdlogtextwidget.cpp.
KDLogTextWidget::~KDLogTextWidget | ( | ) |
Destructor.
Definition at line 147 of file kdlogtextwidget.cpp.
Member Function Documentation
bool KDLogTextWidget::alternatingRowColors | ( | ) | const |
|
protected |
- Reimplemented from superclass.
Definition at line 393 of file kdlogtextwidget.cpp.
|
slot |
Clears the text.
- Postcondition
- lines().empty() == true
Definition at line 291 of file kdlogtextwidget.cpp.
unsigned int KDLogTextWidget::historySize | ( | ) | const |
QStringList KDLogTextWidget::lines | ( | ) | const |
|
slot |
Appends str to the view, highlighting the line in color.
- Postcondition
- lines().back() == str (modulo trailing whitespace and contained newlines)
Definition at line 306 of file kdlogtextwidget.cpp.
|
slot |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Uses the default text color set in this widget's palette.
Definition at line 318 of file kdlogtextwidget.cpp.
QSize KDLogTextWidget::minimumSizeHint | ( | ) | const |
- Reimplemented from superclass.
Definition at line 269 of file kdlogtextwidget.cpp.
unsigned int KDLogTextWidget::minimumVisibleColumns | ( | ) | const |
unsigned int KDLogTextWidget::minimumVisibleLines | ( | ) | const |
|
protected |
- Reimplemented from superclass.
Definition at line 324 of file kdlogtextwidget.cpp.
|
protected |
- Reimplemented from superclass.
Definition at line 398 of file kdlogtextwidget.cpp.
void KDLogTextWidget::setAlternatingRowColors | ( | bool | on | ) |
Definition at line 258 of file kdlogtextwidget.cpp.
void KDLogTextWidget::setHistorySize | ( | unsigned int | size | ) |
Definition at line 159 of file kdlogtextwidget.cpp.
void KDLogTextWidget::setLines | ( | const QStringList & | list | ) |
Definition at line 192 of file kdlogtextwidget.cpp.
void KDLogTextWidget::setMinimumVisibleColumns | ( | unsigned int | num | ) |
Definition at line 238 of file kdlogtextwidget.cpp.
void KDLogTextWidget::setMinimumVisibleLines | ( | unsigned int | num | ) |
Definition at line 216 of file kdlogtextwidget.cpp.
QSize KDLogTextWidget::sizeHint | ( | ) | const |
- Reimplemented from superclass.
Definition at line 279 of file kdlogtextwidget.cpp.
QString KDLogTextWidget::text | ( | ) | const |
|
protected |
- Reimplemented from superclass.
Definition at line 384 of file kdlogtextwidget.cpp.
Property Documentation
|
readwrite |
Specifies whether the background should be drawn using row-alternating colors. The default is false
.
Get this property's value using alternatingRowColors(), and set it using setAlternatingRowColors().
Definition at line 41 of file kdlogtextwidget.h.
|
readwrite |
Specifies the maximum number of lines this widget will hold before dropping old lines. The default is INT_MAX (ie. essentially unlimited).
Get this property's value using historySize(), and set it with setHistorySize().
Definition at line 36 of file kdlogtextwidget.h.
|
readwrite |
Contains the current text as a string list. The default empty.
Get this property's value using lines(), and set it with setLines().
Definition at line 38 of file kdlogtextwidget.h.
|
readwrite |
Specifies the number of columns that should be visible at any one time. The default is 1 (one). The width is calculated using QFontMetrics::averageCharWidth(), if that is available. Otherwise, the width of M
is used.
Get this property's value using minimumVisibleColumns(), and set it using setMinimumVisibleColumns().
Definition at line 40 of file kdlogtextwidget.h.
|
readwrite |
Specifies the number of lines that should be visible at any one time. The default is 1 (one).
Get this property's value using minimumVisibleLines(), and set it using setMinimumVisibleLines().
Definition at line 39 of file kdlogtextwidget.h.
|
read |
Contains the current text as a single string. Equivalent to
Definition at line 37 of file kdlogtextwidget.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.