YLogView Class Reference
Implementation of the LogView widget.
More...
#include <YLogView.h>
Inheritance diagram for YLogView:
List of all members.
Detailed Description
Implementation of the LogView widget.
LogView
- string label ( above the log lines )
- integer visibleLines number of visible lines ( without scrolling )
- integer maxLines number of log lines to store ( use 0 for "all" ) `LogView( "Log file", 4, 200 ); LogView1.ycp
A scrolled output-only text window where ASCII output of any kind can be redirected - very much like a shell window with "tail -f".
The LogView will keep up to "maxLines" of output, discarding the oldest lines if there are more. If "maxLines" is set to 0, all lines will be kept.
"visibleLines" lines will be visible by default ( without scrolling ) unless you stretch the widget in the layout.
Use ChangeWidget( `id( `log ), `LastLine, "bla blurb...\n" )
to append one or several line(s) to the output. Notice the newline at the end of each line!
Use ChangeWidget( `id( `log ), `Value, "bla blurb...\n" )
to replace the entire contents of the LogView.
Use ChangeWidget( `id( `log ), `Value, "" )
to clear the contents.
Constructor & Destructor Documentation
YLogView::YLogView |
( |
const YWidgetOpt & |
opt, |
|
|
const YCPString & |
label, |
|
|
int |
visibleLines, |
|
|
int |
maxLines |
|
) |
|
|
Member Function Documentation
void YLogView::appendLine |
( |
const string & |
line |
) |
|
|
|
Append one single line to the log text. |
void YLogView::appendText |
( |
const YCPString & |
text |
) |
|
|
|
Append one or more lines to the log text. |
|
Implements the ui command changeWidget for the widget specific properties.
string Value All log lines. Set this property to replace or clear the entire contents. Can only be set, not queried.
string LastLine The last log line. Set this property to append one or more line(s) to the log. Can only be set, not queried.
string Label The label above the log text.
Reimplemented from YWidget. |
void YLogView::clearText |
( |
|
) |
|
|
|
Get the label above the log lines. |
int YLogView::lines |
( |
|
) |
const [inline] |
|
|
Return the current number of lines. |
string YLogView::logText |
( |
|
) |
|
|
|
Retrieve the entire log text as one large string of concatenated lines delimited with newlines. |
int YLogView::maxLines |
( |
|
) |
const [inline] |
|
|
Get the maximum number of lines to store. |
|
Implements the ui command changeWidget for the widget specific properties.
Reimplemented from YWidget. |
void YLogView::setLabel |
( |
const YCPString & |
newLabel |
) |
[virtual] |
|
|
Set the label above the log lines. Overload this, but call YLogView::setLabel at the end of your own function. |
virtual void YLogView::setLogText |
( |
const YCPString & |
text |
) |
[pure virtual] |
|
const char* YLogView::shortcutProperty |
( |
|
) |
[inline, virtual] |
|
|
The name of the widget property that holds the keyboard shortcut. Inherited from YWidget.
Reimplemented from YWidget. |
int YLogView::visibleLines |
( |
|
) |
const [inline] |
|
|
Get the number of visible lines. |
virtual char* YLogView::widgetClass |
( |
|
) |
[inline, virtual] |
|
|
Returns a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YWidget. |
Member Data Documentation
The documentation for this class was generated from the following files:
Generated on Fri Nov 9 18:15:25 2007 for yast2-core by
1.3.6