digiKam
tagsmanager.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 : 20013-07-03
7  * Description : Tag Manager main class
8  *
9  * Copyright (C) 2013 by Veaceslav Munteanu <veaceslav dot munteanu90 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 DIGIKAM_TAGS_MANAGER_H
25 #define DIGIKAM_TAGS_MANAGER_H
26 
27 // Qt includes
28 
29 #include <QPointer>
30 #include <QMainWindow>
31 
32 // Local includes
33 
34 #include "statesavingobject.h"
35 
36 namespace Digikam
37 {
38 
39 class TagModel;
40 class TAlbum;
41 
42 class TagsManager : public QMainWindow, public StateSavingObject
43 {
44  Q_OBJECT
45 
46 public:
47 
48  TagsManager();
49  ~TagsManager() override;
50 
54  void setupUi();
55 
56  static QPointer<TagsManager> internalPtr;
57  static TagsManager* instance();
58  static bool isCreated() { return !(internalPtr.isNull()); }
59 
60 Q_SIGNALS:
61 
63 
64 private Q_SLOTS:
65 
70  void slotSelectionChanged();
71 
75  void slotItemChanged();
76 
80  void slotAddAction();
81 
85  void slotDeleteAction();
86 
91  void slotResetTagIcon();
92 
96  void slotEditTagTitle();
97 
101  void slotTitleEditReady();
102 
107  void slotCreateTagAddr();
108 
113  void slotInvertSel();
114 
119  void slotWriteToImg();
120 
125  void slotReadFromImg();
126 
132  void slotWipeAll();
133 
138  void slotRemoveTagsFromImgs();
139 
143  void slotMarkNotAssignedTags();
144 
145 protected:
146 
147  void closeEvent(QCloseEvent* event) override;
148  void showEvent(QShowEvent* event) override;
149 
150  void doLoadState() override;
151  void doSaveState() override;
152 
153 private:
154 
155  // Disable
156  explicit TagsManager(QWidget*) = delete;
157 
158  void setupActions();
159 
164  void setHelpText(QAction* const action, const QString& text);
165  void enableRootTagActions(bool value);
166 
167 private:
168 
169  class Private;
170  Private* const d;
171 };
172 
173 } // namespace Digikam
174 
175 #endif // DIGIKAM_TAGS_MANAGER_H
Definition: statesavingobject.h:76
Definition: album.h:420
Definition: tagsmanager.h:43
void setupUi()
setupUi setup all gui elements for Tag Manager
Definition: tagsmanager.cpp:183
void doSaveState() override
Definition: tagsmanager.cpp:893
static bool isCreated()
Definition: tagsmanager.h:58
~TagsManager() override
Definition: tagsmanager.cpp:166
static TagsManager * instance()
Definition: tagsmanager.cpp:173
void showEvent(QShowEvent *event) override
Definition: tagsmanager.cpp:655
void signalSelectionChanged(TAlbum *album)
void doLoadState() override
Definition: tagsmanager.cpp:886
void closeEvent(QCloseEvent *event) override
Definition: tagsmanager.cpp:649
static QPointer< TagsManager > internalPtr
Definition: tagsmanager.h:56
TagsManager()
Definition: tagsmanager.cpp:139
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: datefolderview.cpp:43