I understand more or less how does MPV works.
But I don't get what classes:
Is the base class for the model of the MVC. Has a global interface for accessing and altering the data and takes care of the Observable part.
Is the base class for the view of the MVC. Has aglobal interface for the view/selections part and it takes care of the Observer part. You don't have to worry about the observer pattern, the framework does it for you.
Is the base class for the controller of the MVC.
Is the Strategy pattern for painting, editing the elements, ...
Are from the "The Graphics View Framework" and is independent of the Model/View framework.
This is also a very powerful framework for the graphics part.
QGraphicsScene provides the Graphics View scene. The scene has the following responsibilities:
Providing a fast interface for managing a large number of items Propagating events to each item Managing item state, such as selection and focus handling Providing untransformed rendering functionality; mainly for printing
QGraphicsView provides the view widget, which visualizes the contents of a scene. You can attach several views to the same scene, to provide several viewports into the same data set
If you want a Model to be visible in a QGraphicsView than you will have to write your own view based on the QAbstractItemView.
Take a QGraphicsView as view port widget
QAbstractScrollArea::setViewport(QWidget * widget)) and then you can
the items in the scene. Don't forget to take care of the reset an layout change events.