~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-05-21 19:47:27 UTC
  • mfrom: (458.1.7 fix_namespace)
  • Revision ID: david@davidedmundson.co.uk-20110521194727-c3wmqlx2n4wjdiqb
Merge branch that puts Qt LightDM into a namespace, removes possibility of file clash. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef LDMSESSIONSMODEL_H
2
 
#define LDMSESSIONSMODEL_H
 
1
#ifndef QLIGTHDM_SESSIONSMODEL_H
 
2
#define QLIGTHDM_SESSIONSMODEL_H
3
3
 
4
4
#include <QtCore/QAbstractListModel>
5
5
 
6
 
class LdmSessionsModelPrivate;
7
 
 
8
 
class Q_DECL_EXPORT LdmSessionsModel : public QAbstractListModel
9
 
{
10
 
    Q_OBJECT
11
 
public:
12
 
    enum SessionModelRoles {IdRole = Qt::UserRole};
13
 
 
14
 
    explicit LdmSessionsModel(QObject *parent = 0);
15
 
    virtual ~LdmSessionsModel();
16
 
    
17
 
    int rowCount(const QModelIndex &parent) const;
18
 
    QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const;
19
 
 
20
 
private:
21
 
    LdmSessionsModelPrivate *d;
22
 
    void buildList(); //maybe make this a public slot, which apps can call only if they give a care about the session.
 
6
class SessionsModelPrivate;
 
7
 
 
8
namespace QLightDM {
 
9
    class Q_DECL_EXPORT SessionsModel : public QAbstractListModel
 
10
    {
 
11
        Q_OBJECT
 
12
    public:
 
13
        enum SessionModelRoles {IdRole = Qt::UserRole};
 
14
 
 
15
        explicit SessionsModel(QObject *parent = 0);
 
16
        virtual ~SessionsModel();
 
17
        
 
18
        int rowCount(const QModelIndex &parent) const;
 
19
        QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const;
 
20
 
 
21
    private:
 
22
        SessionsModelPrivate *d;
 
23
        void buildList(); //maybe make this a public slot, which apps can call only if they give a care about the session.
 
24
    };
23
25
};
24
26
 
25
27
#endif // LDMSESSIONSMODEL_H