org.kde.koala
public class KURLLabel extends QLabel
KURLLabel address = new KURLLabel(this); address.setText("My homepage"); address.setURL("http://www.home.com/~me"); connect(address, SIGNAL("leftClickedURL(String)"), SLOT("processMyURL(String)"));In this example, the text "My homepage" would be displayed as blue, underlined text. When the mouse passed over it, it would "glow" red. When the user clicks on the text, the signal leftClickedURL() would be emitted with "http://www.home.com/~me" as its argument. \image html kurllabel.png "KDE URL Label" See KURLLabelSignals for signals emitted by KURLLabel
Version: $Id: KURLLabel.java 473384 2005-10-23 14:17:09Z rdale $
UNKNOWN: A drop-in replacement for QLabel that displays hyperlinks.
Constructor Summary | |
---|---|
protected | KURLLabel(Class dummy) |
KURLLabel(QWidget parent, String name)
Default constructor.
| |
KURLLabel(QWidget parent) | |
KURLLabel() | |
KURLLabel(String url, String text, QWidget parent, String name)
Convenience constructor. | |
KURLLabel(String url, String text, QWidget parent) | |
KURLLabel(String url, String text) | |
KURLLabel(String url) |
Method Summary | |
---|---|
QPixmap | altPixmap() |
String | className() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | enterEvent(QEvent arg1)
Overridden for internal reasons; the API remains unaffected. |
boolean | event(QEvent e)
Catch parent palette changes |
protected void | finalize() Deletes the wrapped C++ instance |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
boolean | isFloatEnabled()
This feature is very similar to the "glow" feature in that the color of the
label switches to the selected color when the cursor passes
over it. |
boolean | isGlowEnabled()
When this is on, the text will switch to the selected
color whenever the mouse passes over it. |
protected void | leaveEvent(QEvent arg1)
Overridden for internal reasons; the API remains unaffected. |
QMetaObject | metaObject() |
protected void | mouseReleaseEvent(QMouseEvent arg1)
Overridden for internal reasons; the API remains unaffected. |
void | setAltPixmap(QPixmap altPix)
Sets the "alt" pixmap.
|
void | setFloat(boolean do_float)
Turns on or off the "float" feature.
|
void | setFloat() |
void | setFont(QFont arg1)
Overridden for internal reasons; the API remains unaffected. |
void | setGlow(boolean glow)
Turns on or off the "glow" feature.
|
void | setGlow() |
void | setHighlightedColor(QColor highcolor)
Sets the highlight color.
|
void | setHighlightedColor(String highcolor)
This is an overloaded version for convenience. |
void | setSelectedColor(QColor selcolor)
Sets the selected color.
|
void | setSelectedColor(String selcolor)
This is an overloaded version for convenience. |
void | setTipText(String tip)
Specifies what text to display when tooltips are turned on.
|
void | setUnderline(boolean on)
Turns on or off the underlining.
|
void | setUnderline() |
void | setURL(String url)
Sets the URL for this label to url. |
void | setUseCursor(boolean on, QCursor cursor)
Turns the custom cursor feature on or off.
|
void | setUseCursor(boolean on) |
void | setUseTips(boolean on)
Turns on or off the tool tip feature.
|
void | setUseTips() |
String | tipText()
Returns the current tooltip text. |
String | url()
Returns the URL. |
boolean | useCursor() |
boolean | useTips() |
UNKNOWN: Default constructor.
Parameters: url is the URL emitted when the label is clicked. text is the displayed string. If it's equal to null
the url
will be used instead. parent Passed to lower level constructor name Passed to lower level constructor
parent
and name
are passed to QLabel, which in turn passes
them further down
UNKNOWN: Convenience constructor.
Returns: the alternate pixmap (may be 0L if none was set).
UNKNOWN:
UNKNOWN: Overridden for internal reasons; the API remains unaffected.
UNKNOWN: Catch parent palette changes
UNKNOWN: This feature is very similar to the "glow" feature in that the color of the label switches to the selected color when the cursor passes over it.
UNKNOWN: When this is on, the text will switch to the selected color whenever the mouse passes over it.
UNKNOWN: Overridden for internal reasons; the API remains unaffected.
UNKNOWN: Overridden for internal reasons; the API remains unaffected.
See Also: KURLLabel
UNKNOWN: Sets the "alt" pixmap.
false.
UNKNOWN: Turns on or off the "float" feature.
UNKNOWN: Overridden for internal reasons; the API remains unaffected.
true.
UNKNOWN: Turns on or off the "glow" feature.
blue.
UNKNOWN: Sets the highlight color.
See Also: KURLLabel
UNKNOWN: This is an overloaded version for convenience.
red.
UNKNOWN: Sets the selected color.
See Also: KURLLabel
UNKNOWN: This is an overloaded version for convenience.
See Also: KURLLabel
UNKNOWN: Specifies what text to display when tooltips are turned on.
true.
UNKNOWN: Turns on or off the underlining.
Parameters: on whether a custom cursor should be displayed. cursor is the custom cursor. null
indicates the default "hand cursor".
UNKNOWN: Turns the custom cursor feature on or off.
false.
UNKNOWN: Turns on or off the tool tip feature.
UNKNOWN: Returns the current tooltip text.
UNKNOWN: Returns the URL.