lundi 8 octobre 2018

Handling different gui states

So I want to create the gui interface in Qt/cpp for the server which can be in many different states, and depending on its state the buttons in gui need to be set differently ex: GUI:

button1 - unchecked and enabled to click

button2 - disabled(grayed out)

button3 - disabled

button3 - disabled

Then after click button1 GUI:

button1 - checked

button2 - enabled to click

button3 - enabled to click

button3 - enabled to click

But for example if server is in different state and you connect via gui the buttons should look like this:

GUI:

button1 - checked

button2 - enabled to click

button3 - disabled to click

button3 - disabled to click

Is there some established pattern/way of handling that intuitively? The biggest problem here is that if the server has a lot of different states that need the buttons to be set in a lot of different configurations. The only thing I can come up with is mapping the state of all buttons to the specific state but well... there's a lot of buttons and a lot of states.

Aucun commentaire:

Enregistrer un commentaire