• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
FileManager.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2006-2007 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 //
11 
12 #ifndef MARBLE_FILEMANAGER_H
13 #define MARBLE_FILEMANAGER_H
14 
15 #include "GeoDataDocument.h"
16 
17 #include <QObject>
18 #include <QString>
19 #include <QStringList>
20 
21 namespace Marble
22 {
23 
24 class MarbleModel;
25 class FileManagerPrivate;
26 class FileLoader;
27 class GeoDataLatLonBox;
28 
36 class FileManager : public QObject
37 {
38  Q_OBJECT
39 
40  public:
46  explicit FileManager( MarbleModel *model, QObject *parent = 0 );
47 
51  ~FileManager();
52 
56  void addFile( const QString &fileName, const QString &property, const GeoDataStyle* style, DocumentRole role, bool recenter = false );
57 
58 
62  void addFile( const QStringList &fileNames, const QStringList &propertyList, const QList<const GeoDataStyle*> &styles, DocumentRole role );
63 
64 
68  void removeFile( const QString &fileName );
69 
73  void addData( const QString &name, const QString &data, DocumentRole role );
74 
75  void saveFile( const QString &fileName, const GeoDataDocument *document );
76  void closeFile( const GeoDataDocument *document );
77 
78  int size() const;
79  GeoDataDocument *at( const QString &key );
80 
82  int pendingFiles() const;
83 
84  Q_SIGNALS:
85  void fileAdded( const QString &key );
86  void fileRemoved( const QString &key );
87  void centeredDocument( const GeoDataLatLonBox& );
88 
89  private:
90 
91  Q_PRIVATE_SLOT( d, void cleanupLoader( FileLoader *loader ) )
92 
93  Q_DISABLE_COPY( FileManager )
94 
95  friend class FileManagerPrivate;
96  FileManagerPrivate *const d;
97 };
98 
99 }
100 
101 #endif
GeoDataDocument.h
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Marble::FileManager::pendingFiles
int pendingFiles() const
Returns the number of files being opened at the moment.
Definition: FileManager.cpp:189
Marble::FileManager::~FileManager
~FileManager()
Destroys the file manager.
Definition: FileManager.cpp:74
Marble::FileManager::fileAdded
void fileAdded(const QString &key)
Marble::FileLoader
Definition: FileLoader.h:25
Marble::FileManager::centeredDocument
void centeredDocument(const GeoDataLatLonBox &)
QObject::name
const char * name() const
Marble::GeoDataStyle
an addressable style group
Definition: GeoDataStyle.h:55
QObject::property
QVariant property(const char *name) const
Marble::FileManager::addData
void addData(const QString &name, const QString &data, DocumentRole role)
add Data containing KML code as string
Definition: FileManager.cpp:104
Marble::FileManager::closeFile
void closeFile(const GeoDataDocument *document)
Definition: FileManager.cpp:164
QObject
Marble::FileManager
This class is responsible for loading the different files into Geodata model.
Definition: FileManager.h:36
Marble::FileManager::removeFile
void removeFile(const QString &fileName)
removes an existing file from the manager
Definition: FileManager.cpp:119
Marble::FileManager::size
int size() const
Definition: FileManager.cpp:176
QString
QList
QStringList
Marble::FileManager::FileManager
FileManager(MarbleModel *model, QObject *parent=0)
Creates a new file manager.
Definition: FileManager.cpp:67
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
Marble::FileManager::fileRemoved
void fileRemoved(const QString &key)
Marble::FileManager::at
GeoDataDocument * at(const QString &key)
Definition: FileManager.cpp:181
Marble::FileManager::saveFile
void saveFile(const QString &fileName, const GeoDataDocument *document)
Definition: FileManager.cpp:150
Marble::FileManager::FileManagerPrivate
friend class FileManagerPrivate
Definition: FileManager.h:95
QObject::parent
QObject * parent() const
Marble::DocumentRole
DocumentRole
Definition: GeoDataDocument.h:39
Marble::GeoDataLatLonBox
A class that defines a 2D bounding box for geographic data.
Definition: GeoDataLatLonBox.h:51
Marble::FileManager::addFile
void addFile(const QString &fileName, const QString &property, const GeoDataStyle *style, DocumentRole role, bool recenter=false)
Loads a new file into the manager.
Definition: FileManager.cpp:79
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal