On Tue, Sep 30, 2008 at 10:13 PM, Ville M. Vainio <[EMAIL PROTECTED]> wrote:
> This brings up an interesting issue - in Qt mvc approach, the view > (QTreeView) queries the model (QAbstractItemModel - eventually the > LeoTreeModel) for data to draw. I.e. it asks the model for something > like "give me the icon for child #4 of node #121" when it needs to > draw it. How does this map to leo? My guess for this would be - there is very little to be implemented for the tree view. In writing the LeoTreeViewModel, you can pretty much map it directly to leo controller, but have to know when to call beginInsertRows / endInsertRows etc (answer - when vnodes are being added). Is it easy to get callbacks from leo model, along the lines of "vnode v1 child #3 was added"? The API to implement to get full model functionality is not too big: http://www.potu.com/man/doc.trolltech.com/4.0/qabstractitemmodel.html Of course we might be lazy and just use QTreeWidget (as I did in qleolite), especially if we forego lazy loading of tree structure for now... which may not be a good idea, considering the eventual possibilty of doing it someday... -- Ville M. Vainio http://tinyurl.com/vainio --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---