QtPdWidgets  2.3.1
Classes | Public Types | Public Member Functions | Properties | Private Member Functions | Private Attributes | Friends | List of all members
Pd::Tank Class Reference

#include <Tank.h>

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

Classes

struct  Impl
 

Public Types

enum  Style { VerticalCylinder, HorizontalCylinder, Cuboid }
 
enum  LabelPosition { Right, Left }
 

Public Member Functions

 Tank (QWidget *=0)
 
virtual ~Tank ()
 
QSize sizeHint () const
 Gives a hint aboute the optimal size. More...
 
Style getStyle () const
 
void setStyle (Style)
 
void resetStyle ()
 
int getLabelWidth () const
 
void setLabelWidth (int)
 
void resetLabelWidth ()
 
LabelPosition getLabelPosition () const
 
void setLabelPosition (LabelPosition)
 
void resetLabelPosition ()
 
int getCapHeight () const
 
void setCapHeight (int)
 
void resetCapHeight ()
 
double getMaxLevel () const
 
void setMaxLevel (double)
 
void resetMaxLevel ()
 
double getMaxVolume () const
 
void setMaxVolume (double)
 
void resetMaxVolume ()
 
int getLevelDecimals () const
 
void setLevelDecimals (int)
 
void resetLevelDecimals ()
 
int getVolumeDecimals () const
 
void setVolumeDecimals (int)
 
void resetVolumeDecimals ()
 
QColor getBackgroundColor () const
 
void setBackgroundColor (QColor)
 
void resetBackgroundColor ()
 
QString getLevelSuffix () const
 
void setLevelSuffix (const QString &)
 
void resetLevelSuffix ()
 
QString getVolumeSuffix () const
 
void setVolumeSuffix (const QString &)
 
void resetVolumeSuffix ()
 
TankMediumaddMedium ()
 
void clearMedia ()
 

Properties

Style style
 
int labelWidth
 
LabelPosition labelPosition
 
int capHeight
 
double maxLevel
 
double maxVolume
 
int levelDecimals
 
int volumeDecimals
 
QColor backgroundColor
 
QString levelSuffix
 
QString volumeSuffix
 

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
 

Friends

class TankMedium
 

Member Enumeration Documentation

◆ LabelPosition

Enumerator
Right 
Left 

◆ Style

Enumerator
VerticalCylinder 
HorizontalCylinder 
Cuboid 

Constructor & Destructor Documentation

◆ Tank()

Tank::Tank ( QWidget *  parent = 0)

◆ ~Tank()

Tank::~Tank ( )
virtual

References clearMedia().

Member Function Documentation

◆ addMedium()

TankMedium * Tank::addMedium ( )

References impl, and TankMedium.

◆ clearMedia()

void Tank::clearMedia ( )

References impl.

Referenced by ~Tank().

◆ event()

bool Tank::event ( QEvent *  event)
overrideprivate

Event function.

Parameters
eventEvent flags.

Referenced by paintEvent().

◆ getBackgroundColor()

QColor Tank::getBackgroundColor ( ) const

References impl.

◆ getCapHeight()

int Tank::getCapHeight ( ) const

References impl.

◆ getLabelPosition()

Tank::LabelPosition Tank::getLabelPosition ( ) const

References impl.

◆ getLabelWidth()

int Tank::getLabelWidth ( ) const

References impl.

◆ getLevelDecimals()

int Tank::getLevelDecimals ( ) const

References impl.

◆ getLevelSuffix()

QString Tank::getLevelSuffix ( ) const

References impl.

◆ getMaxLevel()

double Tank::getMaxLevel ( ) const

References impl.

◆ getMaxVolume()

double Tank::getMaxVolume ( ) const

References impl.

◆ getStyle()

Tank::Style Tank::getStyle ( ) const

References impl.

◆ getVolumeDecimals()

int Tank::getVolumeDecimals ( ) const

References impl.

◆ getVolumeSuffix()

QString Tank::getVolumeSuffix ( ) const

References impl.

◆ paintEvent()

