• 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
  • plugins
  • declarative
Bookmarks.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_BOOKMARKS_H
12 #define MARBLE_DECLARATIVE_BOOKMARKS_H
13 
14 #include <QObject>
15 #include <QSortFilterProxyModel>
16 
17 class MarbleWidget;
18 
19 class BookmarksModel: public QSortFilterProxyModel
20 {
21  Q_OBJECT
22  Q_PROPERTY( int count READ count NOTIFY countChanged )
23 
24 public:
25  explicit BookmarksModel( QObject *parent = 0 );
26 
27  int count() const;
28 
29 public Q_SLOTS:
30  qreal longitude( int index ) const;
31 
32  qreal latitude( int index ) const;
33 
34  QString name( int index ) const;
35 
36 Q_SIGNALS:
37  void countChanged();
38 };
39 
40 class Bookmarks : public QObject
41 {
42  Q_OBJECT
43 
44  Q_PROPERTY( MarbleWidget* map READ map WRITE setMap NOTIFY mapChanged)
45  Q_PROPERTY( BookmarksModel* model READ model NOTIFY modelChanged )
46 
47 public:
48  explicit Bookmarks( QObject* parent = 0 );
49 
50  MarbleWidget* map();
51 
52  void setMap( MarbleWidget* widget );
53 
54  BookmarksModel* model();
55 
56  bool isBookmark( qreal longitude, qreal latitude ) const;
57 
58 public Q_SLOTS:
59  void addBookmark( qreal longitude, qreal latitude, const QString &name, const QString &folder );
60 
61  void removeBookmark( qreal longitude, qreal latitude );
62 
63 Q_SIGNALS:
64  void mapChanged();
65 
66  void modelChanged();
67 
68 private:
69  MarbleWidget* m_marbleWidget;
70 
71  BookmarksModel* m_proxyModel;
72 };
73 
74 #endif
QSortFilterProxyModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
BookmarksModel::BookmarksModel
BookmarksModel(QObject *parent=0)
Definition: Bookmarks.cpp:143
Bookmarks::mapChanged
void mapChanged()
Bookmarks::setMap
void setMap(MarbleWidget *widget)
Definition: Bookmarks.cpp:39
Bookmarks::isBookmark
bool isBookmark(qreal longitude, qreal latitude) const
Definition: Bookmarks.cpp:44
BookmarksModel::count
int count() const
QObject::name
const char * name() const
QObject
BookmarksModel::countChanged
void countChanged()
QString
BookmarksModel::longitude
qreal longitude(int index) const
Definition: Bookmarks.cpp:163
QSortFilterProxyModel
Bookmarks::removeBookmark
void removeBookmark(qreal longitude, qreal latitude)
Definition: Bookmarks.cpp:105
Bookmarks::modelChanged
void modelChanged()
Bookmarks::addBookmark
void addBookmark(qreal longitude, qreal latitude, const QString &name, const QString &folder)
Definition: Bookmarks.cpp:64
Bookmarks::model
BookmarksModel * model()
Bookmarks::map
MarbleWidget * map()
MarbleWidget
Wraps a Marble::MarbleWidget, providing access to important properties and methods.
Definition: MarbleDeclarativeWidget.h:50
Bookmarks
Definition: Bookmarks.h:40
QObject::parent
QObject * parent() const
BookmarksModel::latitude
qreal latitude(int index) const
Definition: Bookmarks.cpp:173
BookmarksModel
Definition: Bookmarks.h:19
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 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