|
Classified ads
|
Carrier-class for user-profile data. More...
#include <profile.h>


Public Member Functions | |
| Profile (const Hash &aHash) | |
| ~Profile () | |
| QString | displayName () const |
| QByteArray | asJSon (const MController &aController) const |
| QVariant | asQVariant (const MController &aController) const |
| bool | setFromQVariant (const QVariantMap &aJSonAsQVariant, const MController &aController, bool aOmitImage=false) |
| bool | fromJSon (const QByteArray &aJSonBytes, const MController &aController, bool aOmitImage=false) |
Public Attributes | |
| const Hash | iFingerPrint |
| QString | iNickName |
| QString | iGreetingText |
| QString | iFirstName |
| QString | iFamilyName |
| QString | iCityCountry |
| QString | iBTCAddress |
| QString | iStateOfTheWorld |
| bool | iIsPrivate |
| quint32 | iTimeOfPublish |
| QList< Hash > | iProfileReaders |
| QImage | iProfilePicture |
| QList< Hash > | iSharedFiles |
| Node * | iNodeOfProfile |
| QList< Hash > | iTrustList |
Carrier-class for user-profile data.
Instances of this class are stored and retrieved using ProfileModel.
| Profile::Profile | ( | const Hash & | aHash | ) |
constructor
| Profile::~Profile | ( | ) |
destructor
| QByteArray Profile::asJSon | ( | const MController & | aController | ) | const |
returns profile data as JSon stream
| QVariant Profile::asQVariant | ( | const MController & | aController | ) | const |
Method for getting profile as JSon / QVariant
| QString Profile::displayName | ( | ) | const |
method for string that is shown to user about the profile. displays nickname or real name etc. or hash fingerprint if no other data avail. the string returned by this method must be no longer than 160 bytes in utf-8. some chinese glyphs take up to 4 bytes so lets here limit max-len to 40 characters.
| bool Profile::fromJSon | ( | const QByteArray & | aJSonBytes, |
| const MController & | aController, | ||
| bool | aOmitImage = false |
||
| ) |
parses json into members
| aJSonBytes | is json text supposedly containing the profile data |
| aController | application controller |
| aOmitImage | if set to true, possible image will not be loaded from data ; in cases where we know that we'll need only subset of information and no image, we can skip this costly operation |
| bool Profile::setFromQVariant | ( | const QVariantMap & | aJSonAsQVariant, |
| const MController & | aController, | ||
| bool | aOmitImage = false |
||
| ) |
reverse of asQVariant()
| aJSonAsQVariant | is qvariant supposedly containing the profile data |
| aController | application controller |
| aOmitImage | if set to true, possible image will not be loaded from data ; in cases where we know that we'll need only subset of information and no image, we can skip this costly operation |
| QString Profile::iBTCAddress |
payment addr
| QString Profile::iCityCountry |
location of residence
| QString Profile::iFamilyName |
family name
| const Hash Profile::iFingerPrint |
profile encryption key fingerprint
| QString Profile::iFirstName |
given name
| QString Profile::iGreetingText |
short hello-world by user
| bool Profile::iIsPrivate |
if set to true, profile is published encrypted
| QString Profile::iNickName |
nickname selected by user
| Node* Profile::iNodeOfProfile |
physical contact addr of this profile
| QImage Profile::iProfilePicture |
If V. Lenin is too fine for you
| QList<Hash> Profile::iProfileReaders |
in case of private profile, list of reader encryption key fingerprints
| QList<Hash> Profile::iSharedFiles |
Fingerprints of files shared
| QString Profile::iStateOfTheWorld |
State of the world as explained by user..
| quint32 Profile::iTimeOfPublish |
seconds since 1-jan-1970
| QList<Hash> Profile::iTrustList |
Fingerprints of trusted profiles
1.8.11