void Tank::paintEvent ( QPaintEvent *  event)
overrideprivate

References event(), and impl.

◆ resetBackgroundColor()

void Tank::resetBackgroundColor ( )

◆ resetCapHeight()

void Tank::resetCapHeight ( )

◆ resetLabelPosition()

void Tank::resetLabelPosition ( )

◆ resetLabelWidth()

void Tank::resetLabelWidth ( )

◆ resetLevelDecimals()

void Tank::resetLevelDecimals ( )

◆ resetLevelSuffix()

void Tank::resetLevelSuffix ( )

◆ resetMaxLevel()

void Tank::resetMaxLevel ( )

References DEFAULT_MAX_LEVEL, and setMaxLevel().

◆ resetMaxVolume()

void Tank::resetMaxVolume ( )

◆ resetStyle()

void Tank::resetStyle ( )

References DEFAULT_STYLE, and setStyle().

◆ resetVolumeDecimals()

void Tank::resetVolumeDecimals ( )

◆ resetVolumeSuffix()

void Tank::resetVolumeSuffix ( )

◆ resizeEvent()

void Tank::resizeEvent ( QResizeEvent *  )
overrideprivate

References impl.

◆ setBackgroundColor()

void Tank::setBackgroundColor ( QColor  c)

References impl.

Referenced by resetBackgroundColor().

◆ setCapHeight()

void Tank::setCapHeight ( int  height)

References impl.

Referenced by resetCapHeight().

◆ setLabelPosition()

void Tank::setLabelPosition ( LabelPosition  pos)

References impl, Left, and Right.

Referenced by resetLabelPosition().

◆ setLabelWidth()

void Tank::setLabelWidth ( int  width)

References impl.

Referenced by resetLabelWidth().

◆ setLevelDecimals()

void Tank::setLevelDecimals ( int  d)

References impl.

Referenced by resetLevelDecimals().

◆ setLevelSuffix()

void Tank::setLevelSuffix ( const QString &  str)

References impl.

Referenced by resetLevelSuffix(), and resetVolumeSuffix().

◆ setMaxLevel()

void Tank::setMaxLevel ( double  level)

References impl, and maxLevel.

Referenced by resetMaxLevel().

◆ setMaxVolume()

void Tank::setMaxVolume ( double  vol)

References impl, and maxVolume.

Referenced by resetMaxVolume().

◆ setStyle()

void Tank::setStyle ( Style  s)

References impl.

Referenced by resetStyle().

◆ setVolumeDecimals()

void Tank::setVolumeDecimals ( int  d)

References impl.

Referenced by resetVolumeDecimals().

◆ setVolumeSuffix()

void Tank::setVolumeSuffix ( const QString &  str)

References impl.

◆ sizeHint()

QSize Tank::sizeHint ( ) const

Gives a hint aboute the optimal size.

References Cuboid, HorizontalCylinder, impl, and VerticalCylinder.

Friends And Related Function Documentation

◆ TankMedium

friend class TankMedium
friend

Referenced by addMedium().

Member Data Documentation

◆ Impl

struct PD_PRIVATE Pd::Tank::Impl
private

◆ impl

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

Property Documentation

◆ backgroundColor

QColor Pd::Tank::backgroundColor
readwrite

◆ capHeight

int Pd::Tank::capHeight
readwrite

◆ labelPosition

LabelPosition Pd::Tank::labelPosition
readwrite

◆ labelWidth

int Pd::Tank::labelWidth
readwrite

◆ levelDecimals

int Pd::Tank::levelDecimals
readwrite

◆ levelSuffix

QString Pd::Tank::levelSuffix
readwrite

◆ maxLevel

double Pd::Tank::maxLevel
readwrite

Referenced by setMaxLevel().

◆ maxVolume

double Pd::Tank::maxVolume
readwrite

Referenced by setMaxVolume().

◆ style

Style Pd::Tank::style
readwrite

◆ volumeDecimals

int Pd::Tank::volumeDecimals
readwrite

◆ volumeSuffix

QString Pd::Tank::volumeSuffix
readwrite

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