Re: Model, View and Proxy
- You will need proxies to achieve all your views. Look at the proxy classes in the Qt docs and the FlaxProxy class here http://www.thorsen-consulting.dk/software.html .
- Delegates can be added to the view - so you do not have to worry about adding it to the proxy or the model.
- Changes from outside can be made by calling setData which takes care of notifying the views.
Re: Model, View and Proxy
So I would implement one model and one proxy for each view and maybe a third proxy on top of the table view proxy to filter the rows (& colums)?
Regarding the filtering of columns: is this better done as proxy (I think I will need to remap the indices then?) or to subclass the view and hide (as explained in the book Practical Qt) the unneeded columns?
I imagine hiding is easyer (but not good practice) as I would not have to change which column wich delegate is used?
I do not want to to use the model when changing data from the outside of the MVC using setData. I expect there is a slot to notify the model of changes (e.g. rows, colums or whole data)?
This is because the datastructure might be used in another non Qt project and mainly because the operations on it might change the whole tree. When calling the operations from button's slots, I know if this changes one row/column, cell or if this can change the whole tree. So I could notify the model myself.
Thanks in advance,
-Jens