Commit graph

2400 commits

Author SHA1 Message Date
ebbit1q
75203cf385 add reset power and toughness option #3402 (#3412)
* add reset power and toughness function on cards

Add actResetPT to set the power and toughness in the same way as
actSetPT but instead of prompting the user it will fetch the original
pt from the card info for each card.
Add the new command to the card rmb list, keybinds and settings.

* changed style to .clang-format

Please change the contributing guidelines to use this style instead.
2018-10-20 23:33:35 -04:00
Henry Lancelle
cf9fdcd09e Translate curly apostrophe to ASCII apostrophe (#3395) (#3401)
* Translate curly apostrophe to ASCII apostrophe (#3395)

Treats the curly apostrophe as a straight apostrophe when searching in
the deck editor search bar.

* Moved logic for handeling translation to CardDatabaseDisplayModel.

This implementation was done with strings instead of characters because
the curly apostrophes and quotes are considered multi-characters.
Thus, the method of iterating through the string and replacing
the characters with the proper translations was difficult to cleanly
implement.

* clang-tidy modifications

* Implemented faster algorithm for string translation.

Optimized the algorithm for string translation, before it would compute
in O(N*M) time where N is the size of the string and M is the size of
the translation table.  Now it will compute in O(N) time where N is the
length of the string.

* Renaming variables and methods.

* Fixed character literal type, was unicode, is now wide.
2018-10-03 09:15:02 +02:00
Lee Tran
eb4b1e74f1 Disable saving of decks when the deck is empty (#3384)
* Disable saving of decks when the deck is empty

* Replace tabs with spaces to conform with coding conventions

* Remove whitespace at end of line to satisfy the CI robot overlords

* Improve logic to check if deck is empty, fix functionality when a deck is loaded

* Fix code style issues

* Disable more menus when the deck is empty

* Streamline code for disabling save menus when the deck is empty

* Fix save-disabling when loading a deck from the clipboard

* Enable saving deck directly after loading deck
2018-09-21 10:46:31 -04:00
Lee Tran
70005a6f1d Enable the creation and using of shortcuts to move cards from the top of the library to play face down. (#3388) 2018-09-07 09:14:34 +02:00
Alessandro Marzialetti
c58abadff1 fix: cockatrice quits properly when the window is closed (#3329) 2018-08-27 15:01:53 +02:00
Andrew Zwicky
ed01752cb4 [WIP] Card image loading: Fallback on 404 (#3367)
* 2479: Running clang-format

Reformatting files to be in line with style guidelines.

* 2479: Updates to remove set/url indices

This change removes set and Url indices in favor
of check for empty lists and removing items from them
instead.

* 2479: TransformUrl will now error on missing fields

If transformUrl is called with a template, and the card/set
is missing something required by that template, it will now
return an empty string, instead of the template with an empty
string substituted in.

* 2479: clang-format updates

* 2479: Fixing omission of ! from two properties

* 2479: Adding prefix on debug messages

Adding PictureLoader: to the front of each debug message
from this file, so that it can be more easily filtered out
by grep in the log of a running application.

* 2479: Remove outdated comment

* 2479: Remove unused method from intermediate work

* 2479: Updating QDebug messages to be more consistent

* 2479: clang-format updates

* 2479: Remove repeated code, replace with call to nextUrl

This removes some redundant code that is better replaced with a call
to nextUrl, in case the code needed to populate the nextUrl changes
significantly.

* 2479: Adding more detailed comments

* 2479: Refactor transformUrl

Refactor transformUrl to do everything in a single loop instead
of two almost identical loops.  set information is populated if
present, but is added with empty strings if absent.
2018-08-22 09:52:38 +02:00
Zach H
e341337ce0
Revert "[WIP] Fallback on 404" (#3364) 2018-08-11 09:06:18 -04:00
Andrew Zwicky
cbd430555f 2479: Working Url traversal
Url checking is now working as expected.  In set order,
starting with custom sets, then going in priority
order by url template order, Urls will checked, and the
first successful one will be used.
2018-08-09 23:50:01 -05:00
Andrew Zwicky
8239539946 2479:
Initial work on downloading cards through fallback URLs.

This change will add in the ability to proceed to the next URL
should the first one fail.  First trial shows that it's working,
but needs more refinement.
2018-08-08 22:42:22 -05:00
Andrew Zwicky
e467698d72 2497: Forgot to check in .h file 2018-08-05 17:43:28 -05:00
Andrew Zwicky
846b426a7c 2497: Start to implement fallback on card image urls
Return a list instead of a single url.  This is the start
of getting many possible urls instead of one.  Functionally
identical except that the primary url will be attempted for
cards without a muid.
2018-08-05 16:21:53 -05:00
tooomm
f1eab4e26a remove unused beta file endings (#3338) 2018-08-02 21:31:32 +02:00
David Szabo
283ce23111 Manage sets window: "Enable all/selected" button toggling never disabled (#3337)
## Related Ticket(s)
- Fixes #3314 

## Short roundup of the initial problem
When the view was sorted in the manage sets window, the "Enable/Disable All" buttons never toggled to "Enable/Disable selected" buttons, even when more sets were selected.

## What will change with this Pull Request?
- Selected sets can be enabled/disabled in sorted view as well
2018-07-25 14:39:42 +02:00
tooomm
451e1874a7 UI dialog tweaks: filter + create game(s) (#3351)
* vbox --> grid layout
2018-07-25 08:21:29 +02:00
tooomm
69c103ede3
missing features dlg: better update hint (#3352)
## Short roundup of the initial problem
People missed the hint on how to resolve missing features on their own, because update hint was hidden behind the `Show details` label.

## What will change with this Pull Request?
- Update hint is more prominently placed and not hidden behind a label
- It's translatable now
- Wording update to reflect UI change

## Screenshots
<!-- simply drag & drop image files directly into this description! -->
- before
![missing_features](https://user-images.githubusercontent.com/9874850/43153756-74cfd9f0-8f72-11e8-9e0f-fbf47b13f324.png)
- after
![missing_features_new](https://user-images.githubusercontent.com/9874850/43153761-78bec4e0-8f72-11e8-9853-ccc1ecb7f558.png)
2018-07-24 21:05:42 +02:00
Zach H
aa308717de
translation pulls (#3335) 2018-07-17 20:19:40 -04:00
tooomm
cba1ca8d5b remove Qt guards (#3328)
* remove version guards

* clangify

* [skip ci] README wording

* add cmake requirement to readme

* remove return

* remove min req from README
2018-07-17 20:08:42 -04:00
tooomm
4796110afb updates (#3311) 2018-06-29 16:06:55 -04:00
David Szabo
87eb132af1 Tips close with the main window (#3305)
* tips close with main window

* null verification added
2018-06-24 19:37:30 -04:00
ctrlaltca
2354a6f89d Fix cards loading bug (#3307) 2018-06-24 17:49:26 -04:00
ctrlaltca
e223f07462 fix #3235 (#3302) 2018-06-21 18:56:53 -04:00
ctrlaltca
f70e87c5a0
Fix #3285 (#3299) 2018-06-19 22:55:01 +02:00
ctrlaltca
0b3e86e307 Fix "reinstall" button in updater, fix #3293 (#3297) 2018-06-19 19:57:44 +02:00
ctrlaltca
a5ea4f7da2 Add ability to edit chat macros, Fix #3296 (#3298) 2018-06-19 19:15:13 +02:00
Zach H
c7072cd543
translations push (#3291) 2018-06-17 18:23:05 -04:00
Zach H
5e0bfc3193
translations (#3290) 2018-06-17 18:13:02 -04:00
tooomm
b316a5d541 new icons (#3289) 2018-06-17 18:09:58 -04:00
David Szabo
d36f86c523 Duplicate cards & empty setlist (#3283)
* Card duplicates handled

* clangify

* kinda works, some cards are still duplicated

* separate card entries grouped together

* clangify
2018-06-16 22:42:22 -04:00
David Szabo
81803e2612 Search in "Manage sets" window (#3229)
* search field added; sortfilterproxy displayed in treeview

* searching works properly

* moving with filter on works; view isnt't updated yet

* clangify & view updating figured out

* moving disabled when sorting is active

* drag&drop disabled when view sorted

* clangified

* foreach replaced

* button rename & SORT_RESET defined

* changed variable names

* 'x' button added & searchlabel text modified

* 'enabled' column won't grow anymore

* column resize improvement

* button hint & restore original order added

* moving with filter on works; view isnt't updated yet

* sort disable build in column headers (3 clicks)

* codacy fix

* typo + wording

* background color for warning

* buttons moved down a bit

* clicking "default order" button will hide the warning text
2018-06-10 11:00:42 -04:00
Bers
91b3c7343d fixed 2 warning-errors on archlinux(gcc 8.1): implicit fallthrough, ignored qualifiers (#3270) 2018-06-09 10:28:17 +02:00
tooomm
494dfc2f4b actCancel remove (#3261) 2018-05-25 21:59:52 -04:00
tooomm
3a05d063af connect dialog: button reworks (#3243) 2018-05-25 21:59:42 -04:00
ctrlaltca
f97959febc
fix #3257 (#3258) 2018-05-24 15:46:02 +02:00
David Szabo
b3df71ae41 0 values in power/toughness filters won't match non-zero values anymore (#3250)
## Related Ticket(s)
- Fixes #3212 

## What will change with this Pull Request?
- `0` input on power/toughness filters will only return `0` values
- `relationCheck` method will only get called after simple string comparison failed
- due to their similar structure `acceptPower` and `acceptToughness` methods has been merged
2018-05-24 00:18:53 +02:00
tooomm
ec4a99e47b
remove empty languages (#3253)
## What will change with this Pull Request?
- cleanup of empty and unused languages files (catalan, lithuanian, hebrew, ukrainian)
- reflect language removing on transifex
2018-05-23 10:32:41 +02:00
Bers
3b3f5a639c Hide non-existent card values in infowidget and cardframe (#3239) 2018-05-15 01:53:53 -04:00
tooomm
9acf606e93 settings dialog: fewer space (#3245) 2018-05-15 01:53:01 -04:00
ctrlaltca
c06fc562a1
Cmake scripts refactoring; fix #3225 (#3230)
* fix #3225

* Servatrice: use websockets as an optional component (for qt < 5.3)

* Attempt++
2018-05-12 23:28:22 +02:00
tooomm
4e10ce7473 smaller clear pic button (#3220) 2018-05-04 03:48:53 -04:00
ctrlaltca
a7f4aace9c Extract the xml parser from carddatabase (#3223) 2018-05-04 03:46:08 -04:00
tooomm
661e00f563 log cleanup (#3207) 2018-05-02 16:07:43 -04:00
ctrlaltca
2780270911 macOS: fix qt plugin installation (#3216)
* Osx: fix qt plugin installation

* Add make install step to travis debug build

* only install under osx

* Add "styles" plugins (for native look'n'feel)

* Osx: upgrade qt from 5.5 to current (5.10.1)

* Fix osx on travis

The qt homebrew formula now installs three qt* symlinks (qt, qt5, qt5@5.x) so we can't use/don't need bash globbing anymore
2018-05-02 15:57:35 -04:00
tooomm
8a5baa4637 connect dialog tweaks (#3211) 2018-04-23 14:30:46 -04:00
David Szabo
67a2a8cf08 datetime display fixed for OSs with non-English localization (#3204) 2018-04-16 20:07:30 -04:00
Zach H
1fbdea0f35
translation updates (#3200) 2018-04-16 02:42:58 -04:00
David Szabo
cc2a0fa0d0 server site added to connect window (#3190) 2018-04-10 19:05:13 -04:00
Zach H
61e509585f
Server List from JSON (#3165) 2018-04-09 22:38:21 -04:00
tooomm
0c10b66a2d prettify spoiler settings (#3180) 2018-04-09 17:15:37 -04:00
tooomm
a056a882c3 flip rename (client side) (#3149) 2018-04-05 22:42:54 -04:00
tooomm
e25b7e9eb8 button label wording (#3168) 2018-04-04 04:45:28 -04:00