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

List:       kwrite-devel
Subject:    Re: Smart cursors, ranges and performance
From:       Christoph Cullmann <cullmann () babylon2k ! de>
Date:       2005-06-25 9:13:03
Message-ID: 200506251113.06803 () cullmann
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 25 June 2005 04:04, Hamish Rodda wrote:
> I've decided for the sake of performance to do away with having these classes 
> be QObject subclasses, at least internally.  I feel the choices are:
fine ;) I wanted to remove the QObject inheritance since ever, but never got the time \
;)

> 
> 1) Create a separate cursor and range classes for the interface, which bind 
> directly to the internal classes.
> Advantages:
> * the KTextEditor smartcursors could be QObjects if we wanted to keep the 
> signals design
> * if they were not to be QObjects, then we could make them simple classes that 
> could be passed by value and reference rather than by pointer, and simply 
> share the internal implementation
> 
> 2) Share the class directly out through the interface.  
> Advantages:
> * faster?
> Disadvantages:
> * would have to use virtual methods and override them to get direct 
> notifications, much like the *event methods in Qt's api.
I think 2 is the much better thing, even if you have to inherit from them, still, \
this is least hassle.

btw., just out of fun, 3) alternative would be: provide some CursorFeedback \
interface, which the apps can subclass, and which they can pass to the constructor of \
the KTextEditor::SmartCursor, and which will let them get notifications, like

CursorFeedback {
   public:
     void lineInserted (....);
}

But guess this is just the same as 2, beside that the cursor stuff needs not to be \
virtual, but this interface

cu
Christoph

-- 
Christoph Cullmann
KDE Developer, kde.org Maintainance Team
http://www.babylon2k.de, cullmann@kde.org


[Attachment #5 (application/pgp-signature)]

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


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

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