raDIYo 0.4
SWSwitch Class Reference
Inheritance diagram for SWSwitch:

Signals

void hysenkyte ()
 

Public Member Functions

 SWSwitch (QWidget *parent=nullptr)
 
QSize sizeHint () const override
 
QBrush brush () const
 
void setBrush (const QBrush &brush)
 
int offset () const
 
void setOffset (int offset)
 

Protected Member Functions

void paintEvent (QPaintEvent *) override
 
void mouseReleaseEvent (QMouseEvent *) override
 
void enterEvent (QEvent *) override
 

Protected Attributes

const int SWANIMDURATION = 400
 
bool _isOn
 
qreal _opacity
 
int _x
 
int _y
 
int _height
 
int _margin
 
QBrush _thumb
 
QBrush _track
 
QBrush _brush
 
QPropertyAnimation * _anim = nullptr
 

Properties

int offset
 

Detailed Description

Definition at line 29 of file swswitch.h.

Constructor & Destructor Documentation

◆ SWSwitch()

SWSwitch::SWSwitch ( QWidget *  parent = nullptr)

Definition at line 28 of file swswitch.cpp.

Member Function Documentation

◆ brush()

QBrush SWSwitch::brush ( ) const
inline

Definition at line 42 of file swswitch.h.

◆ enterEvent()

void SWSwitch::enterEvent ( QEvent *  event)
overrideprotected

Definition at line 106 of file swswitch.cpp.

◆ mouseReleaseEvent()

void SWSwitch::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 79 of file swswitch.cpp.

◆ offset()

int SWSwitch::offset ( ) const
inline

Definition at line 52 of file swswitch.h.

◆ paintEvent()

void SWSwitch::paintEvent ( QPaintEvent *  event)
overrideprotected

Definition at line 46 of file swswitch.cpp.

◆ setBrush()

void SWSwitch::setBrush ( const QBrush &  brush)
inline

Definition at line 47 of file swswitch.h.

◆ setOffset()

void SWSwitch::setOffset ( int  offset)
inline

Definition at line 57 of file swswitch.h.

◆ sizeHint()

QSize SWSwitch::sizeHint ( ) const
override

Definition at line 113 of file swswitch.cpp.

Member Data Documentation

◆ _anim

QPropertyAnimation* SWSwitch::_anim = nullptr
protected

Definition at line 79 of file swswitch.h.

◆ _brush

QBrush SWSwitch::_brush
protected

Definition at line 78 of file swswitch.h.

◆ _height

int SWSwitch::_height
protected

Definition at line 77 of file swswitch.h.

◆ _isOn

bool SWSwitch::_isOn
protected

Definition at line 75 of file swswitch.h.

◆ _margin

int SWSwitch::_margin
protected

Definition at line 77 of file swswitch.h.

◆ _opacity

qreal SWSwitch::_opacity
protected

Definition at line 76 of file swswitch.h.

◆ _thumb

QBrush SWSwitch::_thumb
protected

Definition at line 78 of file swswitch.h.

◆ _track

QBrush SWSwitch::_track
protected

Definition at line 78 of file swswitch.h.

◆ _x

int SWSwitch::_x
protected

Definition at line 77 of file swswitch.h.

◆ _y

int SWSwitch::_y
protected

Definition at line 77 of file swswitch.h.

◆ SWANIMDURATION

const int SWSwitch::SWANIMDURATION = 400
protected

Definition at line 69 of file swswitch.h.

Property Documentation

◆ offset

int SWSwitch::offset
readwrite

Definition at line 1 of file swswitch.h.


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