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