QtPdWidgets  2.3.1
Classes | Public Member Functions | Protected Member Functions | Properties | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
Pd::Text Class Reference

Text display widget. More...

#include <Text.h>

Inheritance diagram for Pd::Text:
Inheritance graph
[legend]
Collaboration diagram for Pd::Text:
Collaboration graph
[legend]

Classes

class  Hash
 Value hash type. More...
 
struct  Impl
 
struct  Value
 Value type. More...
 

Public Member Functions

 Text (QWidget *parent=0)
 Constructor. More...
 
virtual ~Text ()
 Destructor. More...
 
Qt::Alignment getAlignment () const
 
void setAlignment (Qt::Alignment)
 Sets the alignment. More...
 
void resetAlignment ()
 Resets the prefix. More...
 
QString getPrefix () const
 
void setPrefix (const QString &)
 Sets the prefix. More...
 
void resetPrefix ()
 Resets the prefix. More...
 
QString getSuffix () const
 
void setSuffix (const QString &)
 Sets the suffix. More...
 
void resetSuffix ()
 Resets the suffix. More...
 
void clearData ()
 
int getValue () const
 
void setValue (int)
 Sets the current #processValue. More...
 
void setHash (const Hash *)
 Sets the hash to use. More...
 
void updateValueText ()
 
TextConditionaddCondition (PdCom::Variable, const QString &=QString(), bool=false)
 
TextConditionaddCondition (PdCom::Process *, const QString &, const QString &=QString(), bool=false)
 
void clearConditions ()
 
bool getConditionActive () const
 

Protected Member Functions

bool event (QEvent *) override
 Event handler. More...
 
void paintEvent (QPaintEvent *) override
 Paint function. More...
 

Properties

Qt::Alignment alignment
 
QString prefix
 
QString suffix
 
bool conditionActive
 

Private Slots

PD_PRIVATE void conditionChanged ()
 
PD_PRIVATE void conditionTimeout ()
 

Private Member Functions

PD_PRIVATE void newValues (std::chrono::nanoseconds) override
 This virtual method is called by the ProcessVariable, if its value changes. More...
 

Private Attributes

struct PD_PRIVATE Impl
 
std::unique_ptr< Implimpl
 

Friends

class TextCondition
 

Detailed Description

Text display widget.

Todo:
Default text property.

Constructor & Destructor Documentation

◆ Text()

Text::Text ( QWidget *  parent = 0)

Constructor.

Parameters
parentParent widget.

References Impl.

◆ ~Text()

Text::~Text ( )
virtual

Destructor.

References clearConditions().

Member Function Documentation

◆ addCondition() [1/2]

TextCondition * Text::addCondition ( PdCom::Variable  pv,
const QString &  text = QString(),
bool  invert = false 
)

◆ addCondition() [2/2]

TextCondition * Text::addCondition ( PdCom::Process *  process,
const QString &  path,
const QString &  text = QString(),
bool  invert = false 
)

◆ clearConditions()

void Text::clearConditions ( )

References impl.

Referenced by ~Text().

◆ clearData()

void Text::clearData ( )

References impl.

◆ conditionChanged

void Text::conditionChanged ( )
privateslot

References impl.

Referenced by addCondition().

◆ conditionTimeout

void Text::conditionTimeout ( )
privateslot

References impl.

◆ event()

bool Text::event ( QEvent *  event)
overrideprotected

Event handler.

Parameters
eventEvent flags.

References impl.

Referenced by paintEvent().

◆ getAlignment()

Qt::Alignment Text::getAlignment ( ) const

References impl.

◆ getConditionActive()

bool Text::getConditionActive ( ) const

References impl.

◆ getPrefix()

QString Text::getPrefix ( ) const

References impl.

◆ getSuffix()

QString Text::getSuffix ( ) const

References impl.

◆ getValue()

int Text::getValue ( ) const

References impl.

◆ newValues()

void Text::newValues ( std::chrono::nanoseconds  )
overrideprivate

This virtual method is called by the ProcessVariable, if its value changes.

References impl, and setValue().

◆ paintEvent()

void Text::paintEvent ( QPaintEvent *  event)
overrideprotected

Paint function.

Parameters
eventPaint event flags.

References event(), and impl.

◆ resetAlignment()

void Text::resetAlignment ( )

Resets the prefix.

References DEFAULT_ALIGNMENT, and setAlignment().

◆ resetPrefix()

void Text::resetPrefix ( )

Resets the prefix.

References setPrefix().

◆ resetSuffix()

void Text::resetSuffix ( )

Resets the suffix.

References setSuffix().

◆ setAlignment()

void Text::setAlignment ( Qt::Alignment  a)

Sets the alignment.

References impl.

Referenced by resetAlignment().

◆ setHash()

void Text::setHash ( const Hash h)

Sets the hash to use.

Parameters
hThe new hash.

References impl.

◆ setPrefix()

void Text::setPrefix ( const QString &  p)

Sets the prefix.

References impl.

Referenced by resetPrefix().

◆ setSuffix()

void Text::setSuffix ( const QString &  s)

Sets the suffix.

References impl.

Referenced by resetSuffix().

◆ setValue()

void Text::setValue ( int  v)

Sets the current #processValue.

If the value changed, updateValueText() is called.

References impl.

Referenced by newValues().

◆ updateValueText()

void Text::updateValueText ( )

References impl.

Friends And Related Function Documentation

◆ TextCondition

friend class TextCondition
friend

Referenced by addCondition().

Member Data Documentation

◆ Impl

struct PD_PRIVATE Pd::Text::Impl
private

Referenced by Text().

◆ impl

std::unique_ptr<Impl> Pd::Text::impl
private

Property Documentation

◆ alignment

Qt::Alignment Pd::Text::alignment
readwrite

◆ conditionActive

bool Pd::Text::conditionActive
read

◆ prefix

QString Pd::Text::prefix
readwrite

◆ suffix

QString Pd::Text::suffix
readwrite

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