• 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
  • graphicsview
MarbleGraphicsItem.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 2009 Bastian Holst <bastianholst@gmx.de>
9 //
10 
11 #ifndef MARBLE_MARBLEGRAPHICSITEM_H
12 #define MARBLE_MARBLEGRAPHICSITEM_H
13 
14 #include "marble_export.h"
15 
16 #include <QPointF>
17 #include <QList>
18 #include <QSizeF>
19 #include <QRectF>
20 #include <QString>
21 
22 class QEvent;
23 class QObject;
24 class QPainter;
25 
26 namespace Marble
27 {
28 
29 class AbstractMarbleGraphicsLayout;
30 class ViewportParams;
31 
32 class MarbleGraphicsItemPrivate;
33 
34 class MARBLE_EXPORT MarbleGraphicsItem
35 {
36  friend class MarbleGraphicsItemPrivate;
37 
38  public:
39  enum CacheMode {
40  NoCache,
41  ItemCoordinateCache,
42  DeviceCoordinateCache
43  };
44 
45  virtual ~MarbleGraphicsItem();
46 
51  bool paintEvent( QPainter *painter, const ViewportParams *viewport );
52 
56  bool contains( const QPointF& point ) const;
57 
61  AbstractMarbleGraphicsLayout *layout() const;
62 
67  void setLayout( AbstractMarbleGraphicsLayout *layout );
68 
72  CacheMode cacheMode() const;
73 
77  void setCacheMode( CacheMode mode );
78 
82  bool visible() const;
83 
87  void setVisible( bool visible );
88 
92  void hide();
93 
97  void show();
98 
102  QSizeF size() const;
103 
107  void setSize( const QSizeF& size );
108 
113  virtual QSizeF contentSize() const;
114 
118  virtual void setContentSize( const QSizeF& size );
119 
123  virtual QRectF contentRect() const;
124 
125  virtual void setProjection(const ViewportParams *viewport );
126 
127  protected:
128  explicit MarbleGraphicsItem( MarbleGraphicsItemPrivate *d_ptr );
129 
134  virtual void paint( QPainter *painter );
135 
136  virtual bool eventFilter( QObject *object, QEvent *e );
137 
142  void update();
143 
144  MarbleGraphicsItemPrivate * const d;
145 
146  private:
147  MarbleGraphicsItemPrivate* p();
148  const MarbleGraphicsItemPrivate* p() const;
149 };
150 
151 } // Namespace Marble
152 
153 #endif
QEvent
QPointF
Marble::MarbleGraphicsItem::NoCache
Definition: MarbleGraphicsItem.h:40
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
QPainter
Marble::MarbleGraphicsItem::ItemCoordinateCache
Definition: MarbleGraphicsItem.h:41
Marble::MarbleGraphicsItem
Definition: MarbleGraphicsItem.h:34
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::MarbleGraphicsItem::d
MarbleGraphicsItemPrivate *const d
Definition: MarbleGraphicsItem.h:144
QSizeF
marble_export.h
QRectF
Marble::MarbleGraphicsItemPrivate
Definition: MarbleGraphicsItem_p.h:30
Marble::MarbleGraphicsItem::CacheMode
CacheMode
Definition: MarbleGraphicsItem.h:39
Marble::AbstractMarbleGraphicsLayout
Definition: AbstractMarbleGraphicsLayout.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 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