Marble

GeoDataListStyle.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2012 Mohammed Nafees <[email protected]>
4 //
5 
6 #ifndef GEODATALISTSTYLE_H
7 #define GEODATALISTSTYLE_H
8 
9 #include "MarbleGlobal.h"
10 #include "GeoDataObject.h"
11 #include "geodata_export.h"
12 
13 #include <QColor>
14 #include <QVector>
15 
16 
17 namespace Marble
18 {
19 
20 class GeoDataListStylePrivate;
21 class GeoDataItemIcon;
22 
23 /**
24  */
25 class GEODATA_EXPORT GeoDataListStyle : public GeoDataObject
26 {
27 public:
28  GeoDataListStyle();
29 
30  GeoDataListStyle( const GeoDataListStyle &other );
31 
32  GeoDataListStyle& operator=( const GeoDataListStyle &other );
33 
34  bool operator==( const GeoDataListStyle &other ) const;
35  bool operator!=( const GeoDataListStyle &other ) const;
36 
37  ~GeoDataListStyle() override;
38 
39  /** Provides type information for downcasting a GeoNode */
40  const char* nodeType() const override;
41 
42  enum ListItemType {
43  Check,
44  RadioFolder,
45  CheckOffOnly,
46  CheckHideChildren
47  };
48 
49  ListItemType listItemType() const;
50  void setListItemType(ListItemType type);
51 
52  QColor backgroundColor() const;
53  void setBackgroundColor( const QColor &color );
54 
55  QVector<GeoDataItemIcon*> itemIconList() const;
56 
57  GeoDataItemIcon* child( int );
58 
59  const GeoDataItemIcon* child( int ) const;
60 
61  int childPosition( const GeoDataItemIcon *child ) const;
62 
63  void append( GeoDataItemIcon *other );
64 
65  void remove( int index );
66 
67  int size() const;
68 
69  GeoDataItemIcon& at( int pos );
70  const GeoDataItemIcon& at( int pos ) const;
71 
72  GeoDataItemIcon& last();
73  const GeoDataItemIcon& last() const;
74 
75  GeoDataItemIcon& first();
76  const GeoDataItemIcon& first() const;
77 
82  void clear();
83 
84  void pack( QDataStream& stream ) const override;
85 
86  void unpack( QDataStream& stream ) override;
87 
88 private:
89  friend class GeoDataItemIcon;
90  GeoDataListStylePrivate* const d;
91 };
92 
93 }
94 
95 #endif
const QList< QKeySequence > & begin()
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
KGuiItem clear()
bool operator!=(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
KGuiItem remove()
Binds a QML item to a specific geodetic location in screen coordinates.
const QList< QKeySequence > & end()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.