QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskDrawer.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_DRAWER_H
7#define QSK_DRAWER_H
8
9#include "QskPopup.h"
10
11class QSK_EXPORT QskDrawer : public QskPopup
12{
13 Q_OBJECT
14
15 using Inherited = QskPopup;
16
17 Q_PROPERTY( Qt::Edge edge READ edge WRITE setEdge NOTIFY edgeChanged )
18
19 Q_PROPERTY( qreal dragMargin READ dragMargin
20 WRITE setDragMargin RESET resetDragMargin NOTIFY dragMarginChanged )
21
22 Q_PROPERTY( bool interactive READ isInteractive
23 WRITE setInteractive NOTIFY interactiveChanged )
24
25 public:
26 QSK_SUBCONTROLS( Panel )
27
28 QskDrawer( QQuickItem* = nullptr );
29 QskDrawer( Qt::Edge, QQuickItem* = nullptr );
30
31 ~QskDrawer() override;
32
33 void setEdge( Qt::Edge );
34 Qt::Edge edge() const;
35
36 void setInteractive( bool );
37 bool isInteractive() const;
38
39 void setDragMargin( qreal );
40 void resetDragMargin();
41 qreal dragMargin() const;
42
43 QRectF clipRect() const override;
44 QskAspect fadingAspect() const override;
45
46 QRectF layoutRectForSize( const QSizeF& ) const override;
47
48 Q_SIGNALS:
49 void edgeChanged( Qt::Edge );
50 void dragMarginChanged( qreal );
51 void interactiveChanged( bool );
52
53 protected:
54 void gestureEvent( QskGestureEvent* ) override;
55 void itemChange( ItemChange, const ItemChangeData& ) override;
56
57 void updateResources() override;
58 void updateNode( QSGNode* ) override;
59
60 private:
61 class PrivateData;
62 std::unique_ptr< PrivateData > m_data;
63};
64
65#endif
Lookup key for a QskSkinHintTable.
Definition QskAspect.h:15
virtual QRectF layoutRectForSize(const QSizeF &) const
virtual void updateNode(QSGNode *)