raDIYo 0.4
SWFlipDigit Class Reference
Inheritance diagram for SWFlipDigit:
SWAdjustableDigit

Public Types

enum  SWFlipMode { Slide , Flip , Rotate }
 

Public Slots

void setNumber (int n)
 
void flipTo (int n)
 

Public Member Functions

 SWFlipDigit (QWidget *parent=nullptr)
 
void setTransition (SWFlipMode tr)
 
SWFlipMode transition () const
 
void setRange (int from, int to)
 

Protected Member Functions

void drawFrame (QPainter *p, const QRect &rect)
 
QPixmap drawDigits (int n, const QRect &rect)
 
void preparePixmap ()
 
void resizeEvent (QResizeEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 
void paintStatic ()
 
void paintSlide ()
 
void paintFlip ()
 
void paintRotate ()
 

Protected Attributes

const double SWSCALEFACTOR = 2.7
 
const double SWFONTSCALE = 0.85
 
int _rangeFrom = 0
 
int _rangeTo = 99
 
int _number
 
SWFlipMode _transition
 
QPixmap _pixmap
 
QPixmap _lastPixmap
 
QTimeLine _animator
 

Detailed Description

Definition at line 28 of file swflipdigit.h.

Member Enumeration Documentation

◆ SWFlipMode

enum SWFlipDigit::SWFlipMode

Definition at line 35 of file swflipdigit.h.

Constructor & Destructor Documentation

◆ SWFlipDigit()

SWFlipDigit::SWFlipDigit ( QWidget *  parent = nullptr)
explicit

Definition at line 30 of file swflipdigit.cpp.

◆ ~SWFlipDigit()

SWFlipDigit::~SWFlipDigit ( )
virtual

Definition at line 47 of file swflipdigit.cpp.

Member Function Documentation

◆ drawDigits()

QPixmap SWFlipDigit::drawDigits ( int  n,
const QRect &  rect 
)
protected

Definition at line 113 of file swflipdigit.cpp.

◆ drawFrame()

void SWFlipDigit::drawFrame ( QPainter *  p,
const QRect &  rect 
)
protected

Definition at line 90 of file swflipdigit.cpp.

◆ flipTo

void SWFlipDigit::flipTo ( int  n)
slot

Definition at line 79 of file swflipdigit.cpp.

◆ paintEvent()

void SWFlipDigit::paintEvent ( QPaintEvent *  event)
overrideprotected

Definition at line 296 of file swflipdigit.cpp.

◆ paintFlip()

void SWFlipDigit::paintFlip ( )
protected

Definition at line 212 of file swflipdigit.cpp.

◆ paintRotate()

void SWFlipDigit::paintRotate ( )
protected

Definition at line 272 of file swflipdigit.cpp.

◆ paintSlide()

void SWFlipDigit::paintSlide ( )
protected

Definition at line 196 of file swflipdigit.cpp.

◆ paintStatic()

void SWFlipDigit::paintStatic ( )
protected

Definition at line 186 of file swflipdigit.cpp.

◆ preparePixmap()

void SWFlipDigit::preparePixmap ( )
protected

Definition at line 168 of file swflipdigit.cpp.

◆ resizeEvent()

void SWFlipDigit::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 179 of file swflipdigit.cpp.

◆ setNumber

void SWFlipDigit::setNumber ( int  n)
slot

Definition at line 70 of file swflipdigit.cpp.

◆ setRange()

void SWFlipDigit::setRange ( int  from,
int  to 
)

Definition at line 64 of file swflipdigit.cpp.

◆ setTransition()

void SWFlipDigit::setTransition ( SWFlipMode  tr)

Definition at line 52 of file swflipdigit.cpp.

◆ transition()

SWFlipDigit::SWFlipMode SWFlipDigit::transition ( ) const

Definition at line 58 of file swflipdigit.cpp.

Member Data Documentation

◆ _animator

QTimeLine SWFlipDigit::_animator
protected

Definition at line 79 of file swflipdigit.h.

◆ _lastPixmap

QPixmap SWFlipDigit::_lastPixmap
protected

Definition at line 78 of file swflipdigit.h.

◆ _number

int SWFlipDigit::_number
protected

Definition at line 75 of file swflipdigit.h.

◆ _pixmap

QPixmap SWFlipDigit::_pixmap
protected

Definition at line 77 of file swflipdigit.h.

◆ _rangeFrom

int SWFlipDigit::_rangeFrom = 0
protected

Definition at line 73 of file swflipdigit.h.

◆ _rangeTo

int SWFlipDigit::_rangeTo = 99
protected

Definition at line 74 of file swflipdigit.h.

◆ _transition

SWFlipMode SWFlipDigit::_transition
protected

Definition at line 76 of file swflipdigit.h.

◆ SWFONTSCALE

const double SWFlipDigit::SWFONTSCALE = 0.85
protected

Definition at line 58 of file swflipdigit.h.

◆ SWSCALEFACTOR

const double SWFlipDigit::SWSCALEFACTOR = 2.7
protected

Definition at line 57 of file swflipdigit.h.


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