Classified ads
datamodel
profilecomment.h
Go to the documentation of this file.
1
/* -*-C++-*- -*-coding: utf-8-unix;-*-
2
Classified Ads is Copyright (c) Antti Jarvinen 2013.
3
4
This file is part of Classified Ads.
5
6
Classified Ads is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
10
11
Classified Ads is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public
17
License along with Classified Ads; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef CLASSIFIED_PROFILE_COMMENT_H
22
#define CLASSIFIED_PROFILE_COMMENT_H
23
#include <QString>
24
#include "../util/hash.h"
// for class Hash
25
#include <QPixmap>
26
#include <QVariant>
// actually for qvariantmap
27
#include "../net/protocol.h"
// for ProtocolItemType
28
#include "../mcontroller.h"
// for KNullHash
29
38
class
ProfileComment
{
39
public
:
47
ProfileComment
(
const
Hash
& aHash =
KNullHash
) ;
48
~ProfileComment
() ;
50
QByteArray
asJSon
(
const
MController
& aController)
const
;
51
bool
fromJSon
(
const
QByteArray &aJSonBytes,
52
const
MController
& aController ) ;
56
QVariant
asQVariant
(
const
MController
& aController)
const
;
61
bool
setFromQVariant
(
const
QVariantMap& aJSonAsQVariant,
62
const
MController
& aController) ;
63
64
// data is also public
65
Hash
iFingerPrint
;
66
Hash
iProfileFingerPrint
;
67
Hash
iCommentorHash
;
68
QList<Hash>
iAttachedFiles
;
69
QString
iCommentText
;
70
QString
iSubject
;
71
bool
iIsPrivate
;
73
quint32
iTimeOfPublish
;
74
QByteArray
iKeyOfCommentor
;
75
QString
iCommentorNickName
;
76
Hash
iReferences
;
78
ProtocolItemType
iTypeOfObjectReferenced
;
81
} ;
82
#endif
ProfileComment::iCommentorHash
Hash iCommentorHash
Definition:
profilecomment.h:67
ProfileComment
Carrier-class for comments of a profile.
Definition:
profilecomment.h:38
ProfileComment::iTypeOfObjectReferenced
ProtocolItemType iTypeOfObjectReferenced
Definition:
profilecomment.h:78
ProfileComment::~ProfileComment
~ProfileComment()
ProfileComment::iFingerPrint
Hash iFingerPrint
Definition:
profilecomment.h:65
ProfileComment::iCommentText
QString iCommentText
Definition:
profilecomment.h:69
Hash
Hash is class that carries 160-bit digest.
Definition:
hash.h:38
ProfileComment::fromJSon
bool fromJSon(const QByteArray &aJSonBytes, const MController &aController)
ProtocolItemType
ProtocolItemType
Definition:
protocol.h:157
ProfileComment::iKeyOfCommentor
QByteArray iKeyOfCommentor
Definition:
profilecomment.h:74
MController
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition:
mcontroller.h:48
ProfileComment::iAttachedFiles
QList< Hash > iAttachedFiles
Definition:
profilecomment.h:68
KNullHash
Hash KNullHash
ProfileComment::iIsPrivate
bool iIsPrivate
Definition:
profilecomment.h:71
ProfileComment::iReferences
Hash iReferences
Definition:
profilecomment.h:76
ProfileComment::asQVariant
QVariant asQVariant(const MController &aController) const
ProfileComment::iCommentorNickName
QString iCommentorNickName
Definition:
profilecomment.h:75
ProfileComment::iProfileFingerPrint
Hash iProfileFingerPrint
Definition:
profilecomment.h:66
ProfileComment::ProfileComment
ProfileComment(const Hash &aHash=KNullHash)
ProfileComment::iTimeOfPublish
quint32 iTimeOfPublish
Definition:
profilecomment.h:73
ProfileComment::iSubject
QString iSubject
Definition:
profilecomment.h:70
ProfileComment::asJSon
QByteArray asJSon(const MController &aController) const
ProfileComment::setFromQVariant
bool setFromQVariant(const QVariantMap &aJSonAsQVariant, const MController &aController)
Generated by
1.8.13