digiKam
gpsitemdelegate.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 : 2010-03-22
7  * Description : A model for the view to display a list of items.
8  *
9  * Copyright (C) 2010-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2010 by Michael G. Hansen <mike at mghansen dot de>
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_GPS_ITEM_DELEGATE_H
26 #define DIGIKAM_GPS_ITEM_DELEGATE_H
27 
28 // Qt includes
29 
30 #include <QItemDelegate>
31 
32 // Local includes
33 
34 #include "gpsitemlist.h"
35 
36 namespace Digikam
37 {
38 
39 class GPSItemDelegate : public QItemDelegate
40 {
41  Q_OBJECT
42 
43 public:
44 
45  explicit GPSItemDelegate(GPSItemList* const imageList, QObject* const parent = nullptr);
46  ~GPSItemDelegate() override;
47 
48  void setThumbnailSize(const int size);
49  int getThumbnailSize() const;
50 
51  void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& sortMappedindex) const override;
52  QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& sortMappedindex) const override;
53 
54 private:
55 
56  class Private;
57  Private* const d;
58 };
59 
60 } // namespace Digikam
61 
62 #endif // DIGIKAM_GPS_ITEM_DELEGATE_H
Definition: gpsitemdelegate.h:40
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &sortMappedindex) const override
Definition: gpsitemdelegate.cpp:103
~GPSItemDelegate() override
Definition: gpsitemdelegate.cpp:61
int getThumbnailSize() const
Definition: gpsitemdelegate.cpp:134
void setThumbnailSize(const int size)
Definition: gpsitemdelegate.cpp:115
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &sortMappedindex) const override
Definition: gpsitemdelegate.cpp:66
GPSItemDelegate(GPSItemList *const imageList, QObject *const parent=nullptr)
Definition: gpsitemdelegate.cpp:54
Definition: gpsitemlist.h:47
Definition: datefolderview.cpp:43