File indexing completed on 2025-01-19 03:57:44

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-03-20
0007  * Description : sub class of QStandardItem to represent the images
0008  *
0009  * SPDX-FileCopyrightText: 2010 by Michael G. Hansen <mike at mghansen dot de>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_GEO_MY_IMAGE_ITEM_H
0016 #define DIGIKAM_GEO_MY_IMAGE_ITEM_H
0017 
0018 // Qt includes
0019 
0020 #include <QTreeWidgetItem>
0021 #include <QPersistentModelIndex>
0022 #include <QUrl>
0023 
0024 // Local includes
0025 
0026 #include "geoifacetypes.h"
0027 #include "geocoordinates.h"
0028 
0029 using namespace Digikam;
0030 
0031 const int RoleMyData      = Qt::UserRole+0;
0032 const int RoleCoordinates = Qt::UserRole+1;
0033 
0034 class MyImageItem : public QTreeWidgetItem
0035 {
0036 public:
0037 
0038     MyImageItem(const QUrl& url, const GeoCoordinates& itemCoordinates);
0039     ~MyImageItem() override;
0040 
0041     QVariant data(int column, int role) const override;
0042     void setData(int column, int role, const QVariant& value) override;
0043 
0044 private:
0045 
0046     GeoCoordinates coordinates;
0047     QUrl           imageUrl;
0048 
0049 private:
0050 
0051     Q_DISABLE_COPY(MyImageItem)
0052 };
0053 
0054 #endif // DIGIKAM_GEO_MY_IMAGE_ITEM_H