libyui-qt  2.49.2
YQWidgetCaption Class Reference

Helper class for captions (labels) above a widget: Takes care of hiding itself when its text is empty and showing when its text becomes non-empty. More...

#include <YQWidgetCaption.h>

Inheritance diagram for YQWidgetCaption:
Collaboration diagram for YQWidgetCaption:

Public Member Functions

 YQWidgetCaption (QWidget *parent, const std::string &text)
 Constuctors. More...
 
 YQWidgetCaption (QWidget *parent, const QString &text)
 
virtual ~YQWidgetCaption ()
 Destructor.
 
virtual void setText (const std::string &newText)
 Change the text and handle visibility: If the new text is empty, hide this widget. More...
 
virtual void setText (const QString &newText)
 

Detailed Description

Helper class for captions (labels) above a widget: Takes care of hiding itself when its text is empty and showing when its text becomes non-empty.

Definition at line 38 of file YQWidgetCaption.h.

Constructor & Destructor Documentation

◆ YQWidgetCaption()

YQWidgetCaption::YQWidgetCaption ( QWidget *  parent,
const std::string &  text 
)

Constuctors.

If the text is empty, the widget will be created, but hidden right away. It can later be made visible again with setText() with a non-empty text.

Definition at line 33 of file YQWidgetCaption.cc.

Member Function Documentation

◆ setText()

void YQWidgetCaption::setText ( const std::string &  newText)
virtual

Change the text and handle visibility: If the new text is empty, hide this widget.

If the new text is non-empty, show this widget.

Definition at line 56 of file YQWidgetCaption.cc.


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