• 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
  • routing
RoutingProfilesModel.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 2010 Niko Sams <niko.sams@gmail.com>
9 //
10 
11 
12 #ifndef MARBLE_ROUTINGPROFILESMODEL_H
13 #define MARBLE_ROUTINGPROFILESMODEL_H
14 
15 #include "marble_export.h"
16 #include "RoutingProfile.h"
17 
18 #include <QAbstractListModel>
19 
20 
21 namespace Marble {
22 
23 class PluginManager;
24 
25 class MARBLE_EXPORT RoutingProfilesModel : public QAbstractListModel
26 {
27  Q_OBJECT
28 public:
29  explicit RoutingProfilesModel( const PluginManager *pluginManager, QObject *parent = 0 );
30 
31  virtual QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
32  virtual int rowCount( const QModelIndex& parent = QModelIndex() ) const;
33  virtual bool removeRows( int row, int count, const QModelIndex& parent = QModelIndex() );
34 
35  enum ProfileTemplate {
36  CarFastestTemplate,
37  CarShortestTemplate,
38  CarEcologicalTemplate,
39  BicycleTemplate,
40  PedestrianTemplate,
41 
42  LastTemplate
43  };
44 
45  void setProfiles( const QList<RoutingProfile> &profiles );
46  QList<RoutingProfile> profiles() const;
47 
48  void loadDefaultProfiles();
49 
50  void addProfile( const QString &name );
51  bool moveUp( int row );
52  bool moveDown( int row );
53 
54  bool setProfileName( int row, const QString &name );
55  bool setProfilePluginSettings( int row, const QHash<QString, QHash<QString, QVariant> > &pluginSettings );
56 
57 private:
58  QList<RoutingProfile> m_profiles;
59  const PluginManager* m_pluginManager;
60 };
61 
62 }
63 
64 #endif // MARBLE_ROUTINGPROFILESMODEL_H
QModelIndex
Marble::PluginManager
The class that handles Marble's plugins.
Definition: PluginManager.h:45
Marble::RoutingProfilesModel::CarEcologicalTemplate
Definition: RoutingProfilesModel.h:38
Marble::RoutingProfilesModel
Definition: RoutingProfilesModel.h:25
QHash
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
QAbstractListModel
Marble::RoutingProfilesModel::CarShortestTemplate
Definition: RoutingProfilesModel.h:37
RoutingProfile.h
QString
QList
Marble::RoutingProfilesModel::CarFastestTemplate
Definition: RoutingProfilesModel.h:36
Marble::RoutingProfilesModel::ProfileTemplate
ProfileTemplate
Definition: RoutingProfilesModel.h:35
Marble::RoutingProfilesModel::BicycleTemplate
Definition: RoutingProfilesModel.h:39
marble_export.h
Marble::RoutingProfilesModel::PedestrianTemplate
Definition: RoutingProfilesModel.h:40
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 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