digiKam
Loading...
Searching...
No Matches
showfotostackviewfavoriteitemdlg.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-09-27
7 * Description : Showfoto stack view favorite item edit dialog
8 *
9 * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QString>
20#include <QDate>
21#include <QDialog>
22#include <QList>
23#include <QUrl>
24
25// Local includes
26
27#include "digikam_config.h"
28#include "ditemslist.h"
29
30using namespace Digikam;
31
32namespace ShowFoto
33{
34
35class ShowfotoStackViewFavoriteList;
36class ShowfotoStackViewFavoriteItem;
37
39{
40 Q_OBJECT
41
42public:
43
45 bool create = false);
47
48 void setName(const QString& name);
49 QString name() const;
50
52 int favoriteType() const;
53
54 void setDescription(const QString& desc);
55 QString description() const;
56
57 void setDate(const QDate& name);
58 QDate date() const;
59
60 void setIcon(const QString& icon);
61 QString icon() const;
62
63 void setUrls(const QList<QUrl>& urls);
64 QList<QUrl> urls() const;
65
66 void setCurrentUrl(const QUrl& url);
67 QUrl currentUrl() const;
68
69 void setIconSize(int size);
70 void setSortOrder(int order);
71 void setSortRole(int role);
73
74public:
75
77 QString& name,
78 int& favoriteType,
79 QString& desc,
80 QDate& date,
81 QString& icon,
82 QList<QUrl>& urls,
83 QUrl& current,
84 int iconSize,
85 int sortOrder,
86 int sortRole,
88 bool create = false);
89
90private:
91
92 QList<QDate> getItemDates() const;
93
94 static bool itemIsLessThanHandler(const QTreeWidgetItem* current,
95 const QTreeWidgetItem& other);
96
97private Q_SLOTS:
98
99 void slotIconChanged();
100 void slotIconResetClicked();
101 void slotModified();
102 void slotUpdateMetadata();
103 void slotTypeActivated();
104 void slotDateLowButtonClicked();
105 void slotDateAverageButtonClicked();
106 void slotDateHighButtonClicked();
107 void slotHelp();
108
109private:
110
111 bool canAccept() const;
112
113protected:
114
115 void showEvent(QShowEvent*) override;
116
117private:
118
119 class Private;
120 Private* const d = nullptr;
121};
122
123} // namespace ShowFoto
Definition showfotostackviewfavoriteitemdlg.h:39
QUrl currentUrl() const
Definition showfotostackviewfavoriteitemdlg.cpp:442
int favoriteType() const
Definition showfotostackviewfavoriteitemdlg.cpp:417
void showEvent(QShowEvent *) override
Definition showfotostackviewfavoriteitemdlg.cpp:793
void setSortRole(int role)
Definition showfotostackviewfavoriteitemdlg.cpp:495
void setName(const QString &name)
Definition showfotostackviewfavoriteitemdlg.cpp:447
static bool favoriteItemDialog(ShowfotoStackViewFavoriteList *const list, QString &name, int &favoriteType, QString &desc, QDate &date, QString &icon, QList< QUrl > &urls, QUrl &current, int iconSize, int sortOrder, int sortRole, ShowfotoStackViewFavoriteItem *const pitem, bool create=false)
Definition showfotostackviewfavoriteitemdlg.cpp:598
QString icon() const
Definition showfotostackviewfavoriteitemdlg.cpp:432
void setUrls(const QList< QUrl > &urls)
Definition showfotostackviewfavoriteitemdlg.cpp:474
~ShowfotoStackViewFavoriteItemDlg() override
Definition showfotostackviewfavoriteitemdlg.cpp:315
void setSortOrder(int order)
Definition showfotostackviewfavoriteitemdlg.cpp:489
void setCurrentUrl(const QUrl &url)
Definition showfotostackviewfavoriteitemdlg.cpp:479
QString description() const
Definition showfotostackviewfavoriteitemdlg.cpp:422
QList< QUrl > urls() const
Definition showfotostackviewfavoriteitemdlg.cpp:437
void setIconSize(int size)
Definition showfotostackviewfavoriteitemdlg.cpp:484
void setParentItem(ShowfotoStackViewFavoriteItem *const pitem)
Definition showfotostackviewfavoriteitemdlg.cpp:501
void setIcon(const QString &icon)
Definition showfotostackviewfavoriteitemdlg.cpp:469
void setFavoriteType(int favoriteType)
Definition showfotostackviewfavoriteitemdlg.cpp:453
QDate date() const
Definition showfotostackviewfavoriteitemdlg.cpp:427
void setDate(const QDate &name)
Definition showfotostackviewfavoriteitemdlg.cpp:464
void setDescription(const QString &desc)
Definition showfotostackviewfavoriteitemdlg.cpp:459
QString name() const
Definition showfotostackviewfavoriteitemdlg.cpp:412
Definition showfotostackviewfavoriteitem.h:31
Definition showfotostackviewfavoritelist.h:40
Definition datefolderview.cpp:34
Definition showfotofolderviewbar.cpp:43