diff --git a/examples/cpp/marbleQuick2/main.cpp b/examples/cpp/marbleQuick2/main.cpp index 47be5a933..3fbaf2d89 100644 --- a/examples/cpp/marbleQuick2/main.cpp +++ b/examples/cpp/marbleQuick2/main.cpp @@ -1,98 +1,98 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2014 Adam Dabrowski // #include #include #include #include #include using namespace Marble; class MarbleDemoItem : public MarbleQuickItem { Q_OBJECT public: MarbleDemoItem(QQuickItem *parent = 0) : MarbleQuickItem(parent) { // nothing to do } void componentComplete() { QQuickItem *pinch = findChild("pinchArea"); if (pinch) { pinch->installEventFilter(getEventFilter()); } } public Q_SLOTS: void handlePinchStart(QPointF center) { makePinch(center, Qt::GestureStarted); } void handlePinchUpdate(QPointF center, qreal scale) { makePinch(center, Qt::GestureUpdated, scale); } void handlePinchEnd(QPointF center, bool canceled) { makePinch(center, canceled ? Qt::GestureCanceled : Qt::GestureFinished); } private: void makePinch(QPointF center, Qt::GestureState state, qreal scale = 1) { scale = sqrt(sqrt(scale)); scale = qBound(static_cast(0.5), scale, static_cast(2.0)); pinch(center, scale, state); } }; class MapTestWrap : public QQuickView { public: void start() { MarbleDeclarativePlugin plugin; - plugin.registerTypes("org.kde.edu.marble"); + plugin.registerTypes("org.kde.marble"); setSource(QUrl("qrc:/main.qml")); if(status()!=QQuickView::Ready) qDebug("can't initialise view"); QSurfaceFormat format; format.setAlphaBufferSize(8); setFormat(format); setClearBeforeRendering(true); setColor(QColor(Qt::transparent)); setTitle("Marble in QML 2.0 demo"); show(); } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); MapTestWrap test; test.start(); return app.exec(); } #include "main.moc" diff --git a/examples/cpp/marbleQuick2/main.qml b/examples/cpp/marbleQuick2/main.qml index 32ddacdb5..86a4f2018 100644 --- a/examples/cpp/marbleQuick2/main.qml +++ b/examples/cpp/marbleQuick2/main.qml @@ -1,39 +1,39 @@ import QtQuick 2.0 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Rectangle { id: mainRect width: 600 height: 600 color: "transparent" MarbleItem { anchors.fill: parent id: marble visible: true focus: true PinchArea { anchors.fill: parent enabled: true objectName: "pinchArea" onPinchStarted: { marble.handlePinchStart(pinch.center) } onPinchUpdated: { marble.handlePinchUpdate(pinch.center, pinch.scale) } onPinchFinished:{ marble.handlePinchEnd(pinch.center, false) } } width: 600 height: 600 showFrameRate: false projection: MarbleItem.Spherical mapThemeId: "earth/openstreetmap/openstreetmap.dgml" showAtmosphere: false showCompass: false showClouds: false showCrosshairs: false showGrid: false showOverviewMap: false showOtherPlaces: false showScaleBar: false showBackground: false } } diff --git a/examples/qml/cloud-sync/cloudsync.qml b/examples/qml/cloud-sync/cloudsync.qml index 322aa6241..8c78a0e6a 100644 --- a/examples/qml/cloud-sync/cloudsync.qml +++ b/examples/qml/cloud-sync/cloudsync.qml @@ -1,166 +1,166 @@ // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2013 Dennis Nienhüser import QtQuick 1.0 -import org.kde.edu.marble 0.11 +import org.kde.marble 0.20 Rectangle { id: screen width: 1024; height: 768 MarbleWidget { id: map anchors.top: parent.top anchors.right: parent.right anchors.bottom: parent.bottom anchors.left: routeView.right mapThemeId: "earth/openstreetmap/openstreetmap.dgml" activeFloatItems: [ "compass", "scalebar", "progress" ] } CloudSync { id: cloudSync map: map } Column { id: credentialsColumn anchors.top: parent.top anchors.left: parent.left anchors.margins: 10 width: routeView.width spacing: 10 InputField { label: "Server:" text: "myowncloudserver.com" onAccepted: cloudSync.owncloudServer = text } InputField { label: "User:" text: "myuser" onAccepted: cloudSync.owncloudUsername = text } InputField { label: "Password:" text: "mypassword" onAccepted: cloudSync.owncloudPassword = text echoMode: TextInput.Password } } ListView { id: routeView anchors.top: credentialsColumn.bottom anchors.topMargin: 5 anchors.left: parent.left anchors.bottom: parent.bottom width: 400 clip: true model: cloudSync.routeModel delegate: routeViewDelegate spacing: 5 } Component { id: routeViewDelegate Rectangle { width: routeView.width height: Math.max( previewImage.height, nameText.height+buttonRow.height ) Image { id: previewImage source: previewUrl width: 128; height: 128 anchors.left: parent.left } Text { id: nameText text: name anchors.left: previewImage.right anchors.leftMargin: 5 anchors.right: parent.right wrapMode: Text.WrapAtWordBoundaryOrAnywhere } Row { id: buttonRow anchors.top: nameText.bottom anchors.left: nameText.left anchors.leftMargin: 5 spacing: 5 Button { id: downloadArea visible: !isCached && isOnCloud label: "Download" color: "green" onClicked: { cloudSync.downloadRoute( identifier ) } } Button { id: deleteFromCloudArea visible: !isCached label: "Delete from cloud" color: "red" onClicked: { cloudSync.deleteRouteFromCloud( identifier ) } } Button { id: openArea visible: isCached label: "Open" color: "blue" onClicked: { cloudSync.openRoute( identifier ) } } Button { id: removeFromCacheArea visible: isCached label: "Remove from device" color: "yellow" onClicked: { cloudSync.removeRouteFromDevice( identifier ) } } Button { id: uploadArea visible: isCached && !isOnCloud label: "Upload" color: "grey" onClicked: { cloudSync.uploadRoute( identifier ) } } } } } } diff --git a/examples/qml/data-layers/DynamicLayer.qml b/examples/qml/data-layers/DynamicLayer.qml index bc3dffd77..00b1adaef 100644 --- a/examples/qml/data-layers/DynamicLayer.qml +++ b/examples/qml/data-layers/DynamicLayer.qml @@ -1,70 +1,70 @@ // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Dennis Nienhüser import QtQuick 1.1 -import org.kde.edu.marble 0.11 +import org.kde.marble 0.20 MarbleWidget { width: 800; height: 600 center: Coordinate { longitude: 142.2; latitude: 11.35 } dataLayers: [ DataLayer{ id: layer // The model defines the data that will appear. The lon and lat // property of its items define their position // See EarthquakesModel.qml for details model: EarthquakesModel { id: earthquakes } // The delegate is the component that shows the items from the // model on top of the map. Their position and visibility is managed // automatically by Marble delegate: Rectangle { width: magnitude * 10; height: width radius: width / 2; color: magnitude < 5.0 ? "green" : ( magnitude < 6.0 ? "orange" : "red" ) opacity: 0.67 Text { anchors.centerIn: parent font.bold: true text: magnitude } } // Marble informs us with this signal that new data is needed for the given // bounding box (north, south, east, west, each in degree). We retrieve new // data from our model (which calls geonames.org) in that case onDataRequest: { earthquakes.north = north earthquakes.south = south earthquakes.east = east earthquakes.west = west earthquakes.update() } } ] /** @todo FIXME: Currently we update our model here, but ideally Marble * detects the arrival of new data by itself in the future and this won't be * needed anymore then. */ Connections { target: earthquakes onStatusChanged: { if ( earthquakes.status == XmlListModel.Ready ) { layer.model = earthquakes } } } } diff --git a/examples/qml/data-layers/StaticLayer.qml b/examples/qml/data-layers/StaticLayer.qml index 7ae5bcc68..2c5666f5e 100644 --- a/examples/qml/data-layers/StaticLayer.qml +++ b/examples/qml/data-layers/StaticLayer.qml @@ -1,54 +1,54 @@ // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Dennis Nienhüser import QtQuick 1.1 -import org.kde.edu.marble 0.11 +import org.kde.marble 0.20 MarbleWidget { width: 800; height: 600 center: Coordinate { longitude: 30; latitude: 33 } dataLayers: [ DataLayer{ // The model defines the data that will appear. The lon and lat // property of its items define their position // See SevenWondersOfTheAncientWorld.qml for details model: SevenWondersOfTheAncientWorldModel {} // The delegate is the component that shows the items from the // model on top of the map. Their position and visibility is managed // automatically by Marble delegate: Rectangle { width: 100; height: image.height + label.height + 12 border.color: "darkgray"; border.width: 2 radius: 4; smooth: true Column { id: column; x: 4; y: 4; spacing: 4 Image { id: image width: 92; smooth: true fillMode: Image.PreserveAspectFit // "picture" is a property defined by items in the model source: picture } Text { id: label // "name" is a property defined by items in the model text: name width: 92 wrapMode: Text.Wrap font.bold: true } } } } ] } diff --git a/examples/qml/explore/explore.qml b/examples/qml/explore/explore.qml index d82c2ffcb..0ea6be04c 100644 --- a/examples/qml/explore/explore.qml +++ b/examples/qml/explore/explore.qml @@ -1,190 +1,190 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // import Qt 4.7 -import org.kde.edu.marble 0.11 +import org.kde.marble 0.20 Rectangle { id: screen width: 600; height: 450 SystemPalette { id: activePalette } Flipable { id: flipable width: screen.width height: screen.height scale: 1 z: 0 transformOrigin: "Center" rotation: 0 property int angle: 0 property bool flipped: false MapThemeManager { id: themes } MarbleSettings { id: settings } front: MarbleWidget { id: map width: flipable.width height: flipable.height mapThemeId: settings.mapTheme activeFloatItems: [ "compass", "scalebar", "progress" ] FloatButton { id: configure image: "configure.svg" x: flipable.width - width - 10 y: flipable.height - height - 10; onClicked: flipable.flipped = !flipable.flipped } FloatButton { id: zoom_in anchors.bottom: configure.top image: "zoom-in.svg" x: flipable.width - width - 10 onClicked: map.zoomIn() } FloatButton { id: zoom_out anchors.bottom: zoom_in.top image: "zoom-out.svg" x: flipable.width - width - 10 onClicked: map.zoomOut() } Component.onCompleted: { map.center.longitude = settings.quitLongitude map.center.latitude = settings.quitLatitude map.radius = settings.quitRadius } } back: Rectangle { x: 0; y:0 width: screen.width; height: screen.height; color: "black" Component { id: delegate Item { id: wrapper width: 128+10; height: 128+25 Column { x: 5; y: 10 Image { id: mapimaged width: 128; height: 128; source: "image://maptheme/" + model.modelData.id } Text { width: parent.width anchors.left: model.modelData.name.right text: model.modelData.name; font.pointSize: 8 horizontalAlignment: "AlignHCenter" color: "white" } } } } // Define a highlight component. Just one of these will be instantiated // by each ListView and placed behind the current item. Component { id: highlight Rectangle { color: "lightsteelblue" radius: 5 } } // The actual list GridView { id: mapListView width: parent.width; height: parent.height - flipback.height - 30 cellWidth: 130; cellHeight: 150 model: themes.mapThemes() delegate: delegate highlight: highlight focus: true clip: true //orientation: "Horizontal" MouseArea { id: maplistarea anchors.fill: parent onClicked: { var x = maplistarea.mouseX + mapListView.contentX var y = maplistarea.mouseY + mapListView.contentY mapListView.currentIndex = mapListView.indexAt( x, y ) } } Rectangle { opacity: 0.5; anchors.top: mapListView.bottom; height: 6 x: mapListView.visibleArea.xPosition * mapListView.width width: mapListView.visibleArea.widthRatio * mapListView.width color: "black" } } FloatButton { id: flipback image: "flipback.svg" x: 10 y: flipable.height - height - 10; onClicked: { // First go back, then apply changes flipable.flipped = !flipable.flipped map.mapThemeId = themes.mapThemes()[mapListView.currentIndex].id } } } transform: Rotation { origin.x: flipable.width/2 origin.y: flipable.height/2 axis.x: 1; axis.y:0; axis.z: 0 // rotate around y-axis angle: flipable.angle } states: State { name: "back" PropertyChanges { target: flipable; angle: 180 } when: flipable.flipped } transitions: Transition { NumberAnimation { properties: "angle"; duration: 400 } } } } diff --git a/examples/qml/google-search/google-search.qml b/examples/qml/google-search/google-search.qml index 16ad2e89e..75764cf2d 100644 --- a/examples/qml/google-search/google-search.qml +++ b/examples/qml/google-search/google-search.qml @@ -1,162 +1,162 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // import Qt 4.7 -import org.kde.edu.marble 0.11 +import org.kde.marble 0.20 Rectangle { width: 700 height: 700 SystemPalette { id: activePalette } Image { x: 113 y: 0 source: "marble.png" anchors.horizontalCenter: parent.horizontalCenter } Rectangle { id: searchinput x: 38 y: 117 width: 565 height: 49 border.color: "black" border.width: 1 anchors.horizontalCenter: parent.horizontalCenter TextInput { anchors.fill: parent anchors.margins: 10 id: searchterm text: "" font.pointSize: 18 focus: true } } Item { id: buttonlayouter anchors.top: searchinput.bottom anchors.horizontalCenter: parent.horizontalCenter anchors.margins: 10 height: button1.height Button { id: button1 anchors.right: buttonlayouter.horizontalCenter anchors.margins: 10 width: 126 height: 25 label: "Marble Search" onClicked: { map.search.find( searchterm.text ) } } Button { id: button2 anchors.left: buttonlayouter.horizontalCenter anchors.margins: 10 width: 140 height: 25 label: "I'm Feeling Lucky" } } Item { id: mapcontainer width: 600 height: 400 anchors.horizontalCenter: buttonlayouter.horizontalCenter anchors.top: buttonlayouter.bottom anchors.margins: 30 clip: true MarbleWidget { id: map width: 600 height: 400 activeRenderPlugins: [ "navigation", "scalebar" ] property Search search: Search { map: map placemarkDelegate: myDelegate } } Component { id: myDelegate Image { source: "marker.svg" fillMode: Image.PreserveAspectFit width: 64; height: 64 property bool showDetails: false Text { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom width: parent.width height: parent.height wrapMode: Text.WrapAtWordBoundaryOrAnywhere color: "white" text: index+1 horizontalAlignment: Text.AlignHCenter } Rectangle { anchors.left: parent.right id: itemdetails scale: 0.75 width: 140 height: 60 color: "yellow" radius: 10 border.width: 1 border.color: "gray" z: 42 visible: parent.showDetails Text { id: itemdetailtext x: 10 y: 5 width: parent.width - 20 height: parent.height - 10 text: display wrapMode: "WrapAtWordBoundaryOrAnywhere" clip: true } states: State { name: "back" PropertyChanges { target: itemdetails; scale: 1 } when: itemdetailtext.visible } transitions: Transition { NumberAnimation { properties: "scale"; duration: 100 } } } MouseArea { anchors.fill: parent onClicked: showDetails = !showDetails } } } } } diff --git a/examples/qml/position-tracking/position-tracking.qml b/examples/qml/position-tracking/position-tracking.qml index 81541e39e..9dfc6efd2 100644 --- a/examples/qml/position-tracking/position-tracking.qml +++ b/examples/qml/position-tracking/position-tracking.qml @@ -1,125 +1,125 @@ // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Dennis Nienhüser // A (gps) tracking example. Shows the current (gps) position on the map // using a small ghost image. The visibility of the track can be toggled. import Qt 4.7 -import org.kde.edu.marble 0.11 +import org.kde.marble 0.20 Rectangle { id: screen width: 640; height: 480 // Delivers the current (gps) position PositionSource { id: gpsd // Can optionally be used to select a specific position provider // plugin of marble. Per default the first one is used. // The value is the nameId() of an installed Marble PositionProviderPlugin, // e.g. Gpsd //source: "Gpsd" // This starts/stops gps tracking active: false // A small grow/shrink animation of the ghost to indicate position updates onPositionChanged: { growAnimation.running = true if ( map.autoCenter ) { map.center = gpsd.position } } } // The map widget MarbleWidget { id: map anchors.fill: parent property bool autoCenter: false mapThemeId: "earth/openstreetmap/openstreetmap.dgml" activeFloatItems: [ "compass", "scalebar", "progress" ] // The grouped property tracking provides access to tracking related // properties property Tracking tracking: Tracking { // We connect the position source from above with the map positionSource: gpsd map: map // Don't show the default Marble position indicator (arrow) positionMarkerType: Tracking.Circle // Initially we don't show the track showTrack: false // We have our own position marker, the image of a ghost. // Marble will take care of positioning it correctly. It will // be hidden when there is no current position or it is not // visible on the screen positionMarker: marker } Row { x: 10; y: 10 spacing: 10 Toggle { id: toggleGps width: 140 text: gpsd.active ? "(" + Math.round( 100000 * gpsd.position.longitude ) / 100000 + ", " + Math.round( 100000 * gpsd.position.latitude ) / 100000 + ")" : "GPS off" onToggled: gpsd.active = !gpsd.active } Toggle { id: toggleTrack text: "Show Track" onToggled: map.tracking.showTrack = !map.tracking.showTrack } Toggle { id: toggleCenter text: "Auto Center" onToggled: map.autoCenter = !map.autoCenter } } } // A small ghost indicates the current position Image { id: marker width: 60 fillMode: Image.PreserveAspectFit smooth: true source: "ghost.svg" visible: false PropertyAnimation on x { duration: 300; easing.type: Easing.OutBounce } PropertyAnimation on y { duration: 300; easing.type: Easing.OutBounce } SequentialAnimation { id: growAnimation PropertyAnimation { target: marker properties: "scale" to: 1.2 duration: 150 } PropertyAnimation { target: marker properties: "scale" to: 1.0 duration: 150 } } } } diff --git a/examples/qml/where-is-that/where-is-that.qml b/examples/qml/where-is-that/where-is-that.qml index 353158b9c..8f7c211fd 100644 --- a/examples/qml/where-is-that/where-is-that.qml +++ b/examples/qml/where-is-that/where-is-that.qml @@ -1,306 +1,306 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // import Qt 4.7 -import org.kde.edu.marble 0.11 +import org.kde.marble 0.20 Rectangle { id: screen width: 800; height: 400 Rectangle { id: banner x: 0 y: 0 width: screen.width height: 30 color: "yellow" // XmlListModel { // id: questionModel // source: "questions.xml" // query: "/items/item" // XmlRole { name: "question"; query: "question/string()" } // XmlRole { name: "lon"; query: "lon/string()" } // XmlRole { name: "lat"; query: "lat/string()" } // } // @todo: XmlListModel would be nicer, but does not yet allow data access for non-views ListModel { id: questionModel ListElement { question: "Tom Sawyer paints aunt Polly's fence. Where was that?" lon: -91.3775 lat: 39.704167 } ListElement { question: "Jonathan Harker meets Count Dracula. Where?" lon: 25.370894 lat: 45.517444 } ListElement { question: "Henry Jekyll becomes Edward Hyde in...?" lon: -0.11832 lat: 51.50939 } ListElement { question: "Where did Quasimodo ring the bells?" lon: 2.35 lat: 48.852778 } } Component { id: questionDelegate Row { Text { id: questionItem text: question font { pointSize: 12; bold: true } color: "#606060" } } } ListView { id: questionView x: 10 y: 5 width: banner.width - button.width - 30 height: 20 visible: false clip: true model: questionModel delegate: questionDelegate } FloatButton { id: button y: 2 anchors.left: questionView.right font { pointSize: 12; bold: true } color: "#606060" label: "Start" onClicked: { if ( screen.state == "moving" ) { screen.state = "solving" } else if ( screen.state == "solving" ) { if ( questionView.currentIndex < questionView.count - 1 ) { questionView.visible = true questionView.currentIndex = questionView.currentIndex + 1 screen.state = "selecting" messages.text = "Select the target in the map" } else { screen.state = "finished" messages.text = "" } } else if ( screen.state == "finished" ) { questionView.currentIndex = 0 screen.state = "selecting" } else { screen.state = "selecting" } } } } MouseArea { id: area anchors.top: banner.bottom width: screen.width height: screen.height - banner.height onClicked: { if ( screen.state == "selecting" || screen.state == "moving" ) { screen.state = "selecting" var opx = pointer.x var opy = pointer.y pointer.x = area.mouseX pointer.y = area.mouseY selection.x = pointer.x; selection.y = pointer.y - selection.height screen.state = "moving" messages.text = "Done? Click 'Solve'" var diff = (pointer.x-opx) * (pointer.x-opx); diff += (pointer.y-opy) * (pointer.y-opy); if ( diff > 2000 ) { animation.duration = 500 animation.start() } else { animation.duration = 100 } } } MarbleWidget { id: map width: area.width height: area.height projection: "Mercator" mapThemeId: "earth/plain/plain.dgml" } Image { id: selection x: 200 y: 200 source: "fixing-pin.svg" visible: false } Rectangle { id: pointer x: 200 y: 200 width: 1 height: 1 visible: false } PropertyAnimation { id: solutionanimation target: solution property: "scale" from: .01; to: 1 duration: 1500 } Image { id: solution x: 200 y: 200 visible: false source: "target.svg" } Rectangle { x: 5 y: parent.height - 40 width: 300 height: 30 radius: 5 color: "yellow" Text { id: messages x: 10 y: 5 width: 280 text: "Where is that?" font { pointSize: 12; bold: true } color: "#606060" visible: true } } } PropertyAnimation { id: animation target: selection property: "scale" from: .1; to: 1 duration: 500 } function calculateSolution() { var lon = questionModel.get(questionView.currentIndex).lon var lat = questionModel.get(questionView.currentIndex).lat var pixel = map.pixel( lon, lat ) solution.x = pixel.x solution.y = pixel.y - solution.height } function solve() { var flon = questionModel.get(questionView.currentIndex).lon var flat = questionModel.get(questionView.currentIndex).lat var coordinate = map.coordinate( pointer.x, pointer.y ) var dist = coordinate.distance( flon, flat ) / 1000 messages.text = "Target distance: " + dist.toFixed(1) + " km" } states: [ State { name: "selecting" PropertyChanges { target: questionView; visible: true } PropertyChanges { target: button; label: "Solve" } PropertyChanges { target: button; visible: false } PropertyChanges { target: solution; visible: false } PropertyChanges { target: map; inputEnabled: false } PropertyChanges { target: selection; visible: false } StateChangeScript{ script: calculateSolution(); } }, State { name: "moving" PropertyChanges { target: questionView; visible: true } PropertyChanges { target: button; label: "Solve" } PropertyChanges { target: button; visible: true } PropertyChanges { target: solution; visible: false } PropertyChanges { target: map; inputEnabled: false } PropertyChanges { target: selection; visible: true; } }, State { name: "solving" PropertyChanges { target: questionView; visible: true } PropertyChanges { target: button; label: "Next" } PropertyChanges { target: button; visible: true } PropertyChanges { target: solution; visible: true } PropertyChanges { target: map; inputEnabled: false } PropertyChanges { target: selection; visible: true } StateChangeScript{ script: solutionanimation.start(); } StateChangeScript{ script: solve(); } }, State { name: "finished" PropertyChanges { target: questionView; visible: true } PropertyChanges { target: button; label: "Try Again" } PropertyChanges { target: button; visible: true } PropertyChanges { target: solution; visible: false } PropertyChanges { target: messages; text: "" } PropertyChanges { target: map; inputEnabled: true } PropertyChanges { target: selection; visible: false } } ] transitions: [ Transition { id: movetransition from: "selecting" to: "moving" reversible: true NumberAnimation { target: selection properties: "x,y" duration: animation.duration } } ] } diff --git a/src/apps/behaim/MainScreen.qml b/src/apps/behaim/MainScreen.qml index c27f80673..3c7472c0f 100644 --- a/src/apps/behaim/MainScreen.qml +++ b/src/apps/behaim/MainScreen.qml @@ -1,141 +1,141 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Dennis Nienhüser // import QtQuick 2.3 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 import QtQuick.Layouts 1.1 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 ApplicationWindow { id: root title: qsTr("Behaim Globe") visible: true width: 600 height: 400 property bool landscape: root.width > root.height SystemPalette { id: palette colorGroup: SystemPalette.Active } Rectangle { id: background anchors.fill: parent color: palette.window } Grid { id: mainLayout columns: root.landscape ? 2 : 1 columnSpacing: 0 rows: root.landscape ? 1 : 2 rowSpacing: 0 layoutDirection: root.landscape ? Qt.RightToLeft : Qt.LeftToRight Item { id: mapItem width: root.landscape ? root.width - infoItem.width : root.width height: root.landscape ? root.height : root.height - infoItem.height Rectangle { color: "black" anchors.fill: parent } PinchArea { anchors.fill: parent enabled: true onPinchStarted: marbleMaps.handlePinchStarted(pinch.center) onPinchFinished: marbleMaps.handlePinchFinished(pinch.center) onPinchUpdated: marbleMaps.handlePinchUpdated(pinch.center, pinch.scale); MarbleItem { id: marbleMaps anchors.fill: parent focus: true zoom: 1150 inertialGlobeRotation: true // Theme settings. projection: MarbleItem.Spherical mapThemeId: "earth/behaim1492/behaim1492.dgml" // Visibility of layers/plugins. showFrameRate: false showAtmosphere: true showCompass: false showClouds: false showCrosshairs: false showGrid: false showOverviewMap: false showOtherPlaces: false showScaleBar: false showBackground: true showPositionMarker: false Component.onCompleted: { setPluginSetting("stars", "renderConstellationLines", "false"); setPluginSetting("stars", "renderConstellationLabels", "false"); setPluginSetting("stars", "renderDsoLabels", "false"); setPluginSetting("stars", "viewSolarSystemLabel", "false"); setPluginSetting("stars", "zoomSunMoon", "false"); setPluginSetting("stars", "renderEcliptic", "false"); setPluginSetting("stars", "renderCelestialEquator", "false"); setPluginSetting("stars", "renderCelestialPole", "false"); } } Button { id: minimizeLandscapeButton visible: root.landscape anchors.left: marbleMaps.left anchors.top: marbleMaps.top anchors.leftMargin: Screen.pixelDensity * (infoItem.minimized ? 0.5 : 1.5) anchors.topMargin: Screen.pixelDensity * 0.5 iconSource: "menu.png" onClicked: infoItem.minimized = !infoItem.minimized } Button { id: minimizePortraitButton visible: !root.landscape anchors.right: marbleMaps.right anchors.bottom: marbleMaps.bottom anchors.rightMargin: Screen.pixelDensity * 0.5 anchors.bottomMargin: Screen.pixelDensity * (infoItem.minimized ? 0.5 : 1.5) iconSource: "menu.png" onClicked: infoItem.minimized = !infoItem.minimized } } } Item { id: infoItem property bool minimized: false width: root.landscape ? (minimized ? 0 : root.width / 2.5) : root.width height: root.landscape ? root.height : (minimized ? 0 : root.height / 2.5) Legend { id: legend anchors.fill: parent visible: !infoItem.minimized } } } } diff --git a/src/apps/behaim/main.cpp b/src/apps/behaim/main.cpp index c3a6c2578..9286583f7 100644 --- a/src/apps/behaim/main.cpp +++ b/src/apps/behaim/main.cpp @@ -1,37 +1,37 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Dennis Nienhüser // #include #include #include #include "declarative/MarbleDeclarativePlugin.h" #include using namespace Marble; int main(int argc, char ** argv) { QApplication app(argc, argv); #ifdef Q_OS_ANDROID MarbleGlobal::Profiles profiles = MarbleGlobal::SmallScreen | MarbleGlobal::HighResolution; MarbleGlobal::getInstance()->setProfiles( profiles ); #endif MarbleDeclarativePlugin declarativePlugin; - const char uri[] = "org.kde.edu.marble"; + const char uri[] = "org.kde.marble"; declarativePlugin.registerTypes(uri); QQmlApplicationEngine engine; engine.load(QUrl("qrc:/MainScreen.qml")); return app.exec(); } diff --git a/src/apps/marble-maps/DeveloperDialog.qml b/src/apps/marble-maps/DeveloperDialog.qml index e83057dc5..6bd35cdc8 100644 --- a/src/apps/marble-maps/DeveloperDialog.qml +++ b/src/apps/marble-maps/DeveloperDialog.qml @@ -1,90 +1,90 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Dennis Nienhüser // import QtQuick 2.3 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 import QtQuick.Layouts 1.1 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root height: column.height + Screen.pixelDensity * 4 SystemPalette { id: palette colorGroup: SystemPalette.Active } Settings { id: settings Component.onDestruction: { settings.setValue("Developer", "positionProvider", marbleMaps.currentPositionProvider) settings.setValue("Developer", "textureTiles", marbleMaps.isPropertyEnabled("mapnik") ? "true" : "false") settings.setValue("Developer", "runtimeTrace", runtimeTrace.checked ? "true" : "false") settings.setValue("Developer", "debugPolygons", debugPolygons.checked ? "true" : "false") } } Rectangle { anchors.fill: parent color: palette.base } Column { id: column anchors { left: parent.left right: parent.right top: parent.top margins: Screen.pixelDensity * 2 } spacing: Screen.pixelDensity * 2 Text { id: text text: "Developer Settings" } CheckBox { text: "Simulate GPS Position near Route" checked: settings.value("Developer", "positionProvider") === "RouteSimulationPositionProviderPlugin" onCheckedChanged: marbleMaps.currentPositionProvider = checked ? "RouteSimulationPositionProviderPlugin" : "QtPositioning" } CheckBox { text: "Show OSM Bitmap Tiles" checked: settings.value("Developer", "textureTiles") === "true" onCheckedChanged: marbleMaps.setMapThemeId(checked ? "earth/openstreetmap/openstreetmap.dgml" : "earth/vectorosm/vectorosm.dgml") } CheckBox { id: runtimeTrace text: "Show Render Performance" checked: settings.value("Developer", "runtimeTrace") === "true" onCheckedChanged: marbleMaps.setShowRuntimeTrace(checked) } CheckBox { id: debugPolygons text: "Render in Debug Mode" checked: settings.value("Developer", "debugPolygons") === "true" onCheckedChanged: marbleMaps.setShowDebugPolygons(checked) } Button { text: "Close" onClicked: root.visible = false } } } diff --git a/src/apps/marble-maps/IconText.qml b/src/apps/marble-maps/IconText.qml index 1a5b0ca93..c19ab59fb 100644 --- a/src/apps/marble-maps/IconText.qml +++ b/src/apps/marble-maps/IconText.qml @@ -1,49 +1,49 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2016 Dennis Nienhüser // import QtQuick 2.3 import QtQuick.Window 2.2 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root height: text === "" ? 0 : Math.max(icon.height, text.height) property alias text: text.text property alias icon: icon.source property alias font: text.font property alias maximumLineCount: text.maximumLineCount Image { id: icon sourceSize.height: Screen.pixelDensity * 3 fillMode: Image.PreserveAspectFit anchors.verticalCenter: text.verticalCenter } Text { id: text anchors.left: icon.right anchors.right: parent.right anchors.leftMargin: icon.width === 0 ? 0 : Screen.pixelDensity * 1 font.pointSize: 14 wrapMode: Text.WordWrap elide: Text.ElideRight onLinkActivated: Qt.openUrlExternally(link) MouseArea { anchors.fill: parent acceptedButtons: Qt.NoButton cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor } } } diff --git a/src/apps/marble-maps/MainScreen.qml b/src/apps/marble-maps/MainScreen.qml index d0401a888..8d822b08e 100644 --- a/src/apps/marble-maps/MainScreen.qml +++ b/src/apps/marble-maps/MainScreen.qml @@ -1,379 +1,379 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // Copyright 2015 Dennis Nienhüser // Copyright 2015 Mikhail Ivchenko // import QtQuick 2.3 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 ApplicationWindow { id: root title: qsTr("Marble Maps") visible: true width: 600 height: 400 SystemPalette{ id: palette colorGroup: SystemPalette.Active } Rectangle { id: background anchors.fill: parent color: palette.window } StackView { id: itemStack anchors.fill: parent initialItem: mapItem delegate: StackViewDelegate { function transitionFinished(properties) { properties.exitItem.visible = true } } Item { id: mapItem PinchArea { anchors { top: parent.top left: parent.left right: parent.right bottom: dialogContainer.top } enabled: true onPinchStarted: marbleMaps.handlePinchStarted(pinch.center) onPinchFinished: marbleMaps.handlePinchFinished(pinch.center) onPinchUpdated: marbleMaps.handlePinchUpdated(pinch.center, pinch.scale); MarbleMaps { id: marbleMaps property string currentPositionProvider: "QtPositioning" anchors.fill: parent visible: true // Theme settings. projection: MarbleItem.Mercator mapThemeId: "earth/vectorosm/vectorosm.dgml" // Visibility of layers/plugins. showFrameRate: false showAtmosphere: false showCompass: false showClouds: false showCrosshairs: false showGrid: false showOverviewMap: false showOtherPlaces: false showScaleBar: false showBackground: false positionProvider: suspended ? "" : currentPositionProvider keepScreenOn: !suspended && itemStack.state === "navigation" showPositionMarker: false placemarkDelegate: Image { property int xPos: 0 property int yPos: 0 property var placemark: null x: xPos - 0.5 * width y: yPos - height width: Screen.pixelDensity*6 height: width source: "qrc:///ic_place.png" onPlacemarkChanged: { placemarkDialog.placemark = placemark } } onPositionAvailableChanged: { updateIndicator(); } onPositionVisibleChanged: { updateIndicator(); } onVisibleLatLonAltBoxChanged: { updateIndicator(); } onCurrentPositionChanged: { updateIndicator(); } Component.onCompleted: marbleMaps.loadSettings() Component.onDestruction: marbleMaps.writeSettings() function updateIndicator() { if ( !positionVisible && positionAvailable ) { zoomToPositionButton.updateIndicator(); } } RoutingManager { id: routing anchors.fill: parent marbleItem: marbleMaps routingProfile: routeEditor.routingProfile } PositionMarker { id: positionMarker posX: navigationManager.snappedPositionMarkerScreenPosition.x posY: navigationManager.snappedPositionMarkerScreenPosition.y angle: marbleMaps.angle visible: marbleMaps.positionAvailable && marbleMaps.positionVisible radius: navigationManager.screenAccuracy color: navigationManager.deviated ? "#40ff0000" : "transparent" border.color: navigationManager.deviated ? "red" : "transparent" } MouseArea{ anchors.fill: parent propagateComposedEvents: true onPressed: { marbleMaps.focus = true; mouse.accepted = false; } } Search { id: search anchors.fill: parent marbleQuickItem: marbleMaps routingManager: routing visible: !navigationManager.visible } BoxedText { id: quitHelper visible: false text: qsTr("Press again to close.") anchors.bottom: parent.bottom anchors.bottomMargin: Screen.pixelDensity * 5 anchors.horizontalCenter: parent.horizontalCenter onVisibleChanged: { if (visible) { quitTimer.restart() } } Timer { id: quitTimer interval: 3000; running: false; repeat: false onTriggered: itemStack.state = "" } } } NavigationManager { id: navigationManager width: parent.width height: parent.height visible: false marbleItem: marbleMaps } } BorderImage { anchors.fill: dialogContainer anchors.margins: -14 border { top: 14; left: 14; right: 14; bottom: 14 } source: "qrc:///border_shadow.png" } Item { id: dialogContainer anchors { left: parent.left right: parent.right bottom: parent.bottom } height: routeEditor.visible ? routeEditor.height : (placemarkDialog.visible ? placemarkDialog.height : 0) RouteEditor { id: routeEditor anchors { left: parent.left right: parent.right bottom: parent.bottom } visible: false } PlacemarkDialog { id: placemarkDialog anchors { left: parent.left right: parent.right bottom: parent.bottom } map: marbleMaps } DeveloperDialog { id: developerDialog visible: false anchors { left: parent.left right: parent.right bottom: parent.bottom } } } BoxedText { id: distanceIndicator text: "%1 km".arg(zoomToPositionButton.distance < 10 ? zoomToPositionButton.distance.toFixed(1) : zoomToPositionButton.distance.toFixed(0)) anchors { bottom: zoomToPositionButton.top horizontalCenter: zoomToPositionButton.horizontalCenter } visible: marbleMaps.positionAvailable && !marbleMaps.positionVisible } PositionButton { id: zoomToPositionButton anchors { right: parent.right rightMargin: Screen.pixelDensity * 1 bottom: routeEditorButton.top bottomMargin: 10 } iconSource: marbleMaps.positionAvailable ? "qrc:///gps_fixed.png" : "qrc:///gps_not_fixed.png" onClicked: marbleMaps.centerOnCurrentPosition() property real distance: 0 function updateIndicator() { var point = marbleMaps.mapFromItem(zoomToPositionButton, diameter * 0.5, diameter * 0.5); distance = 0.001 * marbleMaps.distanceFromPointToCurrentLocation(point); angle = marbleMaps.angleFromPointToCurrentLocation(point); } showDirection: marbleMaps.positionAvailable && !marbleMaps.positionVisible } CircularButton { id: routeEditorButton anchors { bottom: dialogContainer.height > 0 ? undefined : parent.bottom verticalCenter: dialogContainer.height > 0 ? dialogContainer.top : undefined horizontalCenter: zoomToPositionButton.horizontalCenter bottomMargin: Screen.pixelDensity * 4 } onClicked: { if (itemStack.state === "routing") { itemStack.state = "navigation" } else if (itemStack.state === "place") { placemarkDialog.addToRoute() } else { itemStack.state = "routing" } } iconSource: "qrc:///material/directions.svg"; states: [ State { name: "" AnchorChanges { target: routeEditorButton; anchors.bottom: parent.bottom; anchors.verticalCenter: undefined; } PropertyChanges { target: routeEditorButton; iconSource: "qrc:///material/directions.svg"; } }, State { name: "routingAction" when: itemStack.state == "routing" AnchorChanges { target: routeEditorButton; anchors.bottom: undefined; anchors.verticalCenter: dialogContainer.top; } PropertyChanges { target: routeEditorButton; iconSource: "qrc:///material/navigation.svg"; } }, State { name: "placeAction" when: itemStack.state == "place" AnchorChanges { target: routeEditorButton; anchors.bottom: undefined; anchors.verticalCenter: dialogContainer.top; } PropertyChanges { target: routeEditorButton; iconSource: placemarkDialog.actionIconSource } } ] } } states: [ State { name: "" PropertyChanges { target: quitHelper; visible: false } PropertyChanges { target: search; visible: true } PropertyChanges { target: placemarkDialog; visible: false } PropertyChanges { target: routeEditor; visible: false } PropertyChanges { target: navigationManager; guidanceMode: false } StateChangeScript { script: itemStack.pop(mapItem); } }, State { name: "place" PropertyChanges { target: search; visible: true } PropertyChanges { target: placemarkDialog; visible: true } PropertyChanges { target: routeEditor; visible: false } PropertyChanges { target: navigationManager; guidanceMode: false } StateChangeScript { script: itemStack.pop(mapItem); } }, State { name: "routing" PropertyChanges { target: search; visible: true } PropertyChanges { target: placemarkDialog; visible: false } PropertyChanges { target: routeEditor; visible: true } PropertyChanges { target: navigationManager; guidanceMode: false } StateChangeScript { script: itemStack.pop(mapItem); } }, State { name: "navigation" PropertyChanges { target: search; visible: false } PropertyChanges { target: placemarkDialog; visible: false } PropertyChanges { target: routeEditor; visible: false } PropertyChanges { target: navigationManager; guidanceMode: true } StateChangeScript { script: itemStack.push(navigationManager); } }, State { name: "aboutToQuit" PropertyChanges { target: quitHelper; visible: true } } ] Keys.onBackPressed: { if (itemStack.state === "aboutToQuit") { event.accepted = false // we will quit } else if (itemStack.state === "") { itemStack.state = "aboutToQuit" event.accepted = true } else { itemStack.state = "" event.accepted = true } } } } diff --git a/src/apps/marble-maps/NavigationManager.qml b/src/apps/marble-maps/NavigationManager.qml index 068bf8387..cb1a7967c 100644 --- a/src/apps/marble-maps/NavigationManager.qml +++ b/src/apps/marble-maps/NavigationManager.qml @@ -1,85 +1,85 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // import QtQuick 2.3 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root property var marbleItem: null property var tts: null property alias snappedPositionMarkerScreenPosition: navigation.screenPosition property bool guidanceMode: false property alias screenAccuracy: navigation.screenAccuracy property alias deviated: navigation.deviated onGuidanceModeChanged: { if (guidanceMode) { marbleItem.setZoomToMaximumLevel(); marbleItem.centerOnCurrentPosition(); } navigation.guidanceModeEnabled = guidanceMode; } Settings { id: settings Component.onDestruction: { settings.setValue("Navigation", "muted", muteButton.muted) } } BorderImage { anchors.fill: infoBar anchors.margins: -14 border { top: 14; left: 14; right: 14; bottom: 14 } source: "qrc:///border_shadow.png" } NavigationInfoBar { id: infoBar anchors { top: parent.top left: parent.left right: parent.right } instructionIcon: navigation.nextInstructionImage.replace("qrc:/", "qrc:///"); distance: navigation.nextInstructionDistance; destinationDistance: navigation.destinationDistance } CircularButton { id: muteButton property bool muted: settings.value("Navigation", "muted") === "true" anchors.right: infoBar.right anchors.rightMargin: Screen.pixelDensity * 3 anchors.top: infoBar.bottom anchors.topMargin: Screen.pixelDensity * 5 iconSource: muted ? "qrc:///material/volume-off.svg" : "qrc:///material/volume-on.svg" onClicked: muted = !muted } Navigation { id: navigation marbleQuickItem: marbleItem onVoiceNavigationAnnouncementChanged: { if (root.guidanceMode && !muteButton.muted) { textToSpeechClient.readText(voiceNavigationAnnouncement); } } } } diff --git a/src/apps/marble-maps/PlacemarkDialog.qml b/src/apps/marble-maps/PlacemarkDialog.qml index f91e7f0bd..24bf4b09e 100644 --- a/src/apps/marble-maps/PlacemarkDialog.qml +++ b/src/apps/marble-maps/PlacemarkDialog.qml @@ -1,181 +1,181 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Dennis Nienhüser // import QtQuick 2.3 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 import QtQuick.Layouts 1.1 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root property var placemark: null property bool condensed: true property string actionIconSource: routeEditor.currentProfileIcon property alias map: bookmarks.map height: placemark === null ? 0 : Screen.pixelDensity * 6 + infoLayout.height function addToRoute() { ensureRouteHasDeparture() routing.addViaByPlacemarkAtIndex(routing.waypointCount(), placemark) routing.clearSearchResultPlacemarks() placemark = null itemStack.state = "routing" } onPlacemarkChanged: { if (placemark) { bookmarkButton.bookmark = bookmarks.isBookmark(placemark.longitude, placemark.latitude) itemStack.state = "place" } else { condensed = true itemStack.state = "" } } SystemPalette { id: palette colorGroup: SystemPalette.Active } Rectangle { anchors.fill: parent color: palette.base } MouseArea { anchors.fill: parent onClicked: { condensed = !condensed } } Bookmarks { id: bookmarks } Column { id: infoLayout anchors { top: parent.top left: parent.left right: bookmarkButton.left margins: Screen.pixelDensity * 2 } IconText { id: name width: parent.width visible: text.length > 0 text: placemark === null ? "" : placemark.name maximumLineCount: 2 font.pointSize: 20 } IconText { width: parent.width visible: text.length > 0 text: placemark === null ? "" : placemark.description maximumLineCount: condensed ? 4 : undefined } IconText { width: parent.width visible: placemark != null && placemark.elevation != "" text: placemark === null ? "" : ("Elevation : " + placemark.elevation + " m") } IconText { width: parent.width visible: text.length > 0 && (!condensed || name.text === "") text: placemark === null ? "" : placemark.address maximumLineCount: 4 } IconText { width: parent.width visible: url.length > 0 property string url: placemark === null ? "" : placemark.website text: "" + url + "" icon: "qrc:/material/browser.svg" maximumLineCount: 4 } IconText { width: parent.width visible: url.length > 0 property string url: placemark === null ? "" : placemark.wikipedia text: "Wikipedia" icon: "qrc:/material/browser.svg" maximumLineCount: 4 } IconText { width: parent.width visible: text.length > 0 text: placemark === null ? "" : placemark.fuelDetails icon: "qrc:/material/gas_station.svg" } IconText { width: parent.width visible: text.length > 0 text: placemark === null ? "" : placemark.openingHours icon: "qrc:/material/access_time.svg" } IconText { width: parent.width visible: text.length > 0 && (!condensed || name.text === "") text: placemark === null ? "" : placemark.coordinates icon: "qrc:/material/place.svg" } } Image { id: bookmarkButton anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: Screen.pixelDensity * 2 visible: root.height > 0 property bool bookmark: false width: Screen.pixelDensity * 6 height: width sourceSize.height: height sourceSize.width: width source: bookmark ? "qrc:/material/star.svg" : "qrc:/material/star_border.svg" MouseArea { id: touchArea anchors.fill: parent onClicked: { if (bookmarkButton.bookmark) { bookmarks.removeBookmark(root.placemark.longitude, root.placemark.latitude) } else { bookmarks.addBookmark(root.placemark, "Default") } bookmarkButton.bookmark = !bookmarkButton.bookmark } } } function ensureRouteHasDeparture() { if (routing.routeRequestModel.count === 0) { if (marbleMaps.positionAvailable) { routing.addViaByPlacemark(marbleMaps.currentPosition) } } } } diff --git a/src/apps/marble-maps/ProfileSelectorMenu.qml b/src/apps/marble-maps/ProfileSelectorMenu.qml index 30ed73b8e..26274eee5 100644 --- a/src/apps/marble-maps/ProfileSelectorMenu.qml +++ b/src/apps/marble-maps/ProfileSelectorMenu.qml @@ -1,64 +1,64 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // Copyright 2015 Dennis Nienhüser // import QtQuick 2.3 import QtQuick.Controls 1.3 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root property string selectedProfile: carProfileButton.profile property string profileIcon: "qrc:///material/directions-car.svg" height: rowLayout.height width: rowLayout.width Settings { id: settings Component.onDestruction: { settings.setValue("Routing", "profile", root.selectedProfile) } } RowLayout { id: rowLayout ExclusiveGroup { id: profileGroup onCurrentChanged: { profileIcon = current.imageSource selectedProfile = current.profile; } } RouteProfileRadioButton { id: carProfileButton checked: settings.value("Routing", "profile", profile) === profile exclusiveGroup: profileGroup property string profile: qsTr("Car (fastest)") imageSource: "qrc:///material/directions-car.svg" } RouteProfileRadioButton { checked: settings.value("Routing", "profile") === profile exclusiveGroup: profileGroup property string profile: qsTr("Bicycle") imageSource: "qrc:///material/directions-bike.svg" } RouteProfileRadioButton { checked: settings.value("Routing", "profile") === profile exclusiveGroup: profileGroup property string profile: qsTr("Pedestrian") imageSource: "qrc:///material/directions-walk.svg" } } } diff --git a/src/apps/marble-maps/RouteEditor.qml b/src/apps/marble-maps/RouteEditor.qml index 16464a419..f4d054db8 100644 --- a/src/apps/marble-maps/RouteEditor.qml +++ b/src/apps/marble-maps/RouteEditor.qml @@ -1,168 +1,168 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // Copyright 2015 Dennis Nienhüser // import QtQuick 2.3 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 import QtQuick.Layouts 1.1 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root property alias routingProfile: profileSelector.selectedProfile property alias currentProfileIcon: profileSelector.profileIcon property alias currentIndex: waypointList.currentIndex height: visible ? Screen.pixelDensity * 4 + column.height : 0 SystemPalette{ id: palette colorGroup: SystemPalette.Active } Rectangle { anchors.fill: parent color: palette.base } Column { id: column spacing: Screen.pixelDensity * 2 anchors { top: parent.top left: parent.left right: parent.right margins: Screen.pixelDensity * 2 } Item { anchors { left: parent.left right: parent.right } height: profileSelector.height ProfileSelectorMenu { id: profileSelector anchors.left: parent.left } } Text { id: helpText visible: waypointList.count < 2 color: "gray" text: "Search for places to integrate them into a route." } ListView { id: waypointList anchors { left: parent.left right: parent.right } height: Math.min(0.4 * Screen.height, contentHeight) clip: true model: routing.routeRequestModel delegate: Rectangle { width: parent.width height: Screen.pixelDensity * 2 + Math.max(text.height, image.height) color: touchArea.pressed || waypointList.currentIndex === index ? palette.highlight : palette.base WaypointImage { id: image anchors { left: parent.left verticalCenter: parent.verticalCenter } type: index === 0 ? "departure" : (index === waypointList.count-1 ? "destination" : "waypoint") } Text { id: text anchors { left: image.right right: buttonsRow.left leftMargin: parent.width * 0.05 verticalCenter: parent.verticalCenter } elide: Text.ElideMiddle text: name font.pointSize: 18 color: palette.text } MouseArea { id: touchArea anchors.fill: parent onClicked: { if (index === waypointList.currentIndex) { waypointList.currentIndex = -1 } else { waypointList.currentIndex = index marbleMaps.centerOn(longitude, latitude) } } } Row { id: buttonsRow anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter ImageButton { id: upButton anchors.verticalCenter: parent.verticalCenter visible: index > 0 && index === waypointList.currentIndex imageSource: "qrc:///up.png" onClicked: { routing.swapVias(index, index-1); waypointList.currentIndex--; } } ImageButton { id: downButton anchors.verticalCenter: parent.verticalCenter visible: index+1 < routing.routeRequestModel.count && index === waypointList.currentIndex imageSource: "qrc:///down.png" onClicked: { routing.swapVias(index, index+1); waypointList.currentIndex++; } } ImageButton { id: deleteButton anchors.verticalCenter: parent.verticalCenter visible: index === waypointList.currentIndex imageSource: "qrc:///delete.png" onClicked: { routing.removeVia(index); waypointList.currentIndex = Math.max(0, waypointList.currentIndex-1); } } } } ScrollBar { id: scrollBar flickableItem: waypointList } } } } diff --git a/src/apps/marble-maps/RoutingManager.qml b/src/apps/marble-maps/RoutingManager.qml index c9715cacd..21f5619dd 100644 --- a/src/apps/marble-maps/RoutingManager.qml +++ b/src/apps/marble-maps/RoutingManager.qml @@ -1,30 +1,30 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // import QtQuick 2.3 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Routing { id: root property var marbleItem: null marbleMap: marbleItem.marbleMap waypointDelegate: Waypoint {visible: false} onRoutingProfileChanged: { updateRoute(); } function addSearchResultAsPlacemark(placemark) { if (marbleItem) { root.addSearchResultPlacemark(placemark); } } } diff --git a/src/apps/marble-maps/Search.qml b/src/apps/marble-maps/Search.qml index dd2efad3a..d70c19ca5 100644 --- a/src/apps/marble-maps/Search.qml +++ b/src/apps/marble-maps/Search.qml @@ -1,154 +1,154 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // import QtQuick 2.3 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root property var marbleQuickItem: null property var routingManager: null signal itemSelected() readonly property alias searchResultPlacemark: backend.selectedPlacemark readonly property alias searchResultsVisible: searchResults.visible onVisibleChanged: { if( !visible ) { searchResults.visible = false; searchField.query = ""; } } SystemPalette{ id: palette colorGroup: SystemPalette.Active } SearchResults { id: searchResults anchors { top: searchField.bottom left: searchField.left } width: searchField.width height: delegateHeight * Math.min(10,count) visible: false onItemSelected: { backend.setSelectedPlacemark(index); root.itemSelected(); searchResults.visible = false; if (routingManager) { routingManager.addSearchResultAsPlacemark(backend.selectedPlacemark); } placemarkDialog.placemark = backend.selectedPlacemark; } } Rectangle { id: background visible: searchField.hasFocus && searchField.query === "" && bookmarks.model.count > 0 anchors.top: searchField.bottom anchors.left: searchField.left width: searchField.width height: 2 * background.itemSpacing + (delegateHeight) * Math.min(4, bookmarksView.model.count) color: palette.base property int delegateHeight: 0 property double itemSpacing: Screen.pixelDensity * 1 ListView { id: bookmarksView anchors.fill: parent anchors.margins: background.itemSpacing clip: true model: bookmarks.model delegate: Row { spacing: background.itemSpacing Image { anchors.verticalCenter: parent.verticalCenter source: iconPath.substr(0,1) === '/' ? "file://" + iconPath : iconPath width: Screen.pixelDensity * 4 height: width sourceSize.width: width sourceSize.height: height } Text { anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: Screen.pixelDensity * 2 text: display font.pointSize: 18 color: palette.text elide: Text.ElideMiddle MouseArea { anchors.fill: parent onClicked: { bookmarksView.currentIndex = index placemarkDialog.focus = true placemarkDialog.placemark = bookmarks.placemark(index); marbleMaps.centerOn(placemarkDialog.placemark.longitude, placemarkDialog.placemark.latitude) } } } Component.onCompleted: { if( background.delegateHeight !== height ) { background.delegateHeight = height; } } } } ScrollBar { flickableItem: bookmarksView } } SearchBackend { id: backend marbleQuickItem: root.marbleQuickItem onSearchResultChanged: { searchResults.model = model; searchResults.visible = true; } onSearchFinished: searchField.busy = false } SearchField { id: searchField width: parent.width - 2 * anchors.margins <= Screen.pixelDensity * 70 ? parent.width - 2 * anchors.margins : Screen.pixelDensity * 50 anchors { top: parent.top left: parent.left margins: Screen.pixelDensity * 3 } completionModel: backend.completionModel onSearchRequested: backend.search(query) onCompletionRequested: backend.setCompletionPrefix(query) onCleared: searchResults.visible = false } Bookmarks { id: bookmarks map: root.marbleQuickItem } } diff --git a/src/apps/marble-maps/Waypoint.qml b/src/apps/marble-maps/Waypoint.qml index d3bbdd791..bcf9df67f 100644 --- a/src/apps/marble-maps/Waypoint.qml +++ b/src/apps/marble-maps/Waypoint.qml @@ -1,55 +1,55 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // import QtQuick 2.3 import QtGraphicalEffects 1.0 import QtQuick.Window 2.2 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root property alias type: image.type property int xPos: 0 property int yPos: 0 property var placemark: null property int index: -1 width: Screen.pixelDensity * 15 height: width x: xPos - 0.5 * width y: yPos - 0.5 * height WaypointImage { id: image onClicked: { if (type == "searchResult") { if (placemarkDialog.placemark === placemark) { placemarkDialog.placemark = null itemStack.state = "" } else { placemarkDialog.placemark = placemark itemStack.state = "place" } } else { routeEditor.currentIndex = index itemStack.state = "routing" } } anchors { bottom: parent.verticalCenter horizontalCenter: parent.horizontalCenter } x: 0.5 * parent.width - 0.5 * width y: 0.5 * parent.height - height } } diff --git a/src/apps/marble-maps/WaypointImage.qml b/src/apps/marble-maps/WaypointImage.qml index ccbc2908e..5fa852dd9 100644 --- a/src/apps/marble-maps/WaypointImage.qml +++ b/src/apps/marble-maps/WaypointImage.qml @@ -1,72 +1,72 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // import QtQuick 2.3 import QtGraphicalEffects 1.0 import QtQuick.Window 2.2 -import org.kde.edu.marble 0.20 +import org.kde.marble 0.20 Item { id: root // Can be 'departure', 'waypoint', 'destination', 'searchResult' property alias type: image.state signal clicked() width: Screen.pixelDensity * 6 height: width Image { id: image anchors.fill: parent states: [ State { name: "departure" PropertyChanges { target: image source: "qrc:///ic_place_departure.png" } }, State { name: "waypoint" PropertyChanges { target: image source: "qrc:///ic_place_via.png" } }, State { name: "destination" PropertyChanges { target: image source: "qrc:///ic_place_arrival.png" } }, State { name: "searchResult" PropertyChanges { target: image source: "qrc:///ic_place.png" } } ] MouseArea { id: touchArea anchors.fill: parent onClicked: root.clicked() } } } diff --git a/src/apps/marble-maps/main.cpp b/src/apps/marble-maps/main.cpp index 38d013880..9107ad1f6 100644 --- a/src/apps/marble-maps/main.cpp +++ b/src/apps/marble-maps/main.cpp @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Gábor Péterffy // #include #include #include #include "declarative/MarbleDeclarativePlugin.h" #include #include "MarbleMaps.h" #include "TextToSpeechClient.h" using namespace Marble; int main(int argc, char ** argv) { QApplication app(argc, argv); app.setApplicationName( "Marble Maps" ); app.setOrganizationName( "KDE" ); app.setOrganizationDomain( "kde.org" ); #ifdef Q_OS_ANDROID MarbleGlobal::Profiles profiles = MarbleGlobal::SmallScreen | MarbleGlobal::HighResolution; MarbleGlobal::getInstance()->setProfiles( profiles ); #endif MarbleDeclarativePlugin declarativePlugin; - const char uri[] = "org.kde.edu.marble"; + const char uri[] = "org.kde.marble"; declarativePlugin.registerTypes(uri); qmlRegisterType(uri, 0, 20, "MarbleMaps"); QQmlApplicationEngine engine; TextToSpeechClient * tts = new TextToSpeechClient(&engine); engine.rootContext()->setContextProperty("textToSpeechClient", tts); engine.load(QUrl("qrc:/MainScreen.qml")); // @todo Ship translations and only fall back to english if no translations for the system locale are installed tts->setLocale("en"); return app.exec(); } diff --git a/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp b/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp index 3a8e614e1..e7c9a0260 100644 --- a/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp +++ b/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp @@ -1,84 +1,84 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #include "MarbleDeclarativePlugin.h" #include "Coordinate.h" #include "DeclarativeMapThemeManager.h" #include "MarbleDeclarativeObject.h" #include "PositionSource.h" #include "Bookmarks.h" #include "Tracking.h" #include "Routing.h" #include "Navigation.h" #include "RouteRequestModel.h" #include "Settings.h" #include "MapThemeModel.h" #include "NewstuffModel.h" #include "OfflineDataModel.h" #include "Placemark.h" #include "routing/SpeakersModel.h" #include "routing/VoiceNavigationModel.h" #include "routing/RoutingModel.h" #include "AbstractFloatItem.h" #include "RenderPlugin.h" #include "MarblePlacemarkModel.h" #include "DeclarativeDataPlugin.h" #include "SearchBackend.h" #include "MarbleQuickItem.h" #include #include void MarbleDeclarativePlugin::registerTypes( const char *uri ) { qRegisterMetaType("MarbleMap*"); - //@uri org.kde.edu.marble + //@uri org.kde.marble qmlRegisterType( uri, 0, 20, "Coordinate" ); qmlRegisterType( uri, 0, 20, "Placemark" ); qmlRegisterType( uri, 0, 20, "PositionSource" ); qmlRegisterType( uri, 0, 20, "Bookmarks" ); qmlRegisterType( uri, 0, 20, "Tracking" ); qmlRegisterType( uri, 0, 20, "Routing" ); qmlRegisterType( uri, 0, 20, "Navigation" ); qmlRegisterType( uri, 0, 20, "RouteRequestModel" ); qmlRegisterType( uri, 0, 20, "Settings" ); qmlRegisterType( uri, 0, 20, "MapThemeManager" ); qmlRegisterType( uri, 0, 20, "SpeakersModel" ); qmlRegisterType( uri, 0, 20, "VoiceNavigation" ); qmlRegisterType( uri, 0, 20, "NewstuffModel" ); qmlRegisterType( uri, 0, 20, "OfflineDataModel" ); qmlRegisterType( uri, 0, 20, "MapThemeModel" ); qmlRegisterType( uri, 0, 20, "DataLayer" ); qmlRegisterType(uri, 0, 20, "SearchBackend"); qRegisterMetaType("MarblePlacemarkModel*"); qmlRegisterType(uri, 0, 20, "MarbleItem"); qmlRegisterUncreatableType(uri, 1, 0, "MarblePlacemarkModel", "MarblePlacemarkModel is not instantiable"); qmlRegisterUncreatableType(uri, 0, 20, "RoutingModel", "RoutingModel is not instantiable"); qmlRegisterUncreatableType( uri, 0, 20, "BookmarksModel", "Do not create" ); qmlRegisterUncreatableType( uri, 0, 20, "FloatItem", "Do not create" ); qmlRegisterUncreatableType( uri, 0, 20, "RenderPlugin", "Do not create" ); qmlRegisterUncreatableType( uri, 0, 20, "MarbleMap", "Do not create" ); } void MarbleDeclarativePlugin::initializeEngine( QQmlEngine *engine, const char *) { engine->addImageProvider( "maptheme", new MapThemeImageProvider ); // Register the global Marble object. Can be used in .qml files for requests like Marble.resolvePath("some/icon.png") if ( !engine->rootContext()->contextProperty( "Marble").isValid() ) { engine->rootContext()->setContextProperty( "Marble", new MarbleDeclarativeObject( this ) ); } } #include "moc_MarbleDeclarativePlugin.cpp" diff --git a/src/lib/marble/declarative/MarbleDeclarativePlugin.h b/src/lib/marble/declarative/MarbleDeclarativePlugin.h index 848fc5774..504276d69 100644 --- a/src/lib/marble/declarative/MarbleDeclarativePlugin.h +++ b/src/lib/marble/declarative/MarbleDeclarativePlugin.h @@ -1,33 +1,33 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_DECLARATIVE_PLUGIN_H #define MARBLE_DECLARATIVE_PLUGIN_H #include "marble_declarative_export.h" #include /** * Registers MarbleQuickItem, MarbleRunnerManager and MarbleThemeManager * as QQml extensions for use in QML. */ class MARBLE_DECLARATIVE_EXPORT MarbleDeclarativePlugin : public QQmlExtensionPlugin { - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.MarbleDeclarativePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.MarbleDeclarativePlugin") Q_OBJECT public: /** Overriding QQmlExtensionPlugin to register types */ virtual void registerTypes( const char *uri ); void initializeEngine( QQmlEngine *engine, const char *); }; #endif diff --git a/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h b/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h index 9fdecc9f1..1569b2930 100644 --- a/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h +++ b/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h @@ -1,45 +1,45 @@ /* // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. */ //Copyright 2008 Henry de Valence #ifndef LATLONEDITPLUGIN_H #define LATLONEDITPLUGIN_H #include #include #include class QString; class QWidget; class QIcon; class LatLonEditPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.LatLonEditPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.LatLonEditPlugin") Q_INTERFACES(QDesignerCustomWidgetInterface) public: explicit LatLonEditPlugin(QObject *parent = 0); bool isContainer() const; bool isInitialized() const; QIcon icon() const; QString domXml() const; QString group() const; QString includeFile() const; QString name() const; QString toolTip() const; QString whatsThis() const; QWidget *createWidget(QWidget *parent); void initialize(QDesignerFormEditorInterface *core); private: bool m_initialized; }; #endif diff --git a/src/plugins/designer/marblewidget/MarbleWidgetPlugin.h b/src/plugins/designer/marblewidget/MarbleWidgetPlugin.h index a3acefac8..f0adfae74 100644 --- a/src/plugins/designer/marblewidget/MarbleWidgetPlugin.h +++ b/src/plugins/designer/marblewidget/MarbleWidgetPlugin.h @@ -1,51 +1,51 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2005-2007 Torsten Rahn // Copyright 2007 Inge Wallin // // // This class is responsible for offering plugin capabilities. // #ifndef MARBLEWIDGETPLUGIN_H #define MARBLEWIDGETPLUGIN_H #include // Workaround: moc on osx is unable to find this file, when prefix with QtDesigner/ // moc also doesn't respect Q_OS_* macros, otherwise I could ifdef this. #include class MarbleWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.MarbleWidgetPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.MarbleWidgetPlugin") Q_INTERFACES(QDesignerCustomWidgetInterface) public: explicit MarbleWidgetPlugin(QObject *parent = 0); bool isContainer() const; bool isInitialized() const; QIcon icon() const; QString domXml() const; QString name() const; QString group() const; QString includeFile() const; QString toolTip() const; QString whatsThis() const; QWidget *createWidget(QWidget *parent); void initialize(QDesignerFormEditorInterface *core); private: bool m_initialized; }; #endif diff --git a/src/plugins/designer/navigator/MarbleNavigatorPlugin.h b/src/plugins/designer/navigator/MarbleNavigatorPlugin.h index b65ccceb4..cdf041899 100644 --- a/src/plugins/designer/navigator/MarbleNavigatorPlugin.h +++ b/src/plugins/designer/navigator/MarbleNavigatorPlugin.h @@ -1,51 +1,51 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2005-2007 Torsten Rahn // Copyright 2007 Inge Wallin // // // This class is responsible for offering plugin capabilities. // #ifndef MARBLENAVIGATORPLUGIN_H #define MARBLENAVIGATORPLUGIN_H #include // Workaround: moc on osx is unable to find this file, when prefix with QtDesigner/ // moc also doesn't respect Q_OS_* macros, otherwise I could ifdef this. #include class MarbleNavigatorPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.MarbleNavigatorPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.MarbleNavigatorPlugin") Q_INTERFACES(QDesignerCustomWidgetInterface) public: explicit MarbleNavigatorPlugin(QObject *parent = 0); bool isContainer() const; bool isInitialized() const; QIcon icon() const; QString domXml() const; QString name() const; QString group() const; QString includeFile() const; QString toolTip() const; QString whatsThis() const; QWidget *createWidget(QWidget *parent); void initialize(QDesignerFormEditorInterface *core); private: bool m_initialized; }; #endif diff --git a/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h b/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h index fc7fa2a26..c94a46250 100644 --- a/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h +++ b/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h @@ -1,70 +1,70 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Ralf Habacker #ifndef FLIGHTGEARPOSITIONPROVIDERPLUGIN_H #define FLIGHTGEARPOSITIONPROVIDERPLUGIN_H #include "PositionProviderPlugin.h" #include class QUdpSocket; namespace Marble { class FlightGearPositionProviderPlugin : public PositionProviderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.FlightGearPositionProviderPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.FlightGearPositionProviderPlugin") Q_INTERFACES( Marble::PositionProviderPluginInterface ) public: FlightGearPositionProviderPlugin(); virtual ~FlightGearPositionProviderPlugin(); virtual QString name() const; virtual QString nameId() const; virtual QString guiString() const; virtual QString version() const; virtual QString description() const; virtual QString copyrightYears() const; QVector pluginAuthors() const override; virtual QIcon icon() const; virtual void initialize(); virtual bool isInitialized() const; virtual PositionProviderPlugin * newInstance() const; virtual PositionProviderStatus status() const; virtual GeoDataCoordinates position() const; virtual GeoDataAccuracy accuracy() const; virtual QString error() const; virtual qreal speed() const; virtual qreal direction() const; virtual QDateTime timestamp() const; private Q_SLOTS: void readPendingDatagrams(); private: void parseNmeaSentence(const QString &sentence); static double parsePosition(const QString &value, bool isNegative); QUdpSocket* m_socket; PositionProviderStatus m_status; GeoDataCoordinates m_position; GeoDataAccuracy m_accuracy; qreal m_speed; qreal m_track; QDateTime m_timestamp; }; } #endif // FLIGHTGEARPOSITIONPROVIDERPLUGIN_H diff --git a/src/plugins/positionprovider/geoclue/GeoCluePositionProviderPlugin.h b/src/plugins/positionprovider/geoclue/GeoCluePositionProviderPlugin.h index 58d58950a..4e7000834 100644 --- a/src/plugins/positionprovider/geoclue/GeoCluePositionProviderPlugin.h +++ b/src/plugins/positionprovider/geoclue/GeoCluePositionProviderPlugin.h @@ -1,68 +1,68 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2009 Eckhart Wörner // #ifndef GEOCLUEPOSITIONPROVIDERPLUGIN_H #define GEOCLUEPOSITIONPROVIDERPLUGIN_H #include "GeoCute/Position.h" #include "GeoCute/Status.h" #include "PositionProviderPlugin.h" namespace GeoCute { class PositionProvider; } namespace Marble { class GeoCluePositionProviderPlugin: public PositionProviderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GeoCluePositionProviderPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GeoCluePositionProviderPlugin") Q_INTERFACES( Marble::PositionProviderPluginInterface ) public: GeoCluePositionProviderPlugin(); virtual ~GeoCluePositionProviderPlugin(); virtual QString name() const; virtual QString nameId() const; virtual QString guiString() const; virtual QString description() const; virtual QIcon icon() const; virtual void initialize(); virtual bool isInitialized() const; virtual PositionProviderPlugin * newInstance() const; virtual PositionProviderStatus status() const; virtual GeoDataCoordinates position() const; virtual GeoDataAccuracy accuracy() const; private: GeoCute::PositionProvider* m_positionProvider; PositionProviderStatus m_status; GeoDataCoordinates m_position; GeoDataAccuracy m_accuracy; private Q_SLOTS: void updatePosition(GeoCute::Position newPosition); void updateStatus(GeoCute::Status newStatus); }; } #endif diff --git a/src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.h b/src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.h index 623ca664d..b16802dfe 100644 --- a/src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.h +++ b/src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.h @@ -1,72 +1,72 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2009 Eckhart Wörner // #ifndef GPSDPOSITIONPROVIDERPLUGIN_H #define GPSDPOSITIONPROVIDERPLUGIN_H #include "PositionProviderPlugin.h" #include #include namespace Marble { class GpsdThread; class GpsdPositionProviderPlugin: public PositionProviderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GpsdPositionProviderPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GpsdPositionProviderPlugin") Q_INTERFACES( Marble::PositionProviderPluginInterface ) public: GpsdPositionProviderPlugin(); virtual ~GpsdPositionProviderPlugin(); virtual QString name() const; virtual QString nameId() const; virtual QString guiString() const; virtual QString version() const; virtual QString description() const; virtual QString copyrightYears() const; QVector pluginAuthors() const override; virtual QIcon icon() const; virtual void initialize(); virtual bool isInitialized() const; virtual PositionProviderPlugin * newInstance() const; virtual PositionProviderStatus status() const; virtual GeoDataCoordinates position() const; virtual GeoDataAccuracy accuracy() const; virtual QString error() const; virtual qreal speed() const; virtual qreal direction() const; virtual QDateTime timestamp() const; private: GpsdThread* m_thread; PositionProviderStatus m_status; GeoDataCoordinates m_position; GeoDataAccuracy m_accuracy; qreal m_speed; qreal m_track; QDateTime m_timestamp; private Q_SLOTS: void update(gps_data_t data); }; } #endif diff --git a/src/plugins/positionprovider/qtpositioning/QtPositioningPositionProviderPlugin.h b/src/plugins/positionprovider/qtpositioning/QtPositioningPositionProviderPlugin.h index 24164668c..0f55a98a7 100644 --- a/src/plugins/positionprovider/qtpositioning/QtPositioningPositionProviderPlugin.h +++ b/src/plugins/positionprovider/qtpositioning/QtPositioningPositionProviderPlugin.h @@ -1,66 +1,66 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Daniel Marth // Copyright 2012 Bernhard Beschow // #ifndef QT_POSITIONING_POSITION_PROVIDER_PLUGIN_H #define QT_POSITIONING_POSITION_PROVIDER_PLUGIN_H #include "PositionProviderPlugin.h" namespace Marble { class QtPositioningPositionProviderPluginPrivate; class QtPositioningPositionProviderPlugin: public PositionProviderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.QtPositioningPositionProviderPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.QtPositioningPositionProviderPlugin") Q_INTERFACES( Marble::PositionProviderPluginInterface ) public: QtPositioningPositionProviderPlugin(); virtual ~QtPositioningPositionProviderPlugin(); // Implementing PluginInterface virtual QString name() const; virtual QString nameId() const; virtual QString guiString() const; virtual QString version() const; virtual QString description() const; virtual QString copyrightYears() const; QVector pluginAuthors() const override; virtual QIcon icon() const; virtual void initialize(); virtual bool isInitialized() const; virtual qreal speed() const; virtual qreal direction() const; virtual QDateTime timestamp() const; // Implementing PositionProviderPlugin virtual PositionProviderPlugin * newInstance() const; // Implementing PositionProviderPluginInterface virtual PositionProviderStatus status() const; virtual GeoDataCoordinates position() const; virtual GeoDataAccuracy accuracy() const; private Q_SLOTS: /** Regular (each second) position and status update */ void update(); private: QtPositioningPositionProviderPluginPrivate* const d; }; } #endif // QT_POSITION_PROVIDER_PLUGIN_H diff --git a/src/plugins/positionprovider/wlocate/WlocatePositionProviderPlugin.h b/src/plugins/positionprovider/wlocate/WlocatePositionProviderPlugin.h index faaa9ff61..dea13d1a7 100644 --- a/src/plugins/positionprovider/wlocate/WlocatePositionProviderPlugin.h +++ b/src/plugins/positionprovider/wlocate/WlocatePositionProviderPlugin.h @@ -1,66 +1,66 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Dennis Nienhüser // #ifndef WLOCATE_POSITION_PROVIDER_PLUGIN_H #define WLOCATE_POSITION_PROVIDER_PLUGIN_H #include "PositionProviderPlugin.h" namespace Marble { class WlocatePositionProviderPluginPrivate; class WlocatePositionProviderPlugin: public PositionProviderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.WlocatePositionProviderPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.WlocatePositionProviderPlugin") Q_INTERFACES( Marble::PositionProviderPluginInterface ) public: WlocatePositionProviderPlugin(); virtual ~WlocatePositionProviderPlugin(); // Implementing PluginInterface virtual QString name() const; virtual QString nameId() const; virtual QString guiString() const; virtual QString version() const; virtual QString description() const; virtual QString copyrightYears() const; QVector pluginAuthors() const override; virtual QIcon icon() const; virtual void initialize(); virtual bool isInitialized() const; // Implementing PositionProviderPlugin virtual PositionProviderPlugin * newInstance() const; // Implementing PositionProviderPluginInterface virtual PositionProviderStatus status() const; virtual GeoDataCoordinates position() const; virtual qreal speed() const; virtual qreal direction() const; virtual GeoDataAccuracy accuracy() const; virtual QDateTime timestamp() const; private Q_SLOTS: void update(); void handleWlocateResult(); private: WlocatePositionProviderPluginPrivate* const d; }; } #endif // WLOCATE_POSITION_PROVIDER_PLUGIN_H diff --git a/src/plugins/render/annotate/AnnotatePlugin.h b/src/plugins/render/annotate/AnnotatePlugin.h index 46b25c9e5..4b4606c3a 100644 --- a/src/plugins/render/annotate/AnnotatePlugin.h +++ b/src/plugins/render/annotate/AnnotatePlugin.h @@ -1,217 +1,217 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2009 Andrew Manson // Copyright 2013 Thibaut Gridel // Copyright 2014 Calin Cruceru // #ifndef MARBLE_ANNOTATEPLUGIN_H #define MARBLE_ANNOTATEPLUGIN_H #include "RenderPlugin.h" #include "SceneGraphicsItem.h" #include "GeoDataGroundOverlay.h" #include "GroundOverlayFrame.h" #include #include namespace Marble { class MarbleWidget; class TextureLayer; class GeoDataDocument; class GeoDataLinearRing; class GeoDataLineString; class AreaAnnotation; class PolylineAnnotation; class PlacemarkTextAnnotation; class OsmPlacemarkData; /** * @brief This class specifies the Marble layer interface of a plugin which * annotates maps with polygons and placemarks. */ class AnnotatePlugin : public RenderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.AnnotatePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.AnnotatePlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( AnnotatePlugin ) public: explicit AnnotatePlugin(const MarbleModel *model = 0); virtual ~AnnotatePlugin(); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QIcon icon () const; QString copyrightYears() const; QVector pluginAuthors() const override; void initialize (); bool isInitialized () const; virtual QString runtimeTrace() const; virtual const QList *actionGroups() const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer = 0 ); Q_SIGNALS: void placemarkMoved(); void nodeAdded( const GeoDataCoordinates &coordinates ); void itemMoved( GeoDataPlacemark *placemark ); void mouseMoveGeoPosition( const QString& ); private Q_SLOTS: void enableModel( bool enabled ); void askToRemoveFocusItem(); void removeFocusItem(); void clearAnnotations(); void saveAnnotationFile(); void loadAnnotationFile(); void copyItem(); void cutItem(); void pasteItem(); void addTextAnnotation(); void editTextAnnotation(); void stopEditingTextAnnotation( int result ); void addOverlay(); void editOverlay(); void removeOverlay(); void updateOverlayFrame( GeoDataGroundOverlay *overlay ); void addPolygon(); void stopEditingPolygon( int result ); void setAddingPolygonHole( bool enabled ); void setAddingNodes( bool enabled ); void editPolygon(); void selectNode(); void deleteNode(); void deselectNodes(); void deleteSelectedNodes(); void setAreaAvailable(); void addPolyline(); void editPolyline(); void stopEditingPolyline( int result ); void setPolylineAvailable(); void addRelation( const OsmPlacemarkData &relationOsmData ); protected: bool eventFilter( QObject *watched, QEvent *event ); private: void addContextItems(); void setupActions( MarbleWidget *marbleWidget ); void disableActions( QActionGroup *group ); void enableAllActions( QActionGroup *group ); void enableActionsOnItemType( const QString &type ); void disableFocusActions(); void setupTextAnnotationRmbMenu(); void showTextAnnotationRmbMenu( qreal x, qreal y ); void setupGroundOverlayModel(); void setupOverlayRmbMenu(); void showOverlayRmbMenu( GeoDataGroundOverlay *overlay, qreal x, qreal y ); void displayOverlayFrame( GeoDataGroundOverlay *overlay ); void clearOverlayFrames(); void setupPolygonRmbMenu(); void setupNodeRmbMenu(); void showPolygonRmbMenu( qreal x, qreal y ); void showNodeRmbMenu( qreal x, qreal y ); void setupPolylineRmbMenu(); void showPolylineRmbMenu( qreal x, qreal y ); void handleUncaughtEvents( QMouseEvent *mouseEvent ); void handleReleaseOverlay( QMouseEvent *mouseEvent ); bool handleDrawingPolyline( QMouseEvent *mouseEvent ); bool handleDrawingPolygon( QMouseEvent *mouseEvent ); bool handleMovingSelectedItem( QMouseEvent *mouseEvent ); void handleRequests( QMouseEvent *mouseEvent, SceneGraphicsItem *item ); void handleSuccessfulPressEvent( QMouseEvent *mouseEvent, SceneGraphicsItem *item ); void handleSuccessfulHoverEvent( QMouseEvent *mouseEvent, SceneGraphicsItem *item ); void handleSuccessfulReleaseEvent( QMouseEvent *mouseEvent, SceneGraphicsItem *item ); void announceStateChanged( SceneGraphicsItem::ActionState newState ); void setupCursor( SceneGraphicsItem *item ); const GeoDataCoordinates mouseGeoDataCoordinates( QMouseEvent *mouseEvent ); bool m_isInitialized; bool m_widgetInitialized; MarbleWidget *m_marbleWidget; QMenu *m_overlayRmbMenu; QMenu *m_polygonRmbMenu; QMenu *m_nodeRmbMenu; QMenu *m_textAnnotationRmbMenu; QMenu *m_polylineRmbMenu; QList m_actions; QSortFilterProxyModel m_groundOverlayModel; QMap m_groundOverlayFrames; // A list of all osm relations QHash m_osmRelations; GeoDataDocument* m_annotationDocument; QList m_graphicsItems; SceneGraphicsItem *m_movedItem; SceneGraphicsItem *m_focusItem; SceneGraphicsItem *m_editedItem; GeoDataGroundOverlay *m_rmbOverlay; GeoDataPlacemark *m_polylinePlacemark; GeoDataPlacemark *m_polygonPlacemark; GeoDataCoordinates m_fromWhereToCopy; SceneGraphicsItem *m_clipboardItem; QAction *m_pasteGraphicItem; bool m_drawingPolygon; bool m_drawingPolyline; bool m_addingPlacemark; bool m_editingDialogIsShown; }; } #endif // MARBLE_ANNOTATEPLUGIN_H diff --git a/src/plugins/render/aprs/AprsPlugin.h b/src/plugins/render/aprs/AprsPlugin.h index 896da8e90..b49d9dccc 100644 --- a/src/plugins/render/aprs/AprsPlugin.h +++ b/src/plugins/render/aprs/AprsPlugin.h @@ -1,118 +1,118 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Wes Hardaker // #ifndef APRSPLUGIN_H #define APRSPLUGIN_H #include #include "RenderPlugin.h" #include "DialogConfigurationInterface.h" #include "AprsObject.h" #include "AprsGatherer.h" #include "GeoDataLatLonAltBox.h" #include "ui_AprsConfigWidget.h" class QMutex; namespace Ui { class AprsConfigWidget; } namespace Marble { /** * \brief This class displays a layer of aprs (which aprs TBD). * */ class AprsPlugin : public RenderPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.AprsPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.AprsPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( AprsPlugin ) public: explicit AprsPlugin( const MarbleModel *marbleModel=0 ); ~AprsPlugin(); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); QDialog *configDialog(); QAction *action() const; QHash settings() const; void setSettings( const QHash &settings ); void stopGatherers(); void restartGatherers(); private Q_SLOTS: void readSettings(); void writeSettings(); void updateVisibility( bool visible ); virtual RenderType renderType() const; private: QMutex *m_mutex; QMap m_objects; bool m_initialized; GeoDataLatLonAltBox m_lastBox; AprsGatherer *m_tcpipGatherer, *m_ttyGatherer, *m_fileGatherer; QString m_filter; QAction *m_action; bool m_useInternet; bool m_useTty; bool m_useFile; QString m_aprsHost; int m_aprsPort; QString m_tncTty; QString m_aprsFile; bool m_dumpTcpIp; bool m_dumpTty; bool m_dumpFile; int m_fadeTime; int m_hideTime; QDialog *m_configDialog; Ui::AprsConfigWidget *ui_configWidget; }; } #endif diff --git a/src/plugins/render/atmosphere/AtmospherePlugin.h b/src/plugins/render/atmosphere/AtmospherePlugin.h index c3bc33c59..e836aa183 100644 --- a/src/plugins/render/atmosphere/AtmospherePlugin.h +++ b/src/plugins/render/atmosphere/AtmospherePlugin.h @@ -1,78 +1,78 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010-2012 Bernhard Beschow // Copyright 2011 Jens-Michael Hoffmann // #ifndef MARBLE_ATMOSPHEREPLUGIN_H #define MARBLE_ATMOSPHEREPLUGIN_H #include "RenderPlugin.h" #include namespace Marble { class AtmospherePlugin : public RenderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.AtmospherePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.AtmospherePlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( AtmospherePlugin ) public: AtmospherePlugin(); explicit AtmospherePlugin( const MarbleModel *marbleModel ); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; virtual RenderType renderType() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QIcon icon() const; QString copyrightYears() const; QVector pluginAuthors() const override; qreal zValue() const; void initialize(); bool isInitialized() const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); void repaintPixmap(const ViewportParams *viewParams); public Q_SLOTS: void updateTheme(); private: QPixmap m_renderPixmap; QColor m_renderColor; int m_renderRadius; }; } #endif // MARBLE_ATMOSPHEREPLUGIN_H diff --git a/src/plugins/render/compass/CompassFloatItem.h b/src/plugins/render/compass/CompassFloatItem.h index 255c89049..60a864b1c 100644 --- a/src/plugins/render/compass/CompassFloatItem.h +++ b/src/plugins/render/compass/CompassFloatItem.h @@ -1,101 +1,101 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Torsten Rahn // #ifndef COMPASS_FLOAT_ITEM_H #define COMPASS_FLOAT_ITEM_H #include #include "AbstractFloatItem.h" #include "DialogConfigurationInterface.h" class QSvgRenderer; namespace Ui { class CompassConfigWidget; } namespace Marble { /** * @short The class that creates a compass * */ class CompassFloatItem : public AbstractFloatItem, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.CompassFloatItem" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.CompassFloatItem") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( CompassFloatItem ) public: CompassFloatItem(); explicit CompassFloatItem( const MarbleModel *marbleModel ); ~CompassFloatItem (); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; QPainterPath backgroundShape() const; void setProjection( const ViewportParams *viewport ); void paintContent( QPainter *painter ); QDialog *configDialog(); QHash settings() const; void setSettings( const QHash &settings ); private Q_SLOTS: void readSettings(); void writeSettings(); private: Q_DISABLE_COPY( CompassFloatItem ) bool m_isInitialized; QSvgRenderer *m_svgobj; QPixmap m_compass; /// allowed values: -1, 0, 1; default here: 0. FIXME: Declare enum int m_polarity; int m_themeIndex; QDialog * m_configDialog; Ui::CompassConfigWidget * m_uiConfigWidget; }; } #endif diff --git a/src/plugins/render/crosshairs/CrosshairsPlugin.h b/src/plugins/render/crosshairs/CrosshairsPlugin.h index 3a5e9d58d..c7f438258 100644 --- a/src/plugins/render/crosshairs/CrosshairsPlugin.h +++ b/src/plugins/render/crosshairs/CrosshairsPlugin.h @@ -1,113 +1,113 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Torsten Rahn // Copyright 2010 Cezar Mocan // // // This class is a crosshairs plugin. // #ifndef MARBLE_CROSSHAIRSPLUGIN_H #define MARBLE_CROSSHAIRSPLUGIN_H #include #include "RenderPlugin.h" #include "DialogConfigurationInterface.h" class QSvgRenderer; namespace Ui { class CrosshairsConfigWidget; } namespace Marble { /** * @short The class that specifies the Marble layer interface of a plugin. * */ class CrosshairsPlugin : public RenderPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.CrosshairsPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.CrosshairsPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN(CrosshairsPlugin) public: CrosshairsPlugin(); explicit CrosshairsPlugin( const MarbleModel *marbleModel ); ~CrosshairsPlugin(); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; virtual RenderType renderType() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); QDialog *configDialog(); QHash settings() const; void setSettings( const QHash &settings ); private Q_SLOTS: void readSettings(); void writeSettings(); private: Q_DISABLE_COPY( CrosshairsPlugin ) bool m_isInitialized; QSvgRenderer *m_svgobj; QPixmap m_crosshairs; int m_themeIndex; QString m_theme; QDialog * m_configDialog; Ui::CrosshairsConfigWidget * m_uiConfigWidget; }; } #endif // MARBLE_CROSSHAIRSPLUGIN_H diff --git a/src/plugins/render/earthquake/EarthquakePlugin.h b/src/plugins/render/earthquake/EarthquakePlugin.h index 81ccbaada..13b921f21 100644 --- a/src/plugins/render/earthquake/EarthquakePlugin.h +++ b/src/plugins/render/earthquake/EarthquakePlugin.h @@ -1,94 +1,94 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Utku Aydın // #ifndef EARTHQUAKEPLUGIN_H #define EARTHQUAKEPLUGIN_H #include "AbstractDataPlugin.h" #include "DialogConfigurationInterface.h" #include namespace Ui { class EarthquakeConfigWidget; } namespace Marble { class EarthquakePlugin : public AbstractDataPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.EarthquakePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.EarthquakePlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( EarthquakePlugin ) public: EarthquakePlugin(); explicit EarthquakePlugin( const MarbleModel *marbleModel ); virtual void initialize(); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; QDialog *configDialog(); /** * @return: The settings of the item. */ virtual QHash settings() const; /** * Set the settings of the item. */ virtual void setSettings( const QHash &settings ); public Q_SLOTS: void readSettings(); void writeSettings(); void updateModel(); private: Ui::EarthquakeConfigWidget *m_ui; QDialog *m_configDialog; qreal m_minMagnitude; QDateTime m_startDate; QDateTime m_endDate; int m_pastDays; bool m_timeRangeNPastDays; int m_numResults; int m_maximumNumberOfItems; private Q_SLOTS: void validateDateRange(); }; } #endif // EARTHQUAKEPLUGIN_H diff --git a/src/plugins/render/eclipses/EclipsesPlugin.h b/src/plugins/render/eclipses/EclipsesPlugin.h index 8ba933a03..e43e9d285 100644 --- a/src/plugins/render/eclipses/EclipsesPlugin.h +++ b/src/plugins/render/eclipses/EclipsesPlugin.h @@ -1,154 +1,154 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Rene Kuettner // #ifndef MARBLE_ECLIPSESPLUGIN_H #define MARBLE_ECLIPSESPLUGIN_H #include "RenderPlugin.h" #include "DialogConfigurationInterface.h" class QMenu; namespace Ui { class EclipsesConfigDialog; class EclipsesReminderDialog; } namespace Marble { class MarbleWidget; class EclipsesModel; class EclipsesItem; class EclipsesBrowserDialog; /** * @brief This plugin displays solar eclipses. * * It utilizes Gerhard Holtcamps eclsolar class to render nice * visualizations of eclipse events on earth. */ class EclipsesPlugin : public RenderPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.EclipsesPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.EclipsesPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( EclipsesPlugin ) public: EclipsesPlugin(); explicit EclipsesPlugin( const MarbleModel *marbleModel ); virtual ~EclipsesPlugin(); // this is the implementation of the RenderPlugin interface // see RenderPlugin.h for a description QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString nameId() const; QString guiString() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; RenderPlugin::RenderType renderType() const; QList* actionGroups() const; QDialog *configDialog(); void initialize(); bool isInitialized() const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer ); QHash settings() const; void setSettings( const QHash &settings ); protected: bool eventFilter( QObject *object, QEvent *e ); private Q_SLOTS: void readSettings(); void writeSettings(); void updateSettings(); /** * @brief Update list of eclipses for the current year * * This calculates the list of eclipses for the year the marble clock * is set to. */ void updateEclipses(); /** * @brief Show an eclipse event on the marble map * * @param year The year the eclipse event happens * @param index The index of the eclipse in this year * * Shows the eclipse with index @p index in year @p year by setting * the marble clock to the time of the eclipse's maximum. */ void showEclipse( int year, int index ); /** * @brief Show an eclipse event selected from the menu * * @param action The menu items action * * Shows the eclipse the menu item given by @p action refers to. * The eclipse's index is stored in the actions data field while the * year is taken from the action's text. */ void showEclipseFromMenu( QAction *action ); /** * @brief Update menu item state * * Updates the state of the plugin's menu items. They will be disabled for * non earth themes since we only support eclipse events on earth. */ void updateMenuItemState(); private: bool renderItem( GeoPainter *painter, EclipsesItem *item ) const; private: bool m_isInitialized; MarbleWidget *m_marbleWidget; EclipsesModel *m_model; QList m_actionGroups; QActionGroup *m_eclipsesActionGroup; QHash m_settings; QAction *m_eclipsesMenuAction; QMenu *m_eclipsesListMenu; int m_menuYear; // dialogs QDialog *m_configDialog; Ui::EclipsesConfigDialog *m_configWidget; EclipsesBrowserDialog *m_browserDialog; QDialog *m_reminderDialog; Ui::EclipsesReminderDialog *m_reminderWidget; }; } #endif // MARBLE_ECLIPSESPLUGIN_H diff --git a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h index 61f12408e..75f1ad5c0 100644 --- a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h +++ b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h @@ -1,160 +1,160 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011-2012 Florian Eßer // Copyright 2012 Bernhard Beschow // Copyright 2013 Roman Karlstetter // #ifndef ELEVATIONPROFILEFLOATITEM_H #define ELEVATIONPROFILEFLOATITEM_H #include "AbstractFloatItem.h" #include "DialogConfigurationInterface.h" #include "ElevationProfileDataSource.h" #include "ElevationProfilePlotAxis.h" #include "GeoDataDocument.h" #include "GeoDataLineString.h" #include "GeoGraphicsItem.h" #include "LabelGraphicsItem.h" namespace Ui { class ElevationProfileConfigWidget; } namespace Marble { class ElevationProfileContextMenu; class ElevationProfileDataSource; class ElevationProfileTrackDataSource; class ElevationProfileRouteDataSource; class GeoDataPlacemark; class MarbleWidget; class RoutingModel; /** * @short The class that creates an interactive elvation profile. * */ class ElevationProfileFloatItem : public AbstractFloatItem, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.ElevationProfileFloatItem" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.ElevationProfileFloatItem") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( ElevationProfileFloatItem ) public: explicit ElevationProfileFloatItem( const MarbleModel *marbleModel = 0 ); ~ElevationProfileFloatItem(); virtual QStringList backendTypes() const; virtual qreal zValue() const; // Overriding LayerInterface to paint on top of the route virtual QString name() const; virtual QString guiString() const; virtual QString nameId() const; virtual QString version() const; virtual QString description() const; virtual QString copyrightYears() const; QVector pluginAuthors() const override; virtual QIcon icon() const; virtual void initialize(); virtual bool isInitialized() const; virtual void setProjection( const ViewportParams *viewport ); virtual void paintContent( QPainter *painter ); QDialog *configDialog(); protected: bool eventFilter( QObject *object, QEvent *e ); virtual void contextMenuEvent( QWidget *w, QContextMenuEvent *e ); private Q_SLOTS: void handleDataUpdate(const GeoDataLineString &points, const QVector &eleData); void updateVisiblePoints(); void forceRepaint(); void readSettings(); void writeSettings(); void toggleZoomToViewport(); void switchToRouteDataSource(); void switchToTrackDataSource(int index); void switchDataSource(ElevationProfileDataSource *source); Q_SIGNALS: void dataUpdated(); private: ElevationProfileDataSource* m_activeDataSource; ElevationProfileRouteDataSource m_routeDataSource; ElevationProfileTrackDataSource m_trackDataSource; QDialog *m_configDialog; Ui::ElevationProfileConfigWidget *ui_configWidget; int m_leftGraphMargin; int m_eleGraphWidth; qreal m_viewportWidth; qreal m_eleGraphHeight; qreal m_shrinkFactorY; int m_fontHeight; ElevationProfilePlotAxis m_axisX; ElevationProfilePlotAxis m_axisY; GeoDataDocument m_markerDocument; GeoDataPlacemark *const m_markerPlacemark; int m_documentIndex; qreal m_cursorPositionX; bool m_isInitialized; friend class ElevationProfileContextMenu; ElevationProfileContextMenu* m_contextMenu; MarbleWidget* m_marbleWidget; int m_firstVisiblePoint; int m_lastVisiblePoint; bool m_zoomToViewport; QVector m_eleData; GeoDataLineString m_points; qreal m_minElevation; qreal m_maxElevation; qreal m_gain; qreal m_loss; QVector calculateElevationData(const GeoDataLineString &lineString) const; void calculateStatistics(const QVector &eleData); }; } #endif // ELEVATIONPROFILEFLOATITEM_H diff --git a/src/plugins/render/elevationprofilemarker/ElevationProfileMarker.h b/src/plugins/render/elevationprofilemarker/ElevationProfileMarker.h index 0b1d0a0ab..21eaaf985 100644 --- a/src/plugins/render/elevationprofilemarker/ElevationProfileMarker.h +++ b/src/plugins/render/elevationprofilemarker/ElevationProfileMarker.h @@ -1,87 +1,87 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Bernhard Beschow // #ifndef ELEVATIONPROFILEMARKER_H #define ELEVATIONPROFILEMARKER_H #include "RenderPlugin.h" #include "BillboardGraphicsItem.h" #include "GeoDataCoordinates.h" #include "LabelGraphicsItem.h" namespace Marble { class GeoDataObject; class GeoDataPlacemark; class ElevationProfileMarker : public RenderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.ElevationProfileMarker" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.ElevationProfileMarker") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( ElevationProfileMarker ) public: explicit ElevationProfileMarker( const MarbleModel *marbleModel = 0 ); ~ElevationProfileMarker(); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; qreal zValue() const; // Overriding LayerInterface to paint on top of the route QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; void initialize(); bool isInitialized() const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer = 0 ); private Q_SLOTS: void onGeoObjectAdded( GeoDataObject *object ); void onGeoObjectRemoved( GeoDataObject *object ); private: GeoDataPlacemark *m_markerPlacemark; GeoDataCoordinates m_currentPosition; BillboardGraphicsItem m_markerItem; LabelGraphicsItem m_markerIcon; LabelGraphicsItem m_markerText; }; } #endif // ELEVATIONPROFILEMARKER_H diff --git a/src/plugins/render/fileview/FileViewFloatItem.h b/src/plugins/render/fileview/FileViewFloatItem.h index 4e62e9d85..2984cb356 100644 --- a/src/plugins/render/fileview/FileViewFloatItem.h +++ b/src/plugins/render/fileview/FileViewFloatItem.h @@ -1,105 +1,105 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Patrick Spendrin // #ifndef FILEVIEW_FLOAT_ITEM_H #define FILEVIEW_FLOAT_ITEM_H // forward declarations class QListView; class QPersistentModelIndex; #include "AbstractFloatItem.h" namespace Marble { class MarbleWidget; /** * @short Provides a float item with a list of opened files * */ class FileViewFloatItem: public AbstractFloatItem { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.FileViewFloatItem" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.FileViewFloatItem") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN(FileViewFloatItem) public: explicit FileViewFloatItem( const QPointF &point = QPointF( -1, 10 ), const QSizeF &size = QSizeF( 110.0, 250.0 ) ); ~FileViewFloatItem(); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString description() const; QIcon icon () const; void initialize (); bool isInitialized () const; void changeViewport( ViewportParams *viewport ); virtual QPainterPath backgroundShape() const; void paintContent( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer *layer = 0 ); protected: bool eventFilter( QObject *object, QEvent *e ); private Q_SLOTS: /** Map theme was changed, adjust controls */ void selectTheme( const QString& theme ); /** Enable/disable zoom in/out buttons */ void updateFileView(); void contextMenu(const QPoint& pos); void addFile(); void removeFile(); private: /** MarbleWidget this float item is installed as event filter for */ MarbleWidget *m_marbleWidget; /** FileView controls */ QListView *m_fileView; /** FileView embedding widget */ QWidget *m_fileViewParent; /** current position */ QPoint m_itemPosition; /** Radius of the viewport last time */ int m_oldViewportRadius; /** Repaint needed */ bool m_repaintScheduled; /** the last clicked ModelIndex */ QPersistentModelIndex* m_persIndex; }; } #endif // FILEVIEW_FLOAT_ITEM_H diff --git a/src/plugins/render/foursquare/FoursquarePlugin.h b/src/plugins/render/foursquare/FoursquarePlugin.h index 75c777f1f..fbda2b83e 100644 --- a/src/plugins/render/foursquare/FoursquarePlugin.h +++ b/src/plugins/render/foursquare/FoursquarePlugin.h @@ -1,63 +1,63 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Utku Aydın // #ifndef FOURSQUAREPLUGIN_H #define FOURSQUAREPLUGIN_H #include "AbstractDataPlugin.h" namespace Marble { class FoursquarePlugin : public AbstractDataPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.FoursquarePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.FoursquarePlugin" ) Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( FoursquarePlugin ) public: FoursquarePlugin(); explicit FoursquarePlugin( const MarbleModel *marbleModel ); virtual void initialize(); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; /** * @brief Checks if there is an access token stored. */ Q_INVOKABLE bool isAuthenticated(); /** * @brief Stores the access token. * @param url A dummy URL that has a fragment named access_token * @see https://developer.foursquare.com/overview/auth */ Q_INVOKABLE bool storeAccessToken(const QString &tokenUrl); }; } #endif // FOURSQUAREPLUGIN_H diff --git a/src/plugins/render/gpsinfo/GpsInfo.h b/src/plugins/render/gpsinfo/GpsInfo.h index bdbfc9e75..1b12be972 100644 --- a/src/plugins/render/gpsinfo/GpsInfo.h +++ b/src/plugins/render/gpsinfo/GpsInfo.h @@ -1,83 +1,83 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Thibaut Gridel // // // This class is a render plugin to display various Position Tracking info. // #ifndef MARBLEGPSINFO_H #define MARBLEGPSINFO_H #include #include "AbstractFloatItem.h" #include "ui_GpsInfoPlugin.h" namespace Marble { class GeoDataCoordinates; class WidgetGraphicsItem; class MarbleLocale; /** * @short The class that displays Position Tracking info * */ class GpsInfo : public AbstractFloatItem { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GpsInfo" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GpsInfo") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( GpsInfo ) public: GpsInfo(); explicit GpsInfo( const MarbleModel *marbleModel ); ~GpsInfo(); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; void forceRepaint(); private Q_SLOTS: void updateLocation( const GeoDataCoordinates& coordinates, qreal speed); private: MarbleLocale* m_locale; Ui::GpsInfoPlugin m_widget; WidgetGraphicsItem* m_widgetItem; }; } #endif diff --git a/src/plugins/render/graticule/GraticulePlugin.h b/src/plugins/render/graticule/GraticulePlugin.h index 2388c19c6..c9d4aace6 100644 --- a/src/plugins/render/graticule/GraticulePlugin.h +++ b/src/plugins/render/graticule/GraticulePlugin.h @@ -1,232 +1,232 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2009 Torsten Rahn // // // This class is a graticule plugin. // #ifndef MARBLEGRATICULEPLUGIN_H #define MARBLEGRATICULEPLUGIN_H #include #include #include #include #include #include "DialogConfigurationInterface.h" #include "RenderPlugin.h" #include "RenderPluginInterface.h" #include "GeoDataCoordinates.h" #include "GeoDataLatLonAltBox.h" namespace Ui { class GraticuleConfigWidget; } namespace Marble { class GeoDataLatLonAltBox; /** * @brief A plugin that creates a coordinate grid on top of the map. * Unlike in all other classes we are using degree by default in this class. * This choice was made due to the fact that all common coordinate grids focus fully * on the degree system. */ class GraticulePlugin : public RenderPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GraticulePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GraticulePlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( GraticulePlugin ) public: GraticulePlugin(); explicit GraticulePlugin( const MarbleModel *marbleModel ); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; QDialog *configDialog(); void initialize (); bool isInitialized () const; virtual bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); virtual qreal zValue() const; virtual QHash settings() const; virtual void setSettings( const QHash &settings ); public Q_SLOTS: void readSettings(); void writeSettings(); void gridGetColor(); void tropicsGetColor(); void equatorGetColor(); private: /** * @brief Renders the coordinate grid within the defined view bounding box. * @param painter the painter used to draw the grid * @param viewport the viewport */ void renderGrid( GeoPainter *painter, ViewportParams *viewport, const QPen& equatorCirclePen, const QPen& tropicsCirclePen, const QPen& gridCirclePen ); /** * @brief Renders a latitude line within the defined view bounding box. * @param painter the painter used to draw the latitude line * @param latitude the latitude of the coordinate line measured in degree . * @param viewLatLonAltBox the latitude longitude bounding box that is covered by the view. */ static void renderLatitudeLine( GeoPainter *painter, qreal latitude, const GeoDataLatLonAltBox& viewLatLonAltBox = GeoDataLatLonAltBox(), const QString& lineLabel = QString(), LabelPositionFlags labelPositionFlags = LineCenter ); /** * @brief Renders a longitude line within the defined view bounding box. * @param painter the painter used to draw the latitude line * @param longitude the longitude of the coordinate line measured in degree . * @param viewLatLonAltBox the latitude longitude bounding box that is covered by the view. * @param polarGap the area around the poles in which most longitude lines are not drawn * for reasons of aesthetics and clarity of the map. The polarGap avoids narrow * concurring lines around the poles which obstruct the view onto the surface. * The radius of the polarGap area is measured in degrees. * @param lineLabel draws a label using the font and color properties set for the painter. */ static void renderLongitudeLine( GeoPainter *painter, qreal longitude, const GeoDataLatLonAltBox& viewLatLonAltBox = GeoDataLatLonAltBox(), qreal northPolarGap = 0.0, qreal southPolarGap = 0.0, const QString& lineLabel = QString(), LabelPositionFlags labelPositionFlags = LineCenter ); /** * @brief Renders the latitude lines that are visible within the defined view bounding box. * @param painter the painter used to draw the latitude lines * @param viewLatLonAltBox the latitude longitude bounding box that is covered by the view. * @param step the angular distance between the lines measured in degrees . */ void renderLatitudeLines( GeoPainter *painter, const GeoDataLatLonAltBox& viewLatLonAltBox, qreal step, qreal skipStep, LabelPositionFlags labelPositionFlags = LineCenter ); /** * @brief Renders the longitude lines that are visible within the defined view bounding box. * @param painter the painter used to draw the latitude lines * @param viewLatLonAltBox the latitude longitude bounding box that is covered by the view. * @param step the angular distance between the lines measured in degrees . * @param northPolarGap the area around the north pole in which most longitude lines are not drawn * for reasons of aesthetics and clarity of the map. The polarGap avoids narrow * concurring lines around the poles which obstruct the view onto the surface. * The radius of the polarGap area is measured in degrees. * @param southPolarGap the area around the south pole in which most longitude lines are not drawn * for reasons of aesthetics and clarity of the map. The polarGap avoids narrow * concurring lines around the poles which obstruct the view onto the surface. * The radius of the polarGap area is measured in degrees. */ void renderLongitudeLines( GeoPainter *painter, const GeoDataLatLonAltBox& viewLatLonAltBox, qreal step, qreal skipStep, qreal northPolarGap = 0.0, qreal southPolarGap = 0.0, LabelPositionFlags labelPositionFlags = LineCenter ); /** * @brief Renders UTM exceptions that are visible within the defined view bounding box. * @param painter the painter used to draw the latitude lines * @param viewLatLonAltBox the latitude longitude bounding box that is covered by the view. * @param step the angular distance between the lines measured in degrees . * @param northPolarGap the area around the north pole in which most longitude lines are not drawn * for reasons of aesthetics and clarity of the map. The polarGap avoids narrow * concurring lines around the poles which obstruct the view onto the surface. * The radius of the polarGap area is measured in degrees. * @param southPolarGap the area around the south pole in which most longitude lines are not drawn * for reasons of aesthetics and clarity of the map. The polarGap avoids narrow * concurring lines around the poles which obstruct the view onto the surface. * The radius of the polarGap area is measured in degrees. */ static void renderUtmExceptions( GeoPainter *painter, const GeoDataLatLonAltBox& viewLatLonAltBox, qreal step, qreal northPolarGap, qreal southPolarGap, const QString & label, LabelPositionFlags labelPositionFlags ); /** * @brief Maps the number of coordinate lines per 360 deg against the globe radius on the screen. * @param notation Determines whether the graticule is according to the DMS or Decimal system. */ void initLineMaps( GeoDataCoordinates::Notation notation ); GeoDataCoordinates::Notation m_currentNotation; // Maps the zoom factor to the amount of lines per 360 deg QMap m_boldLineMap; QMap m_normalLineMap; QPen m_equatorCirclePen; QPen m_tropicsCirclePen; QPen m_gridCirclePen; bool m_showPrimaryLabels; bool m_showSecondaryLabels; bool m_isInitialized; QIcon m_icon; Ui::GraticuleConfigWidget *ui_configWidget; QDialog *m_configDialog; }; } #endif // MARBLEGRATICULEPLUGIN_H diff --git a/src/plugins/render/inhibit-screensaver/InhibitScreensaverPlugin.h b/src/plugins/render/inhibit-screensaver/InhibitScreensaverPlugin.h index b7724608c..3a0326c2a 100644 --- a/src/plugins/render/inhibit-screensaver/InhibitScreensaverPlugin.h +++ b/src/plugins/render/inhibit-screensaver/InhibitScreensaverPlugin.h @@ -1,81 +1,81 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef INHIBITSCREENSAVERPLUGIN_H #define INHIBITSCREENSAVERPLUGIN_H #include "RenderPlugin.h" namespace Marble { class PositionProviderPlugin; class InhibitScreensaverPluginPrivate; /** * A plugin that inhibits the screensaver as long as a position * provider plugin is active */ class InhibitScreensaverPlugin : public RenderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.InhibitScreensaverPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.InhibitScreensaverPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( InhibitScreensaverPlugin ) public: InhibitScreensaverPlugin(); explicit InhibitScreensaverPlugin( const MarbleModel *marbleModel ); ~InhibitScreensaverPlugin(); QStringList backendTypes() const; void initialize(); bool isInitialized() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; virtual QStringList renderPosition() const; virtual bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos = "NONE", GeoSceneLayer * layer = 0 ); virtual QString renderPolicy() const; private Q_SLOTS: void updateScreenSaverState( PositionProviderPlugin *activePlugin ); void inhibitScreenSaver(); private: InhibitScreensaverPluginPrivate* const d; }; } #endif // INHIBITSCREENSAVERPLUGIN_H diff --git a/src/plugins/render/license/License.h b/src/plugins/render/license/License.h index 1cccea13d..5942a866f 100644 --- a/src/plugins/render/license/License.h +++ b/src/plugins/render/license/License.h @@ -1,71 +1,71 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Dennis Nienhüser // Copyright 2012 Illya Kovalevskyy // #ifndef MARBLELICENSE_H #define MARBLELICENSE_H #include "AbstractFloatItem.h" class QLabel; namespace Marble { class GeoDataCoordinates; class WidgetGraphicsItem; class MarbleLocale; /** * @short The class that displays copyright info * */ class License : public AbstractFloatItem { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.License" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.License") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( License ) public: explicit License( const MarbleModel *marbleModel=0 ); ~License(); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; private Q_SLOTS: void updateLicenseText(); void toggleLicenseSize(); void showAboutDialog(); protected: bool eventFilter(QObject *, QEvent *e); void contextMenuEvent( QWidget *w, QContextMenuEvent *e ); private: WidgetGraphicsItem* m_widgetItem; QLabel* m_label; bool m_showFullLicense; QMenu* m_contextMenu; }; } #endif diff --git a/src/plugins/render/mapscale/MapScaleFloatItem.h b/src/plugins/render/mapscale/MapScaleFloatItem.h index e1c7e75e9..8ae2bff3e 100644 --- a/src/plugins/render/mapscale/MapScaleFloatItem.h +++ b/src/plugins/render/mapscale/MapScaleFloatItem.h @@ -1,118 +1,118 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Torsten Rahn // #ifndef MAPSCALEFLOATITEM_H #define MAPSCALEFLOATITEM_H #include "AbstractFloatItem.h" #include "DialogConfigurationInterface.h" namespace Ui { class MapScaleConfigWidget; } namespace Marble { /** * @short The class that creates a map scale. * */ class MapScaleFloatItem : public AbstractFloatItem, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.MapScaleFloatItem" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.MapScaleFloatItem") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( MapScaleFloatItem ) public: explicit MapScaleFloatItem( const MarbleModel *marbleModel = 0 ); ~MapScaleFloatItem(); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; void setProjection( const ViewportParams *viewport ); void paintContent( QPainter *painter ); QDialog *configDialog(); protected: virtual void contextMenuEvent( QWidget *w, QContextMenuEvent *e ); virtual void toolTipEvent( QHelpEvent *e ); private Q_SLOTS: void readSettings(); void writeSettings(); void toggleRatioScaleVisibility(); void toggleMinimized(); private: void calcScaleBar(); private: QDialog *m_configDialog; Ui::MapScaleConfigWidget *ui_configWidget; int m_radius; QString m_target; int m_leftBarMargin; int m_rightBarMargin; int m_scaleBarWidth; int m_viewportWidth; int m_scaleBarHeight; qreal m_scaleBarDistance; qreal m_pixel2Length; int m_bestDivisor; int m_pixelInterval; int m_valueInterval; QString m_ratioString; bool m_scaleInitDone; bool m_showRatioScale; QMenu* m_contextMenu; QAction *m_minimizeAction; bool m_minimized; int m_widthScaleFactor; }; } #endif // MAPSCALEFLOATITEM_H diff --git a/src/plugins/render/measure/MeasureToolPlugin.h b/src/plugins/render/measure/MeasureToolPlugin.h index 951351a15..dd42f4682 100644 --- a/src/plugins/render/measure/MeasureToolPlugin.h +++ b/src/plugins/render/measure/MeasureToolPlugin.h @@ -1,147 +1,147 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2006-2007 Torsten Rahn // Copyright 2007 Inge Wallin // Copyright 2011 Michael Henning // // // MeasureToolPlugin enables Marble to set and display measure points // #ifndef MARBLE_MEASURETOOLPLUGIN_H #define MARBLE_MEASURETOOLPLUGIN_H #include "DialogConfigurationInterface.h" #include "GeoDataLineString.h" #include "RenderPlugin.h" #include "MarbleWidget.h" #include "MarbleWidgetPopupMenu.h" #include #include #include #include namespace Marble { class MeasureConfigDialog; class MeasureToolPlugin : public RenderPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.MeasureToolPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.MeasureToolPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( MeasureToolPlugin ) public: explicit MeasureToolPlugin( const MarbleModel *marbleModel = 0 ); enum PaintMode { Polygon = 0, Circular }; QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); QDialog *configDialog(); QHash settings() const; void setSettings( const QHash &settings ); Q_SIGNALS: void numberOfMeasurePointsChanged( int newNumber ); public Q_SLOTS: bool eventFilter( QObject *object, QEvent *event ); private: void drawMeasurePoints( GeoPainter *painter ) const; void drawInfobox( GeoPainter *painter ) const; void drawSegments( GeoPainter *painter ); void addContextItems(); void removeContextItems(); private Q_SLOTS: void setNumberOfMeasurePoints( int number ); void addMeasurePointEvent(); void addMeasurePoint( qreal lon, qreal lat ); void removeLastMeasurePoint(); void removeMeasurePoints(); void writeSettings(); private: Q_DISABLE_COPY( MeasureToolPlugin ) QString meterToPreferredUnit(qreal meters, bool isSquare = false) const; // The line strings in the distance path. GeoDataLineString m_measureLineString; GeoDataLatLonAltBox m_latLonAltBox; const QPixmap m_mark; QFont m_font_regular; int m_fontascent; QPen m_pen; QAction *m_addMeasurePointAction; QAction *m_removeLastMeasurePointAction; QAction *m_removeMeasurePointsAction; QAction *m_separator; MarbleWidget* m_marbleWidget; MeasureConfigDialog *m_configDialog; bool m_showDistanceLabel; bool m_showBearingLabel; bool m_showBearingChangeLabel; bool m_showPolygonArea; bool m_showCircularArea; bool m_showRadius; bool m_showPerimeter; bool m_showCircumference; qreal m_totalDistance; qreal m_polygonArea; qreal m_circularArea; qreal m_radius; qreal m_perimeter; qreal m_circumference; PaintMode m_paintMode; }; } #endif // MARBLE_MEASURETOOLPLUGIN_H diff --git a/src/plugins/render/navigation/NavigationFloatItem.h b/src/plugins/render/navigation/NavigationFloatItem.h index e5848a4a5..3ed5bfdc7 100644 --- a/src/plugins/render/navigation/NavigationFloatItem.h +++ b/src/plugins/render/navigation/NavigationFloatItem.h @@ -1,124 +1,124 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Dennis Nienhüser // Copyright 2013 Mohammed Nafees // #ifndef NAVIGATION_FLOAT_ITEM_H #define NAVIGATION_FLOAT_ITEM_H #include #include "MarbleGlobal.h" #include "AbstractFloatItem.h" namespace Ui { class Navigation; } namespace Marble { class MarbleWidget; class WidgetGraphicsItem; /** * @short Provides a float item with zoom and move controls * */ class NavigationFloatItem: public AbstractFloatItem { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.NavigationFloatItem" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.NavigationFloatItem") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( NavigationFloatItem ) public: explicit NavigationFloatItem( const MarbleModel *marbleModel = 0 ); ~NavigationFloatItem(); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; void setProjection( const ViewportParams *viewport ); static QPixmap pixmap( const QString &Id ); QHash settings() const; void setSettings( const QHash &settings ); protected: bool eventFilter( QObject *object, QEvent *e ); void paintContent( QPainter *painter ); void contextMenuEvent( QWidget *w, QContextMenuEvent *e ); private Q_SLOTS: /** Map theme was changed, adjust controls */ void selectTheme( const QString& theme ); /** Enable/disable zoom in/out buttons */ void updateButtons( int zoomValue ); void activateCurrentPositionButton(); void activateHomeButton(); void centerOnCurrentLocation(); private: /** MarbleWidget this float item is installed as event filter for */ MarbleWidget *m_marbleWidget; /** The GraphicsItem presenting the widgets. NavigationFloatItem doesn't take direct ownership of this */ WidgetGraphicsItem *m_widgetItem; /** Navigation controls */ Ui::Navigation *m_navigationWidget; /** Used Profile */ MarbleGlobal::Profiles m_profiles; /** Radius of the viewport last time */ int m_oldViewportRadius; int m_maxZoom; int m_minZoom; QMenu *m_contextMenu; QAction *m_activateCurrentPositionButtonAction; QAction *m_activateHomeButtonAction; bool m_showHomeButton; }; } #endif // NAVIGATION_FLOAT_ITEM_H diff --git a/src/plugins/render/opencaching/OpenCachingPlugin.h b/src/plugins/render/opencaching/OpenCachingPlugin.h index d030fec19..53f30faf6 100644 --- a/src/plugins/render/opencaching/OpenCachingPlugin.h +++ b/src/plugins/render/opencaching/OpenCachingPlugin.h @@ -1,85 +1,85 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Daniel Marth // #ifndef OPENCACHINGPLUGIN_H #define OPENCACHINGPLUGIN_H #include "AbstractDataPlugin.h" #include "RenderPlugin.h" #include "RenderPluginInterface.h" #include namespace Ui { class OpenCachingConfigWidget; } namespace Marble { /** * Plugin to display geocaches from opencaching.de on the map. */ class OpenCachingPlugin : public AbstractDataPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.OpenCachingPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.OpenCachingPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( OpenCachingPlugin ) public: OpenCachingPlugin(); virtual void initialize(); virtual bool isInitialized() const; QString name() const; QString guiString() const; QString description() const; QIcon icon() const; QDialog *configDialog(); /** * @return: The settings of the item. */ virtual QHash settings() const; /** * Set the settings of the item. */ virtual void setSettings( const QHash &settings ); public Q_SLOTS: void readSettings(); void writeSettings(); void updateSettings(); private: bool m_isInitialized; Ui::OpenCachingConfigWidget *m_ui; QDialog *m_configDialog; QHash m_settings; private Q_SLOTS: void validateDateRange(); void validateDifficultyRange(); }; } #endif // OPENCACHINGPLUGIN_H diff --git a/src/plugins/render/opencachingcom/OpenCachingComPlugin.h b/src/plugins/render/opencachingcom/OpenCachingComPlugin.h index 759c2f9e4..cd29d4852 100644 --- a/src/plugins/render/opencachingcom/OpenCachingComPlugin.h +++ b/src/plugins/render/opencachingcom/OpenCachingComPlugin.h @@ -1,73 +1,73 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Anders Lund // #ifndef OPENCACHINGCOMPLUGIN_H #define OPENCACHINGCOMPLUGIN_H #include "AbstractDataPlugin.h" #include "RenderPlugin.h" #include "RenderPluginInterface.h" namespace Ui { // class OpenCachingConfigWidget; } namespace Marble { /** * Plugin to display geocaches from opencaching.com on the map. */ class OpenCachingComPlugin : public AbstractDataPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.OpenCachingComPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.OpenCachingComPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( OpenCachingComPlugin ) public: OpenCachingComPlugin(); explicit OpenCachingComPlugin(const MarbleModel *marbleModel); virtual void initialize(); virtual bool isInitialized() const; QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; QDialog *configDialog(); private: bool m_isInitialized; }; } #endif // OPENCACHINGCOMPLUGIN_H diff --git a/src/plugins/render/opendesktop/OpenDesktopPlugin.h b/src/plugins/render/opendesktop/OpenDesktopPlugin.h index 512848e83..ed1bd0c43 100644 --- a/src/plugins/render/opendesktop/OpenDesktopPlugin.h +++ b/src/plugins/render/opendesktop/OpenDesktopPlugin.h @@ -1,80 +1,80 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Utku Aydın // #ifndef OPENDESKTOPPLUGIN_H #define OPENDESKTOPPLUGIN_H #include "AbstractDataPlugin.h" #include "DialogConfigurationInterface.h" namespace Ui { class OpenDesktopConfigWidget; } namespace Marble { const int defaultItemsOnScreen = 15; class OpenDesktopPlugin : public AbstractDataPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.OpenDesktopPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.OpenDesktopPlugin") Q_INTERFACES(Marble::RenderPluginInterface) Q_INTERFACES(Marble::DialogConfigurationInterface) MARBLE_PLUGIN(OpenDesktopPlugin) public: OpenDesktopPlugin(); explicit OpenDesktopPlugin( const MarbleModel *marbleModel ); virtual void initialize(); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; QDialog *configDialog(); QHash settings() const; void setSettings( const QHash &settings ); protected: bool eventFilter(QObject *object, QEvent *event); private Q_SLOTS: void readSettings(); void writeSettings(); private: QDialog * m_configDialog; Ui::OpenDesktopConfigWidget * m_uiConfigWidget; }; } #endif // OPENDESKTOPPLUGIN_H diff --git a/src/plugins/render/overviewmap/OverviewMap.h b/src/plugins/render/overviewmap/OverviewMap.h index cb198bd80..5bb27ea0e 100644 --- a/src/plugins/render/overviewmap/OverviewMap.h +++ b/src/plugins/render/overviewmap/OverviewMap.h @@ -1,131 +1,131 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Torsten Rahn // #ifndef MARBLEOVERVIEWMAP_H #define MARBLEOVERVIEWMAP_H #include #include #include #include #include #include "GeoDataLatLonAltBox.h" #include "AbstractFloatItem.h" #include "DialogConfigurationInterface.h" namespace Ui { class OverviewMapConfigWidget; } namespace Marble { /** * @short The class that creates an overview map. * */ class OverviewMap : public AbstractFloatItem, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.OverviewMap" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.OverviewMap") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( OverviewMap ) public: OverviewMap(); explicit OverviewMap( const MarbleModel *marbleModel ); ~OverviewMap(); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; QDialog *configDialog(); void initialize (); bool isInitialized () const; void setProjection( const ViewportParams *viewport ); void paintContent( QPainter *painter ); /** * @return: The settings of the item. */ virtual QHash settings() const; /** * Set the settings of the item. */ virtual void setSettings( const QHash &settings ); public Q_SLOTS: void readSettings(); void writeSettings(); void updateSettings(); protected: bool eventFilter( QObject *object, QEvent *e ); private: void changeBackground( const QString& target ); QSvgWidget *currentWidget() const; void setCurrentWidget( QSvgWidget *widget ); void loadPlanetMaps(); void loadMapSuggestions(); QString m_target; QSvgRenderer m_svgobj; QHash m_svgWidgets; QHash m_svgPaths; QStringList m_planetID; QPixmap m_worldmap; QHash m_settings; QColor m_posColor; QSizeF m_defaultSize; Ui::OverviewMapConfigWidget *ui_configWidget; QDialog *m_configDialog; GeoDataLatLonAltBox m_latLonAltBox; qreal m_centerLat; qreal m_centerLon; bool m_mapChanged; private Q_SLOTS: void chooseCustomMap(); void synchronizeSpinboxes(); void showCurrentPlanetPreview() const; void choosePositionIndicatorColor(); void useMapSuggestion( int index ); }; } #endif diff --git a/src/plugins/render/panoramio/PanoramioPlugin.h b/src/plugins/render/panoramio/PanoramioPlugin.h index 5b7635219..64ffc00fa 100644 --- a/src/plugins/render/panoramio/PanoramioPlugin.h +++ b/src/plugins/render/panoramio/PanoramioPlugin.h @@ -1,53 +1,53 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2009 Bastian Holst // #ifndef PANORAMIOPLUGIN_H #define PANORAMIOPLUGIN_H #include "AbstractDataPlugin.h" namespace Marble { class PanoramioPlugin : public AbstractDataPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.PanoramioPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.PanoramioPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( PanoramioPlugin ) public: explicit PanoramioPlugin( const MarbleModel *marbleModel = 0 ); QString nameId() const; QString version() const; QString copyrightYears() const; QVector pluginAuthors() const override; void initialize(); QString name() const; QString guiString() const; QString description() const; QIcon icon() const; protected: bool eventFilter( QObject *object, QEvent *event ); }; } #endif // PANORAMIOPLUGIN_H diff --git a/src/plugins/render/photo/PhotoPlugin.h b/src/plugins/render/photo/PhotoPlugin.h index bea725bd5..09c4e2848 100644 --- a/src/plugins/render/photo/PhotoPlugin.h +++ b/src/plugins/render/photo/PhotoPlugin.h @@ -1,93 +1,93 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2009 Bastian Holst // #ifndef PHOTOPLUGIN_H #define PHOTOPLUGIN_H #include "AbstractDataPlugin.h" #include "DialogConfigurationInterface.h" #include "RenderPlugin.h" #include "RenderPluginInterface.h" #include namespace Ui { class PhotoConfigWidget; } namespace Marble { class PhotoPlugin : public AbstractDataPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.PhotoPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.PhotoPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( PhotoPlugin ) public: PhotoPlugin(); explicit PhotoPlugin( const MarbleModel *marbleModel ); ~PhotoPlugin(); void initialize(); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; QDialog *configDialog(); /** * @return: The settings of the item. */ virtual QHash settings() const; /** * Set the settings of the item. */ virtual void setSettings( const QHash &settings ); protected: bool eventFilter( QObject *object, QEvent *event ); private Q_SLOTS: void readSettings(); void writeSettings(); void updateSettings(); void checkNumberOfItems( quint32 number ); private: Ui::PhotoConfigWidget *ui_configWidget; QDialog *m_configDialog; QStringList m_checkStateList; }; } #endif //PHOTOPLUGIN_H diff --git a/src/plugins/render/positionmarker/PositionMarker.h b/src/plugins/render/positionmarker/PositionMarker.h index cf27142e6..22a33a7d3 100644 --- a/src/plugins/render/positionmarker/PositionMarker.h +++ b/src/plugins/render/positionmarker/PositionMarker.h @@ -1,141 +1,141 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2007 Andrew Manson // Copyright 2009 Eckhart Wörner // Copyright 2010 Thibaut Gridel // #ifndef POSITION_MARKER_H #define POSITION_MARKER_H #include #include #include #include #include #include "DialogConfigurationInterface.h" #include "RenderPlugin.h" #include "GeoDataCoordinates.h" #include "GeoDataLatLonAltBox.h" namespace Ui { class PositionMarkerConfigWidget; } namespace Marble { class PositionMarker : public RenderPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.PositionMarker" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.PositionMarker") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( PositionMarker ) public: explicit PositionMarker(const MarbleModel *marbleModel = 0 ); ~PositionMarker (); QStringList renderPosition() const; QString renderPolicy() const; QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; QDialog *configDialog(); void initialize (); bool isInitialized () const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); // Overriding LayerInterface to paint on top of the route virtual qreal zValue() const; /** * @return: The settings of the item. */ virtual QHash settings() const; /** * Set the settings of the item. */ virtual void setSettings( const QHash &settings ); public Q_SLOTS: void readSettings(); void writeSettings(); void setPosition( const GeoDataCoordinates &position ); void chooseCustomCursor(); void chooseColor(); void resizeCursor( int step ); private: Q_DISABLE_COPY( PositionMarker ) void loadCustomCursor( const QString& filename, bool useCursor ); void loadDefaultCursor(); const MarbleModel *m_marbleModel; bool m_isInitialized; bool m_useCustomCursor; const QString m_defaultCursorPath; GeoDataLatLonAltBox m_lastBoundingBox; GeoDataCoordinates m_currentPosition; GeoDataCoordinates m_previousPosition; Ui::PositionMarkerConfigWidget *ui_configWidget; QDialog *m_configDialog; QString m_cursorPath; QPolygonF m_arrow; QPolygonF m_previousArrow; QRegion m_dirtyRegion; QPixmap m_customCursor; QPixmap m_customCursorTransformed; QPixmap m_defaultCursor; float m_cursorSize; QColor m_accuracyColor; QColor m_trailColor; qreal m_heading; QVector m_trail; static const int sm_numTrailPoints = 6; bool m_showTrail; static const int sm_defaultSizeStep; static const int sm_numResizeSteps; static const float sm_resizeSteps[]; }; } #endif diff --git a/src/plugins/render/postalcode/PostalCodePlugin.h b/src/plugins/render/postalcode/PostalCodePlugin.h index 558c080fa..9c1ac5968 100644 --- a/src/plugins/render/postalcode/PostalCodePlugin.h +++ b/src/plugins/render/postalcode/PostalCodePlugin.h @@ -1,52 +1,52 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Valery Kharitonov // #ifndef POSTALCODEPLUGIN_H #define POSTALCODEPLUGIN_H #include "AbstractDataPlugin.h" #include "RenderPlugin.h" #include "RenderPluginInterface.h" namespace Marble { class PostalCodePlugin : public AbstractDataPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.PostalCodePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.PostalCodePlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( PostalCodePlugin ) public: PostalCodePlugin(); explicit PostalCodePlugin( const MarbleModel *marbleModel ); virtual void initialize(); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; }; } #endif // POSTALCODEPLUGIN_H diff --git a/src/plugins/render/progress/ProgressFloatItem.h b/src/plugins/render/progress/ProgressFloatItem.h index 0d2d74173..4be6a6252 100644 --- a/src/plugins/render/progress/ProgressFloatItem.h +++ b/src/plugins/render/progress/ProgressFloatItem.h @@ -1,110 +1,110 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef PROGRESS_FLOAT_ITEM_H #define PROGRESS_FLOAT_ITEM_H #include "AbstractFloatItem.h" #include #include #include namespace Marble { /** * @brief A float item that shows a pie-chart progress * indicator when downloads are active */ class ProgressFloatItem : public AbstractFloatItem { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.ProgressFloatItem" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.ProgressFloatItem") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( ProgressFloatItem ) public: explicit ProgressFloatItem( const MarbleModel *marbleModel = 0 ); ~ProgressFloatItem (); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; QPainterPath backgroundShape() const; void paintContent( QPainter *painter ); private Q_SLOTS: void removeProgressItem(); void handleProgress( int active, int queued ); void hideProgress(); void show(); void scheduleRepaint(); private: Q_DISABLE_COPY( ProgressFloatItem ) bool active() const; void setActive( bool active ); bool m_isInitialized; int m_totalJobs; int m_completedJobs; qreal m_completed; QTimer m_progressHideTimer; QTimer m_progressShowTimer; QMutex m_jobMutex; bool m_active; QIcon m_icon; int m_fontSize; QTimer m_repaintTimer; }; } #endif diff --git a/src/plugins/render/routing/RoutingPlugin.h b/src/plugins/render/routing/RoutingPlugin.h index 5e7d32d4d..47983ab71 100644 --- a/src/plugins/render/routing/RoutingPlugin.h +++ b/src/plugins/render/routing/RoutingPlugin.h @@ -1,108 +1,108 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Siddharth Srivastava // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_ROUTINGPLUGIN_H #define MARBLE_ROUTINGPLUGIN_H #include "AbstractFloatItem.h" #include "DialogConfigurationInterface.h" namespace Marble { class RoutingPluginPrivate; class PositionProviderPlugin; class RoutingPlugin : public AbstractFloatItem, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.RoutingPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.RoutingPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( RoutingPlugin ) public: RoutingPlugin(); explicit RoutingPlugin( const MarbleModel *marbleModel ); ~RoutingPlugin(); QStringList backendTypes() const; void initialize(); bool isInitialized() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; bool eventFilter( QObject *object, QEvent *event ); virtual QHash settings() const; virtual void setSettings( const QHash &settings ); QDialog *configDialog(); private Q_SLOTS: /** Write settings */ void writeSettings(); private: /** Disable zoom buttons if needed */ Q_PRIVATE_SLOT( d, void updateZoomButtons() ) /** Disable zoom buttons if needed */ Q_PRIVATE_SLOT( d, void updateZoomButtons( int ) ) /** Switch source/destination of the route and recalculate it */ Q_PRIVATE_SLOT( d, void reverseRoute() ) /** Toggles guidance mode */ Q_PRIVATE_SLOT( d, void toggleGuidanceMode( bool enabled ) ) /** sets time and distance remaining to reach the destination */ Q_PRIVATE_SLOT( d, void updateDestinationInformation() ) /** Update the checked state of the position tracking button */ Q_PRIVATE_SLOT( d, void updateGpsButton( PositionProviderPlugin *activePlugin ) ) /** Activate or deactivate position tracking */ Q_PRIVATE_SLOT( d, void togglePositionTracking( bool enabled ) ) Q_PRIVATE_SLOT( d, void updateGuidanceModeButton() ) /** Read settings */ Q_PRIVATE_SLOT( d, void readSettings() ) friend class RoutingPluginPrivate; RoutingPluginPrivate* const d; }; } #endif // MARBLE_ROUTINGPLUGIN_H diff --git a/src/plugins/render/satellites/SatellitesPlugin.h b/src/plugins/render/satellites/SatellitesPlugin.h index 1a9bb4f84..2d1ea1e19 100644 --- a/src/plugins/render/satellites/SatellitesPlugin.h +++ b/src/plugins/render/satellites/SatellitesPlugin.h @@ -1,105 +1,105 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Guillaume Martres // Copyright 2012 Rene Kuettner // #ifndef MARBLE_SATELLITESPLUGIN_H #define MARBLE_SATELLITESPLUGIN_H #include "RenderPlugin.h" #include "SatellitesConfigDialog.h" #include "DialogConfigurationInterface.h" #include "SatellitesModel.h" namespace Marble { class SatellitesConfigModel; /** * @brief This plugin displays satellites and their orbits. * */ class SatellitesPlugin : public RenderPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.SatellitesPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.SatellitesPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( SatellitesPlugin ) public: explicit SatellitesPlugin( const MarbleModel *marbleModel = 0 ); virtual ~SatellitesPlugin(); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString nameId() const; QString guiString() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString aboutDataText() const; QIcon icon() const; RenderType renderType() const; void initialize(); bool isInitialized() const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer ); bool eventFilter( QObject *object, QEvent *event ); QHash settings() const; void setSettings( const QHash &settings ); SatellitesConfigDialog *configDialog(); private Q_SLOTS: void activate(); void enableModel( bool enabled ); void visibleModel( bool visible ); void readSettings(); void writeSettings(); void updateSettings(); void updateDataSourceConfig( const QString &source ); void dataSourceParsed( const QString &source ); void userDataSourceAdded( const QString &source ); void showOrbit( bool show ); void trackPlacemark(); protected: void activateDataSource( const QString &source ); void addBuiltInDataSources(); private: SatellitesModel *m_satModel; SatellitesConfigModel *m_configModel; bool m_isInitialized; QHash m_settings; QStringList m_newDataSources; SatellitesConfigDialog *m_configDialog; QAction *m_showOrbitAction; QAction *m_trackPlacemarkAction; QVector m_trackerList; }; } // namespace Marble #endif // MARBLE_SATELLITESPLUGIN_H diff --git a/src/plugins/render/speedometer/Speedometer.h b/src/plugins/render/speedometer/Speedometer.h index 12570d150..5d93a59f3 100644 --- a/src/plugins/render/speedometer/Speedometer.h +++ b/src/plugins/render/speedometer/Speedometer.h @@ -1,79 +1,79 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Bernhard Beschow // // // This class is a render plugin to display various Position Tracking info. // #ifndef MARBLESpeedometer_H #define MARBLESpeedometer_H #include "AbstractFloatItem.h" #include "ui_Speedometer.h" namespace Marble { class GeoDataCoordinates; class WidgetGraphicsItem; class MarbleLocale; /** * @short The class that displays Position Tracking info * */ class Speedometer : public AbstractFloatItem { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.Speedometer" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.Speedometer") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( Speedometer ) public: Speedometer(); explicit Speedometer( const MarbleModel *marbleModel ); ~Speedometer(); QStringList backendTypes() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QVector pluginAuthors() const override; QString copyrightYears() const; QIcon icon () const; void initialize (); bool isInitialized () const; private Q_SLOTS: void updateLocation( const GeoDataCoordinates& coordinates, qreal speed ); private: MarbleLocale* m_locale; Ui::Speedometer m_widget; WidgetGraphicsItem* m_widgetItem; }; } #endif diff --git a/src/plugins/render/stars/StarsPlugin.h b/src/plugins/render/stars/StarsPlugin.h index cc3c2c6ac..c15d07f6a 100644 --- a/src/plugins/render/stars/StarsPlugin.h +++ b/src/plugins/render/stars/StarsPlugin.h @@ -1,322 +1,322 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Torsten Rahn // // // This class is a stars plugin. // #ifndef MARBLESTARSPLUGIN_H #define MARBLESTARSPLUGIN_H #include #include #include #include "RenderPlugin.h" #include "Quaternion.h" #include "DialogConfigurationInterface.h" class QMenu; class QVariant; class SolarSystem; namespace Ui { class StarsConfigWidget; } namespace Marble { class StarPoint { public: StarPoint() {} /** * @brief create a starpoint from rectaszension and declination * @param rect rectaszension * @param lat declination * @param mag magnitude * (default for Radian: north pole at pi/2, southpole at -pi/2) */ StarPoint(int id, qreal rect, qreal decl, qreal mag, int colorId) : m_id( id ), m_magnitude( mag ), m_colorId( colorId ) { m_q = Quaternion::fromSpherical( rect, decl ); } ~StarPoint() {} qreal magnitude() const { return m_magnitude; } const Quaternion &quaternion() const { return m_q; } int id() const { return m_id; } int colorId() const { return m_colorId; } private: int m_id; qreal m_magnitude; Quaternion m_q; int m_colorId; }; class DsoPoint { public: DsoPoint() {} /** * @brief create a dsopoint from rectaszension and declination * @param rect rectaszension * @param lat declination * @param mag * (default for Radian: north pole at pi/2, southpole at -pi/2) */ DsoPoint(const QString& id, qreal rect, qreal decl) { m_id = id; m_q = Quaternion::fromSpherical( rect, decl ); } QString id() const { return m_id; } const Quaternion &quaternion() const { return m_q; } private: QString m_id; Quaternion m_q; }; /** * @short The class that specifies the Marble layer interface of a plugin. * */ class Constellation; class StarsPlugin : public RenderPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.StarsPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.StarsPlugin") Q_INTERFACES(Marble::RenderPluginInterface) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN(StarsPlugin) public: explicit StarsPlugin( const MarbleModel *marbleModel=0 ); ~StarsPlugin(); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; virtual RenderType renderType() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon() const; void initialize(); bool isInitialized() const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); QDialog *configDialog(); QHash settings() const; void setSettings( const QHash &settings ); QString assembledConstellation(const QString &name); protected: bool eventFilter( QObject *object, QEvent *e ); private Q_SLOTS: void requestRepaint(); void toggleSunMoon(bool on); void togglePlanets(bool on); void toggleDsos(bool on); void toggleConstellations(bool on); void executeConfigDialog(); public Q_SLOTS: void readSettings(); void writeSettings(); void constellationGetColor(); void constellationLabelGetColor(); void dsoLabelGetColor(); void eclipticGetColor(); void celestialEquatorGetColor(); void celestialPoleGetColor(); private: template T readSetting( const QHash &settings, const QString &key, const T &defaultValue ) { if ( !settings.contains( key ) ) { return defaultValue; } return settings[key].value(); } QPixmap starPixmap(qreal mag, int colorId) const; void prepareNames(); QHash m_abbrHash; QHash m_nativeHash; int m_nameIndex; void renderPlanet(const QString &planetId, GeoPainter *painter, SolarSystem &sys, ViewportParams *viewport, qreal skyRadius, matrix &skyAxisMatrix) const; void createStarPixmaps(); void loadStars(); void loadConstellations(); void loadDsos(); QPointer m_configDialog; Ui::StarsConfigWidget *ui_configWidget; bool m_renderStars; bool m_renderConstellationLines; bool m_renderConstellationLabels; bool m_renderDsos; bool m_renderDsoLabels; bool m_renderSun; bool m_renderMoon; QMap m_renderPlanet; bool m_renderEcliptic; bool m_renderCelestialEquator; bool m_renderCelestialPole; bool m_starsLoaded; bool m_starPixmapsCreated; bool m_constellationsLoaded; bool m_dsosLoaded; bool m_zoomSunMoon; bool m_viewSolarSystemLabel; QVector m_stars; QPixmap m_pixmapSun; QPixmap m_pixmapMoon; QVector m_constellations; QVector m_dsos; QHash m_idHash; QImage m_dsoImage; int m_magnitudeLimit; int m_zoomCoefficient; QBrush m_constellationBrush; QBrush m_constellationLabelBrush; QBrush m_dsoLabelBrush; QBrush m_eclipticBrush; QBrush m_celestialEquatorBrush; QBrush m_celestialPoleBrush; QVector m_pixN1Stars; QVector m_pixP0Stars; QVector m_pixP1Stars; QVector m_pixP2Stars; QVector m_pixP3Stars; QVector m_pixP4Stars; QVector m_pixP5Stars; QVector m_pixP6Stars; QVector m_pixP7Stars; /* Context menu */ QPointer m_contextMenu; QAction* m_constellationsAction; QAction* m_sunMoonAction; QAction* m_planetsAction; QAction* m_dsoAction; bool m_doRender; }; class Constellation { public: Constellation() {} Constellation(StarsPlugin *plugin, const QString &name, const QString &stars) : m_plugin( plugin ), m_name( name ) { QStringList starlist = stars.split(" "); for (int i = 0; i < starlist.size(); ++i) { m_stars << starlist.at(i).toInt(); } } int size() const { return m_stars.size(); } int at(const int index) const { if (index < 0) { return -1; } if (index >= m_stars.size()) { return -1; } return m_stars.at(index); } QString name() const { return m_plugin->assembledConstellation(m_name); } private: StarsPlugin *m_plugin; QString m_name; QVector m_stars; }; } #endif // MARBLESTARSPLUGIN_H diff --git a/src/plugins/render/sun/SunPlugin.h b/src/plugins/render/sun/SunPlugin.h index 1bb2ba1cf..06de5bb2f 100644 --- a/src/plugins/render/sun/SunPlugin.h +++ b/src/plugins/render/sun/SunPlugin.h @@ -1,72 +1,72 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Torsten Rahn // Copyright 2011 Bernhard Beschow // #ifndef MARBLESUNPLUGIN_H #define MARBLESUNPLUGIN_H #include "RenderPlugin.h" #include namespace Marble { /** * @short The class that specifies the Marble layer interface of a plugin. * */ class SunPlugin : public RenderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.SunPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.SunPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( SunPlugin ) public: SunPlugin(); explicit SunPlugin( const MarbleModel *marbleModel ); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QIcon icon () const; void initialize (); bool isInitialized () const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); private: QPixmap m_pixmap; }; } #endif // MARBLESUNPLUGIN_H diff --git a/src/plugins/render/test/TestPlugin.h b/src/plugins/render/test/TestPlugin.h index 86c70cd06..f8c1984aa 100644 --- a/src/plugins/render/test/TestPlugin.h +++ b/src/plugins/render/test/TestPlugin.h @@ -1,71 +1,71 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Torsten Rahn // // // This class is a test plugin. // #ifndef MARBLETESTPLUGIN_H #define MARBLETESTPLUGIN_H #include "RenderPlugin.h" namespace Marble { /** * @short The class that specifies the Marble layer interface of a plugin. * */ class TestPlugin : public RenderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.TestPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.TestPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN( TestPlugin ) public: TestPlugin(); explicit TestPlugin(const MarbleModel *marbleModel); QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString guiString() const; QString nameId() const; QString version() const override; QString description() const; QIcon icon () const; QString copyrightYears() const override; QVector pluginAuthors() const override; void initialize (); bool isInitialized () const; bool render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0 ); }; } #endif // MARBLETESTPLUGIN_H diff --git a/src/plugins/render/twitter/twitterPlugin.h b/src/plugins/render/twitter/twitterPlugin.h index cd41cca5b..126747c34 100644 --- a/src/plugins/render/twitter/twitterPlugin.h +++ b/src/plugins/render/twitter/twitterPlugin.h @@ -1,93 +1,93 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Shashank Singh // // // This class is a test plugin. // #ifndef MARBLETWITTERPLUGIN_H #define MARBLETWITTERPLUGIN_H #define RADIANSTODEGREES 57.2957795 #include "../lib/HttpDownloadManager.h" #include "../lib/CacheStoragePolicy.h" #include "jsonparser.h" #include "RenderPlugin.h" #include "MarbleDirs.h" #include "GeoPainter.h" #include "GeoDataCoordinates.h" namespace Marble { /** * @short The class that specifies the a simple panormaio plugin * */ struct twitterStructure { QString twit ; GeoDataCoordinates location; }; class twitterPlugin : public RenderPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.twitterPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.twitterPlugin") Q_INTERFACES(Marble::RenderPluginInterface) MARBLE_PLUGIN(twitterPlugin) public: QStringList backendTypes() const; QString renderPolicy() const; QStringList renderPosition() const; QString name() const; QString guiString() const; QString nameId() const; QString description() const; QIcon icon() const; void initialize(); bool isInitialized() const; bool render(GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0); ~twitterPlugin(); public Q_SLOTS: void slotJsonDownloadComplete(QString , QString); //completed download of json reply fom panoramio void slotGeoCodingReplyRecieved(QString , QString); //completed download of image Q_SIGNALS: void statusMessageForImageDownloadingProcess(const QString&); private: CacheStoragePolicy *m_storagePolicy; HttpDownloadManager *m_downloadManager; jsonParser twitterJsonParser; void downloadtwitter(int, int, qreal, qreal, qreal, qreal); QList twitsWithLocation;//this list will hold pointers to TWITT we have downloaded successfully figured out :) QList parsedData; void findLatLonOfStreetAddress(QString streetAddress); int privateFlagForRenderingTwitts;//this flag is one when globe has an Image (downloaded or already there in cache) }; } #endif diff --git a/src/plugins/render/weather/WeatherPlugin.h b/src/plugins/render/weather/WeatherPlugin.h index 90596e796..f8f8c08f4 100644 --- a/src/plugins/render/weather/WeatherPlugin.h +++ b/src/plugins/render/weather/WeatherPlugin.h @@ -1,95 +1,95 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2009 Bastian Holst // #ifndef WEATHERPLUGIN_H #define WEATHERPLUGIN_H #include "AbstractDataPlugin.h" #include "DialogConfigurationInterface.h" // Qt #include #include namespace Ui { class WeatherConfigWidget; } namespace Marble { class WeatherPlugin : public AbstractDataPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.WeatherPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.WeatherPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( WeatherPlugin ) public: WeatherPlugin(); explicit WeatherPlugin( const MarbleModel *marbleModel ); ~WeatherPlugin(); void initialize(); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString aboutDataText() const; QIcon icon() const; QDialog *configDialog(); QHash settings() const; void setSettings( const QHash &settings ); protected: bool eventFilter(QObject *object, QEvent *event); private Q_SLOTS: void readSettings(); void writeSettings(); void updateItemSettings(); void favoriteItemsChanged( const QStringList& favoriteItems ); Q_SIGNALS: void changedSettings(); private: void updateSettings(); quint32 m_updateInterval; const QIcon m_icon; QDialog * m_configDialog; Ui::WeatherConfigWidget * ui_configWidget; QHash m_settings; }; } #endif // WEATHERPLUGIN_H diff --git a/src/plugins/render/wikipedia/WikipediaPlugin.h b/src/plugins/render/wikipedia/WikipediaPlugin.h index 23dab6e4a..b0e1b2ba6 100644 --- a/src/plugins/render/wikipedia/WikipediaPlugin.h +++ b/src/plugins/render/wikipedia/WikipediaPlugin.h @@ -1,94 +1,94 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2009 Bastian Holst // #ifndef WIKIPEDIAPLUGIN_H #define WIKIPEDIAPLUGIN_H #include "AbstractDataPlugin.h" #include "DialogConfigurationInterface.h" #include "RenderPlugin.h" #include "RenderPluginInterface.h" #include #include namespace Ui { class WikipediaConfigWidget; } namespace Marble { class WikipediaPlugin : public AbstractDataPlugin, public DialogConfigurationInterface { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.WikipediaPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.WikipediaPlugin") Q_INTERFACES( Marble::RenderPluginInterface ) Q_INTERFACES( Marble::DialogConfigurationInterface ) MARBLE_PLUGIN( WikipediaPlugin ) public: WikipediaPlugin(); explicit WikipediaPlugin( const MarbleModel *marbleModel ); ~WikipediaPlugin(); void initialize(); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString copyrightYears() const; QString description() const; QVector pluginAuthors() const override; QString aboutDataText() const; QIcon icon() const; QDialog *configDialog(); /** * @return: The settings of the item. */ virtual QHash settings() const; /** * Set the settings of the item. */ virtual void setSettings( const QHash &settings ); protected: bool eventFilter( QObject *object, QEvent *event ); private Q_SLOTS: void readSettings(); void writeSettings(); void updateSettings(); void checkNumberOfItems( quint32 number ); private: const QIcon m_icon; Ui::WikipediaConfigWidget *ui_configWidget; QDialog *m_configDialog; bool m_showThumbnails; }; } #endif // WIKIPEDIAPLUGIN_H diff --git a/src/plugins/runner/cache/CachePlugin.h b/src/plugins/runner/cache/CachePlugin.h index 8806f4f03..bba9c0dec 100644 --- a/src/plugins/runner/cache/CachePlugin.h +++ b/src/plugins/runner/cache/CachePlugin.h @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Thibaut Gridel #ifndef MARBLECACHEPLUGIN_H #define MARBLECACHEPLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class CachePlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.CachePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.CachePlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit CachePlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLECACHEPLUGIN_H diff --git a/src/plugins/runner/cyclestreets/CycleStreetsPlugin.h b/src/plugins/runner/cyclestreets/CycleStreetsPlugin.h index 1afbcaa4e..c84e37d94 100644 --- a/src/plugins/runner/cyclestreets/CycleStreetsPlugin.h +++ b/src/plugins/runner/cyclestreets/CycleStreetsPlugin.h @@ -1,53 +1,53 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2013 Mihail Ivchenko // #ifndef MARBLE_CYCLESTREETSPLUGIN_H #define MARBLE_CYCLESTREETSPLUGIN_H #include "RoutingRunnerPlugin.h" namespace Marble { class CycleStreetsPlugin : public RoutingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.CycleStreetsPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.CycleStreetsPlugin") Q_INTERFACES( Marble::RoutingRunnerPlugin ) public: explicit CycleStreetsPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual RoutingRunner *newRunner() const; ConfigWidget* configWidget(); virtual bool supportsTemplate( RoutingProfilesModel::ProfileTemplate profileTemplate ) const; }; } #endif diff --git a/src/plugins/runner/geouri/GeoUriPlugin.h b/src/plugins/runner/geouri/GeoUriPlugin.h index 95aba4225..300074499 100644 --- a/src/plugins/runner/geouri/GeoUriPlugin.h +++ b/src/plugins/runner/geouri/GeoUriPlugin.h @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2016 Friedrich W. H. Kossebau // #ifndef MARBLE_GEOURIPLUGIN_H #define MARBLE_GEOURIPLUGIN_H #include "SearchRunnerPlugin.h" namespace Marble { class GeoUriPlugin : public SearchRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GeoUriPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GeoUriPlugin") Q_INTERFACES( Marble::SearchRunnerPlugin ) public: explicit GeoUriPlugin(QObject *parent = nullptr); QString name() const override; QString guiString() const override; QString nameId() const override; QString version() const override; QString description() const override; QString copyrightYears() const override; QVector pluginAuthors() const override; SearchRunner* newRunner() const override; }; } #endif diff --git a/src/plugins/runner/gosmore-reversegeocoding/GosmoreReverseGeocodingPlugin.h b/src/plugins/runner/gosmore-reversegeocoding/GosmoreReverseGeocodingPlugin.h index 1e95a6958..26eee4205 100644 --- a/src/plugins/runner/gosmore-reversegeocoding/GosmoreReverseGeocodingPlugin.h +++ b/src/plugins/runner/gosmore-reversegeocoding/GosmoreReverseGeocodingPlugin.h @@ -1,51 +1,51 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // Copyright 2012 Bernhard Beschow // #ifndef MARBLE_GOSMOREREVERSEGEOCODINGPLUGIN_H #define MARBLE_GOSMOREREVERSEGEOCODINGPLUGIN_H #include "ReverseGeocodingRunnerPlugin.h" namespace Marble { class GosmorePlugin : public ReverseGeocodingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GosmoreReverseGeocodingPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GosmoreReverseGeocodingPlugin") Q_INTERFACES( Marble::ReverseGeocodingRunnerPlugin ) public: explicit GosmorePlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual ReverseGeocodingRunner* newRunner() const; virtual bool canWork() const; }; } #endif diff --git a/src/plugins/runner/gosmore-routing/GosmoreRoutingPlugin.h b/src/plugins/runner/gosmore-routing/GosmoreRoutingPlugin.h index fa7efd7ee..2587356ed 100644 --- a/src/plugins/runner/gosmore-routing/GosmoreRoutingPlugin.h +++ b/src/plugins/runner/gosmore-routing/GosmoreRoutingPlugin.h @@ -1,52 +1,52 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_GOSMOREROUTINGPLUGIN_H #define MARBLE_GOSMOREROUTINGPLUGIN_H #include "RoutingRunnerPlugin.h" namespace Marble { class GosmorePlugin : public RoutingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GosmoreRoutingPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GosmoreRoutingPlugin") Q_INTERFACES( Marble::RoutingRunnerPlugin ) public: explicit GosmorePlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual RoutingRunner *newRunner() const; virtual bool supportsTemplate(RoutingProfilesModel::ProfileTemplate profileTemplate) const; virtual bool canWork() const; }; } #endif diff --git a/src/plugins/runner/gpsbabel/GpsbabelPlugin.h b/src/plugins/runner/gpsbabel/GpsbabelPlugin.h index 5094d16b5..380c26260 100644 --- a/src/plugins/runner/gpsbabel/GpsbabelPlugin.h +++ b/src/plugins/runner/gpsbabel/GpsbabelPlugin.h @@ -1,48 +1,48 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2013 Mohammed Nafees #ifndef MARBLE_GPSBABEL_PLUGIN_H #define MARBLE_GPSBABEL_PLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class GpsbabelPlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GpsbabelPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GpsbabelPlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit GpsbabelPlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLE_GPSBABEL_PLUGIN_H diff --git a/src/plugins/runner/gpx/GpxPlugin.h b/src/plugins/runner/gpx/GpxPlugin.h index dc4b9ce1c..46778dfd5 100644 --- a/src/plugins/runner/gpx/GpxPlugin.h +++ b/src/plugins/runner/gpx/GpxPlugin.h @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Thibaut Gridel #ifndef MARBLEGPXPLUGIN_H #define MARBLEGPXPLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class GpxPlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.GpxPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.GpxPlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit GpxPlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLEGPXPLUGIN_H diff --git a/src/plugins/runner/hostip/HostipPlugin.h b/src/plugins/runner/hostip/HostipPlugin.h index 97ecce23b..1f00bc9a9 100644 --- a/src/plugins/runner/hostip/HostipPlugin.h +++ b/src/plugins/runner/hostip/HostipPlugin.h @@ -1,50 +1,50 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_HOSTIPPLUGIN_H #define MARBLE_HOSTIPPLUGIN_H #include "SearchRunnerPlugin.h" namespace Marble { class HostipPlugin : public SearchRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.HostipPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.HostipPlugin") Q_INTERFACES( Marble::SearchRunnerPlugin ) public: explicit HostipPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual SearchRunner* newRunner() const; bool canWork() const; }; } #endif diff --git a/src/plugins/runner/json/JsonPlugin.h b/src/plugins/runner/json/JsonPlugin.h index 1e420c9ec..71c7a9d7b 100644 --- a/src/plugins/runner/json/JsonPlugin.h +++ b/src/plugins/runner/json/JsonPlugin.h @@ -1,49 +1,49 @@ /* This file is part of the Marble Virtual Globe. This program is free software licensed under the GNU LGPL. You can find a copy of this license in LICENSE.txt in the top directory of the source code. Copyright 2013 Ander Pijoan */ #ifndef MARBLE_JSONPLUGIN_H #define MARBLE_JSONPLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class JsonPlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.JsonPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.JsonPlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit JsonPlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif diff --git a/src/plugins/runner/kml/KmlPlugin.h b/src/plugins/runner/kml/KmlPlugin.h index a5b767a8c..578796660 100644 --- a/src/plugins/runner/kml/KmlPlugin.h +++ b/src/plugins/runner/kml/KmlPlugin.h @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Thibaut Gridel #ifndef MARBLEKMLPLUGIN_H #define MARBLEKMLPLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class KmlPlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.KmlPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.KmlPlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit KmlPlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLEKMLPLUGIN_H diff --git a/src/plugins/runner/latlon/LatLonPlugin.h b/src/plugins/runner/latlon/LatLonPlugin.h index 5549c7418..7b392ab41 100644 --- a/src/plugins/runner/latlon/LatLonPlugin.h +++ b/src/plugins/runner/latlon/LatLonPlugin.h @@ -1,48 +1,48 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_LATLONPLUGIN_H #define MARBLE_LATLONPLUGIN_H #include "SearchRunnerPlugin.h" namespace Marble { class LatLonPlugin : public SearchRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.LatLonPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.LatLonPlugin") Q_INTERFACES( Marble::SearchRunnerPlugin ) public: explicit LatLonPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual SearchRunner* newRunner() const; }; } #endif diff --git a/src/plugins/runner/local-osm-search/LocalOsmSearchPlugin.h b/src/plugins/runner/local-osm-search/LocalOsmSearchPlugin.h index c1ff74c10..2065fa5a1 100644 --- a/src/plugins/runner/local-osm-search/LocalOsmSearchPlugin.h +++ b/src/plugins/runner/local-osm-search/LocalOsmSearchPlugin.h @@ -1,65 +1,65 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Dennis Nienhüser // Copyright 2013 Bernhard Beschow // #ifndef MARBLE_LOCALOSMSEARCHPLUGIN_H #define MARBLE_LOCALOSMSEARCHPLUGIN_H #include "SearchRunnerPlugin.h" #include "OsmDatabase.h" #include namespace Marble { class LocalOsmSearchPlugin : public SearchRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.LocalOsmSearchPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.LocalOsmSearchPlugin") Q_INTERFACES( Marble::SearchRunnerPlugin ) public: explicit LocalOsmSearchPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual SearchRunner* newRunner() const; private Q_SLOTS: void updateDirectory( const QString &directory ); void updateFile( const QString &directory ); private: void addDatabaseDirectory( const QString &path ); void updateDatabase(); QStringList m_databaseFiles; QFileSystemWatcher m_watcher; }; } #endif diff --git a/src/plugins/runner/localdatabase/LocalDatabasePlugin.h b/src/plugins/runner/localdatabase/LocalDatabasePlugin.h index 7a7de9f8a..ef01b72e9 100644 --- a/src/plugins/runner/localdatabase/LocalDatabasePlugin.h +++ b/src/plugins/runner/localdatabase/LocalDatabasePlugin.h @@ -1,48 +1,48 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_LOCALDATABASEPLUGIN_H #define MARBLE_LOCALDATABASEPLUGIN_H #include "SearchRunnerPlugin.h" namespace Marble { class LocalDatabasePlugin : public SearchRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.LocalDatabasePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.LocalDatabasePlugin") Q_INTERFACES( Marble::SearchRunnerPlugin ) public: explicit LocalDatabasePlugin(QObject *parent = 0); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual SearchRunner* newRunner() const; }; } #endif diff --git a/src/plugins/runner/log/LogPlugin.h b/src/plugins/runner/log/LogPlugin.h index 9e25d7b05..63905da38 100644 --- a/src/plugins/runner/log/LogPlugin.h +++ b/src/plugins/runner/log/LogPlugin.h @@ -1,48 +1,48 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Bernhard Beschow #ifndef MARBLE_LOGFILE_PLUGIN_H #define MARBLE_LOGFILE_PLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class LogfilePlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.LogPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.LogPlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit LogfilePlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLE_LOGFILE_PLUGIN_H diff --git a/src/plugins/runner/mapquest/MapQuestPlugin.h b/src/plugins/runner/mapquest/MapQuestPlugin.h index 588870107..f5dcbdb80 100644 --- a/src/plugins/runner/mapquest/MapQuestPlugin.h +++ b/src/plugins/runner/mapquest/MapQuestPlugin.h @@ -1,54 +1,54 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Dennis Nienhüser // #ifndef MARBLE_MAPQUESTPLUGIN_H #define MARBLE_MAPQUESTPLUGIN_H #include "RoutingRunnerPlugin.h" namespace Marble { class MapQuestPlugin : public RoutingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.MapQuestPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.MapQuestPlugin") Q_INTERFACES( Marble::RoutingRunnerPlugin ) public: explicit MapQuestPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual RoutingRunner *newRunner() const; ConfigWidget* configWidget(); virtual bool supportsTemplate( RoutingProfilesModel::ProfileTemplate profileTemplate ) const; virtual QHash templateSettings( RoutingProfilesModel::ProfileTemplate profileTemplate ) const; }; } #endif diff --git a/src/plugins/runner/monav/MonavPlugin.h b/src/plugins/runner/monav/MonavPlugin.h index 62253de3a..e09353f65 100644 --- a/src/plugins/runner/monav/MonavPlugin.h +++ b/src/plugins/runner/monav/MonavPlugin.h @@ -1,82 +1,82 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_MONAVPLUGIN_H #define MARBLE_MONAVPLUGIN_H #include "RoutingRunnerPlugin.h" namespace Marble { class MonavMapsModel; class MonavPluginPrivate; class RouteRequest; class MonavPlugin : public RoutingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.MonavPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.MonavPlugin") Q_INTERFACES( Marble::RoutingRunnerPlugin ) public: enum MonavRoutingDaemonVersion { Monav_0_2, Monav_0_3 }; explicit MonavPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; ~MonavPlugin(); virtual RoutingRunner *newRunner() const; virtual bool supportsTemplate(RoutingProfilesModel::ProfileTemplate profileTemplate) const; virtual QHash< QString, QVariant > templateSettings( RoutingProfilesModel::ProfileTemplate profileTemplate ) const; virtual ConfigWidget *configWidget(); virtual bool canWork() const; QString mapDirectoryForRequest( const RouteRequest* request ) const; QStringList mapDirectoriesForRequest( const RouteRequest* request ) const; MonavMapsModel* installedMapsModel(); void reloadMaps(); MonavRoutingDaemonVersion monavVersion() const; private: MonavPluginPrivate* const d; Q_PRIVATE_SLOT( d, void stopDaemon() ) }; } #endif diff --git a/src/plugins/runner/nominatim-reversegeocoding/NominatimReverseGeocodingPlugin.h b/src/plugins/runner/nominatim-reversegeocoding/NominatimReverseGeocodingPlugin.h index d76d9a608..d143c2a5a 100644 --- a/src/plugins/runner/nominatim-reversegeocoding/NominatimReverseGeocodingPlugin.h +++ b/src/plugins/runner/nominatim-reversegeocoding/NominatimReverseGeocodingPlugin.h @@ -1,49 +1,49 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // Copyright 2012 Bernhard Beschow // #ifndef MARBLE_NOMINATIMREVERSEGEOCODINGPLUGIN_H #define MARBLE_NOMINATIMREVERSEGEOCODINGPLUGIN_H #include "ReverseGeocodingRunnerPlugin.h" namespace Marble { class NominatimPlugin : public ReverseGeocodingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.NominatimReverseGeocodingPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.NominatimReverseGeocodingPlugin") Q_INTERFACES( Marble::ReverseGeocodingRunnerPlugin ) public: explicit NominatimPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual ReverseGeocodingRunner* newRunner() const; }; } #endif diff --git a/src/plugins/runner/nominatim-search/NominatimSearchPlugin.h b/src/plugins/runner/nominatim-search/NominatimSearchPlugin.h index a6e2a48f6..8185a3227 100644 --- a/src/plugins/runner/nominatim-search/NominatimSearchPlugin.h +++ b/src/plugins/runner/nominatim-search/NominatimSearchPlugin.h @@ -1,49 +1,49 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // Copyright 2012 Bernhard Beschow // #ifndef MARBLE_NOMINATIMSEARCHPLUGIN_H #define MARBLE_NOMINATIMSEARCHPLUGIN_H #include "SearchRunnerPlugin.h" namespace Marble { class NominatimPlugin : public SearchRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.NominatimSearchPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.NominatimSearchPlugin") Q_INTERFACES( Marble::SearchRunnerPlugin ) public: explicit NominatimPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual SearchRunner* newRunner() const; }; } #endif diff --git a/src/plugins/runner/open-source-routing-machine/OSRMPlugin.h b/src/plugins/runner/open-source-routing-machine/OSRMPlugin.h index 4cd04cd41..de838660a 100644 --- a/src/plugins/runner/open-source-routing-machine/OSRMPlugin.h +++ b/src/plugins/runner/open-source-routing-machine/OSRMPlugin.h @@ -1,50 +1,50 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Dennis Nienhüser // #ifndef MARBLE_OSRMPLUGIN_H #define MARBLE_OSRMPLUGIN_H #include "RoutingRunnerPlugin.h" namespace Marble { class OSRMPlugin : public RoutingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.OSRMPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.OSRMPlugin") Q_INTERFACES( Marble::RoutingRunnerPlugin ) public: explicit OSRMPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual RoutingRunner *newRunner() const; virtual bool supportsTemplate( RoutingProfilesModel::ProfileTemplate profileTemplate ) const; }; } #endif diff --git a/src/plugins/runner/openlocation-code-search/OpenLocationCodeSearchPlugin.h b/src/plugins/runner/openlocation-code-search/OpenLocationCodeSearchPlugin.h index e3030fb4a..03b10cf39 100644 --- a/src/plugins/runner/openlocation-code-search/OpenLocationCodeSearchPlugin.h +++ b/src/plugins/runner/openlocation-code-search/OpenLocationCodeSearchPlugin.h @@ -1,46 +1,46 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2015 Constantin Mihalache // #ifndef OPENLOCATIONCODESEARCHPLUGIN_H #define OPENLOCATIONCODESEARCHPLUGIN_H #include "SearchRunnerPlugin.h" namespace Marble { class OpenLocationCodeSearchPlugin : public SearchRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.OpenLocationCodeSearchPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.OpenLocationCodeSearchPlugin") Q_INTERFACES( Marble::SearchRunnerPlugin ) public: explicit OpenLocationCodeSearchPlugin(QObject *parent = 0); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual SearchRunner* newRunner() const; }; } #endif // OPENLOCATIONCODESEARCHPLUGIN_H diff --git a/src/plugins/runner/openrouteservice/OpenRouteServicePlugin.h b/src/plugins/runner/openrouteservice/OpenRouteServicePlugin.h index 75d5a3cdb..311bb8721 100644 --- a/src/plugins/runner/openrouteservice/OpenRouteServicePlugin.h +++ b/src/plugins/runner/openrouteservice/OpenRouteServicePlugin.h @@ -1,54 +1,54 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_OPENROUTESERVICEPLUGIN_H #define MARBLE_OPENROUTESERVICEPLUGIN_H #include "RoutingRunnerPlugin.h" namespace Marble { class OpenRouteServicePlugin : public RoutingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.OpenRouteServicePlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.OpenRouteServicePlugin") Q_INTERFACES( Marble::RoutingRunnerPlugin ) public: explicit OpenRouteServicePlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual RoutingRunner *newRunner() const; ConfigWidget* configWidget(); virtual bool supportsTemplate( RoutingProfilesModel::ProfileTemplate profileTemplate ) const; virtual QHash templateSettings( RoutingProfilesModel::ProfileTemplate profileTemplate ) const; }; } #endif diff --git a/src/plugins/runner/osm/OsmPlugin.h b/src/plugins/runner/osm/OsmPlugin.h index ff2e23dc2..e12c209eb 100644 --- a/src/plugins/runner/osm/OsmPlugin.h +++ b/src/plugins/runner/osm/OsmPlugin.h @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Thibaut Gridel #ifndef MARBLEOSMPLUGIN_H #define MARBLEOSMPLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class OsmPlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.OsmPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.OsmPlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit OsmPlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLEOSMPLUGIN_H diff --git a/src/plugins/runner/pn2/Pn2Plugin.h b/src/plugins/runner/pn2/Pn2Plugin.h index d361c8548..2fdae6e38 100644 --- a/src/plugins/runner/pn2/Pn2Plugin.h +++ b/src/plugins/runner/pn2/Pn2Plugin.h @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2012 Cezar Mocan #ifndef MARBLEPN2PLUGIN_H #define MARBLEPN2PLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class Pn2Plugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.Pn2Plugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.Pn2Plugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit Pn2Plugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLEPN2PLUGIN_H diff --git a/src/plugins/runner/pnt/PntPlugin.h b/src/plugins/runner/pnt/PntPlugin.h index e7b34b010..0cb6601a4 100644 --- a/src/plugins/runner/pnt/PntPlugin.h +++ b/src/plugins/runner/pnt/PntPlugin.h @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Thibaut Gridel #ifndef MARBLEPNTPLUGIN_H #define MARBLEPNTPLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class PntPlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.PntPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.PntPlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit PntPlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLEPNTPLUGIN_H diff --git a/src/plugins/runner/routino/RoutinoPlugin.h b/src/plugins/runner/routino/RoutinoPlugin.h index e45bff353..7f81321b9 100644 --- a/src/plugins/runner/routino/RoutinoPlugin.h +++ b/src/plugins/runner/routino/RoutinoPlugin.h @@ -1,59 +1,59 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_ROUTINOPLUGIN_H #define MARBLE_ROUTINOPLUGIN_H #include "RoutingRunnerPlugin.h" namespace Ui { class RoutinoConfigWidget; } namespace Marble { class RoutinoPlugin : public RoutingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.RoutinoPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.RoutinoPlugin") Q_INTERFACES( Marble::RoutingRunnerPlugin ) public: explicit RoutinoPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual RoutingRunner *newRunner() const; ConfigWidget* configWidget(); bool supportsTemplate(RoutingProfilesModel::ProfileTemplate profileTemplate) const; QHash< QString, QVariant > templateSettings(RoutingProfilesModel::ProfileTemplate profileTemplate) const; virtual bool canWork() const; }; } #endif diff --git a/src/plugins/runner/shp/ShpPlugin.h b/src/plugins/runner/shp/ShpPlugin.h index da1f844df..f549d459a 100644 --- a/src/plugins/runner/shp/ShpPlugin.h +++ b/src/plugins/runner/shp/ShpPlugin.h @@ -1,47 +1,47 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Thibaut Gridel #ifndef MARBLESHPPLUGIN_H #define MARBLESHPPLUGIN_H #include "ParseRunnerPlugin.h" namespace Marble { class ShpPlugin : public ParseRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.ShpPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.ShpPlugin") Q_INTERFACES( Marble::ParseRunnerPlugin ) public: explicit ShpPlugin( QObject *parent = 0 ); QString name() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; QString fileFormatDescription() const; QStringList fileExtensions() const; virtual ParsingRunner* newRunner() const; }; } #endif // MARBLESHPPLUGIN_H diff --git a/src/plugins/runner/traveling-salesman/TravelingSalesmanPlugin.h b/src/plugins/runner/traveling-salesman/TravelingSalesmanPlugin.h index d9ecc7439..ecdde64aa 100644 --- a/src/plugins/runner/traveling-salesman/TravelingSalesmanPlugin.h +++ b/src/plugins/runner/traveling-salesman/TravelingSalesmanPlugin.h @@ -1,34 +1,34 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_TRAVELINGSALESMANPLUGIN_H #define MARBLE_TRAVELINGSALESMANPLUGIN_H #include "RunnerPlugin.h" namespace Marble { class TravelingSalesmanPlugin : public RunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.TravelingSalesmanPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.TravelingSalesmanPlugin") Q_INTERFACES( Marble::RunnerPlugin ) public: explicit TravelingSalesmanPlugin( QObject *parent = 0 ); virtual MarbleAbstractRunner* newRunner() const; }; } #endif diff --git a/src/plugins/runner/yours/YoursPlugin.h b/src/plugins/runner/yours/YoursPlugin.h index f206deea5..348cf8e56 100644 --- a/src/plugins/runner/yours/YoursPlugin.h +++ b/src/plugins/runner/yours/YoursPlugin.h @@ -1,50 +1,50 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser // #ifndef MARBLE_YOURSPLUGIN_H #define MARBLE_YOURSPLUGIN_H #include "RoutingRunnerPlugin.h" namespace Marble { class YoursPlugin : public RoutingRunnerPlugin { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.YoursPlugin" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.YoursPlugin") Q_INTERFACES( Marble::RoutingRunnerPlugin ) public: explicit YoursPlugin( QObject *parent = 0 ); QString name() const; QString guiString() const; QString nameId() const; QString version() const; QString description() const; QString copyrightYears() const; QVector pluginAuthors() const override; virtual RoutingRunner *newRunner() const; virtual bool supportsTemplate(RoutingProfilesModel::ProfileTemplate profileTemplate) const; }; } #endif diff --git a/src/plugins/templates/floatitem/FITemplateFloatItem.h b/src/plugins/templates/floatitem/FITemplateFloatItem.h index 73b90dfc9..fc4020842 100644 --- a/src/plugins/templates/floatitem/FITemplateFloatItem.h +++ b/src/plugins/templates/floatitem/FITemplateFloatItem.h @@ -1,104 +1,104 @@ // // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2008 Inge Wallin // // // This class is a template Float Item plugin. // #ifndef FITEMPLATE_FLOAT_ITEM_H #define FITEMPLATE_FLOAT_ITEM_H // Qt // Marble #include "AbstractFloatItem.h" class QSvgRenderer; namespace Marble { /** * @short The class that creates a ... Float Item * */ class FITemplateFloatItem : public AbstractFloatItem { Q_OBJECT - Q_PLUGIN_METADATA( IID "org.kde.edu.marble.FITemplateFloatItem" ) + Q_PLUGIN_METADATA(IID "org.kde.marble.FITemplateFloatItem") Q_INTERFACES( Marble::RenderPluginInterface ) MARBLE_PLUGIN(FITemplateFloatItem) public: explicit FITemplateFloatItem( const QPointF &point = QPointF( -1.0, 10.0 ), const QSizeF &size = QSizeF( 75.0, 75.0 ) ); // ---------------------------------------------------------------- // The following functions are defined in RenderPluginInterface.h // and MUST be part of the plugin. See that file for documentation. // // Note that the class AbstractFloatItem provides default // implementations for many of them. // ~FITemplateFloatItem (); QStringList backendTypes() const; // Provided by AbstractFloatItem and should not be implemented. // // QString renderPolicy() const; // QStringList renderPosition() const; QString name() const; QString guiString() const; QString nameId() const; QString description() const; QIcon icon() const; void initialize(); bool isInitialized() const; // Provided by AbstractFloatItem and should not be implemented. // // bool render( GeoPainter *painter, ViewportParams *viewport, // const QString &renderPos, GeoSceneLayer *layer); QPainterPath backgroundShape() const; // End of RenderPluginInterface functions. // ---------------------------------------------------------------- bool needsUpdate( ViewportParams *viewport ); bool renderFloatItem( GeoPainter *painter, ViewportParams *viewport, GeoSceneLayer * layer = 0 ); private: Q_DISABLE_COPY( FITemplateFloatItem ) QSvgRenderer *m_svgobj; QPixmap m_compass; /// allowed values: -1, 0, 1; default here: 0. FIXME: Declare enum int m_polarity; }; } #endif