00001 #ifndef PHOTOCOMMENT_H
00002 #define PHOTOCOMMENT_H
00003
00004 #include <QObject>
00005 #include <QMetaType>
00006 #include <QDomDocument>
00007
00008 #include "utils/qrefreshlist.h"
00009
00010 class PhotoComment;
00011 typedef QRefreshList<PhotoComment> PhotoCommentList;
00012
00013 #define NODE_PHOTO_COMMENT_ROOT "comment"
00014 #define NODE_PHOTO_COMMENT_ID "id"
00015 #define NODE_PHOTO_COMMENT_SENDER_ID "senderid"
00016 #define NODE_PHOTO_COMMENT_SENDER_NAME "sendername"
00017 #define NODE_PHOTO_COMMENT_TEXT "text"
00018 #define NODE_PHOTO_COMMENT_TIME "time"
00019
00020 class PhotoComment : public QObject
00021 {
00022 Q_OBJECT
00023 public:
00024 explicit PhotoComment(QObject *parent = 0);
00025 PhotoComment(const PhotoComment& source);
00026
00027 QString accountId;
00028
00029 QString ownerId;
00030
00031 QString albumId;
00032
00033 QString photoId;
00034
00035 QString commentId;
00036
00037 QString senderId;
00038
00039 QString senderName;
00040
00041 QString time;
00042
00043 QString text;
00044
00045
00046 QDomElement toQDomElement(QDomDocument doc);
00047
00048
00049 static QDomElement toQDomElement(QDomDocument doc, PhotoComment src);
00050
00051
00052 static PhotoComment fromQDomElement(QDomElement fr, QString accountId, QString friendId, QString albumId, QString photoId);
00053
00054 static void copyData(PhotoComment *dst, const PhotoComment *src);
00055
00056 PhotoComment& operator=(const PhotoComment& source);
00057
00058 signals:
00059
00060 public slots:
00061
00062 };
00063
00064 Q_DECLARE_METATYPE(PhotoComment)
00065
00066 Q_DECLARE_METATYPE(PhotoCommentList)
00067
00068
00069 #endif // PHOTOCOMMENT_H