Main Page | Class List | File List | Class Members

qjlistboxpixmap.h

00001 /* 00002 Copyright(C)2004 Johan Thelin 00003 johan.thelin -at- digitalfanatics.org 00004 00005 Visit: http://www.digitalfanatics.org/e8johan/projects/jseries/index.html 00006 00007 This file is part of the JSeries. 00008 00009 JSeries is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 JSeries is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with JSeries; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 */ 00023 00024 #ifndef QjLISTBOXPIXMAP_H 00025 #define QjLISTBOXPIXMAP_H 00026 00027 #include <qlistbox.h> 00028 #include <qstring.h> 00029 #include <qpixmap.h> 00030 00036 class QjListBoxPixmap : public QListBoxItem 00037 { 00038 public: 00040 enum PixmapLocation 00041 { Above, 00042 Under, 00043 Left, 00044 Right 00045 }; 00046 00048 QjListBoxPixmap( PixmapLocation location, const QPixmap &pixmap, const QString &text, QListBox *listbox=0 ); 00050 QjListBoxPixmap( PixmapLocation location, const QPixmap &pixmap, const QString &text, QListBox *listbox, QListBoxItem *after ); 00051 00053 PixmapLocation location() const; 00055 void setLocation( PixmapLocation ); 00056 00058 const QPixmap *pixmap() const; 00060 void setPixmap( const QPixmap &pixmap ); 00061 00062 int height( const QListBox *lb ) const; 00063 int width( const QListBox *lb ) const; 00064 00065 protected: 00066 void paint( QPainter *p ); 00067 00068 private: 00069 QPixmap m_pixmap; 00070 PixmapLocation m_location; 00071 }; 00072 00073 #endif // QjLISTBOXPIXMAP_H

Generated on Thu Jul 15 14:25:47 2004 for JSeries by doxygen 1.3.7