File indexing completed on 2025-01-05 03:59:00
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Levente Kurusa <levex@linux.com> 0004 // 0005 0006 #ifndef MARBLE_GEODATASNIPPET_H 0007 #define MARBLE_GEODATASNIPPET_H 0008 0009 #include <QString> 0010 #include "digikam_export.h" 0011 0012 namespace Marble 0013 { 0014 0015 class DIGIKAM_EXPORT GeoDataSnippet 0016 { 0017 public: 0018 /** 0019 * Create a new snippet with the given @p text and @p maxLines maximum of lines. 0020 * 0021 * @param text the text 0022 * @param maxLines the maximum nuber of lines 0023 */ 0024 explicit GeoDataSnippet( const QString &text = QString() , int maxLines = 0 ); 0025 0026 /** 0027 * Check for equality/inequality between two GeoDataSnippets. 0028 */ 0029 bool operator==( const GeoDataSnippet &other ) const; 0030 bool operator!=( const GeoDataSnippet &other ) const; 0031 0032 /** 0033 * Return the number of lines that should be displayed at maximum. The value 0034 * 0 (default) means "all" 0035 */ 0036 int maxLines() const; 0037 0038 /** 0039 * Set the number of lines displayed at maximum. 0040 */ 0041 void setMaxLines( int lines ); 0042 0043 /** 0044 * Returns the text that is associated with this snippet. 0045 */ 0046 QString text() const; 0047 0048 /** 0049 * Set the text that the snippet will display. 0050 */ 0051 void setText( const QString &text ); 0052 0053 private: 0054 QString m_text; // Text of the snippet 0055 int m_maxLines; // max of lines that are displayed 0056 }; 0057 0058 } 0059 0060 #endif