Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

subalbumWidget.h

Go to the documentation of this file.
00001 //============================================== 00002 // copyright : (C) 2003-2005 by Will Stokes 00003 //============================================== 00004 // This program is free software; you can redistribute it 00005 // and/or modify it under the terms of the GNU General 00006 // Public License as published by the Free Software 00007 // Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 //============================================== 00010 00011 #ifndef GUI_SUBALBUMWIDGET_H 00012 #define GUI_SUBALBUMWIDGET_H 00013 00014 //-------------------- 00015 //forward declarations 00016 class QGridLayout; 00017 class QPixmap; 00018 class QIconView; 00019 class PhotosIconView; 00020 class QToolButton; 00021 class QFrame; 00022 class Subalbum; 00023 class LayoutWidget; 00024 class Photo; 00025 00026 class QIconViewItem; 00027 //-------------------- 00028 00029 #include <qwidget.h> 00030 00031 //===================================== 00034 //===================================== 00035 class SubalbumWidget : public QWidget 00036 { 00037 Q_OBJECT 00038 00039 public: 00041 SubalbumWidget(Subalbum* salbum, 00042 QWidget *parent=0, 00043 const char* name=0); 00044 00046 void setSubalbum(Subalbum* salbum); 00047 00050 void refreshPhotos(); 00051 00053 void refreshAllPhotos(); 00054 00056 void refreshSelectedPhotos(); 00057 00059 Subalbum* getSubalbum(); 00060 00062 Photo* getSelectedPhoto(); 00063 00065 void setSelectedPhoto(Photo* selection); 00066 00068 Photo* getFirstSelectedPhoto(); 00069 00071 bool anyPhotosSelected(); 00072 00074 bool anySelectedPhotosRevertable(); 00075 00077 QIconView* getPhotos(); 00078 00080 void updateButtons(bool enable); 00081 00083 void stripDescriptionsFromSelectedPhotos(); 00084 00086 void revertSelectedPhotos(); 00087 //---------------------- 00088 signals: 00089 //signal emitted when the selection or the state of the selection changes 00090 void selectedPhotoStateChanged(); 00091 //---------------------- 00092 private slots: 00094 void setWallpaperAction(); 00095 00097 void selectionChangedEvent(); 00098 00100 void updateButtons(); 00101 00103 void addImageAction(); 00104 void addImageAction(QStringList fileNames, bool setDescriptions=false); 00105 00107 void removeImageAction(); 00108 00110 void rotate90ImageAction(); 00111 00113 void rotate270ImageAction(); 00114 00115 //Rearranges subalbums in grid 00116 void reorder(); 00117 00118 //Deselect all photos 00119 void deselectAll(); 00120 //---------------------- 00121 protected: 00122 void resizeEvent( QResizeEvent * ); 00123 //---------------------- 00124 private: 00126 QGridLayout* mainGrid; 00127 QGridLayout* buttonsGrid; 00128 00130 QFrame* thumbnailFrame; 00131 QFrame* buttonsFrame; 00132 00134 PhotosIconView* photos; 00135 00137 Subalbum* subalbum; 00138 00140 QToolButton* addImage; 00141 00143 QToolButton* removeImage; 00144 00146 QToolButton* rotate90Image; 00147 00149 QToolButton* rotate270Image; 00150 00152 QToolButton* setDesktopBtn; 00153 00155 LayoutWidget* layout; 00156 00158 bool buttonsState; 00159 00161 bool wallpaperButtonState; 00162 //---------------------- 00163 }; 00164 //====================== 00165 00166 #endif //GUI_SUBALBUMWIDGET_H

Generated on Sun Mar 4 19:42:57 2007 for AlbumShaper by doxygen 1.3.7