digiKam
enfusestack.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 : 2009-12-13
7  * Description : a tool to blend bracketed images.
8  *
9  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2015 by Benjamin Girault <benjamin dot girault 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_ENFUSE_STACK_H
26 #define DIGIKAM_ENFUSE_STACK_H
27 
28 // Qt includes
29 
30 #include <QTreeWidget>
31 #include <QString>
32 #include <QPixmap>
33 #include <QPoint>
34 #include <QList>
35 #include <QIcon>
36 
37 // Local includes
38 
39 #include "enfusesettings.h"
40 
42 {
43 
44 class EnfuseStackItem : public QTreeWidgetItem
45 {
46 public:
47 
48  explicit EnfuseStackItem(QTreeWidget* const parent);
49  ~EnfuseStackItem() override;
50 
54  const QUrl& url() const;
55 
56  void setEnfuseSettings(const EnfuseSettings& settings);
58 
59  void setOn(bool b);
60  bool isOn() const;
61 
62  void setProgressAnimation(const QPixmap& pix);
63  void setThumbnail(const QPixmap& pix);
64  void setProcessedIcon(const QIcon& icon);
65  bool asValidThumb() const;
66 
67 private:
68 
69  class Private;
70  Private* const d;
71 
72 private:
73 
74  Q_DISABLE_COPY(EnfuseStackItem)
75 };
76 
77 // ---------------------------------------------------------------------
78 
79 class EnfuseStackList : public QTreeWidget
80 {
81  Q_OBJECT
82 
83 public:
84 
85  explicit EnfuseStackList(QWidget* const parent);
86  ~EnfuseStackList() override;
87 
89 
90  void setThumbnail(const QUrl& url, const QImage& img);
91  void setOnItem(const QUrl& url, bool on);
92  void removeItem(const QUrl& url);
93  void clearSelected();
94  void addItem(const QUrl& url, const EnfuseSettings& settings);
95  void processingItem(const QUrl& url, bool run);
96  void processedItem(const QUrl& url, bool success);
97 
99 
100 Q_SIGNALS:
101 
102  void signalItemClicked(const QUrl&);
103 
104 private:
105 
106  EnfuseStackItem* findItemByUrl(const QUrl& url);
107 
108 private Q_SLOTS:
109 
110  void slotItemClicked(QTreeWidgetItem*);
111  void slotContextMenu(const QPoint&);
112  void slotRemoveItem();
113  void slotProgressTimerDone();
114 
115 private:
116 
117  class Private;
118  Private* const d;
119 };
120 
121 } // namespace DigikamGenericExpoBlendingPlugin
122 
123 #endif // DIGIKAM_ENFUSE_STACK_H
~EnfuseStackItem() override
Definition: enfusestack.cpp:76
void setProgressAnimation(const QPixmap &pix)
Definition: enfusestack.cpp:100
EnfuseSettings enfuseSettings() const
Definition: enfusestack.cpp:90
EnfuseStackItem(QTreeWidget *const parent)
Definition: enfusestack.cpp:66
const QUrl & url() const
Definition: enfusestack.cpp:95
void setThumbnail(const QPixmap &pix)
Definition: enfusestack.cpp:111
bool asValidThumb() const
Definition: enfusestack.cpp:129
bool isOn() const
Definition: enfusestack.cpp:134
void setProcessedIcon(const QIcon &icon)
Definition: enfusestack.cpp:123
void setEnfuseSettings(const EnfuseSettings &settings)
Definition: enfusestack.cpp:81
void setOn(bool b)
Definition: enfusestack.cpp:139
void setThumbnail(const QUrl &url, const QImage &img)
Definition: enfusestack.cpp:325
~EnfuseStackList() override
Definition: enfusestack.cpp:204
EnfuseStackList(QWidget *const parent)
Definition: enfusestack.cpp:169
void setTemplateFileName(DSaveSettingsWidget::OutputFormat, const QString &)
Definition: enfusestack.cpp:413
void addItem(const QUrl &url, const EnfuseSettings &settings)
Definition: enfusestack.cpp:300
void removeItem(const QUrl &url)
Definition: enfusestack.cpp:294
QList< EnfuseSettings > settingsList()
Definition: enfusestack.cpp:241
void setOnItem(const QUrl &url, bool on)
Definition: enfusestack.cpp:284
void clearSelected()
Definition: enfusestack.cpp:261
void processedItem(const QUrl &url, bool success)
Definition: enfusestack.cpp:402
void processingItem(const QUrl &url, bool run)
Definition: enfusestack.cpp:382
OutputFormat
Definition: dsavesettingswidget.h:47
Definition: piwigotalker.h:48
Definition: bracketstack.cpp:43