Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. User-configurable QStateMachine
Forum Updated to NodeBB v4.3 + New Features

User-configurable QStateMachine

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 550 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thEClaw
    wrote on last edited by
    #1

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

    Intoduction
    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.

    Problems
    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. :)

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved