1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2011 Daniel Marth <danielmarth@gmx.at>
4 //
5 
6 #include "OpenCachingCacheLogEntry.h"
7 
8 namespace Marble
9 {
10 
OpenCachingCacheLogEntry(const QHash<QString,QVariant> & properties)11 OpenCachingCacheLogEntry::OpenCachingCacheLogEntry( const QHash<QString, QVariant>& properties )
12 {
13     m_cacheId = properties["cacheid"].toULongLong();
14     m_userName = properties["userid"].toString();
15     m_logType = properties["logtype"].toString();
16     m_text = properties["text"].toString();
17     m_logDate = properties["date"].toDateTime();
18     m_createdDate = properties["datecreated"].toDateTime();
19     m_lastModifiedDate = properties["lastmodified"].toDateTime();
20 }
21 
setCacheId(int cacheId)22 void OpenCachingCacheLogEntry::setCacheId( int cacheId )
23 {
24     m_cacheId = cacheId;
25 }
26 
cacheId() const27 int OpenCachingCacheLogEntry::cacheId() const
28 {
29     return m_cacheId;
30 }
31 
setUserName(const QString & userName)32 void OpenCachingCacheLogEntry::setUserName( const QString& userName )
33 {
34     m_userName = userName;
35 }
36 
userName() const37 const QString& OpenCachingCacheLogEntry::userName() const
38 {
39     return m_userName;
40 }
41 
setLogType(const QString & logType)42 void OpenCachingCacheLogEntry::setLogType( const QString& logType )
43 {
44     m_logType = logType;
45 }
46 
logType() const47 const QString& OpenCachingCacheLogEntry::logType() const
48 {
49     return m_logType;
50 }
51 
setText(const QString & text)52 void OpenCachingCacheLogEntry::setText( const QString& text )
53 {
54     m_text = text;
55 }
56 
text() const57 const QString& OpenCachingCacheLogEntry::text() const
58 {
59     return m_text;
60 }
61 
setLogDate(const QDateTime & logDate)62 void OpenCachingCacheLogEntry::setLogDate( const QDateTime& logDate )
63 {
64     m_logDate = logDate;
65 }
66 
logDate() const67 const QDateTime& OpenCachingCacheLogEntry::logDate() const
68 {
69     return m_logDate;
70 }
71 
setCreatedDate(const QDateTime & createdDate)72 void OpenCachingCacheLogEntry::setCreatedDate( const QDateTime& createdDate )
73 {
74     m_createdDate = createdDate;
75 }
76 
createdDate() const77 const QDateTime& OpenCachingCacheLogEntry::createdDate() const
78 {
79     return m_createdDate;
80 }
81 
setLastModifiedDate(const QDateTime & lastModifiedDate)82 void OpenCachingCacheLogEntry::setLastModifiedDate( const QDateTime& lastModifiedDate )
83 {
84     m_lastModifiedDate = lastModifiedDate;
85 }
86 
lastModifiedDate() const87 const QDateTime& OpenCachingCacheLogEntry::lastModifiedDate() const
88 {
89     return m_lastModifiedDate;
90 }
91 
92 }
93