Marble

GeoDataSnippet.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Levente Kurusa <[email protected]>
4 //
5 
6 #ifndef MARBLE_GEODATASNIPPET_H
7 #define MARBLE_GEODATASNIPPET_H
8 
9 #include <QString>
10 #include "geodata_export.h"
11 
12 namespace Marble
13 {
14 
15 class GEODATA_EXPORT GeoDataSnippet
16 {
17 public:
18  /**
19  * Create a new snippet with the given @p text and @p maxLines maximum of lines.
20  *
21  * @param text the text
22  * @param maxLines the maximum nuber of lines
23  */
24  explicit GeoDataSnippet( const QString &text = QString() , int maxLines = 0 );
25 
26  /**
27  * Check for equality/inequality between two GeoDataSnippets.
28  */
29  bool operator==( const GeoDataSnippet &other ) const;
30  bool operator!=( const GeoDataSnippet &other ) const;
31 
32  /**
33  * Return the number of lines that should be displayed at maximum. The value
34  * 0 (default) means "all"
35  */
36  int maxLines() const;
37 
38  /**
39  * Set the number of lines displayed at maximum.
40  */
41  void setMaxLines( int lines );
42 
43  /**
44  * Returns the text that is associated with this snippet.
45  */
46  QString text() const;
47 
48  /**
49  * Set the text that the snippet will display.
50  */
51  void setText( const QString &text );
52 
53 private:
54  QString m_text; // Text of the snippet
55  int m_maxLines; // max of lines that are displayed
56 };
57 
58 }
59 
60 #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.