00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KDMPIXMAP_H
00023 #define KDMPIXMAP_H
00024
00025 #include "kdmitem.h"
00026
00027
00028 #include <tqpixmap.h>
00029
00030 #include <ksimpleconfig.h>
00031 #include <kstandarddirs.h>
00032
00033
00034
00035
00036
00037 class KdmPixmap : public KdmItem {
00038 Q_OBJECT
00039
00040 public:
00041 KdmPixmap( KdmItem *parent, const TQDomNode &node, const char *name = 0 );
00042
00043 protected:
00044
00045 virtual TQSize sizeHint();
00046
00047
00048 virtual void drawContents( TQPainter *p, const TQRect &r );
00049
00050
00051 virtual void statusChanged();
00052
00053 virtual void setGeometry( const TQRect &newGeometry, bool force );
00054
00055 struct PixmapStruct {
00056 struct PixmapClass {
00057 TQString fullpath;
00058 TQPixmap pixmap;
00059 TQPixmap readyPixmap;
00060 TQColor tint;
00061 float alpha;
00062 bool present;
00063 } normal, active, prelight;
00064 } pixmap;
00065
00066 private:
00067
00068 TQString fullPath( const TQString &fileName );
00069 void renderSvg( PixmapStruct::PixmapClass *pClass, const TQRect &area );
00070 void loadPixmap( PixmapStruct::PixmapClass *pClass );
00071 };
00072
00073 #endif