mysocials-core 1.0
|
00001 00007 #ifndef ALBUM_H 00008 #define ALBUM_H 00009 00010 #include <QString> 00011 #include <QMetaType> 00012 #include <QDomDocument> 00013 #include <QFile> 00014 #include <QDebug> 00015 00016 #include "utils/qrefreshlist.h" 00017 00018 class Album; 00019 00024 typedef QRefreshList<Album> AlbumList; 00025 00026 #include "photo.h" 00027 00031 #define FILE_PHOTOS_DATA "photos_%1_%2.xml" 00032 #define NODE_PHOTOS_ROOT "photos" 00033 00034 #define NODE_ALBUM_ROOT "album" 00035 #define ATTR_REFRESH "refresh" 00036 #define NODE_ALBUM_ID "id" 00037 #define NODE_ALBUM_TITLE "title" 00038 #define NODE_ALBUM_DESCRIPTION "description" 00039 #define NODE_ALBUM_SIZE "size" 00040 #define NODE_ALBUM_CREATE "create" 00041 #define NODE_ALBUM_UPDATE "update" 00042 #define NODE_ALBUM_ICON "icon" 00043 #define NODE_ALBUM_ICON_URL "iconUrl" 00044 00048 class Album : public QObject 00049 { 00050 Q_OBJECT 00051 00052 public: 00054 Album(); 00055 00057 00062 Album(const Album& src); 00063 00065 ~Album(); 00066 00067 QString albumId; 00068 QString ownerId; 00069 QString title; 00070 QString description; 00071 QString time_create; 00072 QString time_update; 00073 int size; 00074 QString icon; 00075 QString icon_url; 00076 QString accountId; 00085 QDomElement toQDomElement(QDomDocument& doc) const; 00086 00096 static Album fromQDomElement(const QDomElement& fr, const QString& accountId, const QString& friendId); 00097 00103 PhotoList getPhotoList() const; 00104 00113 static void setPhotoList(const PhotoList list, const QString accountId, const QString friendId, const QString albumId); 00114 00120 Album& operator=(const Album&); 00121 00122 }; 00123 00124 Q_DECLARE_METATYPE(Album) 00125 Q_DECLARE_METATYPE(AlbumList) 00126 00127 00128 #endif // ALBUM_H