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()

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

Constructor.

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

◆ ~EditableLabel()

Destructor.

Member Function Documentation

◆ keyPressEvent()

virtual void keyPressEvent ( QKeyEvent *  _event)
protectedvirtual

Qt key press event.

Parameters
[in]_eventQt key event

◆ mouseDoubleClickEvent()

virtual void mouseDoubleClickEvent ( QMouseEvent *  _event)
protectedvirtual

Qt mouse double click event.

Parameters
[in]_eventQt mouse event

◆ Text()

std::string Text ( ) const

Get the string of this label.

Returns
Label string.

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