GUI: Option to use individual time controls in games and in tournaments #599
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR deals with two topics
A new
TimeControlWidget
is introduced in order support theTimeControlDialog
. It takes most of the dialog's components.The dialog controls two
TimeControlWidgets
. The secondTimeControlWidget
(for Black) can be enabled on demand. By checking or unchecking a checkbox the dialog switches between common time controls for both sides or split time controls for White and for Black.TimeControl timeControl2
is added to theGameSettingsWidget
class, to save/read settings for the 2nd time control.If used in the general settings (Tools->Settings->Games) the second time control is saved to the cutechess.ini file.
It was necessary to add extra control logic for
hourglass
mode to prevent diverging settings for the sides.A new context menu is added to the tournament players' list if some player(s) are selected. The menu item "Edit Time control" can be used to edit time controls individually. A simplified time control dialog is shown. It looks mostly like the old time control dialog, the 2nd time control is unused. Multiple-item selection in the player list is supported for time control updates, (Hint to users: also use the SHIFT and the CTRL-modifiers when selecting for best results).
A
QVector
is added toNewTournamentDialog
to store the individual time controls.At tournament creation an individual time control is used when valid else tournament controls are used instead.
The hourglass mode is enabled or disabled uniformly according to the tournament's common settings.
Note:
In total, the
TimeControlDialog
is used in 4 ways:GameSettingsWidget
, two time controls available, values are read from / saved to cutechess.ini).GameSettingsWidget
, two time controls available)GameSettingsWidget
, but only one time control available)The PR relates to #161, the opening book part of #161 is still missing.
Resolves #413
I hope this is useful
Update:
I attached some Screenshots below.
This PR also resolves #619, which came later. Also this addresses item 1 in request #351