Commit graph

400 commits

Author SHA1 Message Date
Olivier Teulière
e55f05e325 Arbitration: fix a focus problem 2012-10-06 17:49:36 +02:00
Olivier Teulière
97f4355502 PlayerWidget: improve focus behaviour and ergonomy 2012-10-06 17:49:36 +02:00
Olivier Teulière
18aa839f11 Validators: always force the input to upper case 2012-10-06 17:49:36 +02:00
Olivier Teulière
d3f642567d Reuse a variable 2012-10-06 17:49:36 +02:00
Olivier Teulière
1e94c56067 Rename slots to indicate what the methods actually do 2012-10-06 17:49:36 +02:00
Olivier Teulière
ca5c6cff0d Do not use Qt auto-connect feature 2012-10-06 17:49:36 +02:00
Olivier Teulière
d3c9c504ba Fix a typo, causing a wrong error message to be displayed 2012-10-06 17:49:36 +02:00
Olivier Teulière
471dcf90e1 Rename Turn into TurnData (step 2) 2012-10-06 17:49:35 +02:00
Olivier Teulière
fa345a9f7b Rename Turn into TurnData (step 1) 2012-10-06 17:49:35 +02:00
Olivier Teulière
65ed44d66d Cosmetics 2012-10-06 17:49:35 +02:00
Olivier Teulière
77fcfab8a5 Stats: add an option to lock the columns sizes 2012-10-06 17:49:35 +02:00
Olivier Teulière
ef5f8e63e9 Do not cache the score of the player.
Caching is almost useless here, and makes the code more complex.
2012-10-06 17:49:35 +02:00
Olivier Teulière
40944884e6 Remove Player::getPoints() 2012-10-06 17:49:35 +02:00
Olivier Teulière
c700f39ac7 Stats: display end game points for a free game 2012-10-06 17:49:35 +02:00
Olivier Teulière
b53295c782 Stats: compute the ranking based on the final score, not the intermediate one 2012-10-06 17:49:35 +02:00
Olivier Teulière
2ab95b5ed9 Get rid of old CVS files 2012-10-06 01:44:33 +02:00
Olivier Teulière
db14ee0622 Training: do not use the auto-connect feature.
The code is now slightly more verbose, but easier to follow and
less sensitive to typos.
2012-10-05 16:10:41 +02:00
Olivier Teulière
75025c33df Training: improve usability 2012-10-05 16:10:41 +02:00
Olivier Teulière
e4f9c03ca7 Training: define key accelerators for the main buttons 2012-10-05 16:10:41 +02:00
Olivier Teulière
1232eda206 Set the allColumnsShowFocus property to true on some views 2012-10-05 16:10:41 +02:00
Olivier Teulière
f4b78e09b1 Arbitration: restore properly the focused player 2012-10-05 16:10:41 +02:00
Olivier Teulière
56028c8651 Arbitration: new popup menu entry to suppress an assigned move 2012-10-05 16:10:41 +02:00
Olivier Teulière
a800863c1f Arbitration: do not handle solos automatically.
The arbitrator has to specify them manually. Otherwise, we cannot know
when a turn is complete and thus we cannot determine if solos can/should
be applied.
2012-10-05 12:52:42 +02:00
Olivier Teulière
bcc2aedbff Improve the detection of finished games for duplicate and arbitration modes 2012-10-05 01:42:46 +02:00
Olivier Teulière
ed152a380d Arbitration: correctly set the state of buttons for past turns 2012-10-05 00:27:34 +02:00
Olivier Teulière
6ec9568020 Arbitration: better label for a popup menu entry 2012-10-05 00:27:10 +02:00
Olivier Teulière
86860a9f80 RackWidget: inherit from QFrame instead of QWidget 2012-08-26 22:18:42 +02:00
Olivier Teulière
d693a53910 TileLayout: respect the margins and alignment 2012-08-26 22:18:42 +02:00
Olivier Teulière
aa557f8121 Improve the handling of favorite players 2012-08-26 22:18:36 +02:00
Olivier Teulière
ee31179864 StatsWidget: add the players ranking 2012-08-26 22:18:32 +02:00
Olivier Teulière
8e1c55c79d StatsWidget: use the player name for the title of the columns. Also hide some rows depending on the game type. 2012-08-26 22:18:32 +02:00
Olivier Teulière
24bf44779a StatsWidget: display some column names even when there is no game 2012-08-26 22:18:31 +02:00
Olivier Teulière
fb2a160d7b StatsWidget: improve the tooltips 2012-08-26 22:18:22 +02:00
Olivier Teulière
80a2e9ce9c StatsWidget: various improvements.
Main changes
 - clean model/view separation
 - code simplification
 - no multi-line cells anymore
 - possibility to change the orientation of the table
 - use of bold font to highlight "top moves"
 - use of colors to highlight some important details
