HighlightInterface

Anders Lund anders at alweb.dk
Wed Oct 3 08:47:55 BST 2007


On Wednesday 03 October 2007, Thomas Zander wrote:
> 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.

I think you don't know what I am talking about :)

The highlight section og group organizes the available syntax highlight 
systems into logical sections such as 'markup', 'scripts' etc. It's nothing 
to do with the content of the actual document. But for some reason the 
interface to access this information was merged into the Document interface.

-- 
Anders

www: http://www.alweb.dk
jabber: anderslund at jabber.dk




More information about the kde-core-devel mailing list