summaryrefslogtreecommitdiff
path: root/sowatchui/watchletsmodel.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-11 16:10:50 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-11 16:10:50 +0200
commitbc899047089079dde323e84a57efe46ce6af653d (patch)
treec88ef2bc6d1876518b285db15e5a400c6c4795a4 /sowatchui/watchletsmodel.h
parent4b5bbdea7bdb6defc88023ba65f7aec1a7439977 (diff)
downloadsowatch-bc899047089079dde323e84a57efe46ce6af653d.tar.gz
sowatch-bc899047089079dde323e84a57efe46ce6af653d.zip
add the liveview paint engine
Diffstat (limited to 'sowatchui/watchletsmodel.h')
-rw-r--r--sowatchui/watchletsmodel.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/sowatchui/watchletsmodel.h b/sowatchui/watchletsmodel.h
deleted file mode 100644
index 4f7ae8f..0000000
--- a/sowatchui/watchletsmodel.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef WATCHLETSMODEL_H
-#define WATCHLETSMODEL_H
-
-#include <QAbstractListModel>
-
-#include <sowatch.h>
-
-class WatchletsModel : public QAbstractListModel
-{
- Q_OBJECT
- Q_PROPERTY(QString configKey READ configKey WRITE setConfigKey NOTIFY configKeyChanged)
- Q_PROPERTY(bool displayUnadded READ displayUnadded WRITE setDisplayUnadded NOTIFY displayUnaddedChanged)
-
-public:
- explicit WatchletsModel(QObject *parent = 0);
-
- enum DataRoles {
- NameRole = Qt::UserRole,
- ConfigQmlUrlRole
- };
-
- QString configKey() const;
- void setConfigKey(const QString& configKey);
-
- bool displayUnadded() const;
- void setDisplayUnadded(bool displayUnadded);
-
- int rowCount(const QModelIndex &parent) const;
- QVariant data(const QModelIndex &index, int role) const;
-
-public slots:
- void addWatchlet(const QString& name);
- void removeWatchlet(const QString& name);
- void moveWatchletUp(const QString& name);
- void moveWatchletDown(const QString& name);
-
-signals:
- void configKeyChanged();
- void displayUnaddedChanged();
-
-private slots:
- void reload();
- void handleConfigChanged();
-
-private:
- sowatch::ConfigKey *_config;
- bool _unadded;
- QStringList _list;
- QMap<QString, sowatch::WatchletPluginInterface::WatchletInfo> _info;
- QSet<QString> _enabled;
-};
-
-#endif // WATCHLETSMODEL_H