PDA

View Full Version : GUI View Modes and QStateMachine?



spawn9997
17th June 2010, 20:05
Qt 4.6.2 --- I have a gui app with a custom QGraphicsView as the central widget. What I want to do is have view modes; just think of Gimp the way the toolbars and mouse functionality changes when ever you click the 'mode' buttons such as zoom, measure etc...

To date I have seven modes, 1 null mode and six action modes. From the null mode I can only goto a single initial mode (on QGraphicsView::setScene). From the other six I can goto any other mode including the null mode. I can see from the QStateMachine docs that I will need a GREAT number of transitions to do this.

My question is, would using QStateMachine be the best way to go or is there a much easier and simpler way to do this?