qskinny/src/controls/QskPageIndicator.h

61 lines
1.5 KiB
C
Raw Normal View History

2017-07-21 18:21:34 +02:00
/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* This file may be used under the terms of the QSkinny License, Version 1.0
*****************************************************************************/
#ifndef QSK_PAGE_INDICATOR_H
#define QSK_PAGE_INDICATOR_H
#include "QskControl.h"
class QskCorner;
class QSK_EXPORT QskPageIndicator : public QskControl
{
Q_OBJECT
2018-08-03 08:15:28 +02:00
Q_PROPERTY( int count READ count
WRITE setCount NOTIFY countChanged FINAL )
Q_PROPERTY( qreal currentIndex READ currentIndex
WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL )
Q_PROPERTY( Qt::Orientation orientation READ orientation
WRITE setOrientation NOTIFY orientationChanged FINAL )
2017-07-21 18:21:34 +02:00
using Inherited = QskControl;
2018-08-03 08:15:28 +02:00
public:
2017-07-21 18:21:34 +02:00
QSK_SUBCONTROLS( Panel, Bullet, Highlighted )
QskPageIndicator( QQuickItem* parent = nullptr );
QskPageIndicator( int count, QQuickItem* parent = nullptr );
2018-07-31 17:32:25 +02:00
~QskPageIndicator() override;
2017-07-21 18:21:34 +02:00
int count() const;
qreal currentIndex() const;
Qt::Orientation orientation() const;
void setOrientation( Qt::Orientation );
2018-08-03 08:15:28 +02:00
Q_SIGNALS:
2017-07-21 18:21:34 +02:00
void countChanged();
void currentIndexChanged();
void orientationChanged();
2018-08-03 08:15:28 +02:00
public Q_SLOTS:
2017-07-21 18:21:34 +02:00
void setCount( int count );
void setCurrentIndex( qreal index );
2019-09-05 15:16:33 +02:00
protected:
QSizeF contentsSizeHint() const override;
2018-08-03 08:15:28 +02:00
private:
2017-07-21 18:21:34 +02:00
class PrivateData;
std::unique_ptr< PrivateData > m_data;
};
#endif