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_SUBALBUMPREVIEWWIDGET_H 00018 #define GUI_SUBALBUMPREVIEWWIDGET_H 00019 00020 //-------------------- 00021 //forward declarations 00022 class Subalbum; 00023 class QPixmap; 00024 class QString; 00025 class SubalbumsIconView; 00026 //-------------------- 00027 00028 #include <qiconview.h> 00029 #include <qobject.h> 00030 00031 //===================================== 00034 //===================================== 00035 class SubalbumPreviewWidget : public QIconViewItem 00036 { 00037 public: 00039 SubalbumPreviewWidget( SubalbumsIconView* parent, 00040 Subalbum* salbum ); 00041 00043 Subalbum* getSubalbum(); 00044 00045 void paintItem( QPainter* p, 00046 const QColorGroup& cg); 00047 bool acceptDrop( const QMimeSource *e) const; 00048 00049 int compare ( QIconViewItem * i ) const; 00050 00051 //---------------------- 00052 private: 00053 void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); 00054 00056 Subalbum* subalbum; 00057 00059 QPixmap* subalbumPreviewImage; 00060 00062 QString* subalbumName; 00063 00065 SubalbumsIconView* parent; 00066 //---------------------- 00067 }; 00068 //====================== 00069 00070 #endif //GUI_SUBALBUMPREVIEWWIDGET_H