]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Expose image path in UsersModel
authorDavid Edmundson <david@davidedmundson.co.uk>
Sat, 8 Sep 2012 11:09:56 +0000 (12:09 +0100)
committerDavid Edmundson <david@davidedmundson.co.uk>
Sat, 8 Sep 2012 11:09:56 +0000 (12:09 +0100)
liblightdm-qt/QLightDM/usersmodel.h
liblightdm-qt/usersmodel.cpp

index 24eafc93bba98824b42101d61e4611a68411ffef..01728232e6a511257f19464ed487994bfb50c3dc 100644 (file)
@@ -33,7 +33,9 @@ public:
                          LoggedInRole,
                          BackgroundRole,
                          SessionRole,
-                         HasMessagesRole};
+                         HasMessagesRole,
+                         ImagePathRole
+    };
 
     int rowCount(const QModelIndex &parent) const;
     QVariant data(const QModelIndex &index, int role) const;
index ca57c9adcf5583cec548e0c7849c8de66cdecb6c..47f6dc9eafdbc81f5cada2fb8f5936c192515af1 100644 (file)
@@ -231,6 +231,8 @@ QVariant UsersModel::data(const QModelIndex &index, int role) const
         return QPixmap(d->users[row].background);
     case UsersModel::HasMessagesRole:
         return d->users[row].hasMessages;
+    case UsersModel::ImagePathRole:
+        return d->users[row].image;
     }
 
     return QVariant();