Basic state system to use with Qt