2012-08-26 22:18:22 +02:00
Olivier Teulière
25f3bccdd1 TileWidget: make sure the font is at least one pixel wide 2012-06-10 23:34:23 +02:00
Olivier Teulière
fdc1478cf4 Arbitration: disable controls for a finished game only in the last turn 2012-06-09 19:18:43 +02:00
Olivier Teulière
3a18a78970 Fixed make dist 2012-06-04 23:04:07 +02:00
Olivier Teulière
4c76ffe8bc Moved the "Favorite players" window to a dedicated file, and added CSV import/export 2012-06-04 23:04:06 +02:00
Olivier Teulière
a4d5709d16 Catch exceptions during the auto-save 2012-06-04 23:04:06 +02:00
Olivier Teulière
e88de64ac9 Stats window: display the table number instead of the row number 2012-05-30 08:14:18 +02:00
Olivier Teulière
2b6b85cce3 Arbitration: allow removing penalties 2012-05-20 22:12:42 +02:00
Olivier Teulière
7868593cb2 Do not always reject completely a rack containing letters not in the bag anymore.
This could be a rack containing an incomplete input sequence for a tile...
2012-05-16 22:07:55 +02:00
Olivier Teulière
0c1634d530 Arbitration: do not accept blindly any rack in Intermediate state.
This fixes a bug with languages using multichar tiles.
2012-05-16 22:07:55 +02:00
Olivier Teulière
a07d39fc22 New statistics window, still quite unpolished. 2012-05-06 23:31:49 +02:00
Olivier Teulière
f7a7eab3a3 Arbitration: when a player is selected, automatically switch to the corresponding history tab 2012-05-06 23:23:52 +02:00
Olivier Teulière
1ad1ef7425 Arbitration: use the same solo-related settings as in duplicate mode 2012-05-05 19:58:31 +02:00
Olivier Teulière
6d4df09b31 Fixed a bug when saving the position of auxiliary windows 2012-05-05 19:45:44 +02:00
Olivier Teulière
0095302b88 Use dedicated getters for the Move type: this is simpler to use and more readable 2012-05-05 19:45:44 +02:00
Olivier Teulière
572d172640 Arbitration: new option to specify the number of "authorized" warnings. Not used yet. 2012-05-05 19:45:44 +02:00
Olivier Teulière
e6c1a180c8 Arbitration: by convention, use negative values to indicate a penalty 2012-05-05 19:45:44 +02:00
Olivier Teulière
6c16f203a5 Warn on game creation before showing the new game dialog, not after 2012-04-29 10:31:30 +02:00
Olivier Teulière
4b4b715a41 New options to desactivate the confirmation dialogs, and rework of the preferences window. 2012-04-29 01:58:43 +02:00
Olivier Teulière
f83b397549 Removed the now useless preference about the default AI level 2012-04-28 15:34:39 +02:00
Olivier Teulière
eaf536b3ba Favorite players: new "Default" column, for automatic inclusion in a new game 2012-04-28 15:34:39 +02:00
Olivier Teulière
094af979c7 Create the new game dialog every time, instead of reusing it 2012-04-28 15:34:39 +02:00
Olivier Teulière
43470edc04 Arbitration: changed some shortcuts, to avoid interferences when typing 2012-04-28 15:34:39 +02:00
Olivier Teulière
c58282faad Arbitration: use a placehoder for the results filter 2012-04-28 15:34:38 +02:00
Olivier Teulière
c3d4f9aa67 Arbitration: do not select the rack after ending the turn 2012-04-28 15:34:38 +02:00
Olivier Teulière
e87018a583 Arbitration: the "Points" column was mistakenly hidden in the players table 2012-04-28 15:34:38 +02:00
Olivier Teulière
917c94fd5e Display the total number of warnings of a player in the corresponding history tab title 2012-04-28 15:34:38 +02:00
Olivier Teulière
a03eaab88a Arbitration: clear the results filter when a new search is performed 2012-04-28 15:34:38 +02:00
Olivier Teulière
81dfee8e55 Emit a beep when the timer reaches the alert level or expires 2012-04-28 15:34:38 +02:00
Olivier Teulière
50855fc104 Arbitration: give the focus on the first search result after a search 2012-04-28 15:34:38 +02:00
Olivier Teulière
27a7cc6846 Arbitration: accept only 7 letters in the rack (or 8, in the game variant) 2012-04-28 15:34:38 +02:00
Olivier Teulière
11db8eb48f Arbitration: accept racks in "intermediate" state 2012-04-28 15:34:38 +02:00
Olivier Teulière
c4fad05ffd Arbitration: new option to deactivate the automatic random rack 2012-04-28 15:34:37 +02:00
Olivier Teulière
c891671588 Arbitration: improve the refreshing of controls when the rack changes 2012-04-28 15:34:37 +02:00
Olivier Teulière
de5783d51a Auto-save the current game regularly, to reduce the loss in case of crash 2012-04-28 15:34:37 +02:00
Olivier Teulière
f3f2d916bb Fixed a few memory leaks 2012-04-28 15:34:37 +02:00
Olivier Teulière
0a2727e767 Added missing headers 2012-04-28 15:34:37 +02:00
Olivier Teulière
afb45d62c4 Preferences: removed the option to link the rack with the 7+1 dictionary tool 2012-04-28 15:34:36 +02:00
Olivier Teulière
731eca6e9c Do not reset the timer when changing turn, it causes problems in arbitration mode.
In fact, it could be more subtle: the timer should be reset whenever a
new turn is created (and only in this case).
2012-04-16 20:32:57 +02:00
Olivier Teulière
e8649aae28 Fixed a typo in 0534e72c 2012-04-12 08:47:20 +02:00
Olivier Teulière
0534e72c0e Only show data relative to the last turn on the external board (and rack) 2012-04-11 20:02:18 +02:00
Olivier Teulière
a2ba303307 History widget: display warnings, penalties and solos 2012-04-11 20:02:18 +02:00
Olivier Teulière
cc0fe39c76 HistoryWidget: simplified the handling of columns 2012-04-10 08:51:12 +02:00
Olivier Teulière
7e37cde0c0 Arbitration: after the end of turn, give the focus to the rack and select all the letters 2012-04-10 08:51:12 +02:00
Olivier Teulière
537d00714b Arbitration: allow selecting all the players directly from the players/results tables 2012-04-10 08:51:12 +02:00
Olivier Teulière
4fe2cf3469 Arbitration: really treat the "No move" pseudo-move as if the player had not played 2012-04-08 20:57:47 +02:00
Olivier Teulière
bcd3f73e62 Arbitration: "No move" is now named "Suppress move" 2012-04-08 20:57:46 +02:00
Olivier Teulière
1f4db7a742 Arbitration: various minor improvements related to search results handling 2012-04-08 20:57:46 +02:00
Olivier Teulière
2f7c09ec83 Arbitration: do not consider the "No move" move as a real move assignment 2012-04-08 20:57:46 +02:00
Olivier Teulière
4e5c86ef11 Added shortcuts to some buttons 2012-04-08 20:57:46 +02:00
Olivier Teulière
9f2ea4f340 Dictionary wizard: new button to load the letter values from the current dictionary 2012-04-07 13:29:07 +02:00
Olivier Teulière
e6a2a6c750 Cosmetics 2012-04-07 13:29:07 +02:00
Olivier Teulière
d6a2fc6e4e PublicGame: more direct access to the game current rack 2012-03-26 07:49:25 +02:00
Olivier Teulière
82b5694a59 Split the ArbitrationWidget class into 2 classes, to keep the code manageable 2012-03-26 07:49:25 +02:00
Olivier Teulière
d4c7511ae5 Allow giving warnings and penalties from the interface 2012-03-26 07:49:25 +02:00
Olivier Teulière
7f504671bb Fixed use of uninitialized value 2012-03-26 07:49:24 +02:00
Olivier Teulière
f9ca096dda Disable impossible actions in the popup menu instead of hiding them 2012-03-20 21:16:25 +01:00
Olivier Teulière
893219b164 New method to select players and to assign moves.
A player can now be selected by typing his table number, when the focus
is in the results table. Pressing the Enter key will assign the current
move to the selected player(s).
This allows a very fast assignment of moves.
2012-03-20 20:52:33 +01:00
Olivier Teulière
1dd271b147 Allow filtering several keys with the same filter 2012-03-19 23:14:34 +01:00
Olivier Teulière
b1e7381b39 Players can now have a table number 2012-03-19 22:49:58 +01:00
Olivier Teulière
7539cddf92 Factorize some code using a utility class 2012-03-18 02:45:15 +01:00
Olivier Teulière
e77923674f Arbitration: a click on the master move previews it on the board 2012-03-18 01:00:25 +01:00
Olivier Teulière
35acc7b7a3 New misc_helpers files to group some utility classes
Currently, it contains only the KeyEventFilter class, and a new
ClickableLabel class (not used yet).
2012-03-18 00:37:57 +01:00
Olivier Teulière
96c0497f7b Arbitraion: the rack can be modified only at the last turn 2012-03-17 23:53:40 +01:00
Olivier Teulière
f3b2442cc0 Arbitration: improved the refresh of search results 2012-03-17 23:53:40 +01:00
Olivier Teulière
3a8ac20a0a Arbitration: allow ending the turn even if some players have no assigned move 2012-03-17 23:53:31 +01:00
Olivier Teulière
0fa7bc91c6 Arbitration mode: allow editing the rack manually 2012-03-11 00:24:29 +01:00
Olivier Teulière
25a36ec9cd Arbitration mode: allow setting the rack randomly 2012-03-11 00:24:21 +01:00
Olivier Teulière
ff21e64a7f Recreate the preferences dialog every time, to avoid displaying unsaved changes 2012-03-10 18:06:41 +01:00
Olivier Teulière
9160e6bc99 New preference to save the search results limit in arbitration mode 2012-03-10 18:06:41 +01:00
Olivier Teulière
05a51101db New arbitration mode, dedicate to arbitration of duplicate games.
It is mostly working, but many things are still missing.
In particular:
 - ability to enter (or change) moves for a past turn
 - ability to change the rack (manually, or randomly)
 - ability to add/remove players during the game
 - support for solos, warnings, penalties
 - support for table number
 - more ergonomic interface
 - non regression tests
 - ... and probably bugs to fix
