using Qt::Edge instead of QskAspect::Placement
This commit is contained in:
parent
1300761ee2
commit
4c10d8b0e4
@ -28,10 +28,10 @@ namespace
|
||||
setSizePolicy( Qt::Horizontal, QskSizePolicy::Fixed );
|
||||
setSpacing( 0 );
|
||||
|
||||
auto* const topButton = new RoundButton( QskAspect::Top, this );
|
||||
auto* const topButton = new RoundButton( Qt::TopEdge, this );
|
||||
connect( topButton, &QskPushButton::clicked, this, &UpAndDownBox::increase );
|
||||
|
||||
auto* const bottomButton = new RoundButton( QskAspect::Bottom, this );
|
||||
auto* const bottomButton = new RoundButton( Qt::BottomEdge, this );
|
||||
connect( bottomButton, &QskPushButton::clicked, this, &UpAndDownBox::decrease );
|
||||
}
|
||||
|
||||
|
@ -4,23 +4,19 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "RoundButton.h"
|
||||
|
||||
#include <QskGraphic.h>
|
||||
#include <QskPushButton.h>
|
||||
|
||||
#include <QImage>
|
||||
|
||||
QSK_SUBCONTROL( RoundButton, Panel )
|
||||
|
||||
QSK_STATE( RoundButton, Top, ( QskAspect::FirstUserState << 1 ) )
|
||||
|
||||
RoundButton::RoundButton( QskAspect::Placement placement, QQuickItem* parent )
|
||||
RoundButton::RoundButton( Qt::Edge edge, QQuickItem* parent )
|
||||
: QskPushButton( parent )
|
||||
{
|
||||
setSubcontrolProxy( QskPushButton::Panel, RoundButton::Panel );
|
||||
setSizePolicy( QskSizePolicy::Fixed, QskSizePolicy::Expanding );
|
||||
|
||||
if( placement == QskAspect::Top )
|
||||
if( edge == Qt::TopEdge )
|
||||
{
|
||||
setSkinStateFlag( Top );
|
||||
setGraphicSource( "up" );
|
||||
|
@ -6,6 +6,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QskPushButton.h>
|
||||
#include <Qt>
|
||||
|
||||
class RoundButton : public QskPushButton
|
||||
{
|
||||
@ -15,5 +16,5 @@ class RoundButton : public QskPushButton
|
||||
QSK_SUBCONTROLS( Panel )
|
||||
QSK_STATES( Top )
|
||||
|
||||
RoundButton( QskAspect::Placement, QQuickItem* parent );
|
||||
RoundButton( Qt::Edge, QQuickItem* parent );
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user