QtPdWidgets  2.3.1
Classes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Pd::BarPrivate Class Reference

Bar graph widget. More...

#include <Bar_p.h>

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

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

- Public Member Functions inherited from Pd::Widget
 Widget ()
 Constructor. More...
 
virtual ~Widget ()
 Destructor. More...
 
- Static Public Member Functions inherited from Pd::Widget
static void setRedrawInterval (int)
 Sets the redraw interval. More...
 
static const QTimer * getTimer ()
 Returns the redrawTimer. More...
 

Detailed Description

Bar graph widget.

Member Typedef Documentation

◆ StackList

typedef QList<Stack *> Pd::BarPrivate::StackList
private

Constructor & Destructor Documentation

◆ BarPrivate()

BarPrivate::BarPrivate ( Bar parent)
private

Member Function Documentation

◆ calcPosition()

unsigned int BarPrivate::calcPosition ( double  value,
bool  limit = true 
) const
private

◆ clearVariables()

void BarPrivate::clearVariables ( )
private

Clear all stacks and sections.

References stacks, and updateLayout().

◆ findSiblings()

QList< Bar * > BarPrivate::findSiblings ( )
private

◆ initDragIndicatorPolygons()

void BarPrivate::initDragIndicatorPolygons ( )
staticprivate

Drag indicator polygon initializer.

References horizontalArrow, horizontalDragIndicatorPolygon, verticalArrow, and verticalDragIndicatorPolygon.

Referenced by BarPrivate().

◆ maxBarWidthChanged()

void BarPrivate::maxBarWidthChanged ( )
private

References autoBarWidth, and updateLayout().

◆ notifyMaxBarWidthChange()

void BarPrivate::notifyMaxBarWidthChange ( )
private

References autoBarWidth, and findSiblings().

Referenced by updateLayout().

◆ redrawEvent()

void BarPrivate::redrawEvent ( )
private

Redraw event slot, that is called by the redraw timer.

References stacks.

◆ retranslate()

void BarPrivate::retranslate ( )
private

Retranslate the widget.

Referenced by BarPrivate().

◆ updateBackground()

void BarPrivate::updateBackground ( )
private

◆ updateGradient()

void BarPrivate::updateGradient ( )
private

◆ updateLayout()

void BarPrivate::updateLayout ( )
private

Member Data Documentation

◆ autoBarWidth

bool Pd::BarPrivate::autoBarWidth
private

◆ backgroundColor

QColor Pd::BarPrivate::backgroundColor
private

Background color of the bar area.

Referenced by updateBackground().

◆ backgroundPixmap

QPixmap Pd::BarPrivate::backgroundPixmap
private

Pixmap that stores the background and scale.

Referenced by updateBackground().

◆ barRect

QRect Pd::BarPrivate::barRect
private

Layout rectangle containing the bar drawing area.

Referenced by calcPosition(), Pd::BarPrivate::Stack::paintColorBar(), updateBackground(), updateGradient(), and updateLayout().

◆ borderRect

QRect Pd::BarPrivate::borderRect
private

Referenced by updateBackground(), and updateLayout().

◆ borderWidth

int Pd::BarPrivate::borderWidth
private

Width of the border around the bar drawing area.

Referenced by updateBackground(), and updateLayout().

◆ brightPolygon

QPolygon Pd::BarPrivate::brightPolygon
private

Polygon to draw the border light.

Referenced by updateBackground().

◆ darkPolygon

QPolygon Pd::BarPrivate::darkPolygon
private

Polygon to draw the border shadow.

Referenced by updateBackground().

◆ debugStr

QString Pd::BarPrivate::debugStr
private

Referenced by updateGradient().

◆ gradient

QLinearGradient Pd::BarPrivate::gradient
private

◆ gradientStops

QGradientStops Pd::BarPrivate::gradientStops
private

◆ horizontalArrow

QPolygon BarPrivate::horizontalArrow
staticprivate

Arrow shape in #Horizontal mode.

Referenced by initDragIndicatorPolygons(), and Pd::BarPrivate::Stack::paintArrow().

◆ horizontalDragIndicatorPolygon

QPolygon BarPrivate::horizontalDragIndicatorPolygon
staticprivate

Drag indicator arrow shape in #Horizontal mode.

Referenced by initDragIndicatorPolygons(), and Pd::BarPrivate::Stack::paint().

◆ maxBarWidth

int Pd::BarPrivate::maxBarWidth
private

Referenced by BarPrivate(), and updateLayout().

◆ maxStop

double Pd::BarPrivate::maxStop
private

Value of last gradient stop.

Referenced by Pd::BarPrivate::Stack::findMultiColor(), and updateGradient().

◆ minStop

double Pd::BarPrivate::minStop
private

Value of first gradient stop.

Referenced by Pd::BarPrivate::Stack::findMultiColor(), and updateGradient().

◆ orientation

Bar::Orientation Pd::BarPrivate::orientation
private

◆ origin

Bar::Origin Pd::BarPrivate::origin
private

Bar drawing origin.

Referenced by Pd::BarPrivate::Stack::paintColorBar().

◆ q_ptr

Bar* const Pd::BarPrivate::q_ptr
private

◆ scaleRect

QRect Pd::BarPrivate::scaleRect
private

Referenced by updateBackground(), and updateLayout().

◆ showScale

bool Pd::BarPrivate::showScale
private

Whether or not the scale is shown.

Referenced by updateBackground(), and updateLayout().

◆ stacks

StackList Pd::BarPrivate::stacks
private

◆ style

Bar::Style Pd::BarPrivate::style
private

◆ valueScale

Scale Pd::BarPrivate::valueScale
private

◆ verticalArrow

QPolygon BarPrivate::verticalArrow
staticprivate

Arrow shape in #Vertical mode.

Referenced by initDragIndicatorPolygons(), and Pd::BarPrivate::Stack::paintArrow().

◆ verticalDragIndicatorPolygon

QPolygon BarPrivate::verticalDragIndicatorPolygon
staticprivate

Drag indicator arrow shape in #Vertical mode.

Referenced by initDragIndicatorPolygons(), and Pd::BarPrivate::Stack::paint().

◆ zeroLine

QLine Pd::BarPrivate::zeroLine
private

Zero line.

Referenced by updateLayout().


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