~lightdm-team/lightdm/1.4

« back to all changes in this revision

Viewing changes to liblightdm-qt/QLightDM/sessionsmodel.h

  • Committer: David Edmundson
  • Date: 2011-11-22 19:17:07 UTC
  • mto: (1297.1.18 qt-fixes)
  • mto: This revision was merged to the branch mainline in revision 1322.
  • Revision ID: david@davidedmundson.co.uk-20111122191707-tkagux6wtlm71f1n
Port sessions model to use GObject lib

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 * license.
10
10
 */
11
11
 
12
 
#ifndef QLIGHTDM_SESSION_H
13
 
#define QLIGHTDM_SESSION_H
 
12
#ifndef QLIGHTDM_SESSIONS_MODEL_H
 
13
#define QLIGHTDM_SESSIONS_MODEL_H
14
14
 
15
15
#include <QtCore/QAbstractListModel>
16
16
 
22
22
        Q_OBJECT
23
23
    public:
24
24
        enum SessionModelRoles {
 
25
            //name is exposed as Qt::DisplayRole
 
26
            //comment is exposed as Qt::TooltipRole
25
27
            IdRole = Qt::UserRole
26
28
        };
27
29
 
31
33
        int rowCount(const QModelIndex &parent) const;
32
34
        QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const;
33
35
 
 
36
    protected:
 
37
        SessionsModelPrivate *d_ptr;
 
38
        
34
39
    private:
35
 
        SessionsModelPrivate *d;
36
 
        void buildList(); //maybe make this a public slot, which apps can call only if they give a care about the session.
 
40
        Q_DECLARE_PRIVATE(SessionsModel)
37
41
    };
38
42
};
39
43