EditableLabel Class Reference

Editable Label. More...

#include <EditableLabel.hh>

Inherits QWidget.

Public Member Functions

 EditableLabel (const std::string &_label, QWidget *_parent=nullptr)
 Constructor. More...
 
 ~EditableLabel ()
 Destructor. More...
 
std::string Text () const
 Get the string of this label. More...
 

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *_event)
 Qt key press event. More...
 
virtual void mouseDoubleClickEvent (QMouseEvent *_event)
 Qt mouse double click event. More...
 

Detailed Description

Editable Label.

The widget toggles between a QLabel and QLineEdit to support edits to the label text.

Constructor & Destructor Documentation

EditableLabel ( const std::string &  _label,
QWidget *  _parent = nullptr 
)

Constructor.

Parameters
[in]_labelLabel text.
[in]_parentParent widget.

Destructor.

Member Function Documentation

virtual void keyPressEvent ( QKeyEvent *  _event)
protectedvirtual

Qt key press event.

Parameters
[in]_eventQt key event
virtual void mouseDoubleClickEvent ( QMouseEvent *  _event)
protectedvirtual

Qt mouse double click event.

Parameters
[in]_eventQt mouse event
std::string Text ( ) const

Get the string of this label.

Returns
Label string.

The documentation for this class was generated from the following file: