[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Can we drop KWrite ?
From: Simon Hausmann <sh () caldera ! de>
Date: 2001-03-13 11:20:03
[Download RAW message or body]
On Tue, Mar 13, 2001 at 11:51:33AM +0100, Bernd Gehrmann wrote:
> On Tue, 13 Mar 2001, Simon Hausmann wrote:
> > What you describe is kparts? :-)
>
> Except that kparts (more precisely, PartManager)
> doesn't support multiple views of a document as
> childs of the same toplevel window, because the
> part activation is based on Part::widget(),
> which does not exist in the case of multiple views
> per document.
Oh, you can solve this by reimplementing KParts::Part::hitTest,
which was added for this very purpose (well, for koffice :)
You get a QWidget as argument and depend on whether it is a
view of your document you either return this, 0L or possibly
a reference to an embedded child document (one without widget
maybe, if using a non-widget embedding, like in koffice) .
I see your hidden point though :-) : We might want to provide a
class in KParts which one can use out-of-the-box for multiple
views, as reimplementing hitTest is not something really convenient.
Hm, looking at the source I see that you are right though when it
comes to non-mouse activation (read: focusin) . Here we in fact
use widget() .
David, what do you think about calling findPartFromWidget( w, QPoint( 0, 0 ) )
(or -1, -1 or something) here?
Bye,
Simon
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic