Debian Codegraph @

core/showfoto/folderview/showfotofolderviewmodel.h

raw symbols SCIP
1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2021-08-27
7 * Description : Showfoto folder view model.
8 *
9 * SPDX-FileCopyrightText: 2021-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15 #pragma once
16
17 // QT includes
18
19 #include <QFileSystemModel>
20 #include <QStringList>
21
22 // Local includes
23
24 #include "loadingdescription.h"
25
26 using namespace Digikam;
27
28 namespace ShowFoto
29 {
30
31 class ShowfotoFolderViewList;
32
33 class ShowfotoFolderViewModel : public QFileSystemModel
34 {
35 Q_OBJECT
36
37 public:
38
39 explicit ShowfotoFolderViewModel(ShowfotoFolderViewList* const view);
40 ~ShowfotoFolderViewModel() override;
41
42 static int maxIconSize();
43
44 QVariant data(const QModelIndex& index, int role) const override;
45
46 /**
47 * List all file paths from the current model root index selected in the view.
48 */
49 QStringList currentFilesPath() const;
50
51 private Q_SLOTS:
52
53 void refreshThumbnails(const LoadingDescription& desc, const QPixmap& pix);
54
55 private:
56
57 class Private;
58 Private* const d = nullptr;
59 };
60
61 } // namespace ShowFoto