[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    KActiveLabel (QLabel + active links)
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2001-11-13 12:42:19
[Download RAW message or body]

Following the thread of yesterday, I tried to implement a simple
label class that would support active links. I quickly got something
working, probably not complete but suiting my needs. This class
KActiveLabel is based on QFrame and support these features:
- active links anywhere in the text using <a> tags
- autoRun mode: when enabled, uses KRun to start the application
  associated with the anchor (URL), on click
- emit a signal linkClicked(const QString&) on click
- alignment: actually only vertical alignment is used
- tooltips: the associated anchor is shown as tooltip

I included the class in kdeprint library (libkdeprint_management) and
used in 2 places inside kdeprint:
- the add printer wizard: in first page with a "mailto:" url
- "export driver to Windows" wizard (CUPS): for various messages
I put it there essentially for testing purpose. Moreover it uses KRun
so it can't be put in kdeui. If people finds it useful, it can probably
be adapted and moved elsewhere.

If you want to see it in action, update kdelibs/kdeprint/, or ask me
for a screenshot (I have one, but don't want to bother everybody with
it on the list).

Bye.
Michael.

-- 
------------------------------------------------------------------
Michael Goffioul		IMEC-DESICS-MIRA
e-mail: goffioul@imec.be	(Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510		Kapeldreef, 75
Fax:    +32/16/28-1515		3001 HEVERLEE, BELGIUM
------------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic