52 lines
1.6 KiB
C
Raw Normal View History

2023-01-05 17:08:50 +01:00
/******************************************************************************
* Copyright (C) 2022 Edelhirsch Software GmbH
2023-04-06 10:15:03 +02:00
* SPDX-License-Identifier: BSD-3-Clause
2023-01-05 17:08:50 +01:00
*****************************************************************************/
2023-01-04 17:17:17 +01:00
#pragma once
#include <QskControl.h>
class StorageBar final : public QskControl
{
2023-01-05 17:08:50 +01:00
using Inherited = QskControl;
Q_OBJECT
Q_PROPERTY( qreal pictures READ pictures WRITE setPictures NOTIFY picturesChanged )
Q_PROPERTY( qreal music READ music WRITE setMusic NOTIFY musicChanged )
Q_PROPERTY( qreal videos READ videos WRITE setVideos NOTIFY videosChanged )
Q_PROPERTY( qreal documents READ documents WRITE setDocuments NOTIFY documentsChanged )
Q_PROPERTY( qreal others READ others WRITE setOthers NOTIFY othersChanged )
public:
QSK_SUBCONTROLS( Pictures, Music, Videos, Documents, Others, Free )
2024-02-02 14:13:33 +01:00
explicit StorageBar( QskItem* parent = nullptr );
2023-01-05 17:08:50 +01:00
qreal pictures() const;
void setPictures( qreal newPictures );
qreal music() const;
void setMusic( qreal newMusic );
qreal videos() const;
void setVideos( qreal newVideos );
qreal documents() const;
void setDocuments( qreal newDocuments );
qreal others() const;
void setOthers( qreal newOthers );
qreal free() const;
Q_SIGNALS:
void picturesChanged( qreal value );
void musicChanged( qreal value );
void videosChanged( qreal value );
void documentsChanged( qreal value );
void othersChanged( qreal value );
private:
qreal m_pictures = 0.0;
qreal m_music = 0.0;
qreal m_videos = 0.0;
qreal m_documents = 0.0;
qreal m_others = 0.0;
2023-01-04 17:17:17 +01:00
};