• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
kurllabel.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1998 Kurt Granroth <granroth@kde.org>
3  Copyright (C) 2000 Peter Putzer <putzer@kde.org>
4  Copyright (C) 2005 Jaroslaw Staniek <js@iidea.pl>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KURLLABEL_H
22 #define KURLLABEL_H
23 
24 #include <tqlabel.h>
25 
26 #include <tdelibs_export.h>
27 
28 class TQColor;
29 class TQCursor;
30 class TQPixmap;
31 
71 class TDEUI_EXPORT KURLLabel : public TQLabel
72 {
73  TQ_OBJECT
74  TQ_PROPERTY (TQString url READ url WRITE setURL)
75  TQ_PROPERTY (TQString tipText READ tipText WRITE setTipText )
76  TQ_PROPERTY (TQPixmap altPixmap READ altPixmap WRITE setAltPixmap)
77  TQ_PROPERTY (bool glowEnabled READ isGlowEnabled WRITE setGlow )
78  TQ_PROPERTY (bool floatEnabled READ isFloatEnabled WRITE setFloat )
79  TQ_PROPERTY (bool useTips READ useTips WRITE setUseTips )
80  TQ_PROPERTY (bool useCursor READ useCursor WRITE setUseCursor )
81 
82 public:
89  KURLLabel (TQWidget* parent = 0L, const char* name = 0L);
90 
103  KURLLabel (const TQString& url, const TQString& text = TQString::null,
104  TQWidget* parent = 0L, const char* name = 0L);
105 
109  virtual ~KURLLabel ();
110 
114  const TQString& url () const;
115 
119  const TQString& tipText () const;
120 
126  bool useTips () const;
127 
133  bool useCursor () const;
134 
139  bool isGlowEnabled () const;
140 
149  bool isFloatEnabled () const;
150 
154  const TQPixmap* altPixmap () const;
155 
159  virtual void setMargin ( int margin );
160 
164 #ifdef qdoc
165 #else
166  virtual void setFocusPolicy ( TQWidget::FocusPolicy policy );
167 #endif
168 
172  virtual void setSizePolicy ( TQSizePolicy );
173 
174 public slots:
181  void setUnderline (bool on = true);
182 
188  void setURL (const TQString& url);
189 
193  virtual void setFont (const TQFont&);
194 
202  void setUseTips (bool on = true);
203 
211  void setTipText (const TQString& tip);
212 
219  void setHighlightedColor(const TQColor& highcolor);
220 
226  void setHighlightedColor(const TQString& highcolor);
227 
235  void setSelectedColor(const TQColor& selcolor);
236 
242  void setSelectedColor(const TQString& selcolor);
243 
247  virtual void setCursor ( const TQCursor& cursor );
248 
252  virtual void unsetCursor ();
253 
264  void setUseCursor (bool on, TQCursor* cursor = 0L);
265 
273  void setGlow (bool glow = true);
274 
286  void setFloat (bool do_float = true);
287 
297  void setAltPixmap (const TQPixmap& altPix);
298 
299 signals:
300 
306  void enteredURL (const TQString& url);
307 
311  void enteredURL ();
312 
318  void leftURL (const TQString& url);
319 
323  void leftURL ();
324 
330  void leftClickedURL(const TQString& url);
331 
335  void leftClickedURL();
336 
342  void rightClickedURL(const TQString& url);
343 
347  void rightClickedURL();
348 
354  void middleClickedURL(const TQString& url);
355 
359  void middleClickedURL();
360 
361 protected:
362 
366  virtual void mouseReleaseEvent ( TQMouseEvent * e );
367 
371  virtual void enterEvent (TQEvent*);
372 
376  virtual void leaveEvent (TQEvent*);
377 
381  virtual bool event (TQEvent *e);
382 
386  TQRect activeRect() const;
387 
388 
389 private slots:
394  void updateColor ();
395 
396 private:
401  void setLinkColor (const TQColor& col);
402 
403 protected:
404  virtual void virtual_hook( int id, void* data );
405 private:
406  class Private;
407  Private* d;
408 };
409 
410 #endif // KURLLABEL_H
411 
KURLLabel
A drop-in replacement for TQLabel that displays hyperlinks.
Definition: kurllabel.h:72
KURLLabel::middleClickedURL
void middleClickedURL(const TQString &url)
Emitted when the user clicked the middle mouse button on this label.
KURLLabel::enteredURL
void enteredURL()
Emitted when the mouse has passed over the label.
KURLLabel::rightClickedURL
void rightClickedURL()
Emitted when the user clicked the right mouse button on this label.
KURLLabel::middleClickedURL
void middleClickedURL()
Emitted when the user clicked the left mouse button on this label.
KURLLabel::rightClickedURL
void rightClickedURL(const TQString &url)
Emitted when the user clicked the right mouse button on this label.
KURLLabel::enteredURL
void enteredURL(const TQString &url)
Emitted when the mouse has passed over the label.
KURLLabel::leftClickedURL
void leftClickedURL(const TQString &url)
Emitted when the user clicked the left mouse button on this label.
KURLLabel::leftURL
void leftURL()
Emitted when the mouse is no longer over the label.
KURLLabel::leftURL
void leftURL(const TQString &url)
Emitted when the mouse is no longer over the label.
KURLLabel::leftClickedURL
void leftClickedURL()
Emitted when the user clicked the left mouse button on this label.

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.1
This website is maintained by Timothy Pearson.