Marble

OsmRelationManagerWidget.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2015 Stanciu Marius-Valeriu <[email protected]>
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 
14 class QTreeWidgetItem;
15 
16 namespace Marble
17 {
18 
19 class OsmRelationManagerWidgetPrivate;
20 class GeoDataPlacemark;
21 class OsmPlacemarkData;
22 
23 enum 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  */
34 class MARBLE_EXPORT OsmRelationManagerWidget : public QWidget
35 {
36  Q_OBJECT
37 
38 public:
39  explicit OsmRelationManagerWidget( GeoDataPlacemark *placemark,
40  const QHash<qint64, OsmPlacemarkData> *relations,
41  QWidget *parent = nullptr );
42  ~OsmRelationManagerWidget() override;
43 
44 public 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 
58 Q_SIGNALS:
59  void relationCreated( const OsmPlacemarkData &relationData );
60 
61 private:
62  friend class OsmRelationManagerWidgetPrivate;
63  OsmRelationManagerWidgetPrivate* const d;
64 };
65 
66 }
67 
68 #endif
69 
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 class is used to encapsulate the osm data fields kept within a placemark's extendedData.
a class representing a point of interest on the map
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.