[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: HighlightInterface
From: Thomas Zander <zander () kde ! org>
Date: 2007-10-03 7:45:38
Message-ID: 200710030945.38481.zander () kde ! org
[Download RAW message or body]
On Wednesday 03 October 2007 09:22:10 Anders Lund wrote:
> I know we have the API freeze coming up, but to me this is a bad loss.
> Would it be OK if I add this option today?
>
> It's the question of adding one method
>
> virtual QString highlightSection( QString highlightName ) = 0;
What about returning a Cursor instead?
In QTextDocument (as an example) you create a QTextCursor which has a position
and an anchor, which together makes a range. You can have as many cursors
on the document as you want.
So in KWord I create a highlight section by creating a new QTextCursor and
setting the range.
I should note that in contrary to KTextEditor::Cursor the QTextCursor has a
selectedText() method.
I think it makes a lot of sense to follow that design instead of moving away
further.
> to KTextEditor::Document
>
> and of course implementation in KateDocument?
--
Thomas Zander
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic