Krita Source Code Documentation
Loading...
Searching...
No Matches
KisRecentDocumentsModelWrapper.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 Felipe Lema <felipelema@mortemale.org>
3 * SPDX-FileCopyrightText: 2022 Alvin Wong <alvin@alvinhc.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef KISRECENTDOCUMENTSMODELWRAPPER_H
9#define KISRECENTDOCUMENTSMODELWRAPPER_H
10
11#include <QStandardItemModel>
12
13class QString;
14class QIcon;
15
26class KisRecentDocumentsModelWrapper : public QObject
27{
28 Q_OBJECT
29public:
30 static constexpr const int ICON_SIZE_LENGTH = 200;
31
33
34private:
37
41 void setFiles(const QList<QUrl> &urls);
42
43public:
49 QStandardItemModel &model();
50
51private:
52 QStandardItemModel m_filesAndThumbnailsModel;
53
54private Q_SLOTS:
55 void slotFileIconChanged(const QUrl &url, const QIcon &icon);
56 void fileAdded(const QUrl &url);
57 void fileRemoved(const QUrl &url);
58 void listRenewed();
59
60Q_SIGNALS:
65}; // class KisRecentDocumentsModelWrapper
66
67#endif // KISRECENTDOCUMENTSMODELWRAPPER_H
void slotFileIconChanged(const QUrl &url, const QIcon &icon)
static KisRecentDocumentsModelWrapper * instance()