File indexing completed on 2025-01-05 03:58:31
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2010-03-22 0007 * Description : A model for the view to display a list of items. 0008 * 0009 * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2010 by Michael G. Hansen <mike at mghansen dot de> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_GPS_ITEM_DELEGATE_H 0017 #define DIGIKAM_GPS_ITEM_DELEGATE_H 0018 0019 // Qt includes 0020 0021 #include <QItemDelegate> 0022 0023 // Local includes 0024 0025 #include "gpsitemlist.h" 0026 0027 namespace Digikam 0028 { 0029 0030 class GPSItemDelegate : public QItemDelegate 0031 { 0032 Q_OBJECT 0033 0034 public: 0035 0036 explicit GPSItemDelegate(GPSItemList* const imageList, QObject* const parent = nullptr); 0037 ~GPSItemDelegate() override; 0038 0039 void setThumbnailSize(const int size); 0040 int getThumbnailSize() const; 0041 0042 void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& sortMappedindex) const override; 0043 QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& sortMappedindex) const override; 0044 0045 private: 0046 0047 class Private; 0048 Private* const d; 0049 }; 0050 0051 } // namespace Digikam 0052 0053 #endif // DIGIKAM_GPS_ITEM_DELEGATE_H