Main Page   Class Hierarchy   Alphabetical List   Compound List   File List  

imagelabel.h

00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Hans Karlsson                                   *
00003  *   karlsson.h@home.se                                                      *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 #ifndef IMAGELABEL_H
00011 #define IMAGELABEL_H
00012 #include "meter.h"
00013 #include <qpixmap.h>
00014 #include <qimage.h>
00015 #include <qpainter.h>
00016 #include <qstring.h>
00017 #include <qstringlist.h>
00018 #include <kurl.h>
00019 #include <kio/netaccess.h>
00020 #include <qregexp.h>
00021 
00022 #include "karamba.h"
00023 
00024 class karamba;
00025 
00026 class ImageLabel : public Meter
00027 {
00028 public:
00029   ImageLabel( int ix,int iy,int iw,int ih );
00030   ImageLabel();
00031   ~ImageLabel();
00032   void setValue( QString imagePath );
00033 
00034   void setValue( int );
00035   void mUpdate( QPainter * );
00036 
00037   void rolloverImage(QMouseEvent *e);
00038   void parseImages( QString fn, QString fn_roll, int, int, int, int );
00039 
00040   void setKaramba(karamba*);
00041   void setTooltip(QString txt);
00042 
00043 private:
00044 
00045   int pixmapWidth;
00046   int pixmapHeight;
00047   int pixmapOffWidth;
00048   int pixmapOffHeight;
00049   int pixmapOnWidth;
00050   int pixmapOnHeight;
00051 
00052   QPixmap pixmap;
00053   QRect rect_off, rect_on;
00054 
00055   bool zoomed;
00056   //QString fn, fn_roll;
00057   bool rollover;
00058   QPixmap pixmap_off;
00059   QPixmap pixmap_on;
00060   int xoff,xon;
00061   int yoff,yon;
00062   karamba* myKaramba;
00063 }
00064 ;
00065 #endif // IMAGELABEL_H

Generated on Tue May 6 09:52:08 2003 for karamba by doxygen1.2.18