2012-03-10 18:06:41 +01:00
Olivier Teulière
51622a0012 Make sure the tooltip for the "show definition" menu entry is displayed 2012-03-04 23:02:32 +01:00
Olivier Teulière
ce5f2b2a8c Move the rack and the timer above the external board (useful when displayed with a projector) 2012-03-04 23:02:28 +01:00
Olivier Teulière
22fd6484f3 Correctly retrieve the game rack 2012-02-25 23:51:30 +01:00
Olivier Teulière
4077a25fa0 Use the GameMoveCmd command 2012-02-25 23:25:40 +01:00
Olivier Teulière
6ac6849bf8 Remove status bar messages automatically after 2s 2012-02-25 21:56:41 +01:00
Olivier Teulière
7195f3415c Warn when loading a game, if there is already an existing game 2012-02-25 21:56:41 +01:00
Olivier Teulière
cae5f38af5 Allow saving the results of a regular expression search into a file 2012-02-25 21:56:41 +01:00
Olivier Teulière
746abef2cf Added search buttons to the "plus 1" and "regexp" tools 2012-02-25 21:56:41 +01:00
Olivier Teulière
efb5fddf58 Reset the timer when the current turn changes 2012-02-21 08:22:33 +01:00
Olivier Teulière
0d45fc6227 When showing a preview on the board, do not hijack the normal internal data 2012-02-21 08:22:32 +01:00
Olivier Teulière
bf42c49850 Added loggers to most classes 2012-02-19 13:07:29 +01:00
Olivier Teulière
a1c6a917a4 Get rid of the UI file for the favourite players: the same can be done with a few lines of code 2012-02-18 01:20:55 +01:00
Olivier Teulière
d45ad3325c Simplify the New Game dialog by removing various controls 2012-02-18 01:19:24 +01:00
Olivier Teulière
9d987974cd If the added fav player already exists, generate a new name 2012-02-18 01:19:24 +01:00
Olivier Teulière
33814ef058 Start editing the name directly after adding a player 2012-02-18 01:19:24 +01:00
Olivier Teulière
03f20dd7be Allow deleting players with the Del key only if there is a corresponding popup menu entry 2012-02-18 01:19:24 +01:00
Olivier Teulière
0daa773268 Do not allow duplicate entries in the players tables 2012-02-18 01:19:24 +01:00
Olivier Teulière
37715c1411 Extract PlayerDef from the PlayerTableHelper class 2012-02-18 01:19:24 +01:00
Olivier Teulière
b02d25dee7 New action, to mark a player as favourite 2012-02-18 01:19:24 +01:00
Olivier Teulière
987ff4c15f NewGame: new button to add favourite players. Also added a popup menu to delete players more easily. 2012-02-18 01:19:24 +01:00
Olivier Teulière
2cf5e29347 New dialog to define the favourite players 2012-02-18 01:19:24 +01:00
Olivier Teulière
323344a674 New helper class to help dealing with a players table 2012-02-16 22:17:26 +01:00
Olivier Teulière
c231cd4b5d Remove all the selected players, not only the first one 2012-02-16 22:17:26 +01:00
Olivier Teulière
a3084bc8b3 Use a QTableWidget instead of a QTreeView. This simplifies the code a little. 2012-02-16 22:17:26 +01:00
Olivier Teulière
e86d71626c Do not repeat the application name and organization name everywhere 2012-02-16 22:17:23 +01:00
Olivier Teulière
a3b8b9872a Removed (old) debugging code 2012-01-30 08:27:27 +01:00
Olivier Teulière
ea4b4396a8 Add auto-completion on the dictionary path 2012-01-29 23:40:02 +01:00
Olivier Teulière
84c4937d8d The external board now also contains a rack and a timer 2012-01-29 22:47:51 +01:00
Olivier Teulière
0e7880dbbe New Rack widget 2012-01-29 22:47:51 +01:00
Olivier Teulière
54700f71de Added an option to highlight the tiles in the rack, accessible via the context menu 2012-01-29 22:47:51 +01:00
Olivier Teulière
8bbbf32e8f Added an option to show/hide the played tiles, accessible via the context menu 2012-01-29 22:47:51 +01:00
Olivier Teulière
8d9eaf3f3d Use the "visual" bag widget instead of the old one 2012-01-29 22:47:51 +01:00
Olivier Teulière
85e79e0294 TileWidget: change the prototype of tileChanged() and improve the possible states 2012-01-29 22:47:51 +01:00
Olivier Teulière
00a98a7c31 TileWidget: rename some constants to be more explicit 2012-01-29 22:47:51 +01:00
Olivier Teulière
ebea504aa7 TileWidget: avoid a lot of useless repaintings 2012-01-29 22:47:51 +01:00
Olivier Teulière
f6d7661367 TileWidget: get rid of BasicTileWidget and TileWidgetDecorator.
TileWidget now supports all these functionalities, with a much simpler code.
2012-01-29 22:47:51 +01:00
Olivier Teulière
5d62711789 TileWidget: do not display anything on a joker tile that has not yet been played 2012-01-29 22:47:51 +01:00
Olivier Teulière
3aab437022 TileLayout: simplify code using the inherited "spacing" property 2012-01-29 22:47:51 +01:00
Olivier Teulière
c11de9eed5 TileLayout: proper sizeHint() implementation 2012-01-29 22:47:51 +01:00
Olivier Teulière
61f75894da TileLayout: fix the computation of the minimum size 2012-01-29 22:47:51 +01:00
Olivier Teulière
95211525a5 TileLayout: allow forcing the number of lines instead of the number of columns 2012-01-29 22:47:50 +01:00
Olivier Teulière
b45d113157 TileLayout: fix the clear() method 2012-01-29 22:47:50 +01:00
Olivier Teulière
6411b1975d TileLayout: fix a layout bug in "static" mode 2012-01-29 22:47:50 +01:00
Olivier Teulière
51d6a3bc8b Added logging macros 2012-01-29 20:34:48 +01:00
Olivier Teulière
afe54e9785 Set a minimum size to the timer 2012-01-29 20:05:22 +01:00
Olivier Teulière
9d00f873a3 Changed the shortcut to change the dictionary, as it is already used for copy-paste... 2012-01-29 20:05:22 +01:00