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