I've put it in the title because it's very important: "(reusable and embeddable)" - the grid should be a reusable widget, easy to embed into any scene, even in large number (one scene contains more "grids").
The natural way of working would be:
- create new QGraphicsScene
- create several new MyGrids
- create some new "objects" (they would be basically QObject subclasses, with some extra features) via bit matrices for each
- put those several new MyGrids on the scene
MyGrid would be the class representing the concept of "grid" I've talked about in post #1. It has as children some rectangles managed in turn by a layout (default: QGraphicsGridLayout) for the reasons I've also mentioned in post #1.
The question is just: What should MyGrid subclass, such that I can reuse as much as possible of the features already existing qt classes provide, to let the user (the real game developer) easily create and manipulate several MyGrid instances as his game requires.
I hope it's clear now.




Reply With Quote
Bookmarks