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, const QHash<qint64, OsmPlacemarkData> *relations, QWidget *parent = nullptr);
41
42public Q_SLOTS:
43 /**
44 * @brief addRelation adds the placemark to the relation specified in the action->text();
45 * If the text is "New Relation", a new relation is added
46 */
47 void addRelation(QAction *action);
48 void handleItemChange(QTreeWidgetItem *item, int column);
49 void handleDoubleClick(QTreeWidgetItem *item, int column);
50 void handleRelationContextMenuRequest(const QPoint &point);
51 /**
52 * @brief update updates the relations list and the suggested relations drop menu
53 */
54 void update();
55
56Q_SIGNALS:
57 void relationCreated(const OsmPlacemarkData &relationData);
58
59private:
60 friend class OsmRelationManagerWidgetPrivate;
61 OsmRelationManagerWidgetPrivate *const d;
62};
63
64}
65
66#endif
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 Fri Nov 29 2024 11:55:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.