digiKam
tageditdlg.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 : 2004-07-01
7  * Description : dialog to edit and create digiKam Tags
8  *
9  * Copyright (C) 2004-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  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_TAG_EDIT_DLG_H
26 #define DIGIKAM_TAG_EDIT_DLG_H
27 
28 // Qt includes
29 
30 #include <QMap>
31 #include <QString>
32 #include <QKeySequence>
33 #include <QDialog>
34 
35 // Local includes
36 
37 #include "albummanager.h"
38 #include "digikam_config.h"
39 
40 namespace Digikam
41 {
42 
43 class TagEditDlg : public QDialog
44 {
45  Q_OBJECT
46 
47 public:
48 
49  explicit TagEditDlg(QWidget* const parent, TAlbum* const album, bool create = false);
50  ~TagEditDlg() override;
51 
52  QString title() const;
53  QString icon() const;
54  QKeySequence shortcut() const;
55 
56  static bool tagEdit(QWidget* const parent, TAlbum* const album, QString& title, QString& icon, QKeySequence& ks);
57  static bool tagCreate(QWidget* const parent, TAlbum* const album, QString& title, QString& icon, QKeySequence& ks);
58 
67  static AlbumList createTAlbum(TAlbum* const mainRootAlbum, const QString& tagStr, const QString& icon,
68  const QKeySequence& ks, QMap<QString, QString>& errMap);
69 
70  static void showtagsListCreationError(QWidget* const parent, const QMap<QString, QString>& errMap);
71 
72 private Q_SLOTS:
73 
74  void slotIconChanged();
75  void slotIconResetClicked();
76  void slotTitleChanged(const QString& newtitle);
77  void slotHelp();
78 
79 private:
80 
81  class Private;
82  Private* const d;
83 };
84 
85 } // namespace Digikam
86 
87 #endif // DIGIKAM_TAG_EDIT_DLG_H
Definition: album.h:420
Definition: tageditdlg.h:44
static void showtagsListCreationError(QWidget *const parent, const QMap< QString, QString > &errMap)
Definition: tageditdlg.cpp:517
QString icon() const
Definition: tageditdlg.cpp:305
static AlbumList createTAlbum(TAlbum *const mainRootAlbum, const QString &tagStr, const QString &icon, const QKeySequence &ks, QMap< QString, QString > &errMap)
Definition: tageditdlg.cpp:410
QString title() const
Definition: tageditdlg.cpp:300
TagEditDlg(QWidget *const parent, TAlbum *const album, bool create=false)
Definition: tageditdlg.cpp:111
~TagEditDlg() override
Definition: tageditdlg.cpp:295
static bool tagCreate(QWidget *const parent, TAlbum *const album, QString &title, QString &icon, QKeySequence &ks)
Definition: tageditdlg.cpp:392
QKeySequence shortcut() const
Definition: tageditdlg.cpp:310
static bool tagEdit(QWidget *const parent, TAlbum *const album, QString &title, QString &icon, QKeySequence &ks)
Definition: tageditdlg.cpp:375
Definition: datefolderview.cpp:43