Classified ads
profile.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_H
21 #define CLASSIFIED_PROFILE_H
22 #include <QString>
23 #include "../util/hash.h" // for class Hash
24 #include <QPixmap>
25 #include <QVariant> // actually for qvariantmap
26 
27 class MController ;
28 class Node ;
29 
36 class Profile : public QObject {
37  Q_OBJECT
38 
39 public:
40  Profile(const Hash& aHash) ;
41  ~Profile() ;
51  QString displayName() const ;
52  QByteArray asJSon(const MController& aController) const ;
56  QVariant asQVariant(const MController& aController) const ;
61  bool setFromQVariant(const QVariantMap& aJSonAsQVariant,
62  const MController& aController) ;
63  bool fromJSon(const QByteArray &aJSonBytes,
64  const MController& aController ) ;
65  const Hash iFingerPrint ;
66  QString iNickName ;
67  QString iGreetingText ;
68  QString iFirstName ;
69  QString iFamilyName ;
70  QString iCityCountry ;
71  QString iBTCAddress ;
72  QString iStateOfTheWorld ;
73  bool iIsPrivate ;
74  quint32 iTimeOfPublish ;
79  QList<Hash> iProfileReaders ;
80  QPixmap iProfilePicture ;
81  QList<Hash> iSharedFiles ;
83 } ;
84 #endif
Node is a peer in network.
Definition: node.h:39
QString iCityCountry
Definition: profile.h:70
QList< Hash > iSharedFiles
Definition: profile.h:81
const Hash iFingerPrint
Definition: profile.h:65
QByteArray asJSon(const MController &aController) const
bool setFromQVariant(const QVariantMap &aJSonAsQVariant, const MController &aController)
bool fromJSon(const QByteArray &aJSonBytes, const MController &aController)
Profile(const Hash &aHash)
Hash is class that carries 160-bit digest.
Definition: hash.h:37
QString iFirstName
Definition: profile.h:68
quint32 iTimeOfPublish
Definition: profile.h:74
QVariant asQVariant(const MController &aController) const
QPixmap iProfilePicture
Definition: profile.h:80
QString iGreetingText
Definition: profile.h:67
bool iIsPrivate
Definition: profile.h:73
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:39
QString iFamilyName
Definition: profile.h:69
QString iBTCAddress
Definition: profile.h:71
QString displayName() const
QString iNickName
Definition: profile.h:66
QList< Hash > iProfileReaders
Definition: profile.h:79
Node * iNodeOfProfile
Definition: profile.h:82
Carrier-class for user-profile data.
Definition: profile.h:36
QString iStateOfTheWorld
Definition: profile.h:72