• 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
28class TQColor;
29class TQCursor;
30class TQPixmap;
31
71class 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
82public:
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
174public 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
299signals:
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
361protected:
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
389private slots:
394 void updateColor ();
395
396private:
401 void setLinkColor (const TQColor& col);
402
403protected:
404 virtual void virtual_hook( int id, void* data );
405private:
406 class Private;
407 Private* d;
408};
409
410#endif // KURLLABEL_H
411
KURLLabel::setCursor
virtual void setCursor(const TQCursor &cursor)
Overridden for internal reasons; the API remains unaffected.
Definition kurllabel.cpp:199
KURLLabel::url
const TQString & url() const
Returns the URL.
Definition kurllabel.cpp:188
KURLLabel::unsetCursor
virtual void unsetCursor()
Overridden for internal reasons; the API remains unaffected.
Definition kurllabel.cpp:193
KURLLabel::middleClickedURL
void middleClickedURL(const TQString &url)
Emitted when the user clicked the middle mouse button on this label.
KURLLabel::setSelectedColor
void setSelectedColor(const TQColor &selcolor)
Sets the selected color.
Definition kurllabel.cpp:263
KURLLabel::enteredURL
void enteredURL()
Emitted when the mouse has passed over the label.
KURLLabel::setMargin
virtual void setMargin(int margin)
Reimplemented for internal reasons, the API is not affected.
Definition kurllabel.cpp:425
KURLLabel::rightClickedURL
void rightClickedURL()
Emitted when the user clicked the right mouse button on this label.
KURLLabel::setFocusPolicy
virtual void setFocusPolicy(TQWidget::FocusPolicy policy)
Reimplemented for internal reasons, the API is not affected.
Definition kurllabel.cpp:431
KURLLabel::middleClickedURL
void middleClickedURL()
Emitted when the user clicked the left mouse button on this label.
KURLLabel::KURLLabel
KURLLabel(TQWidget *parent=0L, const char *name=0L)
Default constructor.
Definition kurllabel.cpp:94
KURLLabel::useTips
bool useTips() const
Definition kurllabel.cpp:240
KURLLabel::setSizePolicy
virtual void setSizePolicy(TQSizePolicy)
Reimplemented for internal reasons, the API is not affected.
Definition kurllabel.cpp:439
KURLLabel::rightClickedURL
void rightClickedURL(const TQString &url)
Emitted when the user clicked the right mouse button on this label.
KURLLabel::isFloatEnabled
bool isFloatEnabled() const
This feature is very similar to the "glow" feature in that the color of the label switches to the sel...
Definition kurllabel.cpp:291
KURLLabel::event
virtual bool event(TQEvent *e)
Catch parent palette changes.
Definition kurllabel.cpp:352
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::isGlowEnabled
bool isGlowEnabled() const
When this is on, the text will switch to the selected color whenever the mouse passes over it.
Definition kurllabel.cpp:286
KURLLabel::useCursor
bool useCursor() const
Definition kurllabel.cpp:218
KURLLabel::setGlow
void setGlow(bool glow=true)
Turns on or off the "glow" feature.
Definition kurllabel.cpp:276
KURLLabel::setFloat
void setFloat(bool do_float=true)
Turns on or off the "float" feature.
Definition kurllabel.cpp:281
KURLLabel::setURL
void setURL(const TQString &url)
Sets the URL for this label to url.
Definition kurllabel.cpp:178
KURLLabel::setFont
virtual void setFont(const TQFont &)
Overridden for internal reasons; the API remains unaffected.
Definition kurllabel.cpp:145
KURLLabel::enterEvent
virtual void enterEvent(TQEvent *)
Overridden for internal reasons; the API remains unaffected.
Definition kurllabel.cpp:306
KURLLabel::setUnderline
void setUnderline(bool on=true)
Turns on or off the underlining.
Definition kurllabel.cpp:153
KURLLabel::setUseTips
void setUseTips(bool on=true)
Turns on or off the tool tip feature.
Definition kurllabel.cpp:223
KURLLabel::mouseReleaseEvent
virtual void mouseReleaseEvent(TQMouseEvent *e)
Overridden for internal reasons; the API remains unaffected.
Definition kurllabel.cpp:110
KURLLabel::setAltPixmap
void setAltPixmap(const TQPixmap &altPix)
Sets the "alt" pixmap.
Definition kurllabel.cpp:296
KURLLabel::tipText
const TQString & tipText() const
Returns the current tooltip text.
Definition kurllabel.cpp:245
KURLLabel::setHighlightedColor
void setHighlightedColor(const TQColor &highcolor)
Sets the highlight color.
Definition kurllabel.cpp:250
KURLLabel::setTipText
void setTipText(const TQString &tip)
Specifies what text to display when tooltips are turned on.
Definition kurllabel.cpp:233
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::altPixmap
const TQPixmap * altPixmap() const
Definition kurllabel.cpp:301
KURLLabel::leaveEvent
virtual void leaveEvent(TQEvent *)
Overridden for internal reasons; the API remains unaffected.
Definition kurllabel.cpp:336
KURLLabel::setUseCursor
void setUseCursor(bool on, TQCursor *cursor=0L)
Turns the custom cursor feature on or off.
Definition kurllabel.cpp:205
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.15.0
This website is maintained by Timothy Pearson.