QtPdWidgets
2.3.1
|
#include <Bar_p.h>
Classes | |
class | Stack |
Private Types | |
typedef QList< Stack * > | StackList |
Private Member Functions | |
BarPrivate (Bar *parent) | |
Constructor. More... | |
void | clearVariables () |
Clear all stacks and sections. More... | |
void | updateLayout () |
Calculates the widget's layout and draws the background into a pixmap. More... | |
void | updateBackground () |
Calculates the widget's layout and draws the background into a pixmap. More... | |
unsigned int | calcPosition (double, bool=true) const |
Calculates a 1-D position from a real-world value. More... | |
void | notifyMaxBarWidthChange () |
QList< Bar * > | findSiblings () |
void | maxBarWidthChanged () |
void | retranslate () |
Retranslate the widget. More... | |
void | updateGradient () |
void | redrawEvent () |
Redraw event slot, that is called by the redraw timer. More... | |
Static Private Member Functions | |
static void | initDragIndicatorPolygons () |
Drag indicator polygon initializer. More... | |
Private Attributes | |
Bar *const | q_ptr |
Bar::Orientation | orientation |
Orientation of the bar. More... | |
Bar::Style | style |
Widget appearance. More... | |
bool | showScale |
Whether or not the scale is shown. More... | |
Scale | valueScale |
Value scale. More... | |
Bar::Origin | origin |
Bar drawing origin. More... | |
int | borderWidth |
Width of the border around the bar drawing area. More... | |
QColor | backgroundColor |
Background color of the bar area. More... | |
bool | autoBarWidth |
QGradientStops | gradientStops |
Color gradient. More... | |
QLinearGradient | gradient |
double | minStop |
Value of first gradient stop. More... | |
double | maxStop |
Value of last gradient stop. More... | |
StackList | stacks |
Bar stacks. More... | |
QPixmap | backgroundPixmap |
Pixmap that stores the background and scale. More... | |
QRect | scaleRect |
QRect | borderRect |
QRect | barRect |
Layout rectangle containing the bar drawing area. More... | |
QLine | zeroLine |
Zero line. More... | |
QPolygon | darkPolygon |
Polygon to draw the border shadow. More... | |
QPolygon | brightPolygon |
Polygon to draw the border light. More... | |
int | maxBarWidth |
QString | debugStr |
Static Private Attributes | |
static QPolygon | verticalDragIndicatorPolygon |
Drag indicator arrow shape in #Vertical mode. More... | |
static QPolygon | horizontalDragIndicatorPolygon |
Drag indicator arrow shape in #Horizontal mode. More... | |
static QPolygon | verticalArrow |
Arrow shape in #Vertical mode. More... | |
static QPolygon | horizontalArrow |
Arrow shape in #Horizontal mode. More... | |
Additional Inherited Members | |
![]() | |
Widget () | |
Constructor. More... | |
virtual | ~Widget () |
Destructor. More... | |
![]() | |
static void | setRedrawInterval (int) |
Sets the redraw interval. More... | |
static const QTimer * | getTimer () |
Returns the redrawTimer. More... | |
Bar graph widget.
|
private |
|
private |
Constructor.
parent | parent widget |
References DEFAULT_SCALEMAX, DEFAULT_SCALEMIN, initDragIndicatorPolygons(), maxBarWidth, retranslate(), Pd::Scale::setMax(), Pd::Scale::setMin(), stacks, updateLayout(), and valueScale.
|
private |
Calculates a 1-D position from a real-world value.
References barRect, Pd::Scale::getMax(), Pd::Scale::getMin(), orientation, Pd::Scale::range(), valueScale, and Pd::Bar::Vertical.
Referenced by Pd::BarPrivate::Stack::paint(), Pd::BarPrivate::Stack::paintArrow(), Pd::BarPrivate::Stack::paintColorBar(), updateGradient(), and updateLayout().
|
private |
Clear all stacks and sections.
References stacks, and updateLayout().
|
private |
Referenced by notifyMaxBarWidthChange(), and updateLayout().
|
staticprivate |
Drag indicator polygon initializer.
References horizontalArrow, horizontalDragIndicatorPolygon, verticalArrow, and verticalDragIndicatorPolygon.
Referenced by BarPrivate().
|
private |
References autoBarWidth, and updateLayout().
|
private |
References autoBarWidth, and findSiblings().
Referenced by updateLayout().
|
private |
Redraw event slot, that is called by the redraw timer.
References stacks.
|
private |
Retranslate the widget.
Referenced by BarPrivate().
|
private |
Calculates the widget's layout and draws the background into a pixmap.
References Pd::Bar::Arrow, backgroundColor, backgroundPixmap, barRect, borderRect, borderWidth, brightPolygon, Pd::Bar::ColorBar, darkPolygon, Pd::Scale::draw(), gradient, gradientStops, Pd::Bar::MultiColorBar, scaleRect, showScale, style, updateGradient(), and valueScale.
Referenced by updateLayout().
|
private |
References barRect, calcPosition(), debugStr, gradient, gradientStops, Pd::Bar::Horizontal, maxStop, minStop, orientation, and Pd::Bar::Vertical.
Referenced by updateBackground().
|
private |
Calculates the widget's layout and draws the background into a pixmap.
References autoBarWidth, barRect, borderRect, borderWidth, calcPosition(), Pd::Bar::d_ptr, findSiblings(), Pd::Scale::getOuterLength(), maxBarWidth, notifyMaxBarWidthChange(), orientation, scaleRect, Pd::Scale::setLength(), showScale, stacks, Pd::Scale::update(), updateBackground(), valueScale, Pd::Bar::Vertical, and zeroLine.
Referenced by BarPrivate(), clearVariables(), and maxBarWidthChanged().
|
private |
Referenced by maxBarWidthChanged(), notifyMaxBarWidthChange(), and updateLayout().
|
private |
Background color of the bar area.
Referenced by updateBackground().
|
private |
Pixmap that stores the background and scale.
Referenced by updateBackground().
|
private |
Layout rectangle containing the bar drawing area.
Referenced by calcPosition(), Pd::BarPrivate::Stack::paintColorBar(), updateBackground(), updateGradient(), and updateLayout().
|
private |
Referenced by updateBackground(), and updateLayout().
|
private |
Width of the border around the bar drawing area.
Referenced by updateBackground(), and updateLayout().
|
private |
Polygon to draw the border light.
Referenced by updateBackground().
|
private |
Polygon to draw the border shadow.
Referenced by updateBackground().
|
private |
Referenced by updateGradient().
|
private |
|
private |
Color gradient.
Referenced by Pd::BarPrivate::Stack::paintColorBar(), updateBackground(), and updateGradient().
|
staticprivate |
Arrow shape in #Horizontal mode.
Referenced by initDragIndicatorPolygons(), and Pd::BarPrivate::Stack::paintArrow().
|
staticprivate |
Drag indicator arrow shape in #Horizontal mode.
Referenced by initDragIndicatorPolygons(), and Pd::BarPrivate::Stack::paint().
|
private |
Referenced by BarPrivate(), and updateLayout().
|
private |
Value of last gradient stop.
Referenced by Pd::BarPrivate::Stack::findMultiColor(), and updateGradient().
|
private |
Value of first gradient stop.
Referenced by Pd::BarPrivate::Stack::findMultiColor(), and updateGradient().
|
private |
Orientation of the bar.
Referenced by calcPosition(), Pd::BarPrivate::Stack::paint(), Pd::BarPrivate::Stack::paintArrow(), Pd::BarPrivate::Stack::paintColorBar(), updateGradient(), and updateLayout().
|
private |
Bar drawing origin.
Referenced by Pd::BarPrivate::Stack::paintColorBar().
|
private |
|
private |
Referenced by updateBackground(), and updateLayout().
|
private |
Whether or not the scale is shown.
Referenced by updateBackground(), and updateLayout().
|
private |
Bar stacks.
Referenced by BarPrivate(), clearVariables(), redrawEvent(), and updateLayout().
|
private |
Widget appearance.
Referenced by Pd::BarPrivate::Stack::paint(), Pd::BarPrivate::Stack::paintColorBar(), and updateBackground().
|
private |
Value scale.
Referenced by BarPrivate(), calcPosition(), Pd::BarPrivate::Stack::paintColorBar(), updateBackground(), and updateLayout().
|
staticprivate |
Arrow shape in #Vertical mode.
Referenced by initDragIndicatorPolygons(), and Pd::BarPrivate::Stack::paintArrow().
|
staticprivate |
Drag indicator arrow shape in #Vertical mode.
Referenced by initDragIndicatorPolygons(), and Pd::BarPrivate::Stack::paint().
|
private |
Zero line.
Referenced by updateLayout().