Qt Virtual Chart Table (QVCT)
COverlayText Class Reference

[UI] Overlay-specific text label More...

#include <overlays/COverlayText.hpp>

Inheritance diagram for COverlayText:
COverlayUrl

Public Member Functions

 COverlayText (QWidget *_pqParent=0)
 
 COverlayText (const QString &_rqsText, QWidget *_pqParent=0)
 
virtual ~COverlayText ()
 
void setText (const QString &_rqsText)
 [override] QLabel::setText( const QString& ) More...
 
virtual void setText (const QString &_rqsText, bool _bInvalid)
 Sets the underlying QLabel's text. More...
 
void resetText ()
 Resets (clears) the underlying QLabel's text. More...
 
const QString & emptyString ()
 Returns the string corresponding to undefined (empty) content ("n/a" in English) More...
 
QString formatString (const QString &_rqsString)
 Returns the string properly formatted if it is undefined (empty) More...
 

Detailed Description

[UI] Overlay-specific text label

This class provides the widget that allows the display text and handle undefined (empty) content gracefully.

Author
Cedric Dufour http://cedric.dufour.name

Definition at line 33 of file COverlayText.hpp.

Constructor & Destructor Documentation

◆ COverlayText() [1/2]

COverlayText::COverlayText ( QWidget *  _pqParent = 0)

Definition at line 31 of file COverlayText.cpp.

◆ COverlayText() [2/2]

COverlayText::COverlayText ( const QString &  _rqsText,
QWidget *  _pqParent = 0 
)

Definition at line 35 of file COverlayText.cpp.

◆ ~COverlayText()

virtual COverlayText::~COverlayText ( )
inlinevirtual

Definition at line 43 of file COverlayText.hpp.

Member Function Documentation

◆ setText() [1/2]

void COverlayText::setText ( const QString &  _rqsText)

[override] QLabel::setText( const QString& )

Definition at line 45 of file COverlayText.cpp.

◆ setText() [2/2]

void COverlayText::setText ( const QString &  _rqsText,
bool  _bInvalid 
)
virtual

Sets the underlying QLabel's text.

This methods sets the underlying QLabel's text. If the text is undefined (empty), it displays a graceful equivalent content instead ("n/a" in English). If the content is deemed invalid by the user, it is displayed using italic font.

Reimplemented in COverlayUrl.

Definition at line 59 of file COverlayText.cpp.

◆ resetText()

void COverlayText::resetText ( )

Resets (clears) the underlying QLabel's text.

Definition at line 67 of file COverlayText.cpp.

◆ emptyString()

const QString & COverlayText::emptyString ( )

Returns the string corresponding to undefined (empty) content ("n/a" in English)

Definition at line 79 of file COverlayText.cpp.

◆ formatString()

QString COverlayText::formatString ( const QString &  _rqsString)

Returns the string properly formatted if it is undefined (empty)

Definition at line 85 of file COverlayText.cpp.


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