diff --git a/src/lib/marble/TourWidget.h b/src/lib/marble/TourWidget.h index a404eb4ee..a7d8f4ea6 100644 --- a/src/lib/marble/TourWidget.h +++ b/src/lib/marble/TourWidget.h @@ -1,111 +1,111 @@ // // 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 // Copyright 2014 Sanjiban Bairagya // #ifndef MARBLE_TOURWIDGET_H #define MARBLE_TOURWIDGET_H #include "marble_export.h" #include #include #include -#include +#include "GeoDataCoordinates.h" class QItemSelection; class QModelIndex; class QDoubleSpinBox; class QRadioButton; class QLineEdit; class QToolButton; class QLabel; namespace Marble { class FileManager; class GeoDataPlacemark; class GeoDataLatLonBox; class GeoDataTreeModel; class GeoDataFeature; class GeoDataFlyTo; class GeoDataTourControl; class GeoDataWait; class GeoDataSoundCue; class GeoDataContainer; class MarbleWidget; class TourWidgetPrivate; class MARBLE_EXPORT TourWidget : public QWidget { Q_OBJECT public: explicit TourWidget( QWidget *parent = 0, Qt::WindowFlags f = 0 ); ~TourWidget(); void setMarbleWidget( MarbleWidget *widget ); bool openTour( const QString &filename ); bool isPlaying() const; bool eventFilter( QObject *watched, QEvent *event ); public Q_SLOTS: void startPlaying(); void pausePlaying(); void togglePlaying(); void stopPlaying(); void handleSliderMove( int ); /** * Highlights the item curently being played. */ void setHighlightedItemIndex( int index ); Q_SIGNALS: void featureUpdated( GeoDataFeature *feature ); void featureAdded( GeoDataContainer *parent, GeoDataFeature *feature, int row ); void featureRemoved( const GeoDataFeature *feature ); private Q_SLOTS: void moveUp(); void moveDown(); void addFlyTo(); void addWait(); void addSoundCue(); void addPlacemark(); void addRemovePlacemark(); void addChangePlacemark(); void deleteSelected(); void updateDuration(); void finishAddingItem(); void stopLooping(); protected: void closeEvent( QCloseEvent *event ); private: Q_PRIVATE_SLOT( d, void openFile() ) Q_PRIVATE_SLOT( d, void createTour() ) Q_PRIVATE_SLOT( d, void saveTour() ) Q_PRIVATE_SLOT( d, void saveTourAs() ) Q_PRIVATE_SLOT( d, void captureTour() ) Q_PRIVATE_SLOT( d, void updateButtonsStates() ) Q_PRIVATE_SLOT( d, void mapCenterOn( const QModelIndex &index ) ) Q_PRIVATE_SLOT( d, void handlePlaybackProgress( const double position ) ) Q_DISABLE_COPY( TourWidget ) void removeHighlight(); TourWidgetPrivate * const d; }; } #endif diff --git a/src/lib/marble/geodata/data/GeoDataDocument.h b/src/lib/marble/geodata/data/GeoDataDocument.h index eaf476d88..d1808b397 100644 --- a/src/lib/marble/geodata/data/GeoDataDocument.h +++ b/src/lib/marble/geodata/data/GeoDataDocument.h @@ -1,207 +1,207 @@ /* Copyright (C) 2007, 2008 Nikolas Zimmermann Copyright (C) 2007 Murad Tagirov Copyright (C) 2009 Patrick Spendrin This file is part of the KDE project This library is free software you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License aint with this library see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef MARBLE_GEODATADOCUMENT_H #define MARBLE_GEODATADOCUMENT_H #include #include #include #include "geodata_export.h" #include "GeoDataContainer.h" #include "GeoDocument.h" -#include +#include "GeoDataStyle.h" namespace Marble { enum DocumentRole { UnknownDocument, MapDocument, UserDocument, TrackingDocument, BookmarkDocument, SearchResultDocument }; class GeoDataStyle; class GeoDataStyleMap; class GeoDataNetworkLinkControl; class GeoDataSchema; class GeoDataDocumentPrivate; /** * @short A container for Features, Styles and in the future Schemas. * * A GeoDataDocument is a container for features, styles, and * schemas. This element is required if your KML file uses schemas or * shared styles. It is recommended that all Styles be defined in a * Document, each with an id, and then later referenced by a * styleUrl for a given Feature or StyleMap. */ class GEODATA_EXPORT GeoDataDocument : public GeoDocument, public GeoDataContainer { public: GeoDataDocument(); GeoDataDocument( const GeoDataDocument& other ); ~GeoDataDocument(); bool operator==( const GeoDataDocument &other ) const; bool operator!=( const GeoDataDocument &other ) const; /// Provides type information for downcasting a GeoData virtual bool isGeoDataDocument() const { return true; } DocumentRole documentRole() const; void setDocumentRole( DocumentRole role ); QString property() const; void setProperty( QString property ); /** * @brief The filename of the document * * The filename of the document is used internally to identify the files. * it should never be empty as this could lead to potential collisions. * * @return The filename of this document */ QString fileName() const; /** * @brief Set a new file name for this document * @param value the new name */ void setFileName( const QString &value ); /** * @brief The URI relative paths should be resolved against */ QString baseUri() const; /** * @brief Change the URI for resolving relative paths. * See http://tools.ietf.org/html/rfc3986#section-5 */ void setBaseUri( const QString &baseUri ); /** * @brief the NetworkLinkControl of the file */ GeoDataNetworkLinkControl networkLinkControl() const; /** * @brief set the NetworkLinkControl of the file */ void setNetworkLinkControl( const GeoDataNetworkLinkControl &networkLinkControl ); /** * @brief Add a style to the style storage * @param style the new style */ void addStyle(const Marble::GeoDataStyle::Ptr &style ); /** * @brief Add a style to the style storage * @param style the new style */ void removeStyle( const QString& styleId ); /** * @brief Return a style in the style storage * @param styleId the id of the style */ GeoDataStyle::Ptr style( const QString& styleId ); GeoDataStyle::ConstPtr style( const QString& styleId ) const; /** * @brief dump a Vector of all styles */ QList styles(); QList styles() const; /** * @brief Add a stylemap to the stylemap storage * @param map the new stylemap */ void addStyleMap( const GeoDataStyleMap& map ); /** * @brief remove stylemap from storage * @param mapId the styleId of the styleMap to be removed */ void removeStyleMap( const QString& mapId ); /** * @brief Return a style in the style storage * @param styleId the id of the style */ GeoDataStyleMap& styleMap( const QString& styleId ); GeoDataStyleMap styleMap( const QString& styleId ) const; /** * @brief dump a Vector of all styles */ QList styleMaps() const; /** * @brief Add a schema to simplemap storage * @param schema the new schema */ void addSchema( const GeoDataSchema& schema ); /** * @brief remove a schema from schema storage * @param schemaId the of schema to be removed */ void removeSchema( const QString& schemaId ); /** * @brief Returns a schema with id = schemaId form schema storage * @param schemaId The id of schema to be returned */ GeoDataSchema schema( const QString& schemaId ) const; GeoDataSchema &schema( const QString& schemaId ); /** * @brief dump a vector of all schemas */ QList schemas() const; // Serialize the Placemark to @p stream virtual void pack( QDataStream& stream ) const; // Unserialize the Placemark from @p stream virtual void unpack( QDataStream& stream ); private: GeoDataDocumentPrivate *p(); const GeoDataDocumentPrivate *p() const; }; } Q_DECLARE_METATYPE(Marble::GeoDataDocument*) #endif diff --git a/src/lib/marble/graphicsview/GeoGraphicsItem.h b/src/lib/marble/graphicsview/GeoGraphicsItem.h index 144d49c99..fcd6954f3 100644 --- a/src/lib/marble/graphicsview/GeoGraphicsItem.h +++ b/src/lib/marble/graphicsview/GeoGraphicsItem.h @@ -1,159 +1,159 @@ // // 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 // Copyright 2009 Andrew Manson // #ifndef MARBLE_GEOGRAPHICSITEM_H #define MARBLE_GEOGRAPHICSITEM_H // Marble #include "marble_export.h" -#include +#include "GeoDataStyle.h" class QString; namespace Marble { class GeoDataFeature; class GeoDataLatLonAltBox; class GeoGraphicsItemPrivate; class GeoPainter; class ViewportParams; class MARBLE_EXPORT GeoGraphicsItem { public: explicit GeoGraphicsItem( const GeoDataFeature *feature ); virtual ~GeoGraphicsItem(); enum GeoGraphicsItemFlag { NoOptions = 0x0, ItemIsMovable = 0x1, ItemIsSelectable = 0x2, ItemIsVisible = 0x4 }; Q_DECLARE_FLAGS(GeoGraphicsItemFlags, GeoGraphicsItemFlag) bool visible() const; void setVisible( bool visible ); /** * Get the GeoGraphicItemFlags value that describes which flags are set on * this item. @see QFlags */ GeoGraphicsItemFlags flags() const; /** * Set or unset a single flag * @param enabled sets if the flag is to be set or unset */ void setFlag( GeoGraphicsItemFlag flag, bool enabled = true ); /** * Replace all of the current flags. * @param flags is the new value for this item's flags. */ void setFlags( GeoGraphicsItemFlags flags ); /** * Returns the minim zoom level on which item will be active. */ int minZoomLevel() const; /** * Sets the minimum zoom level */ void setMinZoomLevel( int zoomLevel ); /** * Returns the placemark for that item. */ const GeoDataFeature* feature() const; /** * Returns the bounding box covered by the item. */ virtual const GeoDataLatLonAltBox& latLonAltBox() const; /** * Set the box used to determine if an item is active or inactive. If an empty box is passed * the item will be shown in every case. */ void setLatLonAltBox( const GeoDataLatLonAltBox& latLonAltBox ); /** * Returns the style of item. */ GeoDataStyle::ConstPtr style() const; /** * Set the style for the item. */ void setStyle(const GeoDataStyle::ConstPtr &style ); /** * Set the style which will be used when * placemark is highlighted. * GeoGraphicsItem takes ownership of the * passed style and deletes it when appropriate. */ void setHighlightStyle( const GeoDataStyle::ConstPtr &highlightStyle ); /** * Returns the z value of the item */ qreal zValue() const; /** * Set the z value of the item */ void setZValue( qreal z ); static bool zValueLessThan(GeoGraphicsItem* one, GeoGraphicsItem* two); /** * Paints the item using the given GeoPainter. * * Note that depending on the projection and zoom level, the item may be visible more than once, * which is taken care of by GeoPainter. */ virtual void paint( GeoPainter *painter, const ViewportParams *viewport ) = 0; void setHighlighted( bool highlight ); bool isHighlighted() const; const QList& decorations(); bool isDecoration() const; protected: GeoGraphicsItemPrivate *const d; /** * Creates a new decoration for this item. * * Override this function to create a new type of decoration, * e.g. outlines for lines or "fake 3D effect" for polygons. * After a decoration was created add it to the item with * addDecoration(). You can create multiple decoration for a * single GeoGraphicsItem. */ virtual void createDecorations(); void addDecoration(GeoGraphicsItem* decoration); }; } // Namespace Marble Q_DECLARE_OPERATORS_FOR_FLAGS(Marble::GeoGraphicsItem::GeoGraphicsItemFlags) #endif