* protocol changes
* servatrice changes
* add new setting
* implement client side with static 4 phases
* reading the code explains the code
* add subphases to phase.cpp
* use new subphase definition
* Give settings managers default groups instead of manually specifying them everywhere.
Took 1 hour 2 minutes
Took 41 seconds
Took 32 seconds
Took 5 minutes
* Fix dbconverter mock.
Took 2 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Have CardDatabase::getPreferredPrintingInfo respect card provider ID overrides (pinned printings)
Took 13 minutes
Took 37 seconds
Took 10 seconds
Took 10 seconds
# Commit time for manual adjustment:
# Took 30 seconds
Took 15 seconds
Took 8 minutes
Took 21 seconds
* Move settings cache and settings card preference provider out of libcockatrice_settings and into cockatrice
Took 52 minutes
Took 9 minutes
Took 1 minute
* Temp cache.
Took 16 minutes
* Dependency Injection for SettingsCache
* Turn SettingsCache into a QSharedPointer.
* Implement interfaces for settings that need it
Took 2 hours 38 minutes
* Adjust oracle.
Took 5 minutes
* Move abstract/noop interfaces to libcockatrice_interfaces so they can be linked against independently.
Took 52 minutes
* Clean up some links.
Took 3 minutes
* Cleanup two includes.
Took 3 minutes
* More fixes.
Took 7 minutes
* More includes that slipped past.
Took 3 minutes
* Stop mocking and start injecting for tests.
Took 15 minutes
* I don't know why remote_client was including main.
Took 4 minutes
* Include.
Took 3 minutes
* Lint.
Took 2 minutes
* Don't use Qt pointers.
Took 1 hour 7 minutes
* Make parser use CardSettingsInterface
Took 13 minutes
* Also adjust constructor lol.
Took 8 minutes
* Lint.
Took 32 minutes
* Revert "Lint."
This reverts commit ecb596c39e.
Took 3 minutes
* Test.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Untangle the card_info.cpp mess and split into individual files.
Took 53 minutes
* Auto-lint was disabled and my pre-commit hook didn't fire. Oh well.
Took 3 minutes
* Fix oracle.
Took 35 seconds
* Lint!
Took 20 seconds
* Fix tests.
Took 3 minutes
* CMakeLists.txt: The reason why I have to disable auto-lint.
Took 2 minutes
* dbconverter.
Took 3 minutes
* Oracle again.
Took 3 minutes
* dbconverter again.
Took 3 minutes
* dbconverter again again.
Took 2 minutes
* More fixes.
Took 4 minutes
Took 21 seconds
* Everything needs everything.
Took 3 minutes
* Everything means everything.
Took 4 minutes
* All the tests.
Took 4 minutes
* I hate everything about this.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Simplify add card.
Took 25 minutes
Took 8 minutes
# Commit time for manual adjustment:
# Took 16 minutes
Took 7 seconds
* Refactor out db loading from card db.
Took 39 minutes
Took 9 minutes
Took 2 minutes
Took 17 seconds
* Refactor out db queries from card db.
Took 42 minutes
* Lint.
Took 3 minutes
* I guess.
Took 7 minutes
* Tests.
Took 15 minutes
* I don't understand this.
Took 9 minutes
* fix linker errors
* Rename to querier and promote to QObject
Took 39 minutes
* Lint.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* big move
* also move game_specific_terms
* fix imports
* alphabetize cmake
* fix build failure
* create database folder and move files into it
* fix includes
* run formatter
* Add option to share decklists on load.
Took 1 hour 58 minutes
Took 9 minutes
Took 39 minutes
* Lint.
Took 14 minutes
Took 2 minutes
* Stuffs
Took 39 minutes
Took 4 seconds
Took 43 minutes
* Process local player first.
Took 45 minutes
* Consider if the setting is set on the game info first.
Took 4 minutes
* Save an indent level.
Took 43 seconds
* Don't commit logging config.
Took 3 minutes
* Remove a debug print.
Took 10 seconds
Took 7 seconds
* Add another optional guard.
Took 5 minutes
* Hide the tab bar if only one (own deck) is visible.
Took 9 minutes
* Rename setting label for clarity
Took 2 minutes
* Capitalization.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Add the option to background the oracle wizard, add an option to automatically launch oracle wizard in background every X days since last launch.
* Mocks and a typo.
* Lint.
* Lint?
* qOverload the spinBox.
* Change to a prompt instead.
* An Label.
* Update window_main.cpp
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
* Add a new dialog that allows editing the default suggested tags.
* Lint.
* Actually hand linting, lol.
* Fix Build
* Add dialog.
* Use show() instead of exec(), properly size hint list item widgets.
* Fix... something to do with the build?
* Cast to abstract tab deck editor instead of regular.
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
* Implement a little "raise on enter" animation for deck preview widgets.
* Why does the linter need to be run twice?
* Fix build.
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* change settings entry of the cod conversion prompt to a combobox
replace the two checkboxes of which one state is ignored if one is
checked with a three state combobox for better user experience
* Update dlg_settings.cpp
---------
Co-authored-by: Zach H <zahalpern+github@gmail.com>
* fix: Use isRebalanced to detect Arena cards
In #5759 we introduced a setting (off by default) to disable the use of
Arena cards. This was done by checking the `isOnlineOnly` property of
the card, which accidentally also disabled online *printings* of cards
that otherwise exist in paper (e.g. Vintage Masters).
This PR does the same thing but uses the `isRebalanced` property
instead, which is `true` for Arena cards only and should have been used
from the start. This setting does not impact online-only printings such
as Vintage Masters. The settings is still on by default.
* Update setting to mention Alchemy rather than Arena
* Move show folders option next to the search bar.
* Add a new settings button and settings popup, move the folder visibility checkbox there and the ability to hide tags.
* Make popup not close when interacting with child widgets.
* Fix mocks.
* Include cog icon.
* Move PrintingSelector Display options to new quick settings widget.
* Adjust size before first show so as to not overflow.
* Add option to hide card size slider in VDS.
* Qt5 support.
* Fix some warnings by containerizing layouts because addChildLayout is silly.
* Fix an incorrect slot/signal assignment.
* Correct sub-categories for settings to persist them.
* Shuffle some slots and signals around to distinguish between the tag filter and the tags on the deck preview widgets.
* Add a quick setting to draw unused color identities and center them.
* Respect the setting on startup.
* Move card size slider to the quick settings menu.
* Move PrintingSelector card size slider to quick menu, adjust other layout from other options.
* Improve layout, add a gray border.
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Add a dialog to prompt user to convert to .cod format if trying to apply tags to a .txt deck.
* Lint mocks.
* Address comments, move dialog to appropriate folder.
* Unlint.
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* 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>
* 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>
* Fix the image shrinking due to repeated scaling and FP precision loss.
* Add a setting for auto-rotating sideways layout cards.
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Have the server respect gameType info when setting up zones.
* ServerPlayer::setupZones is now passed the room->getGameTypes();
* ServerPlayer::setupZones now checks if the GameType String includes "Commander" and then sets the life total to 40 instead.
* Formatting.
* Remove debug logging imports.
* Move game option value declarations to dlg_create_game.
* Lint.
* Fix mocks.
* Add a default for backwards compatibility.
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Squashed Commits
Lint things.
Set focus back to deckView after selecting a card to enable keyboard navigation.
Bump scrollbar to top when selecting a new card.
Update card info on hover.
Layout cleanups
Add +- to buttons.
Merge buttons into card picture.
Cleanup size, min 2 cards by default in rows
Support layout settings config and set min to 525 so two cols are visible by default for printings, when opened
Move Printing Selector to before Deck, and visible true
Null safety for setCard.
Turn down the dropshadow a little.
Make PrintingSelector dockable, don't duplicate sets when bumping them to the front of the list.
When swapping cards between mainboard and sideboard, use preferred printing if no uuid is available (i.e. null).
Reorder includes...
Unwonk an include.
Give the card widget a snazzy drop shadow, appease the linter gods.
Handle jumping between segments
Remember scale factor when initializing new widgets.
Cleanup
Select Card works (Not M->SB tho)
Resize word-wrapped label properly.
Fix the layouting, mostly.
remove tx
Build Fix
Squashed Commits
Load and store redirects properly.
Layouting is fun :)
* Group PrintingSelectorCardDisplayWidgets into distinct containers for alignment purposes.
Override resizeEvent() properly.
Word wrap properly.
Keep widget sizes uniform for aesthetic reasons (grid pattern).
Label stuff, center card picture widget, allow cardSizeSlider to scale down.
Replace cards which have no uuid in the decklist when first selecting a printing.
Add buttons for previous and next card in DeckList.
Add a card size slider.
Move sort options initialization to implementation file.
Explicitly nullptr the parent for the PrintingSelector.
Address PR comments (minor cleanups).
Hook up to the rows removed signal to update card counts properly.
Include QDebug.
Add labels to the mainboard/sideboard button boxes.
Implement a search bar.
Expand node recursively when we add a new card.
Only create image widgets for the printing selector if it is visible in order to not slow down image loading.
Minor Tweaks
Invert decklist export logic to write out setName, collectorNumber, providerId value if it is NOT empty.
Linting.
Update CardCounts properly, update PrintingSelector on Database selection.
Initialize sideboard card count label properly.
Split mainboard/sideboard display and increment/decrement buttons.
Add button to sort all sortOptions by ascending or descending order.
Add option to sort by release date in ascending or descending order.
Add PrintingSelector to database view.
Display placeholder image before loading.
Fix deckEditor crash on mainboard/sideboard swap by correcting column index to providerId instead of shortName.
Include currentZoneName, fix the column when updating from DeckView indexChanged to be UUID and not setShortName so cards are properly fetched again.
The most minor linter change you've ever seen.
Null checks are important.
Linter again.
Linter and refactor to providerId.
Sort properly, (We don't need a map, we need a list, a map won't be ordered right [i.e. 1, 10, 11, 2, 3, 4, ..., 9])
Sort alphabetically or by preference.
Hook printingSelector up to the CardInfoFrameWidget.
Allow info from CardFrame to be retrieved, properly initialize PrintingSelector again.
Refactors to reflect CardInfoPicture becoming CardInfoPictureWidget.
Make PrintingSelector re-usable by introducing setCard().
Make PrintingSelector use the CardFrame, not the database index.
Add a new selector widget for printings.
* Support multiple <set> tags per card within the database
This will allow us to show off all different printings for cards that might appear multiple times in a set (alt arts, Secret Lairs, etc.)
* Support Flip Cards with related art
* Minor Cleanup
* Minor Cleanup
* Release Date DESC default
* Load widgets in batches.
* Refactor local batch variables to be class variables/defines.
* Clear timer on updateDisplay.
* Fix Timer & Builds on Qt5
* Not Override
* Yes Override
* Yes Override
* Lint
* Can't override in function definition.
* Resize setName to picture width on initialization.
Also add a new signal to card_info_picture_widget to emit when the scale factor changes.
Hook this up to the setName resizing method to ensure card size updates trigger it appropriately after initialization.
Clean up unused enter and resize methods that just delegated to base-class.
* Add ability to force preferred set art to be loaded for every card.
* Show related cards from printing selector by right-clicking card image.
* fix build
* Fix UST cards
* Inc QDebug
* Fix Qt5 Builds
* Fix Qt5 Builds
* Fix Qt5 Builds
* Fix Qt5 Builds
* Fix Qt5 Builds
* Fix cards being able to jump between side and mainboard
* Don't hide PrintingSelector button widgets if the deck contains a card from the set.
* Update PrintingSelector properly on DeckListModel::dataChanged
* Add option to disable bumping sets to the front of the list if the deck contains cards from the set.
* Linter behave.
* Linter behave.
* Fix mocks.
* Fix cards without providerIds being counted for all cards.
* Flip preference sort so descending means "Most to least preferred".
* Set the index correctly when removing a non-providerId printing for a providerId printing to avoid jumping to the next card.
* Move the "Next/Previous" card buttons to their own widget.
* Move the card size slider to its own widget.
* Lint the makelist.
* Linter
* Crash fix
* Move the sorting options to their own widget.
* Move the search bar to its own widget.
* Minor cleanup
* Minor cleanup
* Minor cleanup
* Only overwrite card in deck if UUID _and_ Number missing
* Adjust font size when adjusting card size.
* Clean up some imports.
* Pivot to a view options toolbar.
* Persist sort options and change default to 'preference'.
* Lint.
* Remember how many cards were originally in deck when replacing with uuid version.
* Relabel buttons for clarity.
* Fix tests.
* Fix tests properly.
* Fix dbconverter mock.
* Try to wrangle font sizes.
* Update mainboard/sideboard labels correctly.
* Initialize button sizes correctly.
* Label texts are supposed to be white.
* Adjust another deckModel->findCard call to include number parameter.
* Style buttons again.
* Negative currentSize means we don't render the widget yet, return a default value.
* Clean up debug statements.
* Boop the mainboard/sideboard label and the cardCount after a little bit of delay to make sure they initialize at the right size.
* Persist card size slider selection in SettingsCache.
* Good Lint Inc.
* updateCardCount to get white color in initializer
* Make the view display options functional.
* Comment ALL the things.
* Lint the things.
* Brief accidentally nuked some constants.
* Proper Qt slot for checkboxes.
* Don't use timers, Qt provides ShowEvent for anything necessary before the widget is shown.
* Cleanup from Reading
* Cleanup Lints
* Minor
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach Halpern <zahalpern+github@gmail.com>
* play action now applies to all selected cards
* check card zone before applying action
* fix bug with wonky play from deck
* refactor
* don't play card if it's already on table
* add new setting
* make actPlay and friends public
* implement thing
* refactor card_item
* update settingsCache
* implement thing
* add new setting to window
* rename setting
* make it compile on qt5
* fix typo
* somehow changing the order here fixes a bug?
The loaded value was getting clamped to 99