kurllabel.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KURLLABEL_H
00021 #define KURLLABEL_H
00022
00023 #include <qlabel.h>
00024
00025 #include <kdelibs_export.h>
00026
00027 class QColor;
00028 class QCursor;
00029 class QPixmap;
00030
00066 class KDEUI_EXPORT KURLLabel : public QLabel
00067 {
00068 Q_OBJECT
00069 Q_PROPERTY (QString url READ url WRITE setURL)
00070 Q_PROPERTY (QString tipText READ tipText WRITE setTipText )
00071 Q_PROPERTY (QPixmap altPixmap READ altPixmap WRITE setAltPixmap)
00072 Q_PROPERTY (bool glowEnabled READ isGlowEnabled WRITE setGlow )
00073 Q_PROPERTY (bool floatEnabled READ isFloatEnabled WRITE setFloat )
00074 Q_PROPERTY (bool useTips READ useTips WRITE setUseTips )
00075 Q_PROPERTY (bool useCursor READ useCursor WRITE setUseCursor )
00076
00077 public:
00084 KURLLabel (QWidget* parent = 0L, const char* name = 0L);
00085
00098 KURLLabel (const QString& url, const QString& text = QString::null,
00099 QWidget* parent = 0L, const char* name = 0L);
00100
00104 virtual ~KURLLabel ();
00105
00109 const QString& url () const;
00110
00114 const QString& tipText () const;
00115
00121 bool useTips () const;
00122
00128 bool useCursor () const;
00129
00134 bool isGlowEnabled () const;
00135
00144 bool isFloatEnabled () const;
00145
00149 const QPixmap* altPixmap () const;
00150
00151 public slots:
00158 void setUnderline (bool on = true);
00159
00165 void setURL (const QString& url);
00166
00170 virtual void setFont (const QFont&);
00171
00179 void setUseTips (bool on = true);
00180
00188 void setTipText (const QString& tip);
00189
00196 void setHighlightedColor(const QColor& highcolor);
00197
00203 void setHighlightedColor(const QString& highcolor);
00204
00212 void setSelectedColor(const QColor& selcolor);
00213
00219 void setSelectedColor(const QString& selcolor);
00220
00231 void setUseCursor (bool on, QCursor* cursor = 0L);
00232
00240 void setGlow (bool glow = true);
00241
00253 void setFloat (bool do_float = true);
00254
00264 void setAltPixmap (const QPixmap& altPix);
00265
00266 signals:
00267
00273 void enteredURL (const QString& url);
00274
00278 void enteredURL ();
00279
00285 void leftURL (const QString& url);
00286
00290 void leftURL ();
00291
00297 void leftClickedURL(const QString& url);
00298
00302 void leftClickedURL();
00303
00309 void rightClickedURL(const QString& url);
00310
00314 void rightClickedURL();
00315
00321 void middleClickedURL(const QString& url);
00322
00326 void middleClickedURL();
00327
00328 protected:
00329
00333 virtual void mouseReleaseEvent (QMouseEvent*);
00334
00338 virtual void enterEvent (QEvent*);
00339
00343 virtual void leaveEvent (QEvent*);
00344
00348 virtual bool event (QEvent *e);
00349
00350
00351 private slots:
00356 void updateColor ();
00357
00358 private:
00363 void setLinkColor (const QColor& col);
00364
00365 protected:
00366 virtual void virtual_hook( int id, void* data );
00367 private:
00368 class Private;
00369 Private* d;
00370 };
00371
00372 #endif
This file is part of the documentation for kdeui Library Version 3.4.3.