digiKam
showfotofolderviewmodel.h
Go to the documentation of this file.
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  * Copyright (C) 2021-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef SHOWFOTO_FOLDER_VIEW_MODEL_H
25 #define SHOWFOTO_FOLDER_VIEW_MODEL_H
26 
27 // QT includes
28 
29 #include <QFileSystemModel>
30 #include <QStringList>
31 
32 // Local includes
33 
34 #include "loadingdescription.h"
35 
36 using namespace Digikam;
37 
38 namespace ShowFoto
39 {
40 
41 class ShowfotoFolderViewList;
42 
43 class ShowfotoFolderViewModel : public QFileSystemModel
44 {
45  Q_OBJECT
46 
47 public:
48 
49  explicit ShowfotoFolderViewModel(ShowfotoFolderViewList* const view);
50  ~ShowfotoFolderViewModel() override;
51 
52  static int maxIconSize();
53 
54  QVariant data(const QModelIndex& index, int role) const override;
55 
59  QStringList currentFilesPath() const;
60 
61 private Q_SLOTS:
62 
63  void refreshThumbnails(const LoadingDescription& desc, const QPixmap& pix);
64 
65 private:
66 
67  class Private;
68  Private* const d;
69 };
70 
71 } // namespace ShowFoto
72 
73 #endif // SHOWFOTO_FOLDER_VIEW_MODEL_H
Definition: loadingdescription.h:45
Definition: showfotofolderviewlist.h:44
Definition: showfotofolderviewmodel.h:44
Definition: datefolderview.cpp:43
Definition: showfotofolderviewbar.cpp:52