/usr/include/marble/RouteRequest.h is in libmarble-dev 4:15.12.3-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | //
// 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 <nienhueser@kde.org>
//
#ifndef MARBLE_ROUTEREQUEST_H
#define MARBLE_ROUTEREQUEST_H
#include "marble_export.h"
#include "GeoDataCoordinates.h"
#include "RoutingProfile.h"
#include <QFlags>
namespace Marble
{
class GeoDataPlacemark;
class RouteRequestPrivate;
/**
* @brief Points to be included in a route. An ordered list of
* GeoDataCoordinates with change notification and Pixmap access, similar
* to QAbstractItemModel.
*/
class MARBLE_EXPORT RouteRequest: public QObject
{
Q_OBJECT
public:
/** Constructor */
explicit RouteRequest( QObject *parent = 0 );
/** Destructor */
~RouteRequest();
/** The first point, or a default constructed if empty */
GeoDataCoordinates source() const;
/** The last point, or a default constructed if empty */
GeoDataCoordinates destination() const;
/** Number of points in the route */
int size() const;
/** Accessor for the n-th position */
GeoDataCoordinates at( int index ) const;
/** Add the given element to the end */
void append( const GeoDataCoordinates &coordinates, const QString &name = QString() );
void append( const GeoDataPlacemark &placemark );
/** Add the given element at the given position */
void insert( int index, const GeoDataCoordinates &coordinates, const QString &name = QString() );
void insert(int index, const GeoDataPlacemark &placemark);
/** Swaps the given elements at the given positions*/
void swap( int index1, int index2 );
/** Change the value of the element at the given position */
void setPosition( int index, const GeoDataCoordinates &position, const QString &name = QString() );
/** Remove the element at the given position */
void remove( int index );
/** Remove all elements */
void clear();
/**
* Insert a via point. Order will be chosen such that the via point is not before
* the start or after the destination. Furthermore the distance between neighboring
* route points is minimized
*
* @note: This does not trigger an update of the route. It becomes "dirty"
*
* @todo: Minimizing the distance might not always be what the user wants
*/
void addVia( const GeoDataCoordinates &position );
void addVia( const GeoDataPlacemark &placemark );
/** Returns a pixmap which indicates the position of the element */
QPixmap pixmap( int index, int size=-1, int margin=2 ) const;
void setName( int index, const QString &name );
QString name( int index ) const;
void setVisited( int index, bool visited );
bool visited( int index ) const;
void reverse();
void setRoutingProfile( const RoutingProfile &profile );
RoutingProfile routingProfile() const;
GeoDataPlacemark & operator[] ( int index );
GeoDataPlacemark const & operator[] ( int index ) const;
Q_SIGNALS:
/** The value of the n-th element was changed */
void positionChanged( int index, const GeoDataCoordinates &position );
/** An element was added at the given position */
void positionAdded( int index );
/** The element at the given position was removed */
void positionRemoved( int index );
/** The routing profile was changed */
void routingProfileChanged();
private:
RouteRequestPrivate *const d;
};
} // namespace Marble
#endif
|