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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • declarative
MapThemeModel.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 2012 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef MARBLE_DECLARATIVE_STREETMAPTHEMEMODEL_H
12 #define MARBLE_DECLARATIVE_STREETMAPTHEMEMODEL_H
13 
14 #include <QSortFilterProxyModel>
15 
16 namespace Marble { class MapThemeManager; }
17 
18 class MapThemeModel : public QSortFilterProxyModel
19 {
20  Q_OBJECT
21 
22  Q_PROPERTY( int count READ count NOTIFY countChanged )
23 
24 public:
25  enum MapThemeFilter {
26  AnyTheme = 0x0,
27  Terrestrial = 0x1,
28  Extraterrestrial = 0x2,
29  LowZoom = 0x4,
30  HighZoom = 0x8
31  };
32 
33  Q_DECLARE_FLAGS(MapThemeFilters, MapThemeFilter)
34 
35  Q_FLAGS(MapThemeFilter MapThemeFilters)
36 
37  Q_PROPERTY( MapThemeFilters mapThemeFilter READ mapThemeFilter WRITE setMapThemeFilter NOTIFY mapThemeFilterChanged )
38 
39 public:
40  explicit MapThemeModel( QObject* parent = 0 );
41 
43  int count() const;
44 
45 #if QT_VERSION >= 0x050000
46  QHash<int, QByteArray> roleNames() const;
47 #endif
48 
49  Q_INVOKABLE QString name( const QString &id ) const;
50 
51  Q_INVOKABLE int indexOf( const QString &id ) const;
52 
53  Q_INVOKABLE MapThemeFilters mapThemeFilter() const;
54 
55 public Q_SLOTS:
56  void setMapThemeFilter( MapThemeFilters filters );
57 
58 Q_SIGNALS:
59  void countChanged();
60 
61  void mapThemeFilterChanged();
62 
63 protected:
64  virtual bool filterAcceptsRow(int sourceRow,
65  const QModelIndex &sourceParent) const;
66 
67 private Q_SLOTS:
68  void handleChangedThemes();
69 
70 private:
71  Marble::MapThemeManager* m_themeManager;
72 
73  QList<QString> m_streetMapThemeIds;
74 
75  MapThemeFilters m_mapThemeFilters;
76 
77 #if QT_VERSION >= 0x050000
78  QHash<int, QByteArray> m_roleNames;
79 #endif
80 };
81 
82 #endif
MapThemeModel::name
Q_INVOKABLE QString name(const QString &id) const
Definition: MapThemeModel.cpp:52
MapThemeModel::countChanged
void countChanged()
MapThemeModel::MapThemeFilter
MapThemeFilter
Definition: MapThemeModel.h:25
MapThemeModel::mapThemeFilterChanged
void mapThemeFilterChanged()
MapThemeModel::AnyTheme
Definition: MapThemeModel.h:26
MapThemeModel::count
int count() const
MapThemeManager
Provides access to all map themes installed locally.
Definition: DeclarativeMapThemeManager.h:40
QObject
MapThemeModel::Extraterrestrial
Definition: MapThemeModel.h:28
MapThemeModel::setMapThemeFilter
void setMapThemeFilter(MapThemeFilters filters)
Definition: MapThemeModel.cpp:77
MapThemeModel
Definition: MapThemeModel.h:18
Marble::MapThemeManager
The class that handles map themes that are locally available .
Definition: MapThemeManager.h:48
MapThemeModel::filterAcceptsRow
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
Definition: MapThemeModel.cpp:85
MapThemeModel::mapThemeFilter
Q_INVOKABLE MapThemeFilters mapThemeFilter() const
MapThemeModel::LowZoom
Definition: MapThemeModel.h:29
MapThemeModel::indexOf
Q_INVOKABLE int indexOf(const QString &id) const
Definition: MapThemeModel.cpp:62
MapThemeModel::Terrestrial
Definition: MapThemeModel.h:27
MapThemeModel::HighZoom
Definition: MapThemeModel.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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