File indexing completed on 2024-04-28 03:50:19
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Daniel Marth <danielmarth@gmx.at> 0004 // 0005 0006 #include "OpenCachingCache.h" 0007 0008 namespace Marble 0009 { 0010 0011 OpenCachingCache::OpenCachingCache( const QHash<QString, QVariant>& properties ) 0012 { 0013 m_id = properties["id"].toULongLong(); 0014 m_dateHidden = properties["datehidden"].toDateTime(); 0015 m_dateCreated = properties["datecreated"].toDateTime(); 0016 m_dateLastModified = properties["lastmodified"].toDateTime(); 0017 m_userName = properties["userid"].toString(); 0018 m_cacheName = properties["name"].toString(); 0019 m_cacheType = properties["type"].toString(); 0020 m_status = properties["status"].toString(); 0021 m_country = properties["country"].toString(); 0022 m_sizeString = properties["size"].toString(); 0023 m_difficulty = properties["difficulty"].toReal(); 0024 m_terrain = properties["terrain"].toReal(); 0025 m_longitude = properties["longitude"].toReal(); 0026 m_latitude = properties["latitude"].toReal(); 0027 } 0028 0029 void OpenCachingCache::setId( unsigned long long id ) 0030 { 0031 m_id = id; 0032 } 0033 0034 unsigned long long OpenCachingCache::id() const 0035 { 0036 return m_id; 0037 } 0038 0039 void OpenCachingCache::setDateHidden( const QDateTime& dateHidden ) 0040 { 0041 m_dateHidden = dateHidden; 0042 } 0043 0044 const QDateTime& OpenCachingCache::dateHidden() const 0045 { 0046 return m_dateHidden; 0047 } 0048 0049 void OpenCachingCache::setDateCreated( const QDateTime& dateCreated ) 0050 { 0051 m_dateCreated = dateCreated; 0052 } 0053 0054 const QDateTime& OpenCachingCache::dateCreated() const 0055 { 0056 return m_dateCreated; 0057 } 0058 0059 void OpenCachingCache::setDateLastModified( const QDateTime& dateLastModified ) 0060 { 0061 m_dateLastModified = dateLastModified; 0062 } 0063 0064 const QDateTime& OpenCachingCache::dateLastModified() const 0065 { 0066 return m_dateLastModified; 0067 } 0068 0069 void OpenCachingCache::setUserName( const QString& userName ) 0070 { 0071 m_userName = userName; 0072 } 0073 0074 const QString& OpenCachingCache::userName() const 0075 { 0076 return m_userName; 0077 } 0078 0079 void OpenCachingCache::setCacheName( const QString& cacheName ) 0080 { 0081 m_cacheName = cacheName; 0082 } 0083 0084 const QString& OpenCachingCache::cacheName() const 0085 { 0086 return m_cacheName; 0087 } 0088 0089 void OpenCachingCache::setCacheType( const QString& cacheType ) 0090 { 0091 m_cacheType = cacheType; 0092 } 0093 0094 const QString& OpenCachingCache::cacheType() const 0095 { 0096 return m_cacheType; 0097 } 0098 0099 void OpenCachingCache::setStatus( const QString& status ) 0100 { 0101 m_status = status; 0102 } 0103 0104 const QString& OpenCachingCache::status() const 0105 { 0106 return m_status; 0107 } 0108 0109 void OpenCachingCache::setCountry( const QString& country ) 0110 { 0111 m_country = country; 0112 } 0113 0114 const QString& OpenCachingCache::country() const 0115 { 0116 return m_country; 0117 } 0118 0119 void OpenCachingCache::setSizeString( const QString& sizeString ) 0120 { 0121 m_sizeString = sizeString; 0122 } 0123 0124 const QString& OpenCachingCache::sizeString() const 0125 { 0126 return m_sizeString; 0127 } 0128 0129 void OpenCachingCache::setDifficulty( qreal difficulty ) 0130 { 0131 m_difficulty = difficulty; 0132 } 0133 0134 qreal OpenCachingCache::difficulty() const 0135 { 0136 return m_difficulty; 0137 } 0138 0139 void OpenCachingCache::setTerrain( qreal terrain ) 0140 { 0141 m_terrain = terrain; 0142 } 0143 0144 qreal OpenCachingCache::terrain() const 0145 { 0146 return m_terrain; 0147 } 0148 0149 void OpenCachingCache::setLongitude( qreal longitude ) 0150 { 0151 m_longitude = longitude; 0152 } 0153 0154 qreal OpenCachingCache::longitude() const 0155 { 0156 return m_longitude; 0157 } 0158 0159 void OpenCachingCache::setLatitude( qreal latitude ) 0160 { 0161 m_latitude = latitude; 0162 } 0163 0164 qreal OpenCachingCache::latitude() const 0165 { 0166 return m_latitude; 0167 } 0168 0169 void OpenCachingCache::setDescription( const QHash<QString, OpenCachingCacheDescription>& description ) 0170 { 0171 m_description = description; 0172 } 0173 0174 const QHash<QString, OpenCachingCacheDescription>& OpenCachingCache::description() const 0175 { 0176 return m_description; 0177 } 0178 0179 void OpenCachingCache::setLog( const OpenCachingCacheLog& log ) 0180 { 0181 m_log = log; 0182 } 0183 0184 const OpenCachingCacheLog& OpenCachingCache::log() const 0185 { 0186 return m_log; 0187 } 0188 0189 }