digiKam
albummodificationhelper.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 : 2000-12-05
7  * Description : helper class used to modify physical albums in views
8  *
9  * Copyright (C) 2009-2011 by Johannes Wienke <languitar at semipol dot de>
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 DIGIKAM_ALBUM_MODIFICATION_HELPER_H
25 #define DIGIKAM_ALBUM_MODIFICATION_HELPER_H
26 
27 // Qt includes
28 
29 #include <QObject>
30 #include <QWidget>
31 
32 // Local includes
33 
34 #include "album.h"
35 
36 namespace Digikam
37 {
38 
45 class AlbumModificationHelper : public QObject
46 {
47  Q_OBJECT
48 
49 public:
50 
57  explicit AlbumModificationHelper(QObject* const parent, QWidget* const dialogParent);
58 
62  ~AlbumModificationHelper() override;
63 
70  void bindAlbum(QAction* const action, PAlbum* const parent) const;
71 
77  PAlbum* boundAlbum(QObject* const action) const;
78 
79 public Q_SLOTS:
80 
88  PAlbum* slotAlbumNew(PAlbum* parentAlbum);
90 
97  void slotAlbumDelete(PAlbum* album);
98  void slotAlbumDelete();
99 
105  void slotAlbumRename(PAlbum* album);
106  void slotAlbumRename();
107 
113  void slotAlbumEdit(PAlbum* album);
114  void slotAlbumEdit();
115 
116  void slotAlbumResetIcon(PAlbum* album);
117  void slotAlbumResetIcon();
118 
119 private:
120 
121  void addAlbumChildrenToList(QList<QUrl>& list, Album* const album);
122 
123 private:
124 
125  class Private;
126  Private* const d;
127 };
128 
129 } // namespace Digikam
130 
131 #endif // DIGIKAM_ALBUM_MODIFICATION_HELPER_H
Definition: albummodificationhelper.h:46
void slotAlbumDelete()
Definition: albummodificationhelper.cpp:184
AlbumModificationHelper(QObject *const parent, QWidget *const dialogParent)
Definition: albummodificationhelper.cpp:70
PAlbum * slotAlbumNew()
Definition: albummodificationhelper.cpp:99
void slotAlbumRename()
Definition: albummodificationhelper.cpp:260
~AlbumModificationHelper() override
Definition: albummodificationhelper.cpp:77
void slotAlbumResetIcon()
Definition: albummodificationhelper.cpp:395
void slotAlbumEdit()
Definition: albummodificationhelper.cpp:323
void bindAlbum(QAction *const action, PAlbum *const parent) const
Definition: albummodificationhelper.cpp:82
PAlbum * boundAlbum(QObject *const action) const
Definition: albummodificationhelper.cpp:87
Abstract base class for all album types.
Definition: album.h:67
Definition: album.h:357
Definition: datefolderview.cpp:43