Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

imagelabel.h

Go to the documentation of this file.
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 
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 #include "meter.h"
00024 
00025 class karamba;
00026 
00032 class ImageLabel : public Meter
00033 {
00034 public:
00035   ImageLabel( int ix,int iy,int iw,int ih );
00036   ImageLabel();
00037   ~ImageLabel();
00038   void setValue( QString imagePath );
00039 
00040   void setValue( int );
00041   void setCenter( bool c, int w=0, int h=0 );
00042   void mUpdate( QPainter * );
00043 
00044   void rolloverImage(QMouseEvent *e);
00045   void parseImages( QString fn, QString fn_roll, int, int, int, int );
00046 
00047   void setKaramba(karamba*);
00048   void setTooltip(QString txt);
00049 
00050 private:
00051 
00052   int pixmapWidth;
00053   int pixmapHeight;
00054   int pixmapOffWidth;
00055   int pixmapOffHeight;
00056   int pixmapOnWidth;
00057   int pixmapOnHeight;
00058   bool center;
00059   int witdh;
00060   int height;
00061 
00062   QPixmap pixmap;
00063   QRect rect_off, rect_on;
00064 
00065   bool zoomed;
00066   //QString fn, fn_roll;
00067   bool rollover;
00068   QPixmap pixmap_off;
00069   QPixmap pixmap_on;
00070   int xoff,xon;
00071   int yoff,yon;
00072   karamba* myKaramba;
00073 }
00074 ;
00075 #endif // IMAGELABEL_H

Generated on Mon May 16 13:59:20 2005 for karamba by  doxygen 1.3.9.1