digiKam
bracketstack.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_BRACKET_STACK_H
26 #define DIGIKAM_BRACKET_STACK_H
27 
28 // Qt includes
29 
30 #include <QTreeWidget>
31 #include <QString>
32 #include <QPixmap>
33 #include <QUrl>
34 
35 // Local includes
36 
37 #include "loadingdescription.h"
38 
39 using namespace Digikam;
40 
42 {
43 
44 class BracketStackItem : public QTreeWidgetItem
45 {
46 public:
47 
48  explicit BracketStackItem(QTreeWidget* const parent);
49  ~BracketStackItem() override = default;
50 
51  void setUrl(const QUrl& url);
52  const QUrl& url() const;
53 
54  void setOn(bool b);
55  bool isOn() const;
56 
57  void setThumbnail(const QPixmap& pix);
58  void setExposure(const QString& exp);
59 
60 private:
61 
62  bool operator< (const QTreeWidgetItem& other) const override;
63 
64 private:
65 
66  QUrl m_url;
67 
68 private:
69 
70  Q_DISABLE_COPY(BracketStackItem)
71 };
72 
73 // ---------------------------------------------------------------------
74 
75 class BracketStackList : public QTreeWidget
76 {
77  Q_OBJECT
78 
79 public:
80 
81  explicit BracketStackList(QWidget* const parent);
82  ~BracketStackList() override = default;
83 
84  void addItems(const QList<QUrl>& list);
85 
86  QList<QUrl> urls();
87  BracketStackItem* findItem(const QUrl& url);
88 
89 Q_SIGNALS:
90 
92  void signalItemClicked(const QUrl& url);
93 
94 private Q_SLOTS:
95 
96  void slotThumbnail(const LoadingDescription&, const QPixmap& pix);
97  void slotItemClicked(QTreeWidgetItem* item, int column);
98 };
99 
100 } // namespace DigikamGenericExpoBlendingPlugin
101 
102 #endif // DIGIKAM_BRACKET_STACK_H
Definition: loadingdescription.h:45
Definition: bracketstack.cpp:43
Definition: datefolderview.cpp:43
bool operator<(const WSAlbum &first, const WSAlbum &second)
Definition: wstalker.cpp:47