~lukas-kde/unity8/betterSessionManagement

« back to all changes in this revision

Viewing changes to tests/mocks/Unity/Application/MirSurfaceListModel.h

  • Committer: Lukáš Tinkl
  • Date: 2017-03-24 11:57:27 UTC
  • mfrom: (2800.1.91 unity8)
  • Revision ID: lukas.tinkl@canonical.com-20170324115727-34c7tvv3qnxvxzdj
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2016 Canonical, Ltd.
 
2
 * Copyright (C) 2016-2017 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
23
23
#include <QAbstractListModel>
24
24
#include <QList>
25
25
 
26
 
class MirSurface;
27
 
 
28
26
class MirSurfaceListModel : public unity::shell::application::MirSurfaceListInterface
29
27
{
30
28
    Q_OBJECT
38
36
    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
39
37
    QVariant data(const QModelIndex& index, int role) const override;
40
38
 
41
 
    void addSurface(MirSurface *surface);
42
 
    void removeSurface(MirSurface *surface);
 
39
    void addSurface(unity::shell::application::MirSurfaceInterface *surface);
 
40
    void removeSurface(unity::shell::application::MirSurfaceInterface *surface);
43
41
 
44
 
    bool contains(MirSurface *surface) const { return m_surfaceList.contains(surface); }
 
42
    bool contains(unity::shell::application::MirSurfaceInterface *surface) const { return m_surfaceList.contains(surface); }
45
43
 
46
44
private:
47
 
    void raise(MirSurface *surface);
 
45
    void raise(unity::shell::application::MirSurfaceInterface *surface);
48
46
    void moveSurface(int from, int to);
49
 
    void connectSurface(MirSurface *surface);
 
47
    void connectSurface(unity::shell::application::MirSurfaceInterface *surface);
50
48
 
51
 
    QList<MirSurface*> m_surfaceList;
 
49
    QList<unity::shell::application::MirSurfaceInterface*> m_surfaceList;
52
50
};
53
51
 
54
52
Q_DECLARE_METATYPE(MirSurfaceListModel*)