summaryrefslogtreecommitdiff
path: root/liblightdm-qt/QLightDM
diff options
context:
space:
mode:
authorDavid Edmundson <david@davidedmundson.co.uk>2011-11-22 19:17:07 +0000
committerDavid Edmundson <david@davidedmundson.co.uk>2011-11-22 19:17:07 +0000
commit999d9953b1b1e8e05504bc8f8f808e9d55da13b2 (patch)
tree4fd793ffe1e7db8096effe5743187a83660b409c /liblightdm-qt/QLightDM
parent94733bc2b6cd0d0a2320e615323607c80bdb0c2c (diff)
downloadlightdm-git-999d9953b1b1e8e05504bc8f8f808e9d55da13b2.tar.gz
Port sessions model to use GObject lib
Diffstat (limited to 'liblightdm-qt/QLightDM')
-rw-r--r--liblightdm-qt/QLightDM/Session1
-rw-r--r--liblightdm-qt/QLightDM/SessionsModel1
-rw-r--r--liblightdm-qt/QLightDM/sessionsmodel.h (renamed from liblightdm-qt/QLightDM/session.h)12
3 files changed, 9 insertions, 5 deletions
diff --git a/liblightdm-qt/QLightDM/Session b/liblightdm-qt/QLightDM/Session
deleted file mode 100644
index 9566e0b8..00000000
--- a/liblightdm-qt/QLightDM/Session
+++ /dev/null
@@ -1 +0,0 @@
-#include "QLightDM/session.h" \ No newline at end of file
diff --git a/liblightdm-qt/QLightDM/SessionsModel b/liblightdm-qt/QLightDM/SessionsModel
new file mode 100644
index 00000000..7fe68741
--- /dev/null
+++ b/liblightdm-qt/QLightDM/SessionsModel
@@ -0,0 +1 @@
+#include "QLightDM/sessionsmodel.h" \ No newline at end of file
diff --git a/liblightdm-qt/QLightDM/session.h b/liblightdm-qt/QLightDM/sessionsmodel.h
index f859e4ce..92df0589 100644
--- a/liblightdm-qt/QLightDM/session.h
+++ b/liblightdm-qt/QLightDM/sessionsmodel.h
@@ -9,8 +9,8 @@
* license.
*/
-#ifndef QLIGHTDM_SESSION_H
-#define QLIGHTDM_SESSION_H
+#ifndef QLIGHTDM_SESSIONS_MODEL_H
+#define QLIGHTDM_SESSIONS_MODEL_H
#include <QtCore/QAbstractListModel>
@@ -22,6 +22,8 @@ namespace QLightDM {
Q_OBJECT
public:
enum SessionModelRoles {
+ //name is exposed as Qt::DisplayRole
+ //comment is exposed as Qt::TooltipRole
IdRole = Qt::UserRole
};
@@ -31,9 +33,11 @@ namespace QLightDM {
int rowCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const;
+ protected:
+ SessionsModelPrivate *d_ptr;
+
private:
- SessionsModelPrivate *d;
- void buildList(); //maybe make this a public slot, which apps can call only if they give a care about the session.
+ Q_DECLARE_PRIVATE(SessionsModel)
};
};