Marble

MapViewItemDelegate.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2004-2007 Torsten Rahn <tackat@kde.org>
4// SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
5// SPDX-FileCopyrightText: 2007 Thomas Zander <zander@kde.org>
6// SPDX-FileCopyrightText: 2010 Bastian Holst <bastianholst@gmx.de>
7// SPDX-FileCopyrightText: 2011-2013 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
8// SPDX-FileCopyrightText: 2012 Illya Kovalevskyy <illya.kovalevskyy@gmail.com>
9//
10
11#ifndef MAPVIEWITEMDELEGATE_H
12#define MAPVIEWITEMDELEGATE_H
13
14#include <QStyledItemDelegate>
15
16class QListView;
17
18namespace Marble
19{
20
21/**
22 * @brief The MapViewItemDelegate class is a delegate class for both the MapViewWidget's listView
23 * and MapChangeEditDialog's listView.
24 */
26{
28
29public:
30 explicit MapViewItemDelegate(QListView *view);
31 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
32 QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
33
34private:
35 static QString text(const QModelIndex &index);
36 QListView *m_view;
37 QIcon m_bookmarkIcon;
38};
39
40} // Namespace: Marble
41
42#endif // MAPVIEWITEMDELEGATE_H
The MapViewItemDelegate class is a delegate class for both the MapViewWidget's listView and MapChange...
Binds a QML item to a specific geodetic location in screen coordinates.
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.