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

#include <Rotor.h>

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

Classes

struct  Impl
 

Public Member Functions

 Rotor (QWidget *=0)
 
 ~Rotor ()
 
QSize sizeHint () const
 Gives a hint aboute the optimal size. More...
 
QString getBackground () const
 
void setBackground (const QString &)
 
void resetBackground ()
 
QString getRotor () const
 
void setRotor (const QString &)
 
void resetRotor ()
 
QString getForeground () const
 
void setForeground (const QString &)
 
void resetForeground ()
 
QPointF getRotorCenter () const
 
void setRotorCenter (QPointF)
 
void resetRotorCenter ()
 
double getGlobalAngle () const
 
void setGlobalAngle (double)
 
void resetGlobalAngle ()
 
void setSpeedVariable (PdCom::Variable pv, const PdCom::Selector &selector={}, const QtPdCom::Transmission &=QtPdCom::event_mode, double scale=1.0, double offset=0.0, double tau=0.0)
 Subscribe to a process variable. More...
 
void setSpeedVariable (PdCom::Process *process, const QString &path, const PdCom::Selector &selector={}, const QtPdCom::Transmission &=QtPdCom::event_mode, double scale=1.0, double offset=0.0, double tau=0.0)
 Subscribes to a ProcessVariable. More...
 
void clearSpeedVariable ()
 Unsubscribe from a Variable. More...
 

Properties

QString background
 
QString rotor
 
QString foreground
 
QPointF rotorCenter
 
double globalAngle
 

Private Slots

PD_PRIVATE void timeout ()
 

Private Member Functions

PD_PRIVATE bool event (QEvent *) override
 Event function. More...
 
PD_PRIVATE void resizeEvent (QResizeEvent *) override
 
PD_PRIVATE void paintEvent (QPaintEvent *) override
 

Private Attributes

struct PD_PRIVATE Impl
 
std::unique_ptr< Implimpl
 

Constructor & Destructor Documentation

◆ Rotor()

Rotor::Rotor ( QWidget *  parent = 0)

◆ ~Rotor()

Rotor::~Rotor ( )

Member Function Documentation

◆ clearSpeedVariable()

void Rotor::clearSpeedVariable ( )

Unsubscribe from a Variable.

References impl.

Referenced by setSpeedVariable().

◆ event()

bool Rotor::event ( QEvent *  event)
overrideprivate

Event function.

Parameters
eventEvent flags.

Referenced by paintEvent().

◆ getBackground()

QString Rotor::getBackground ( ) const

References impl.

◆ getForeground()

QString Rotor::getForeground ( ) const

References impl.

◆ getGlobalAngle()

double Rotor::getGlobalAngle ( ) const

References impl.

◆ getRotor()

QString Rotor::getRotor ( ) const

References impl.

◆ getRotorCenter()

QPointF Rotor::getRotorCenter ( ) const

References impl.

◆ paintEvent()

void Rotor::paintEvent ( QPaintEvent *  event)
overrideprivate

References event(), and impl.

◆ resetBackground()

void Rotor::resetBackground ( )

References setBackground().

◆ resetForeground()

void Rotor::resetForeground ( )

References setForeground().

◆ resetGlobalAngle()

void Rotor::resetGlobalAngle ( )

References DEFAULT_ANGLE, and setGlobalAngle().

◆ resetRotor()

void Rotor::resetRotor ( )

References setRotor().

◆ resetRotorCenter()

void Rotor::resetRotorCenter ( )

References setRotorCenter().

◆ resizeEvent()

void Rotor::resizeEvent ( QResizeEvent *  )
overrideprivate

References impl.

◆ setBackground()

void Rotor::setBackground ( const QString &  path)

References impl.

Referenced by resetBackground().

◆ setForeground()

void Rotor::setForeground ( const QString &  path)

References impl.

Referenced by resetForeground().

◆ setGlobalAngle()

void Rotor::setGlobalAngle ( double  a)

References impl.

Referenced by resetGlobalAngle().

◆ setRotor()

void Rotor::setRotor ( const QString &  path)

References impl.

Referenced by resetRotor().

◆ setRotorCenter()

void Rotor::setRotorCenter ( QPointF  p)

References impl.

Referenced by resetRotorCenter().

◆ setSpeedVariable() [1/2]

void Rotor::setSpeedVariable ( PdCom::Variable  pv,
const PdCom::Selector &  selector = {},
const QtPdCom::Transmission &  transmission = QtPdCom::event_mode,
double  scale = 1.0,
double  offset = 0.0,
double  tau = 0.0 
)

Subscribe to a process variable.

Subscribes to a ProcessVariable.

Parameters
pvProcess variable.
selectorSelector.
transmissionTransmission.
scaleScale factor.
offsetOffset (applied after scaling).
tauPT1 filter time constant. A value less or equal to 0.0 means, that no filter is applied.

References clearSpeedVariable(), and impl.

◆ setSpeedVariable() [2/2]

void Rotor::setSpeedVariable ( PdCom::Process *  process,
const QString &  path,
const PdCom::Selector &  selector = {},
const QtPdCom::Transmission &  transmission = QtPdCom::event_mode,
double  scale = 1.0,
double  offset = 0.0,
double  tau = 0.0 
)

Subscribes to a ProcessVariable.

Parameters
processProcess.
pathVariable path.
selectorSelector.
transmissionTransmission.
scaleScale factor.
offsetOffset (applied after scaling).
tauPT1 filter time constant. A value less or equal to 0.0 means, that no filter is applied.

References clearSpeedVariable(), and impl.

◆ sizeHint()

QSize Rotor::sizeHint ( ) const

Gives a hint aboute the optimal size.

◆ timeout

void Rotor::timeout ( )
privateslot

References impl, and PERIOD.

Member Data Documentation

◆ Impl

struct PD_PRIVATE Pd::Rotor::Impl
private

◆ impl

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

Property Documentation

◆ background

QString Pd::Rotor::background
readwrite

◆ foreground

QString Pd::Rotor::foreground
readwrite

◆ globalAngle

double Pd::Rotor::globalAngle
readwrite

◆ rotor

QString Pd::Rotor::rotor
readwrite

◆ rotorCenter

QPointF Pd::Rotor::rotorCenter
readwrite

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