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

List:       kde-kafka
Subject:    Re: Bah! Mouse events...
From:       Thomas <zander () xs4all ! nl>
Date:       2000-11-30 19:14:59
[Download RAW message or body]

> Hello all,
> 
> Tonight I have been looking at Kafka again and thinking of a way of 
> implementing mouse selections. We were discussing using the KHTML events 
> which can be found in in khtml_event.h. The problem with these events is that 
> if you try to reimplement them as virtuals it will not work as each event 
> appears to be a class and you cannot make a constructor a virtual.
> 
> We now have two options:
> 
>  - Create custom event methods (maybe using an event filter)
>  - Use the KHTMLView events
>  - Use the KHTML event methods but use them in a different way reimplementing

You use a QScrollView for you view.
There you implement 
 virtual void contentsMousePressEvent ( QMouseEvent * )

And you get sent (automatically I think) the relevant khtml::MouseEvent via the 
argument. I have not checked but I believe the khtml events are subclasses of 
the QMouseEvent.

You can cast the events to the right class from the html_events.h file and 
simply use that.


And as I see nothing static in that definition I don't see any reason to 
reimlement that.
-- 
Thomas Zander                                            zander@earthling.net
The only thing worse than failure is the fear of trying something new
_______________________________________________
Kde-kafka mailing list
Kde-kafka@master.kde.org
http://master.kde.org/mailman/listinfo/kde-kafka

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

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