Marble

GeoDataSnippet.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Levente Kurusa <levex@linux.com>
4//
5
6#ifndef MARBLE_GEODATASNIPPET_H
7#define MARBLE_GEODATASNIPPET_H
8
9#include "geodata_export.h"
10#include <QString>
11
12namespace Marble
13{
14
15class GEODATA_EXPORT GeoDataSnippet
16{
17public:
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
53private:
54 QString m_text; // Text of the snippet
55 int m_maxLines; // max of lines that are displayed
56};
57
58}
59
60#endif
KIOCORE_EXPORT bool operator!=(const UDSEntry &entry, const UDSEntry &other)
bool operator==(const StyleDelim &l, const StyleDelim &r)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.