/usr/include/marble/BookmarkManager.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 | //
// 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 Gaurav Gupta <1989.gaurav@googlemail.com>
// Copyright 2012 Thibaut Gridel <tgridel@free.fr>
//
#ifndef MARBLE_BOOKMARKMANAGER_H
#define MARBLE_BOOKMARKMANAGER_H
#include <QObject>
#include <QString>
#include <QVector>
#include "MarbleGlobal.h"
namespace Marble
{
class BookmarkManagerPrivate;
class GeoDataContainer;
class GeoDataDocument;
class GeoDataPlacemark;
class GeoDataFolder;
class GeoDataTreeModel;
/**
* This class is responsible for loading the
* book mark objects from the files and various
* book mark operations
*/
class MARBLE_EXPORT BookmarkManager : public QObject
{
Q_OBJECT
public:
explicit BookmarkManager( GeoDataTreeModel *treeModel, QObject *parent = 0 );
~BookmarkManager();
/**
* @brief load bookmark file as GeoDataDocument and return true
* if loaded successfully else false
* @param relativeFilePath relative path of bookmark file
*/
bool loadFile( const QString &relativeFilePath );
/**
* @brief return bookmark file path
*/
QString bookmarkFile() const;
/**
* @brief add bookmark in a folder
* @param bookmark bookmark to be added
* @param folderName folder name in which bookmark to be added
*/
void addBookmark( GeoDataContainer *folder, const GeoDataPlacemark &bookmark ) ;
void updateBookmark( GeoDataPlacemark *bookmark );
void removeBookmark( GeoDataPlacemark *bookmark );
GeoDataDocument * document();
const GeoDataDocument * document() const;
bool showBookmarks() const;
/**
* @brief return Vector of folders
*/
QVector<GeoDataFolder*> folders() const;
/**
* @brief add a folder
* @param folder name of folder to be created
*/
void addNewBookmarkFolder( GeoDataContainer *folder, const QString &name );
void renameBookmarkFolder( GeoDataFolder *folder, const QString &name );
void removeBookmarkFolder( GeoDataFolder *folder );
/**
* @brief checks that there is at least one folder
*/
void ensureDefaultFolder();
/**
* @brief remove all folders and bookmarks except default folder
*/
void removeAllBookmarks();
public Q_SLOTS:
void setShowBookmarks( bool visible );
Q_SIGNALS:
/** One or more bookmarks were added or removed */
void bookmarksChanged();
private:
friend class BookmarkManagerDialog;
/**
* @brief updates bookmark file and return true if updated successfully
*/
bool updateBookmarkFile();
static GeoDataDocument* openFile( const QString& fileName );
BookmarkManagerPrivate* const d;
};
}
#endif
|