Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Marble
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
Marble
Commits
20bf24f4
Commit
20bf24f4
authored
Jul 03, 2016
by
Dennis Nienhüser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide basic OSM POI information
parent
b40c96b8
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
394 additions
and
3 deletions
+394
-3
src/apps/marble-maps/PlacemarkDialog.qml
src/apps/marble-maps/PlacemarkDialog.qml
+11
-1
src/lib/marble/declarative/MarbleDeclarativePlugin.cpp
src/lib/marble/declarative/MarbleDeclarativePlugin.cpp
+1
-1
src/lib/marble/declarative/Placemark.cpp
src/lib/marble/declarative/Placemark.cpp
+368
-0
src/lib/marble/declarative/Placemark.h
src/lib/marble/declarative/Placemark.h
+14
-1
No files found.
src/apps/marble-maps/PlacemarkDialog.qml
View file @
20bf24f4
...
...
@@ -53,7 +53,7 @@ Item {
right
:
actionsLayout
.
left
margins
:
Screen
.
pixelDensity
*
2
}
height
:
nameLabel
.
height
+
(
addressLabel
.
text
==
""
?
0
:
addressLabel
.
height
)
height
:
nameLabel
.
height
+
(
descriptionLabel
.
text
==
""
?
0
:
descriptionLabel
.
height
)
+
(
addressLabel
.
text
==
""
?
0
:
addressLabel
.
height
)
Text
{
id
:
nameLabel
...
...
@@ -65,6 +65,16 @@ Item {
font.pointSize
:
20
}
Text
{
id
:
descriptionLabel
width
:
parent
.
width
text
:
placemark
===
null
?
""
:
placemark
.
description
wrapMode
:
Text
.
WordWrap
elide
:
Text
.
ElideRight
maximumLineCount
:
4
font.pointSize
:
14
}
Text
{
id
:
addressLabel
width
:
parent
.
width
...
...
src/lib/marble/declarative/MarbleDeclarativePlugin.cpp
View file @
20bf24f4
...
...
@@ -44,7 +44,7 @@ void MarbleDeclarativePlugin::registerTypes( const char *uri )
//@uri org.kde.edu.marble
qmlRegisterType
<
Coordinate
>
(
uri
,
0
,
20
,
"Coordinate"
);
qmlRegisterType
<
Placemark
>
(
uri
,
0
,
20
,
"Placemark"
);
qmlRegisterType
<
Marble
::
Placemark
>
(
uri
,
0
,
20
,
"Placemark"
);
qmlRegisterType
<
Marble
::
PositionSource
>
(
uri
,
0
,
20
,
"PositionSource"
);
qmlRegisterType
<
Marble
::
Bookmarks
>
(
uri
,
0
,
20
,
"Bookmarks"
);
qmlRegisterType
<
Marble
::
Tracking
>
(
uri
,
0
,
20
,
"Tracking"
);
...
...
src/lib/marble/declarative/Placemark.cpp
View file @
20bf24f4
This diff is collapsed.
Click to expand it.
src/lib/marble/declarative/Placemark.h
View file @
20bf24f4
...
...
@@ -14,11 +14,14 @@
#include "Coordinate.h"
#include "GeoDataPlacemark.h"
#include "GeoDataFeature.h"
#include <QObject>
#include <QAbstractListModel>
#include <QQmlComponent>
namespace
Marble
{
/**
* Wraps a GeoDataPlacemark for QML access
*/
...
...
@@ -28,6 +31,7 @@ class Placemark : public QObject
Q_PROPERTY
(
Coordinate
*
coordinate
READ
coordinate
NOTIFY
coordinateChanged
)
Q_PROPERTY
(
QString
name
WRITE
setName
READ
name
NOTIFY
nameChanged
)
Q_PROPERTY
(
QString
description
READ
description
NOTIFY
descriptionChanged
)
Q_PROPERTY
(
QString
address
READ
address
NOTIFY
addressChanged
)
public:
...
...
@@ -41,6 +45,7 @@ public:
Coordinate
*
coordinate
();
QString
name
()
const
;
QString
description
()
const
;
QString
address
()
const
;
public
Q_SLOTS
:
...
...
@@ -50,14 +55,22 @@ Q_SIGNALS:
void
coordinateChanged
();
void
nameChanged
();
void
descriptionChanged
();
void
addressChanged
();
private:
QString
categoryName
(
GeoDataFeature
::
GeoDataVisualCategory
category
)
const
;
void
addTagValue
(
const
QString
&
key
)
const
;
void
addTagDescription
(
const
QString
&
key
,
const
QString
&
value
,
const
QString
&
description
)
const
;
Marble
::
GeoDataPlacemark
m_placemark
;
Coordinate
m_coordinate
;
mutable
QString
m_address
;
// mutable to allow lazy calculation in the getter
mutable
QString
m_description
;
};
QML_DECLARE_TYPE
(
Placemark
)
}
QML_DECLARE_TYPE
(
Marble
::
Placemark
)
#endif // MARBLE_DECLARATIVE_PLACEMARK_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment