Adding additional IOutputViewModel

dukju ahn dukjuahn at gmail.com
Mon Jun 11 08:04:28 UTC 2007


I suggest that we provide model interface such as,

class IOutputViewModel
{
    void activate(QModelIndex)
    QModelIndex highlightNext()
    QModelIndex highlightPrev()
    Qlist<QMenu> contextMenu(QModelIndex)
}
and make the users double-inherit with QAbsItemModel
Reason is that

1. think about makebuilders' show next error stuff, which I implemented.
Although the item can be activated, item cannot be selected in GUI
because item selection is done in QAbsItemView::setCurrentIndex().
And it's a bad idea to provides IOutputView::setCurrentIndex() stuff
because view are hided from outside world.
By above interface, outputview knows which item to highlight.

Also, we can consolidate many "show next item.." stuffs. For example,
suppose that grepview, makebuilder both plugs "show next item.."
into the menubar. It's annoying. Rather we just let only outputview plugs
"show next item" action.

2. Context menu is eaily retrieved.




More information about the KDevelop-devel mailing list