Classified ads
Main Page
Classes
Files
File List
File Members
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 modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(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
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with Classified Ads. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef CLASSIFIED_PROFILE_COMMENT_H
21
#define CLASSIFIED_PROFILE_COMMENT_H
22
#include <QString>
23
#include "../util/hash.h"
// for class Hash
24
#include <QPixmap>
25
#include <QVariant>
// actually for qvariantmap
26
#include "../net/protocol.h"
// for ProtocolItemType
27
#include "../mcontroller.h"
// for KNullHash
28
37
class
ProfileComment
{
38
public
:
46
ProfileComment
(
const
Hash
& aHash =
KNullHash
) ;
47
~ProfileComment
() ;
49
QByteArray
asJSon
(
const
MController
& aController)
const
;
50
bool
fromJSon
(
const
QByteArray &aJSonBytes,
51
const
MController
& aController ) ;
55
QVariant
asQVariant
(
const
MController
& aController)
const
;
60
bool
setFromQVariant
(
const
QVariantMap& aJSonAsQVariant,
61
const
MController
& aController) ;
62
63
// data is also public
64
Hash
iFingerPrint
;
65
Hash
iProfileFingerPrint
;
66
Hash
iCommentorHash
;
67
QList<Hash>
iAttachedFiles
;
68
QString
iCommentText
;
69
QString
iSubject
;
70
bool
iIsPrivate
;
72
quint32
iTimeOfPublish
;
73
QByteArray
iKeyOfCommentor
;
74
QString
iCommentorNickName
;
75
Hash
iReferences
;
77
ProtocolItemType
iTypeOfObjectReferenced
;
80
} ;
81
#endif
ProfileComment::iCommentorHash
Hash iCommentorHash
Definition:
profilecomment.h:66
ProfileComment
Carrier-class for comments of a profile.
Definition:
profilecomment.h:37
ProfileComment::iTypeOfObjectReferenced
ProtocolItemType iTypeOfObjectReferenced
Definition:
profilecomment.h:77
ProfileComment::~ProfileComment
~ProfileComment()
ProfileComment::iFingerPrint
Hash iFingerPrint
Definition:
profilecomment.h:64
ProfileComment::iCommentText
QString iCommentText
Definition:
profilecomment.h:68
Hash
Hash is class that carries 160-bit digest.
Definition:
hash.h:37
ProfileComment::fromJSon
bool fromJSon(const QByteArray &aJSonBytes, const MController &aController)
ProtocolItemType
ProtocolItemType
Definition:
protocol.h:124
ProfileComment::iKeyOfCommentor
QByteArray iKeyOfCommentor
Definition:
profilecomment.h:73
MController
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition:
mcontroller.h:39
ProfileComment::iAttachedFiles
QList< Hash > iAttachedFiles
Definition:
profilecomment.h:67
KNullHash
Hash KNullHash
ProfileComment::iIsPrivate
bool iIsPrivate
Definition:
profilecomment.h:70
ProfileComment::asJSon
QByteArray asJSon(const MController &aController) const
ProfileComment::iReferences
Hash iReferences
Definition:
profilecomment.h:75
ProfileComment::iCommentorNickName
QString iCommentorNickName
Definition:
profilecomment.h:74
ProfileComment::iProfileFingerPrint
Hash iProfileFingerPrint
Definition:
profilecomment.h:65
ProfileComment::ProfileComment
ProfileComment(const Hash &aHash=KNullHash)
ProfileComment::iTimeOfPublish
quint32 iTimeOfPublish
Definition:
profilecomment.h:72
ProfileComment::iSubject
QString iSubject
Definition:
profilecomment.h:69
ProfileComment::setFromQVariant
bool setFromQVariant(const QVariantMap &aJSonAsQVariant, const MController &aController)
ProfileComment::asQVariant
QVariant asQVariant(const MController &aController) const
Generated on Mon Jan 5 2015 23:02:08 for Classified ads by
1.8.8