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 #ifndef OPENCACHINGCACHELOGENTRY_H
0007 #define OPENCACHINGCACHELOGENTRY_H
0008 
0009 #include <QString>
0010 #include <QDateTime>
0011 #include <QHash>
0012 
0013 class QVariant;
0014 
0015 namespace Marble
0016 {
0017 
0018 /**
0019  * Single log entry for a cache.
0020  */
0021 class OpenCachingCacheLogEntry
0022 {
0023 public:
0024     OpenCachingCacheLogEntry( const QHash<QString, QVariant>& properties );
0025 
0026     void setCacheId( int cacheId );
0027 
0028     int cacheId() const;
0029 
0030     void setUserName( const QString& userName );
0031 
0032     const QString& userName() const;
0033 
0034     void setLogType( const QString& logType );
0035 
0036     const QString& logType() const;
0037 
0038     void setText( const QString& text );
0039 
0040     const QString& text() const;
0041 
0042     void setLogDate( const QDateTime& logDate );
0043 
0044     const QDateTime& logDate() const;
0045 
0046     void setCreatedDate( const QDateTime& createdDate );
0047 
0048     const QDateTime& createdDate() const;
0049 
0050     void setLastModifiedDate( const QDateTime& lastModifiedDate );
0051 
0052     const QDateTime& lastModifiedDate() const;
0053 
0054 private:
0055     long m_cacheId;                      ///< Unique ID of the cache.
0056 
0057     QString m_userName;                  ///< Name of the user that created the log entry.
0058 
0059     QString m_logType;                   ///< Type of the log. @todo ?
0060 
0061     QString m_text;                      ///< Actual text of the log.
0062 
0063     QDateTime m_logDate;                 ///< Date the cache was found.
0064 
0065     QDateTime m_createdDate;             ///< Date the log was created.
0066 
0067     QDateTime m_lastModifiedDate;        ///< Date the log was last modified.
0068 };
0069 
0070 }
0071 
0072 #endif // OPENCACHINGCACHELOGENTRY_H