Changeset View
Changeset View
Standalone View
Standalone View
shell/runtimesmodel.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright 2017 Aleix Pol Gonzalez <aleixpol@kde.org> | ||||
3 | | ||||
4 | This library is free software; you can redistribute it and/or | ||||
5 | modify it under the terms of the GNU Library General Public | ||||
6 | License version 2 as published by the Free Software Foundation. | ||||
7 | | ||||
8 | This library is distributed in the hope that it will be useful, | ||||
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
11 | Library General Public License for more details. | ||||
12 | | ||||
13 | You should have received a copy of the GNU Library General Public License | ||||
14 | along with this library; see the file COPYING.LIB. If not, write to | ||||
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||||
16 | Boston, MA 02110-1301, USA. | ||||
17 | */ | ||||
18 | | ||||
19 | #include "runtimecontroller.h" | ||||
20 | | ||||
21 | namespace KDevelop | ||||
22 | { | ||||
23 | | ||||
24 | class RuntimeController; | ||||
25 | | ||||
26 | class RuntimesModel : public QAbstractListModel | ||||
27 | { | ||||
28 | Q_OBJECT | ||||
29 | public: | ||||
30 | friend class KDevelop::RuntimeController; | ||||
31 | | ||||
32 | RuntimesModel(RuntimeController* controller); | ||||
33 | | ||||
34 | QVariant data(const QModelIndex & index, int role) const override; | ||||
35 | int rowCount(const QModelIndex & parent) const override; | ||||
36 | KDevelop::IRuntime* runtimeAt(int row) const; | ||||
37 | | ||||
38 | private: | ||||
39 | KDevelop::RuntimeController* const m_controller; | ||||
40 | }; | ||||
41 | | ||||
42 | } |