Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/slidemodel.h
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2019 David Redondo <kde@david-redondo.de> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU General Public License as published by | ||||
6 | * the Free Software Foundation; either version 2 of the License, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU General Public License | ||||
15 | * along with this program; if not, write to the Free Software | ||||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||||
17 | */ | ||||
18 | | ||||
1 | #ifndef SLIDEMODEL_H | 19 | #ifndef SLIDEMODEL_H | ||
2 | #define SLIDEMODEL_H | 20 | #define SLIDEMODEL_H | ||
3 | 21 | | |||
4 | #include "backgroundlistmodel.h" | 22 | #include "backgroundlistmodel.h" | ||
5 | 23 | | |||
6 | class SlideModel : public BackgroundListModel | 24 | class SlideModel : public BackgroundListModel | ||
7 | { | 25 | { | ||
8 | Q_OBJECT | 26 | Q_OBJECT | ||
9 | public: | 27 | public: | ||
10 | using BackgroundListModel::BackgroundListModel; | 28 | using BackgroundListModel::BackgroundListModel; | ||
11 | void reload(const QStringList &selected); | 29 | void reload(const QStringList &selected); | ||
12 | void addDirs(const QStringList &selected); | 30 | void addDirs(const QStringList &selected); | ||
13 | void removeDir(const QString &selected); | 31 | void removeDir(const QString &selected); | ||
14 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | 32 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | ||
15 | QHash<int, QByteArray> roleNames() const override; | 33 | QHash<int, QByteArray> roleNames() const override; | ||
34 | | ||||
35 | Q_SIGNALS: | ||||
36 | void done(); | ||||
37 | | ||||
16 | private Q_SLOTS: | 38 | private Q_SLOTS: | ||
17 | void removeBackgrounds(const QStringList &paths, const QString &token); | 39 | void removeBackgrounds(const QStringList &paths, const QString &token); | ||
18 | void backgroundsFound(const QStringList &paths, const QString &token); | 40 | void backgroundsFound(const QStringList &paths, const QString &token); | ||
19 | }; | 41 | }; | ||
20 | 42 | | |||
21 | #endif | 43 | #endif |