6#include "QskSwitchButton.h"
12struct QskSwitchButton::PrivateData
14 PrivateData( Qt::Orientation orientation )
15 : orientation( orientation )
19 bool inverted =
false;
20 Qt::Orientation orientation;
21 IconMode iconMode = NoIcon;
24QskSwitchButton::QskSwitchButton( QQuickItem* parent )
29QskSwitchButton::QskSwitchButton( Qt::Orientation orientation, QQuickItem* parent )
31 , m_data( new PrivateData( orientation ) )
33 initSizePolicy( QskSizePolicy::Fixed, QskSizePolicy::Fixed );
36QskSwitchButton::~QskSwitchButton()
40bool QskSwitchButton::isCheckable()
const
45Qt::Orientation QskSwitchButton::orientation()
const
47 return m_data->orientation;
50void QskSwitchButton::setOrientation( Qt::Orientation orientation )
52 if( m_data->orientation != orientation )
54 m_data->orientation = orientation;
59 Q_EMIT orientationChanged( orientation );
63bool QskSwitchButton::isInverted()
const
65 return m_data->inverted;
68void QskSwitchButton::setInverted(
bool on )
70 if( m_data->inverted != on )
72 m_data->inverted = on;
77 Q_EMIT invertedChanged( on );
81QskSwitchButton::IconMode QskSwitchButton::iconMode()
const
83 return m_data->iconMode;
86void QskSwitchButton::setIconMode( IconMode iconMode )
88 if( iconMode != m_data->iconMode )
90 m_data->iconMode = iconMode;
91 Q_EMIT iconModeChanged( m_data->iconMode );
100#include "moc_QskSwitchButton.cpp"
Variation
Some sort of variation.