Marble

GeoDataItemIcon.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2012 Mohammed Nafees <[email protected]>
4 //
5 
6 #ifndef GEODATAITEMICON_H
7 #define GEODATAITEMICON_H
8 
9 #include <QFlags>
10 
11 #include "GeoDataObject.h"
12 
13 class QImage;
14 
15 namespace Marble
16 {
17 
18 class GeoDataItemIconPrivate;
19 
20 /**
21  */
22 class GEODATA_EXPORT GeoDataItemIcon : public GeoDataObject
23 {
24  Q_FLAGS( ItemIconState ItemIconStates )
25 public:
26  GeoDataItemIcon();
27 
28  GeoDataItemIcon( const GeoDataItemIcon &other );
29 
30  GeoDataItemIcon& operator=( const GeoDataItemIcon &other );
31  bool operator==( const GeoDataItemIcon &other ) const;
32  bool operator!=( const GeoDataItemIcon &other ) const;
33 
34  ~GeoDataItemIcon() override;
35 
36  /** Provides type information for downcasting a GeoNode */
37  const char* nodeType() const override;
38 
39  enum ItemIconState {
40  Open = 1 << 0,
41  Closed = 1 << 1,
42  Error = 1 << 2,
43  Fetching0 = 1 << 3,
44  Fetching1 = 1 << 4,
45  Fetching2 = 1 << 5
46  };
47  Q_DECLARE_FLAGS( ItemIconStates, ItemIconState )
48 
49  ItemIconStates state() const;
50  void setState(ItemIconStates state);
51 
52  QString iconPath() const;
53  void setIconPath( const QString &path );
54 
55  QImage icon() const;
56  void setIcon( const QImage &icon );
57 
58 private:
59  GeoDataItemIconPrivate* const d;
60 };
61 
62 }
63 
64 #endif
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
bool operator!=(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
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 Thu Sep 21 2023 04:12:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.