15ClickMap::ClickMap(karamba* k,
int x,
int y,
int w,
int h )
16 :Meter(k, x, y, w, h )
36void ClickMap::setTextProps(
TextField *t )
41bool ClickMap::click( TQMouseEvent *e ) {
44 if (boundingBox.contains(e->x(), e->y())) {
46 int index = ((e -> y() - getY()) / text.getLineHeight()) + 1;
47 if (index >= 1 && index <= (
int)displays.count()) {
50 KRun::runCommand(
"konqueror " + links[index - 1]);
56void ClickMap::mUpdate( TQPainter *p )
61 p->setFont(text.getFont());
62 TQStringList::Iterator it = displays.begin();
63 while( it != displays.end() && (row <= getHeight() || getHeight() == -1 ) )
65 p->setPen( text.getColor() );
67 p->drawText(getX(), getY() + i + text.getLineHeight(), *it);
68 i += text.getLineHeight();
74void ClickMap::setValue( TQString v )
76 TQRegExp rx(
"^http://",
false );
77 if ( rx.search( v ) == -1 )
87void ClickMap::setValue(
long v )
96#include "clickmap.moc"