Marble

MapViewItemDelegate.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2004-2007 Torsten Rahn <[email protected]>
4 // SPDX-FileCopyrightText: 2007 Inge Wallin <[email protected]>
5 // SPDX-FileCopyrightText: 2007 Thomas Zander <[email protected]>
6 // SPDX-FileCopyrightText: 2010 Bastian Holst <[email protected]>
7 // SPDX-FileCopyrightText: 2011-2013 Bernhard Beschow <[email protected]>
8 // SPDX-FileCopyrightText: 2012 Illya Kovalevskyy <[email protected]>
9 //
10 
11 #ifndef MAPVIEWITEMDELEGATE_H
12 #define MAPVIEWITEMDELEGATE_H
13 
14 #include <QStyledItemDelegate>
15 
16 class QListView;
17 
18 namespace 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 {
27  Q_OBJECT
28 
29 public:
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 
34 private:
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
Q_OBJECTQ_OBJECT
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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Oct 3 2023 04:09:48 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.