49 const std::string &
label,
64 virtual const char *
widgetClass()
const {
return "YLogView"; }
69 std::string
label()
const;
154 virtual bool setProperty(
const std::string & propertyName,
207 void appendLine(
const std::string & line );
212 void updateDisplay();
std::string logText() const
Return the entire log text as one large string of concatenated lines delimited with newlines.
virtual void displayLogText(const std::string &text)=0
Display the part of the log text that should be displayed.
A set of properties to check names and types against.
virtual std::string shortcutString() const
Get the string of this widget that holds the keyboard shortcut.
int lines() const
Return the current number of lines.
virtual void setShortcutString(const std::string &str)
Set the string of this widget that holds the keyboard shortcut.
LogView: A scrollable (output-only) text to display a growing log, very much like the "tail -f" shell...
void setLogText(const std::string &text)
Set (replace) the entire log text and trigger a display update.
std::string lastLine() const
Return the last log line.
std::string label() const
Return the label (the caption above the log text).
virtual ~YLogView()
Destructor.
virtual const YPropertySet & propertySet()
Return this class's property set.
virtual void setLabel(const std::string &label)
Set the label (the caption above the log text).
int visibleLines() const
Return the number of visible lines.
void clearText()
Clear the log text and trigger a display update.
Transport class for the value of simple properties.
YLogView(YWidget *parent, const std::string &label, int visibleLines, int maxLines)
Constructor.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
virtual const char * widgetClass() const
Returns a descriptive name of this widget class for logging, debugging etc.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
void appendLines(const std::string &text)
Append one or more lines to the log text and trigger a display update.
int maxLines() const
Return the maximum number of lines to store.
void setMaxLines(int newMaxLines)
Set the maximum number of lines to store.
void setVisibleLines(int newVisibleLines)
Set the number of visible lines.