• 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
  • render
  • navigation
NavigationFloatItem.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 2008 Dennis Nienhüser <earthwings@gentoo.org>
9 // Copyright 2013 Mohammed Nafees <nafees.technocool@gmail.com>
10 //
11 
12 #ifndef NAVIGATION_FLOAT_ITEM_H
13 #define NAVIGATION_FLOAT_ITEM_H
14 
15 #include <QObject>
16 #include <QMenu>
17 
18 #include "MarbleGlobal.h"
19 
20 #include "AbstractFloatItem.h"
21 
22 namespace Ui
23 {
24  class Navigation;
25 }
26 
27 namespace Marble
28 {
29 
30 class MarbleWidget;
31 class WidgetGraphicsItem;
32 
37 class NavigationFloatItem: public AbstractFloatItem
38 {
39  Q_OBJECT
40  Q_PLUGIN_METADATA( IID "org.kde.edu.marble.NavigationFloatItem" )
41 
42  Q_INTERFACES( Marble::RenderPluginInterface )
43 
44 MARBLE_PLUGIN( NavigationFloatItem )
45 
46  public:
47  explicit NavigationFloatItem( const MarbleModel *marbleModel = 0 );
48  ~NavigationFloatItem();
49 
50  QStringList backendTypes() const;
51 
52  QString name() const;
53 
54  QString guiString() const;
55 
56  QString nameId() const;
57 
58  QString version() const;
59 
60  QString description() const;
61 
62  QString copyrightYears() const;
63 
64  QList<PluginAuthor> pluginAuthors() const;
65 
66  QIcon icon () const;
67 
68  void initialize ();
69 
70  bool isInitialized () const;
71 
72  void setProjection( const ViewportParams *viewport );
73 
74  static QPixmap pixmap( const QString &Id );
75 
76  QHash<QString,QVariant> settings() const;
77 
78  void setSettings( const QHash<QString, QVariant> &settings );
79 
80  protected:
81  bool eventFilter( QObject *object, QEvent *e );
82  void paintContent( QPainter *painter );
83  void contextMenuEvent( QWidget *w, QContextMenuEvent *e );
84 
85  private Q_SLOTS:
87  void selectTheme( QString theme );
88 
90  void updateButtons( int zoomValue );
91 
92  void activateCurrentPositionButton();
93  void activateHomeButton();
94  void centerOnCurrentLocation();
95 
96  private:
98  MarbleWidget *m_marbleWidget;
99 
102  WidgetGraphicsItem *m_widgetItem;
103 
105  Ui::Navigation *m_navigationWidget;
106 
108  MarbleGlobal::Profiles m_profiles;
109 
111  int m_oldViewportRadius;
112 
113  int m_maxZoom;
114  int m_minZoom;
115 
116  QMenu *m_contextMenu;
117  QAction *m_activateCurrentPositionButtonAction;
118  QAction *m_activateHomeButtonAction;
119 
120  bool m_showHomeButton;
121 };
122 
123 }
124 
125 #endif // NAVIGATION_FLOAT_ITEM_H
QEvent
Marble::RenderPluginInterface
The class that specifies the Marble layer interface of a plugin.
Definition: RenderPluginInterface.h:30
QWidget
Marble::NavigationFloatItem::setProjection
void setProjection(const ViewportParams *viewport)
Definition: NavigationFloatItem.cpp:144
Marble::NavigationFloatItem::guiString
QString guiString() const
String that should be displayed in GUI.
Definition: NavigationFloatItem.cpp:78
Marble::NavigationFloatItem::backendTypes
QStringList backendTypes() const
Returns the name(s) of the backend that the plugin can render This method should return the name of t...
Definition: NavigationFloatItem.cpp:68
Marble::NavigationFloatItem::setSettings
void setSettings(const QHash< QString, QVariant > &settings)
Set the settings of the plugin.
Definition: NavigationFloatItem.cpp:339
AbstractFloatItem.h
Marble::NavigationFloatItem::version
QString version() const
Definition: NavigationFloatItem.cpp:88
Marble::NavigationFloatItem::pluginAuthors
QList< PluginAuthor > pluginAuthors() const
Definition: NavigationFloatItem.cpp:103
Marble::NavigationFloatItem::eventFilter
bool eventFilter(QObject *object, QEvent *e)
Definition: NavigationFloatItem.cpp:155
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
Marble::NavigationFloatItem::copyrightYears
QString copyrightYears() const
Definition: NavigationFloatItem.cpp:98
Marble::NavigationFloatItem::description
QString description() const
Returns a user description of the plugin.
Definition: NavigationFloatItem.cpp:93
Marble::NavigationFloatItem::icon
QIcon icon() const
Returns an icon for the plugin.
Definition: NavigationFloatItem.cpp:111
QHash< QString, QVariant >
QContextMenuEvent
QObject
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:45
Marble::NavigationFloatItem::settings
QHash< QString, QVariant > settings() const
Settings of the plugin.
Definition: NavigationFloatItem.cpp:332
QPainter
Marble::NavigationFloatItem
Provides a float item with zoom and move controls.
Definition: NavigationFloatItem.h:37
QString
QList
MarbleGlobal.h
Marble::NavigationFloatItem::initialize
void initialize()
Definition: NavigationFloatItem.cpp:116
Marble::WidgetGraphicsItem
Definition: WidgetGraphicsItem.h:28
QStringList
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QPixmap
Marble::NavigationFloatItem::contextMenuEvent
void contextMenuEvent(QWidget *w, QContextMenuEvent *e)
Definition: NavigationFloatItem.cpp:248
Marble::NavigationFloatItem::paintContent
void paintContent(QPainter *painter)
Here the items paint their content.
Definition: NavigationFloatItem.cpp:241
QMenu
Marble::NavigationFloatItem::pixmap
static QPixmap pixmap(const QString &Id)
Definition: NavigationFloatItem.cpp:231
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QAction
Marble::NavigationFloatItem::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: NavigationFloatItem.cpp:83
Marble::NavigationFloatItem::name
QString name() const
Returns the user-visible name of the plugin.
Definition: NavigationFloatItem.cpp:73
Navigation
Definition: Navigation.qml:16
Marble::NavigationFloatItem::~NavigationFloatItem
~NavigationFloatItem()
Definition: NavigationFloatItem.cpp:56
MarbleWidget
Wraps a Marble::MarbleWidget, providing access to important properties and methods.
Definition: MarbleDeclarativeWidget.h:50
Marble::RenderPlugin::marbleModel
const MarbleModel * marbleModel() const
Access to the MarbleModel.
Definition: RenderPlugin.cpp:83
Marble::NavigationFloatItem::isInitialized
bool isInitialized() const
Definition: NavigationFloatItem.cpp:139
QIcon
MARBLE_PLUGIN
#define MARBLE_PLUGIN(T)
Definition: RenderPlugin.h:340
Marble::NavigationFloatItem::NavigationFloatItem
NavigationFloatItem(const MarbleModel *marbleModel=0)
Definition: NavigationFloatItem.cpp:37
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