• 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
  • lib
  • marble
  • layers
PopupLayer.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 Mohammed Nafees <nafees.technocool@gmail.com>
9 // Copyright 2012 Dennis Nienhüser <earthwings@gentoo.org>
10 // Copyright 2012 Illya Kovalevskyy <illya.kovalevskyy@gmail.com>
11 //
12 
13 #ifndef POPUPLAYER_H
14 #define POPUPLAYER_H
15 
16 #include "LayerInterface.h"
17 #include "ViewportParams.h"
18 #include "GeoPainter.h"
19 #include "MarbleWidget.h"
20 #include "GeoDataCoordinates.h"
21 
22 #include <QObject>
23 #include <QUrl>
24 
25 namespace Marble
26 {
27 
28 class PopupItem;
29 class MarbleModel;
30 
39 class MARBLE_EXPORT PopupLayer : public QObject, public LayerInterface
40 {
41  Q_OBJECT
42 public:
43  explicit PopupLayer( MarbleWidget *widget, QObject* parent = 0 );
44  ~PopupLayer();
45 
46  QStringList renderPosition() const;
47  QString renderPolicy() const;
48  bool render( GeoPainter *painter, ViewportParams *viewport,
49  const QString &, GeoSceneLayer * );
50  virtual bool eventFilter( QObject *, QEvent * );
51  qreal zValue() const;
52 
53  virtual QString runtimeTrace() const { return "PopupLayer"; }
54 
63  bool visible() const;
64 
73  void setVisible( bool visible );
74 
81  void popup();
82 
97  void setCoordinates( const GeoDataCoordinates &coordinates, Qt::Alignment alignment );
98 
106  void setUrl( const QUrl &url );
107 
115  void setSize( const QSizeF &size );
116 
121  void setPosition( const QPointF &position );
122 
130  void setContent( const QString &html );
131 
139  void setBackgroundColor( const QColor &color );
140 
148  void setTextColor( const QColor &color );
149 
150 Q_SIGNALS:
151  void repaintNeeded();
152 
153 private slots:
154  void hidePopupItem();
155 
156 private:
161  void setAppropriateSize( const ViewportParams *viewport );
162 
163  PopupItem *const m_popupItem;
164  MarbleWidget * const m_widget;
165  QSizeF m_requestedSize;
166  bool m_adjustMap;
167 };
168 
169 }
170 
171 #endif
GeoDataCoordinates.h
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::PopupLayer::runtimeTrace
virtual QString runtimeTrace() const
Returns a debug line for perfo/tracing issues.
Definition: PopupLayer.h:53
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::PopupLayer
The PopupLayer class.
Definition: PopupLayer.h:39
LayerInterface.h
Marble::LayerInterface
Definition: LayerInterface.h:25
QObject
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:102
Marble::PopupItem
The PopupItem Class.
Definition: PopupItem.h:37
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
GeoPainter.h
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
ViewportParams.h
This file contains the headers for ViewportParams.
MarbleWidget.h
This file contains the headers for MarbleWidget.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 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