User-configurable QStateMachine

  • Hello,
    I am having problems finding a nice way to enable a QStateMachine to be configurable by the user.

    After having integrated SDL into my application I piped all the generated events into a QStateMachine. Each type of input corresponds to a single subclass of QAbstractTransition ("button pushed", "button released", ...). Each class generates a brief descriptive string that contains most of the information of the original input.

    The strings created by the state machine are supposed to be mapped to specific functions. This mapping should be changeable by the user. I have yet to come up with a pretty idea to do this - in a way I have the backend and the frontend, but I am lacking the "mid-end".
    If I were to use a QMap<QString, function pointer>, how should I do that and how would I save the mapping to be reused later one? Maybe there is a much better way of handling things?

    I would be glad about any kind of input on this. Thanks in advance. :)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.