digiKam
showfotostackviewitem.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 item
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_STACK_VIEW_ITEM_H
25 #define SHOWFOTO_STACK_VIEW_ITEM_H
26 
27 // Qt includes
28 
29 #include <QString>
30 #include <QPixmap>
31 #include <QTreeWidgetItem>
32 
33 // Local includes
34 
35 #include "showfotoiteminfo.h"
36 
37 namespace ShowFoto
38 {
39 
40 class ShowfotoStackViewList;
41 
42 class ShowfotoStackViewItem : public QTreeWidgetItem
43 {
44 
45 public:
46 
47  explicit ShowfotoStackViewItem(ShowfotoStackViewList* const parent);
48  ~ShowfotoStackViewItem() override;
49 
50  void setInfo(const ShowfotoItemInfo&);
51  ShowfotoItemInfo info() const;
52 
53  void setThumbnail(const QPixmap&);
54 
55  bool operator<(const QTreeWidgetItem& other) const override;
56 
57 private:
58 
59  ShowfotoItemInfo m_info;
60 
61  Q_DISABLE_COPY(ShowfotoStackViewItem)
62 };
63 
64 } // namespace ShowFoto
65 
66 #endif // SHOWFOTO_STACK_VIEW_ITEM_H
Definition: showfotoiteminfo.h:48
Definition: showfotostackviewitem.h:43
void setInfo(const ShowfotoItemInfo &)
Definition: showfotostackviewitem.cpp:64
ShowfotoStackViewItem(ShowfotoStackViewList *const parent)
Definition: showfotostackviewitem.cpp:53
void setThumbnail(const QPixmap &)
Definition: showfotostackviewitem.cpp:98
bool operator<(const QTreeWidgetItem &other) const override
Definition: showfotostackviewitem.cpp:113
~ShowfotoStackViewItem() override
Definition: showfotostackviewitem.cpp:60
ShowfotoItemInfo info() const
Definition: showfotostackviewitem.cpp:93
Definition: showfotostackviewlist.h:46
Definition: showfotofolderviewbar.cpp:52