00001 //============================================== 00002 // copyright : (C) 2003 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 // As a special exception, Will Stokes gives permission to 00011 // link this program with Qt non-commercial edition, and 00012 // distribute the resulting executable, without including the 00013 // source code for the Qt non-commercial edition in the 00014 // source distribution. 00015 //============================================== 00016 00017 #ifndef GUI_SUBALBUMSWIDGET_H 00018 #define GUI_SUBALBUMSWIDGET_H 00019 00020 //forward declarations 00021 class QGridLayout; 00022 class QLabel; 00023 class QIconViewItem; 00024 class QToolButton; 00025 class LayoutWidget; 00026 class SubalbumsIconView; 00027 00028 #include <qwidget.h> 00029 00030 //===================================== 00033 //===================================== 00034 00035 class SubalbumsWidget : public QWidget 00036 { 00037 Q_OBJECT 00038 00039 public: 00041 SubalbumsWidget(QWidget *parent=0, 00042 const char* name=0); 00043 00045 void updateSubalbumName(const QString& val); 00046 00048 void updateSubalbumThumbnail( QPixmap* val); 00049 00051 void refresh(); 00052 00054 LayoutWidget* getParent(); 00055 00057 void updateButtons(bool enable); 00058 //---------------------- 00059 private slots: 00061 void createAction(); 00062 00064 void deleteAction(); 00065 00067 void updateSubalbumLayout( QIconViewItem* selection); 00068 void updateSubalbumLayout( QIconViewItem* selection, bool oldExists); 00069 00070 //Rearranges subalbums in grid 00071 void reorder(); 00072 //---------------------- 00073 private: 00074 00076 QGridLayout* grid; 00077 00079 QLabel* subalbumsText; 00080 00082 SubalbumsIconView* subalbums; 00083 00085 QToolButton* createSubalbum; 00086 00088 QToolButton* deleteSubalbum; 00089 00091 LayoutWidget* layout; 00092 00094 bool buttonsState; 00095 //---------------------- 00096 }; 00097 //====================== 00098 00099 #endif //GUI_SUBALBUMSWIDGET_H
1.3.4