File indexing completed on 2024-04-14 05:24:39

0001 /*
0002     SPDX-FileCopyrightText: 2019 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef VIEWINDICATORRESOURCES_H
0007 #define VIEWINDICATORRESOURCES_H
0008 
0009 // Qt
0010 #include <QObject>
0011 
0012 namespace Latte {
0013 namespace ViewPart {
0014 class Indicator;
0015 }
0016 }
0017 
0018 namespace Latte {
0019 namespace ViewPart {
0020 namespace IndicatorPart {
0021 
0022 /**
0023  * Resources requested from indicator in order to reduce consumption
0024  **/
0025 
0026 class Resources: public QObject
0027 {
0028     Q_OBJECT
0029     Q_PROPERTY(QList<QObject *> svgs READ svgs NOTIFY svgsChanged)
0030 
0031 public:
0032     Resources(Indicator *parent);
0033     virtual ~Resources();
0034 
0035     QList<QObject *> svgs() const;
0036 
0037 public slots:
0038     Q_INVOKABLE void setSvgImagePaths(QStringList paths);
0039 
0040 signals:
0041     void svgsChanged();
0042 
0043 private:
0044     QStringList m_svgImagePaths;
0045 
0046     Indicator *m_indicator{nullptr};
0047 
0048     QList<QObject *> m_svgs;
0049 };
0050 
0051 }
0052 }
0053 }
0054 
0055 #endif