qskinny/src/controls/QskBox.h

44 lines
997 B
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_BOX_H
#define QSK_BOX_H
#include "QskControl.h"
class QSK_EXPORT QskBox : public QskControl
{
Q_OBJECT
using Inherited = QskControl;
2019-05-10 07:44:13 +02:00
Q_PROPERTY( bool panel READ hasPanel
WRITE setPanel NOTIFY panelChanged FINAL )
2018-08-03 08:15:28 +02:00
public:
2017-07-21 18:21:34 +02:00
QSK_SUBCONTROLS( Panel )
QskBox( QQuickItem* parent = nullptr );
2019-05-10 07:44:13 +02:00
QskBox( bool hasPanel, QQuickItem* parent = nullptr );
2018-07-31 17:32:25 +02:00
~QskBox() override;
2017-07-21 18:21:34 +02:00
2019-05-10 07:44:13 +02:00
void setPanel( bool );
bool hasPanel() const;
2019-09-05 15:16:33 +02:00
QRectF layoutRectForSize( const QSizeF& ) const override;
2019-05-10 07:44:13 +02:00
Q_SIGNALS:
void panelChanged( bool );
protected:
QSizeF contentsSizeHint( Qt::SizeHint, const QSizeF& ) const override;
2019-05-10 07:44:13 +02:00
private:
bool m_hasPanel;
2017-07-21 18:21:34 +02:00
};
#endif