Marble

EditPlacemarkDialog.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Calin Cruceru <crucerucalincristian@gmail.com>
4//
5
6#ifndef EDITPLACEMARKDIALOG_H
7#define EDITPLACEMARKDIALOG_H
8
9#include "marble_export.h"
10
11#include <QDialog>
12
13namespace Marble {
14
15class GeoDataFeature;
16class GeoDataPlacemark;
17class OsmPlacemarkData;
18
19/**
20 * @brief The EditPlacemarkDialog class deals with customizing placemarks.
21 */
22class MARBLE_EXPORT EditPlacemarkDialog : public QDialog
23{
24 Q_OBJECT
25
26public:
28 const QHash<qint64,OsmPlacemarkData> *relations = nullptr,
29 QWidget *parent = nullptr );
30 ~EditPlacemarkDialog() override;
31
32 /**
33 * @brief setLabelColor tells the dialog what the label color is
34 */
35 void setLabelColor( const QColor &color );
36
37 /**
38 * @brief idFilter gets filter for id of placemark
39 * @return QStringList of ids which could not be used as id.
40 */
41 QStringList idFilter() const;
42
43 /**
44 * @brief targetIds gets ids which could be target of placemark.
45 * @return QStringList of ids which could be target of placemark.
46 */
47 QStringList targetIds() const;
48
49 /**
50 * @brief isTargetIdFieldVisible tells if targetId field is shown.
51 */
52 bool isTargetIdFieldVisible() const;
53
54 /**
55 * @brief isIdFieldVisible tells if targetId field is shown.
56 */
57 bool isIdFieldVisible() const;
58
59public Q_SLOTS:
60 /**
61 * @brief updateDialogFields is connected to a signal from AnnotatePlugin in order
62 * to update some fields in the dialog as the user interacts directly with the text
63 * annotation item.
64 */
65 void updateDialogFields();
66
67 /**
68 * @brief setIdFilter sets filter for id of placemark.
69 * @param filter QStringList with ids which could not be used as id.
70 */
71 void setIdFilter( const QStringList &filter );
72
73 /**
74 * @brief setTargetIds sets ids which could be target of placemark.
75 * @param targetIds QStringList with ids which could be target of placemark.
76 */
77 void setTargetIds( const QStringList &targetIds );
78
79 /**
80 * @brief setTargetIdFieldVisible tells the dialog whether targetId field should be shown.
81 */
82 void setTargetIdFieldVisible( bool visible );
83
84 /**
85 * @brief setIdFieldVisible tells the dialog whether id field should be shown.
86 */
87 void setIdFieldVisible( bool visible );
88
89 /**
90 * @brief isReadOnly tells whether the data from input fields is protected
91 */
92 bool isReadOnly() const;
93
94 /**
95 * @brief Protecting data from input fields changes
96 */
97 void setReadOnly( bool state );
98
99private Q_SLOTS:
100
101 /**
102 * @brief checkFields shows warnings if there are important fields which don't hold
103 * accurate information.
104 */
105 void checkFields();
106
107 /**
108 * @brief updateTextAnnotation is the main slot which synchronizes the information
109 * from the dialog with the way the text annotation item is painted.
110 */
111 void updateTextAnnotation();
112
113 /**
114 * @brief updateLabelDialog The color chooser for label is represented as a push
115 * button with a filled pixmap as its icon. This slot updates the color fill of this
116 * pixmap.
117 */
118 void updateLabelDialog( const QColor &color );
119
120 /**
121 * @brief updateIconDialog The same as above, but for icons.
122 * FIXME: This is not functional ATM - we need some mechanism for customizing existing
123 * icons.
124 */
125 void updateIconDialog( const QColor &color );
126
127 /**
128 * @brief updatePlacemarkAltitude changes an actual elevation value of placemark instance
129 * according to the value/unit of elevation widget spin box representing it
130 */
131 void updatePlacemarkAltitude();
132
133 /**
134 * @brief restoreInitial restores the dialog's previous settings if the dialog closes with
135 * a zero return value.
136 */
137 void restoreInitial( int result );
138
139 /**
140 * @brief toogleDescriptionEditMode toggles edit mode for description field.
141 */
142
143Q_SIGNALS:
144 /**
145 * @brief textAnnotationUpdated signals that some property of the PlacemarkTextAnnotation
146 * instance has changed.
147 * @param feature The instance's placemark.
148 */
150
151 /**
152 * @brief relationCreated signals the annotate plugin that a new relation has been
153 * created( or modified ) within the relation editor
154 * @param relation the relation's osmData
155 */
156 void relationCreated( const OsmPlacemarkData &relation );
157
158private:
159 class Private;
160 Private * const d;
161};
162
163}
164
165#endif
The EditPlacemarkDialog class deals with customizing placemarks.
void relationCreated(const OsmPlacemarkData &relation)
relationCreated signals the annotate plugin that a new relation has been created( or modified ) withi...
void textAnnotationUpdated(GeoDataFeature *feature)
toogleDescriptionEditMode toggles edit mode for description field.
A base class for all geodata features.
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.
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.