2017-07-21 16:21:34 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef QSK_SEPARATOR_H
|
|
|
|
#define QSK_SEPARATOR_H
|
|
|
|
|
|
|
|
#include "QskControl.h"
|
|
|
|
|
|
|
|
class QSK_EXPORT QskSeparator : public QskControl
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
Q_PROPERTY( Qt::Orientation orientation READ orientation
|
|
|
|
WRITE setOrientation NOTIFY orientationChanged )
|
|
|
|
|
2020-12-15 10:01:23 +00:00
|
|
|
Q_PROPERTY( qreal extent READ extent
|
|
|
|
WRITE setExtent RESET resetExtent NOTIFY extentChanged )
|
2017-09-01 10:27:08 +00:00
|
|
|
|
2017-07-21 16:21:34 +00:00
|
|
|
using Inherited = QskControl;
|
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
public:
|
2017-07-21 16:21:34 +00:00
|
|
|
QSK_SUBCONTROLS( Panel )
|
|
|
|
|
|
|
|
QskSeparator( QQuickItem* parent = nullptr );
|
|
|
|
QskSeparator( Qt::Orientation, QQuickItem* parent = nullptr );
|
2017-09-01 10:27:08 +00:00
|
|
|
|
2018-07-31 15:32:25 +00:00
|
|
|
~QskSeparator() override;
|
2017-07-21 16:21:34 +00:00
|
|
|
|
|
|
|
void setOrientation( Qt::Orientation );
|
|
|
|
Qt::Orientation orientation() const;
|
|
|
|
|
2020-12-17 07:52:30 +00:00
|
|
|
void setExtent( qreal );
|
2020-12-15 10:01:23 +00:00
|
|
|
void resetExtent();
|
|
|
|
qreal extent() const;
|
2017-09-01 10:27:08 +00:00
|
|
|
|
2018-07-31 15:32:25 +00:00
|
|
|
QskAspect::Placement effectivePlacement() const override;
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
Q_SIGNALS:
|
2017-07-21 16:21:34 +00:00
|
|
|
void orientationChanged( Qt::Orientation );
|
2020-12-15 10:01:23 +00:00
|
|
|
void extentChanged( qreal );
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
private:
|
2017-07-21 16:21:34 +00:00
|
|
|
Qt::Orientation m_orientation;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|