QtPdWidgets
2.3.1
|
#include <Image.h>
Classes | |
struct | Impl |
Public Types | |
enum | Axis { X, Y } |
typedef QHash< int, QPixmap > | PixmapHash |
Pixmap hash type. More... | |
Public Member Functions | |
Image (QWidget *parent=0) | |
Constructor. More... | |
virtual | ~Image () |
Destructor. More... | |
void | clearData () |
int | getValue () const |
void | setValue (int) |
Sets the current #value. More... | |
void | setPixmapHash (const PixmapHash *) |
Sets the PixmapHash to use. More... | |
const QPixmap & | getDefaultPixmap () const |
void | setDefaultPixmap (const QPixmap &) |
Sets the defaultPixmap. More... | |
void | resetDefaultPixmap () |
Resets the defaultPixmap. More... | |
qreal | getAngle () const |
void | setAngle (qreal) |
Sets the angle to use. More... | |
void | resetAngle () |
Resets the angle. More... | |
bool | hasScaledContents () const |
void | setScaledContents (bool) |
Sets whether to scale contents (scaledContents). More... | |
void | resetScaledContents () |
Resets the scaledContents. More... | |
void | clearTransformations () |
void | translate (qreal, qreal) |
void | translate (Axis axis, 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) |
void | translate (Axis axis, PdCom::Process *p, 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) |
void | rotate (qreal) |
void | rotate (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) |
void | rotate (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) |
Protected Member Functions | |
bool | event (QEvent *) override |
Event handler. More... | |
void | paintEvent (QPaintEvent *) override |
Properties | |
QPixmap | defaultPixmap |
qreal | angle |
bool | scaledContents |
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< Impl > | impl |
Image display widget.
This widget can display images from a hash, depending on the attached process variable's value.
typedef QHash<int, QPixmap> Pd::Image::PixmapHash |
Pixmap hash type.
The used pixmap hash shall contain a pixmap for every value to display.
enum Pd::Image::Axis |
Image::Image | ( | QWidget * | parent = 0 | ) |
|
virtual |
Destructor.
References clearTransformations().
void Image::clearData | ( | ) |
References impl.
|
overrideprotected |
qreal Image::getAngle | ( | ) | const |
References impl.
const QPixmap & Image::getDefaultPixmap | ( | ) | const |
References impl.
|
inline |
References impl.
bool Image::hasScaledContents | ( | ) | const |
References impl.
|
overrideprivate |
This virtual method is called by the ProcessVariable, if its value changes.
References setValue().
void Image::resetAngle | ( | ) |
Resets the angle.
References setAngle().
void Image::resetDefaultPixmap | ( | ) |
Resets the defaultPixmap.
References setDefaultPixmap().
void Image::resetScaledContents | ( | ) |
Resets the scaledContents.
References setScaledContents().
void Image::rotate | ( | qreal | alpha | ) |
References impl.
void Image::rotate | ( | 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 |
||
) |
void Image::rotate | ( | 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 |
||
) |
void Image::setAngle | ( | qreal | a | ) |
void Image::setDefaultPixmap | ( | const QPixmap & | p | ) |
void Image::setPixmapHash | ( | const PixmapHash * | ph | ) |
Sets the PixmapHash to use.
References impl.
void Image::setScaledContents | ( | bool | scale | ) |
Sets whether to scale contents (scaledContents).
References impl.
Referenced by resetScaledContents().
void Image::setValue | ( | int | value | ) |
Sets the current #value.
If the value has changed, updatePixmap() is called.
References impl.
Referenced by newValues().
void Image::translate | ( | qreal | x, |
qreal | y | ||
) |
References impl.
void Image::translate | ( | Axis | axis, |
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 |
||
) |
void Image::translate | ( | Axis | axis, |
PdCom::Process * | p, | ||
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 |
||
) |
|
private |
Referenced by Image().
|
private |
|
readwrite |
|
readwrite |
|
readwrite |