Commit graph

345 commits

Author SHA1 Message Date
BruebachL
ba89495dc0
Refactor Picture Loader (#5457) 2025-01-13 18:52:54 +00:00
RickyRister
a417b049da
Make Visual Deck Storage tab be managed by TabSupervisor (#5453)
* remove closeRequest override

* remove visualDeckStorage from WindowMain

* manage visual deck storage in TabSupervisor

* open on startup

* refresh vds on db load finish

* open deck editor tab first on startup
2025-01-13 18:42:58 +00:00
BruebachL
dd8ac14f99
Visual deck storage v2 (#5427)
* Restore some button states (ready/sideboard locked) to sensible defaults when unloading a deck.

* Update last loaded timestamp in decklist file and then restore original last modified timestamp if a user requests a deck load.

* Add some todos.

* Loading a deck from local file dialog should swap out scenes, enable unload button.

* Lint.

* Shuffle some classes and signals around.

* More sort options, sort widgets directly.

* Banner cards should respect providerIds.

* Properly updateSortOrder on load.

* Add the color identity to the Deck Preview Widget.

* Properly set sort indices.

* Change replace visualDeckStorageWidget with deckView to be in deckSelectFinished so that it also works on remote deck load.

* Include settings for unused color identities display.

* Change opacity scaling.

* Overload for Qt.

* Lint.

* Lint.

* Include QMouseEvent

* Template because MacOs.

* Include a quick filter for color identities.

* Include a quick filter for color identities.

* Save some space.

* Refactor DeckPreviewWidgets to reside in their own folder.

* Add Deck Loader logging category.

* Introduce a tagging system.

* Add some more default tags.

* Even more default tags.

* Lint.

* Lint a comma.

* Remove extra set of braces.

* Lint some stuff.

* Refresh banner cards when tags are added.

* Lint.

* Wrestle with Qt Checkboxes.

* Lint.

* Adjust some sizes, relayout.

* Address comments.

* Lint.

* Reorder kindred types.

* Add a search bar for tags.

* Remove close button (for now) and change "Add tags ..." to "Edit tags ..."

* Retranslate window title for Deck Tag Manager Dialog.

* Style tag addition widget to be consistent.

* Lint.

* Override paintEvent.

* Override sizeHint

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-12 17:46:22 -05:00
RickyRister
9bd024d39f
Make all tabs closable; add tabs menu (#5451)
* make closeRequest call close by default

* make all tabs closable by default

* closeRequest instead of deleteLater on stop

* null out pointer on destroy

* no need to manually null out the tabs anymore

* comment

* pass tabsMenu into ctor

* comment

* implement tabs menu

* fix segfault on close (again)

* remove deck editor action from WindowMain
2025-01-12 16:15:19 -05:00
RickyRister
3f41e5dd77
don't close replay tabs and do close message tabs on disconnect (#5450) 2025-01-12 02:47:36 -05:00
RickyRister
a6fc88c79a
Always set TabSupervisor as parent in Tab subclasses (#5449)
* refactor closeTab

* always set tab parent to tabSupervisor

* set tabSupervisor parent

* use close instead of deleteLater

* be more clear about overloads
2025-01-12 02:34:11 -05:00
RickyRister
7347ba88ac
fix segfault on disconnect (#5447)
* add new param to closeRequest

* don't emit signals in dtors

* send closeRequest

* fix build failure

* fix build failure

* see if we can get away with the overloaded triggered

* fix build failure
2025-01-11 22:19:45 -05:00
tooomm
3b544a36a8
Fix button label (#5441) 2025-01-11 21:28:23 -05:00
RickyRister
2851d0c7e6
add override specifier to tab subclasses (#5445) 2025-01-11 21:28:02 -05:00
ZeldaZach
7db9c9115e
Fix SoundEngine on Windows (again) 2025-01-11 00:19:00 -05:00
ZeldaZach
503985a080
Initialize audioOutput for SoundEngine 2025-01-11 00:12:32 -05:00
Zach H
8bea3f8997
Fix sounds on Qt6 (#5439) 2025-01-10 23:10:47 -05:00
RickyRister
1a3df84f0a
fix segfault on exit if any closable tabs were open (#5435) 2025-01-10 17:27:26 -05:00
RickyRister
6e8adddc6d
Refactor tab_supervisor to new Qt Slot/Signal syntax (#5430)
* Refactor tab_supervisor to new Qt Slot/Signal syntax

* fix build failure
2025-01-09 06:26:42 -05:00
RickyRister
22a6ded4f0
reduce vertical spacing in visual deck storage (#5422) 2025-01-09 06:25:40 -05:00
RickyRister
23171f79d0
Refactor window_main to new Qt Slot/Signal syntax (#5423) 2025-01-06 12:38:44 -05:00
RickyRister
b7f05a12a3
get swap cards button to work with multi-selections (#5421) 2025-01-05 22:44:40 -05:00
BruebachL
81b85e97df
Extend decklist parsing (#5316)
* Extend the decklist parsing from clipboard to also support SetName, CollectorNumber and Foil Status.

* Q_UNUSED foil for now but keep parsing logic for future PR's/compatibility.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-05 21:07:17 -05:00
BruebachL
62f7c7f9ce
New visual deck storage (#5290)
* Add TabDeckStorageVisual

* Visual Deck Storage

* Add BannerCard to .cod format, use it in the visual deck storage widget.

* Show filename instead of deckname if deck name is empty.

* Lint.

* Don't delint cmake list through hooks.

* Add deck loading functionality.

* Open Decks on double click, not single click.

* Void event for now.

* Fix build issue with overload?

* Fix build issue with overload?

* Include QDebug.

* Turn the tab into a widget.

* Move the signals down to the widget, move the connections and slots up to the parent widgets.

* No banner card equals an empty CardInfoPtr.

* Add an option to sort by filename or last modified.

* Flip last modified comparison.

* Lint.

* Don't open decks twice in the storage tab.

* Fix unload deck not working by showing/hiding widgets instead of adding/removing to layout.

* Add a search bar.

* Add a card size slider.

* Lint.

* Lint.

* Lint.

* Fix settings mocks.

* No need to QDebug.

* No need to QDebug.

* Member variable.

* Member variable.

* Non-lambda.

* Change set to list conversion.

* Specify overload.

* Include MouseEvent

* Adjust font size dynamically.

* Add an option to show the visual deck storage on database load.

* Fix the close button not working on the tab, add an option to launch the visual deck storage tab to Cockatrice menu.

* Override virtual functions.

* Correct tab text.

* Add a setting to remember last used sorting order for visual deck storage widget.

* Update banner card combo box correctly.

* Fix mocks.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-01-05 18:12:20 -05:00
BruebachL
7496e79e8c
Add a button to swap the card between mainboard and sideboard to the DeckEditor (#5175)
* Add a button to swap the card between mainboard and sideboard to the deck editor.

* Add new icon to cockatrice.qrc and force update.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-05 17:57:37 -05:00
RickyRister
93fab3d78f
Remember last opened directory when loading decks (#5418)
* remember last directory when loading deck

* move shared code into new dlg class
2025-01-05 17:40:20 -05:00
BruebachL
9c38c9ed1b
Differentiate logging in order to silence certain modules. (#5419)
* Differentiate logging in order to silence certain modules.

* Lint cmake.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-05 17:38:51 -05:00
RickyRister
38e99f2e87
implement /card command (#5413) 2025-01-04 02:07:43 +00:00
RickyRister
68226786a2
don't redraw PrintingSelector's FlowWidget unless cards actually changed (#5392) 2025-01-04 01:49:54 +00:00
RickyRister
455cd9717a
add menu action to open settings folder (#5412) 2025-01-04 01:49:41 +00:00
RickyRister
0402d4b853
add debug setting to load deck and ready on join (#5409)
* new property

* refactor deck loading to new method

* another new method

* works now
2025-01-02 17:08:51 -05:00
RickyRister
8a427955e7
Add debug setting to start local game on startup (#5408)
* new properties

* refactor

* start local game on startup

* disable autoconnect
2025-01-02 09:51:59 -05:00
RickyRister
34df4cd060
support multi-select in deck editor (#5397)
* support multiselect in deck editor

* fix crash

* don't reset selection after each action

* maintain old reselecting behavior when changing cards from left side

* fix crash for real (probably)

* maintain reselection behavior when deleting single selection
2025-01-01 00:43:47 -05:00
RickyRister
3348e051a1
update recently opened decks when saving a new deck (#5389) 2024-12-30 00:57:31 +00:00
Zach H
dad1aea128
Show correct art on middle mouse popup (#5385) 2024-12-29 23:24:32 +00:00
tooomm
6679705254
Simpler naming (#5381) 2024-12-29 15:41:30 +00:00
RickyRister
ac3aa949ad
add "view related cards" right click menu to card info widget (#5375) 2024-12-29 06:11:12 +00:00
RickyRister
25d21a3da6
refactor: remove ReleaseChannel keeping track of its own indexes (#5366) 2024-12-28 23:51:37 +00:00
RickyRister
df9c5ae53c
Check for client updates on startup (#5359) 2024-12-28 21:29:59 +00:00
RickyRister
4c7796537f
Support folder download in deck storage tab (#5356)
* refactor

* support folder download
2024-12-28 06:31:18 +00:00
RickyRister
3452cb01d0
fix replay download not working if replay folder is empty (#5355)
* fix downloading single replays

* fix downloading replay folder
2024-12-28 06:15:25 +00:00
RickyRister
6a151ef97a
Add button to open decks folder (#5354) 2024-12-28 05:09:46 +00:00
RickyRister
e3d651668c
Add button to open replays folder (#5352) 2024-12-28 05:06:26 +00:00
Zach H
7a5704beaa
Support Moderator/Admin force activating users (#5353) 2024-12-28 05:01:31 +00:00
RickyRister
37b78a9a4c
change action's text to "unconcede" when player is conceded (#5351) 2024-12-28 00:01:36 +00:00
ZeldaZach
3524231500
Allow Moderators/Admins to Grant Replay Access
- Only to themselves, at this time
- Automatically refreshes feed, no need to re-login
2024-12-27 18:32:39 -05:00
RickyRister
83db00d7a3
reduce vertical spacing in PrintingSelector (#5342) 2024-12-27 08:35:38 +00:00
ZeldaZach
7e9bd88eb4
Fix Shutdown Server 2024-12-27 01:38:21 -05:00
RickyRister
914002f846
use grid instead of FlowWidget for PrintingSelector display options (#5341)
* use grid instead of FlowWidget for PrintingSelector display options

* remove one level of nesting
2024-12-27 02:08:07 +00:00
Zach H
6dfd354973
Support starting games with fewer than max players (#5338) 2024-12-26 18:32:20 -05:00
RickyRister
de63066b0b
fix deck storage open deck not working at all when folder is in selection (#5333) 2024-12-26 00:25:30 -05:00
Zach H
c7ca55ceb5
Support Picking Select Art per Card Basis (#5329) 2024-12-25 23:12:06 -05:00
RickyRister
024bef7ded
add local rename button to replays tab (#5331) 2024-12-25 22:34:24 -05:00
RickyRister
ed907d7c6f
Support downloading replay folders (#5325)
* rename old get replay match method to get enclosing

* creat raw getReplayMatch method

* implement thing
2024-12-25 07:33:36 -05:00
RickyRister
4c3ceae0e4
open replays on double-click in replays tab (#5323) 2024-12-25 00:34:43 -05:00