digiKam
showfotofolderviewbookmarkdlg.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 bookmark edit dialog
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_BOOKMARK_DLG_H
25 #define SHOWFOTO_FOLDER_VIEW_BOOKMARK_DLG_H
26 
27 // Qt includes
28 
29 #include <QString>
30 #include <QDialog>
31 
32 // Local includes
33 
34 #include "digikam_config.h"
35 
36 namespace ShowFoto
37 {
38 
39 class ShowfotoFolderViewBookmarkList;
40 
41 class ShowfotoFolderViewBookmarkDlg : public QDialog
42 {
43  Q_OBJECT
44 
45 public:
46 
48  bool create = false);
50 
51  void setTitle(const QString& title);
52  QString title() const;
53 
54  void setIcon(const QString& icon);
55  QString icon() const;
56 
57  void setPath(const QString& path);
58  QString path() const;
59 
60 public:
61 
62  static bool bookmarkDialog(ShowfotoFolderViewBookmarkList* const parent,
63  QString& title,
64  QString& icon,
65  QString& path,
66  bool create = false);
67 
68 private Q_SLOTS:
69 
70  void slotIconChanged();
71  void slotIconResetClicked();
72  void slotAccept();
73  void slotModified();
74 
75 private:
76 
77  bool canAccept() const;
78 
79 private:
80 
81  class Private;
82  Private* const d;
83 };
84 
85 } // namespace ShowFoto
86 
87 #endif // SHOWFOTO_FOLDER_VIEW_BOOKMARK_DLG_H
Definition: showfotofolderviewbookmarkdlg.h:42
void setPath(const QString &path)
Definition: showfotofolderviewbookmarkdlg.cpp:271
ShowfotoFolderViewBookmarkDlg(ShowfotoFolderViewBookmarkList *const parent, bool create=false)
Definition: showfotofolderviewbookmarkdlg.cpp:93
void setTitle(const QString &title)
Definition: showfotofolderviewbookmarkdlg.cpp:261
QString title() const
Definition: showfotofolderviewbookmarkdlg.cpp:246
~ShowfotoFolderViewBookmarkDlg() override
Definition: showfotofolderviewbookmarkdlg.cpp:212
QString path() const
Definition: showfotofolderviewbookmarkdlg.cpp:256
QString icon() const
Definition: showfotofolderviewbookmarkdlg.cpp:251
void setIcon(const QString &icon)
Definition: showfotofolderviewbookmarkdlg.cpp:266
static bool bookmarkDialog(ShowfotoFolderViewBookmarkList *const parent, QString &title, QString &icon, QString &path, bool create=false)
Definition: showfotofolderviewbookmarkdlg.cpp:304
Definition: showfotofolderviewbookmarklist.h:45
Definition: showfotofolderviewbar.cpp:52