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_RECENTALBUMMENUITEM_H 00012 #define GUI_RECENTALBUMMENUITEM_H 00013 00014 #include <qmenudata.h> 00015 #include <qimage.h> 00016 00017 //forward declarations 00018 00019 //===================================== 00022 //===================================== 00023 class RecentAlbumMenuItem : public QCustomMenuItem 00024 { 00025 //---------------------- 00026 public: 00027 RecentAlbumMenuItem( Key acceleratorKey ); 00028 00030 void changeItem( QString albumName, QString albumLocation, QString numPhotos ); 00031 00032 00034 void paint( QPainter * p, const QColorGroup & cg, bool act, bool enabled, 00035 int x, int y, int w, int h ); 00036 00038 QSize sizeHint (); 00039 00042 void setMaxWidth( int val ); 00043 00045 bool fullSpan() const; 00046 //---------------------- 00047 private: 00048 Key acceleratorKey; 00049 00051 QImage albumImage; 00052 00054 QString albumName; 00055 00057 QString numPhotos; 00058 00060 QSize size; 00061 00063 int maxWidth; 00064 00066 int idealImageWidth; 00067 //---------------------- 00068 }; 00069 //====================== 00070 #endif //GUI_RECENTALBUMMENUITEM_H