Marble

WidgetGraphicsItem.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010 Bastian Holst <[email protected]>
4 //
5 
6 #ifndef MARBLE_WIDGETGRAPHICSITEM_H
7 #define MARBLE_WIDGETGRAPHICSITEM_H
8 
9 // Marble
10 #include "ScreenGraphicsItem.h"
11 #include "marble_export.h"
12 
13 class QWidget;
14 
15 namespace Marble
16 {
17 
18 class WidgetGraphicsItemPrivate;
19 
20 class MARBLE_EXPORT WidgetGraphicsItem : public ScreenGraphicsItem
21 {
22  public:
23  explicit WidgetGraphicsItem( MarbleGraphicsItem *parent = nullptr );
24 
25  ~WidgetGraphicsItem() override;
26 
27  void setWidget( QWidget *widget );
28  QWidget *widget() const;
29 
30  protected:
31  /**
32  * Paints the item in item coordinates.
33  */
34  void paint( QPainter *painter ) override;
35 
36  bool eventFilter( QObject *, QEvent * ) override;
37 
38  private:
39  Q_DISABLE_COPY( WidgetGraphicsItem )
40  Q_DECLARE_PRIVATE(WidgetGraphicsItem)
41 };
42 
43 } // Namespace Marble
44 
45 #endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:09:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.