00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef BACKEND_SUBALBUM_H
00018 #define BACKEND_SUBALBUM_H
00019
00020
00021 #define SMALL 1
00022 #define MEDIUM 2
00023 #define LARGE 3
00024
00025
00026
00027 class QString;
00028 class QPixmap;
00029 class QDomNode;
00030 class Album;
00031 class Photo;
00032 class LoadDialog;
00033 class PhotoWidget;
00034
00035
00036
00049
00050
00051 class Subalbum
00052 {
00053
00054 public:
00055
00058 Subalbum(Album* albm, int number);
00059
00061 ~Subalbum();
00062
00064 void setName(QString val);
00065
00067 QString getName();
00068
00070 void setDescription(QString val);
00071
00073 QString getDescription();
00074
00076 QPixmap* getRepresentativeImage(int size);
00077
00079 void setRepresentativeImages(QImage* val);
00080
00083 bool addPhoto(QString fileName, Photo* newPhoto = NULL);
00084
00086 bool lazyAddPhoto(QString imageName,
00087 QString slideshowName,
00088 QString thumbnailName,
00089 Photo* newPhoto);
00090
00092 void addPhoto(Photo* newPhoto);
00093
00095 void photoMoved(Photo* val);
00096
00098 void removePhoto(Photo* val);
00099
00101 Subalbum* getNext();
00102
00104 void setNext(Subalbum* val);
00105
00107 Photo* getFirst();
00108
00110 Photo* getLast();
00111
00113 void exportToXML(QTextStream& stream);
00114
00116 void exportThumbnailHTML(QTextStream& stream, int subalbumNumber);
00117
00119 void exportSlideshowHTML(QTextStream& stream, int subalbumNumber);
00120
00122 void importFromDisk(QDomNode* root, int subalbumNum, LoadDialog* dialog, QString dirName);
00123
00125 void syncPhotoList(PhotoWidget* item);
00126
00128 int getSubalbumNumber();
00129
00131 int getNumPhotos();
00132
00134 int getNumLoadedPhotos();
00135
00136
00137 void resetNumLoadedPhotos();
00138
00139 private:
00141 int number;
00142
00144 int numPhotos;
00145
00147 int loadedPhotos;
00148
00150 QString name;
00151
00153 QString description;
00154
00155
00156 QPixmap* smallRepresentativeImage;
00157 QPixmap* mediumRepresentativeImage;
00158 QPixmap* largeRepresentativeImage;
00159
00161 Photo* firstPhoto;
00162
00164 Photo* lastPhoto;
00165
00167 Subalbum* nextSubalbum;
00168
00170 Album* albm;
00171
00172 };
00173
00174 #endif //BACKEND_SUBALBUM_H