summaryrefslogtreecommitdiff
path: root/libsowatch/watchletsmodel.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-14 01:13:41 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-14 01:13:41 +0200
commit80c58c124caf17f670d8efc120f5ae4bfd9aa09f (patch)
treec6d036f06437e54f80afd65e1a700a018cab994b /libsowatch/watchletsmodel.h
parentc3392e5d539e87f4720b3d107aaefffdc9579f4d (diff)
downloadsowatch-80c58c124caf17f670d8efc120f5ae4bfd9aa09f.tar.gz
sowatch-80c58c124caf17f670d8efc120f5ae4bfd9aa09f.zip
added liveview watchlet menu (API break)
Diffstat (limited to 'libsowatch/watchletsmodel.h')
-rw-r--r--libsowatch/watchletsmodel.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/libsowatch/watchletsmodel.h b/libsowatch/watchletsmodel.h
index cdb6be4..3bbabf9 100644
--- a/libsowatch/watchletsmodel.h
+++ b/libsowatch/watchletsmodel.h
@@ -12,15 +12,20 @@ namespace sowatch
class WatchletsModel : public QAbstractListModel
{
Q_OBJECT
+ Q_PROPERTY(QString watchModel READ watchModel WRITE setWatchModel NOTIFY watchModelChanged)
public:
explicit WatchletsModel(QObject *parent = 0);
enum DataRoles {
ObjectRole = Qt::UserRole,
- TitleRole = Qt::DisplayRole
+ TitleRole = Qt::DisplayRole,
+ IconRole = Qt::DecorationRole
};
+ QString watchModel() const;
+ void setWatchModel(const QString& s);
+
int rowCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
@@ -35,14 +40,16 @@ public:
void remove(int position);
signals:
+ void watchModelChanged();
void modelChanged();
protected:
typedef WatchletPluginInterface::WatchletInfo WatchletInfo;
- static WatchletInfo getInfoForWatchlet(const Watchlet *w);
+ WatchletInfo getInfoForWatchlet(const Watchlet *w);
private:
+ QString _watchModel;
QList<Watchlet*> _list;
QList<WatchletInfo> _info;