00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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