Marble

OsmRelationManagerWidget.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2015 Stanciu Marius-Valeriu <stanciumarius94@gmail.com>
4//
5
6#ifndef MARBLE_OSMRELATIONMANAGERWIDGET_H
7#define MARBLE_OSMRELATIONMANAGERWIDGET_H
8
9#include <QWidget>
10
11#include "MarbleGlobal.h"
12#include "marble_export.h"
13
14class QTreeWidgetItem;
15
16namespace Marble
17{
18
19class OsmRelationManagerWidgetPrivate;
20class GeoDataPlacemark;
21class OsmPlacemarkData;
22
23enum Column {
24 Name = 0,
25 Type = 1,
26 Role = 2
27};
28
29/**
30 * @brief The OsmRelationManagerWidget class is used to view and edit relations for any placemark
31 * within the Annotate Plugin.
32 * It can add the placemark to any relation the Annotate Plugin has loaded, or to newly created ones
33 */
34class MARBLE_EXPORT OsmRelationManagerWidget : public QWidget
35{
36 Q_OBJECT
37
38public:
39 explicit OsmRelationManagerWidget( GeoDataPlacemark *placemark,
40 const QHash<qint64, OsmPlacemarkData> *relations,
41 QWidget *parent = nullptr );
43
44public Q_SLOTS:
45 /**
46 * @brief addRelation adds the placemark to the relation specified in the action->text();
47 * If the text is "New Relation", a new relation is added
48 */
49 void addRelation( QAction* action );
50 void handleItemChange( QTreeWidgetItem *item, int column );
51 void handleDoubleClick( QTreeWidgetItem * item, int column );
52 void handleRelationContextMenuRequest( const QPoint& point );
53 /**
54 * @brief update updates the relations list and the suggested relations drop menu
55 */
56 void update();
57
58Q_SIGNALS:
59 void relationCreated( const OsmPlacemarkData &relationData );
60
61private:
62 friend class OsmRelationManagerWidgetPrivate;
63 OsmRelationManagerWidgetPrivate* const d;
64};
65
66}
67
68#endif
69
a class representing a point of interest on the map
This class is used to encapsulate the osm data fields kept within a placemark's extendedData.
The OsmRelationManagerWidget class is used to view and edit relations for any placemark within the An...
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.