digiKam
datefolderview.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 : 2005-04-27
7  * Description : a folder view for date albums.
8  *
9  * Copyright (C) 2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2009-2010 by Johannes Wienke <languitar at semipol dot de>
12  * Copyright (C) 2014 by Michael G. Hansen <mike at mghansen dot de>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option)
18  * any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * ============================================================ */
26 
27 #ifndef DIGIKAM_DATE_FOLDER_VIEW_H
28 #define DIGIKAM_DATE_FOLDER_VIEW_H
29 
30 // Qt includes
31 
32 #include <QScopedPointer>
33 
34 // Local includes
35 
36 #include "dlayoutbox.h"
37 #include "albummanager.h"
38 #include "statesavingobject.h"
39 
40 namespace Digikam
41 {
42 
43 class Album;
44 class DAlbum;
45 class DateAlbumModel;
46 class ItemFilterModel;
47 
48 template <class T>
49 class AlbumPointer;
50 
51 class DateFolderView : public DVBox,
52  public StateSavingObject
53 {
54  Q_OBJECT
55 
56 public:
57 
58  explicit DateFolderView(QWidget* const parent, DateAlbumModel* const dateAlbumModel);
59  ~DateFolderView() override;
60 
61  void setItemModel(ItemFilterModel* const model);
62 
63  void setActive(const bool val);
64 
65  void gotoDate(const QDate& dt);
66 
67  void changeAlbumFromHistory(DAlbum* const album);
68 
70 
71  void doLoadState() override;
72  void doSaveState() override;
73 
74  void setConfigGroup(const KConfigGroup& group) override;
75 
76 private Q_SLOTS:
77 
78  void slotSelectionChanged(Album* selectedAlbum);
79  void slotAllAlbumsLoaded();
80 
81 private:
82 
83  class Private;
84  const QScopedPointer<Private> d;
85 };
86 
87 } // namespace Digikam
88 
89 #endif // DIGIKAM_DATE_FOLDER_VIEW_H
Definition: albumpointer.h:48
Abstract base class for all album types.
Definition: album.h:67
Definition: album.h:460
Definition: dlayoutbox.h:75
Definition: albummodel.h:145
Definition: datefolderview.h:53
void changeAlbumFromHistory(DAlbum *const album)
Definition: datefolderview.cpp:205
void doSaveState() override
Definition: datefolderview.cpp:172
void setConfigGroup(const KConfigGroup &group) override
Definition: datefolderview.cpp:161
void setItemModel(ItemFilterModel *const model)
Definition: datefolderview.cpp:92
~DateFolderView() override
Definition: datefolderview.cpp:87
DateFolderView(QWidget *const parent, DateAlbumModel *const dateAlbumModel)
Definition: datefolderview.cpp:62
AlbumPointer< DAlbum > currentAlbum() const
Definition: datefolderview.cpp:210
void gotoDate(const QDate &dt)
Definition: datefolderview.cpp:177
void setActive(const bool val)
Definition: datefolderview.cpp:97
void doLoadState() override
Definition: datefolderview.cpp:167
Definition: itemfiltermodel.h:125
Definition: statesavingobject.h:76
@ Album
Definition: coredbfields.h:58
Definition: datefolderview.cpp:43