Commit graph

133 commits

Author SHA1 Message Date
Xenos6666
63b4f9b2f0
Add keyboard shorcuts to focus and unfocus chat (#3898)
* Added keyboard shorcuts to focus and unfocus chat

* Fixed format

* Changed the Esc behavior to work on any QLineEdit in the main Window and ignore shortcut conflicts

* Fixed a conflict with shortcuts

* Configurable unfocus shortcut and format fixes

* minor style fix
2020-03-16 21:48:05 -04:00
ctrlaltca
7c3cc527f6
fix windows style (#3739) 2019-06-01 16:08:44 +02:00
ctrlaltca
389f7fdc25
Shortcuts preference pane (#3641)
* Shortcuts preference pane

* Honor and glory to the hypnoclangifier

* clanfigy: exclude deleted files from being checked

* keep the olf translation context to be able to reuse old translations

* Fix gcc; extract translations

* Moved generic buttons after the groupbox

* Update current item on "clear/reset all"

* Sequenceedit: make buttons larger and translatable, add text

* Event filter

* Don't filter arrow keys; added placeholder text

* group counters
2019-03-10 21:49:33 +01:00
Rob Blanckaert
eb60fec8e2 Filter Strings for Deck Editor search (#3582)
* Add MagicCards.info like fitler parser.

* Use FilterString whenever one of [:=<>] is in the edit box.

* Opts

* Opt

* - Capture errors
- Allow querying any property by full name

* clang format

* Update cockatrice/src/filter_string.cpp

Co-Authored-By: basicer <basicer@basicer.com>

* - Some refactoring for clarity
- More filters
- Add filter help

* Clangify

* Add icon

* Fix test name

* Remove stay debug

* - Add Rarity filter
- Make " trigger filter string mode

* You have to pass both filter types

* clangify

* - Allow filtering by legality
- Import legality into card.xml

* Add format filter to filtertree

* More color search options

* RIP extended

* More fixes

* Fix c:m

* set syntax help parent

* Fix warning

* add additional explanations to syntax help

* Allow multiple ands/ors to be chained

* Cleanup and refactor

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Move utility into guards

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* I heard you like refactors so I put a refactor inside your refactor (#3594)

* I heard you like refactors so I put a refactor inside your refactor

so you can refactor while you refactor

* clangify

* Update tab_deck_editor.h
2019-03-01 14:30:32 -05:00
Rob Blanckaert
9a8c81cf5e Client Websockets (#3545)
* Websockets

* Add setting to get websocket IP from header

* Add QT version guard

* Minor cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* - Make QWebSocket required
- Remove QWEBSOCEKT_LIB guards
- Only TCP on port 4747
- Fix peerName lookup

* fix check

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Update CMakeLists.txt

* Update CMakeLists.txt
2019-02-03 11:43:22 +01:00
ctrlaltca
ed70099e36 Rework of the card database, xml format and oracle parser (#3511)
* CardDB: merge all card properties in a new structure

* Pre Json parser changes

 * Cockatrice: use qt's builtin json support
 * Move qt-json src dir from cockatrice to oracle
 * Add dummy cockatricexml4 parser (yet to be implemented)

* Implement a new parser and xml format

 * cockatricexml4: new xml parser following the "generic properties hash" pattern;
 * oracleimporter: refactor the parsing code to better adapt to cockatricexml4; rewrote split cards parsing
 * carddb: change "colors" from a stringlist to a string
 * carddb: move the getMainCardType() method to the cockatricexml3 parser
 *

* CardInfo: show all properties (stil missing: nice name + translation)

* Rework the "add related card" feature so that it doesn't change the card name in the carddb

Also, fix token count display

* Picture loader: Added support for transform cards

* Fix side information for flip cards

Mtgjson uses side a/b for flip cards, while scryfall doesn't

* Pictureloader: dynamic tag resolution from card properties

Examples old => new
* !cardid! => !set:muid!
* !uuid!   => !set:uuid!
* !collectornumber! => !set:num!
New examples:
 * !prop:type!
 * !prop:manacost!

* Start moving mtg-related property names to a specific file

* Clangify

* Fix tests

* Make gcc an happy puppy

* Revert "Make gcc an happy puppy"

This reverts commit 446ec5f27516c4d3b32dbfc79557f4827c5c5bdf.

* Some gcc fixes

* Share set list between different db parsers, so they won't overwrite one each other

* All glory to the hypnoclangifier!

* Fix test compilation

* Cleanup edited files in the prior PR. (#3519)

* Cleanup edited files in the prior PR.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Fix includes

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Update carddatabase.h
2019-01-23 18:17:10 -05:00
Zach H
b0e643ecc0
Several download URLs have arrived! (#3494)
* Cockatrice Picture loader uses better defined URLs now
URLs are defined on the Card Management tab
Instead of Primary/Backup, you can now define a list of URLs
List of URLs can be drag/dropped for priority ordering
Oracle now uses scryfallId > mtgjsonUUID for !uuid!

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Simplify to QStringList and remove metacall

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* fix issues brought up by Dae. Also fix how the defaults load to account for first time users.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* clangify

* Fix save settings on row moved (#3495)

* merge model fix, and reclangify

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Sources > Resources

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-01-08 15:18:06 -05:00
ctrlaltca
65f41e520e [WIP] Basic mtgjsonv4 support (#3458)
* Basic mtgjsonv4 support

* Fix set type

* [WIP] Oracle: use zx instead of zip

* clanfigy fixes

* Fix reading last block of xz

* Added back zip support

* [WIP] adding xz on ci + fixes

* typo

* resolve conflict

* Make gcc an happy puppy

* test appveyor build

* appveyor maybe

* Appveyor: add  xz bindir

* Update ssl version (the old one is not available anymore)

* Windows is a really shitty platform to code on.

* test vcpkg

* again

* gosh

* nowarn

* warning 2

* static

* Maybe

* cmake fix

* fsck this pain

* FindWin32SslRuntime: add vcpkg path

* Appveyor: cache support, force usable of openssl from vcpkg

* updated as suggested

* ouch

* Import card uuids and expose this property as !uuid! for card image download

* Minor style fixes

* address changed URL
2018-12-20 18:05:03 -05:00
ctrlaltca
e223f07462 fix #3235 (#3302) 2018-06-21 18:56:53 -04:00
ctrlaltca
f97959febc
fix #3257 (#3258) 2018-05-24 15:46:02 +02: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
ctrlaltca
a7f4aace9c Extract the xml parser from carddatabase (#3223) 2018-05-04 03:46:08 -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
Zach H
61e509585f
Server List from JSON (#3165) 2018-04-09 22:38:21 -04:00
David Szabo
312caae062 Tip of the Day (#3118)
* Basic tip of the day with sample widget added

* "Show tips on startup" option added to settings

* tip cycling implemented

* Structure of the tipOfTheDay class and resource created

* tip getter function modified

* Resources added, feature works properly

* clangified

* accidental modification rolled back

* zach cleanup

* tips to spaces; cmake list combined

* cleanup img

* fix copy

* remove TOTD as QObject so we can copy construct it

* prevent mem leaks in dlg

* changed order of 'next' and 'previous' buttons

* Date and tip numbers added; content wraps around

* useless sizepolicy removed

* link support added & clangified

* Initial tips & memory management updates
2018-03-02 03:11:18 -05:00
Zach H
d19744236e
Automatic Spoiler Season (#2991)
* oracle now can be run in spoiler or normal mode

* tests for travis

* only run on relaunch

* spoilers in client (not oracle now) and tray icon shows when done

* spoiler status will be checked before downloading spoiler file

* only download if they care about spoilers

* reload db on spoiler download

* manual update button, code cleanup, and fix enabling sets when new

* cleanup, nullchecks, and fixes to spoiler

* reload DB even if not in spoiler season; necessary as we have a check elsewhere to prevent the reload if spoiler check happens

* Implement changes from 2991#issuecomment-356169374

* Change implicit nullptrs, alert on file deletion, minor changes

* make reload thread safe and minor changes from 2991#issuecomment-356450302

* Fix locking

* Disable update now button while process running
2018-01-10 13:27:43 -05:00
ctrlaltca
ccee0aa3fd Cmake: remove old unneeded POLICIES (fix Appveyor) (#2859) 2017-09-22 17:47:05 +02:00
ctrlaltca
1366e5970e Portable mode for windows (#2794)
* Portable mode for windows

* fix start menu in portable mode

* Make gcc an happy puppy

* Clean old installation if we are installing over an old portable mode installation

* Default to Desktop\CockatricePortable

* Settings dialog fixes

* wording
2017-07-08 11:22:29 +02:00
Zach H
16bc8b764b remove all of pricing 2017-05-04 23:29:43 -04:00
Gavin Bisesi
d65a444ac5 Remove direct usages of TabSupervisor from Chatview
- There still might be inherited usages
- It's still used in the ctor

Areas to test
- Mentions
- Chat notifications
- Username clickable links
2017-03-22 20:44:05 -04:00
Zach H
4cfcca33db Server Connect Remade (#2452)
* Save multiple server configurations
* Each server has its own password/port storage

Close #2452
2017-03-14 17:51:51 -04:00
ctrlaltca
7373819c32 Add release channels for autoupdater (#2362)
Fetch releases from github and find corresponding installers on bintray
2017-03-01 09:43:09 +01:00
Zach H
47cafde521 fix lowercase (#2419)
* fix lowercase

* fix changes

* fix .desktop

* servatrice .desktop
2017-02-23 08:53:18 +01:00
woogerboy21
0cfa6863d5 Simpler forgot password functionality (#2393)
* Simpler forgot password functionality (Server/Client)
2017-02-15 17:41:40 -05:00
ctrlaltca
c3ef53d6fd Removed unused class (#2222) 2016-10-18 14:34:11 +02:00
ctrlaltca
7f28a7e844 Fix #601; Fix #725 (#2126)
Analyze deck on tappedout
Fix small bug in deckstats interface
2016-09-02 01:34:56 -04:00
Fabio Bas
8db10be892 Log UI 2016-06-27 22:18:39 +02:00
Fabio Bas
1bc56e1c86 Fix some translation issues
Fix #2010
2016-06-15 22:17:31 +02:00
Fabio Bas
bb5292aa8d Drop Qt4, libgcrypt, qtmobility dependencies 2016-05-11 12:45:58 +02:00
Fabio Bas
a55b3784eb cmake: Enable c++11 for all targets 2016-03-21 11:42:38 +01:00
Fabio Bas
1e3fb6c6e1 Rework "paths" settings loading and card database loading
* main.cpp: removed path checking and db loading
 * card database: merge card loading methods into a single one
 * settings cache: take care of returning safe paths for decks,
replays, etc..
 * main window: if db loading fails (eg. first run), propose to run
oracle

NSIS: propose to run cockatrice instead of oracle

Rework card database loading

 * Move carddatabase-related method out of deckeditor tab
 * Load cards in another thread and render them progressively
 * Optimize database reload after enabled sets change

Fix deck editor column width

 * removed the noCard hack.
 * getCard() no more creates cards instead of just returning existing
ones
 * Fix the “edit tokens” dialog.
 * PictureLoader: avoid trying to download twice the same card
 * PictureLoader: correct return of card background
 * AbstractCardItem: avoid recalculating card color at every paint

Use a different file to save custom tokens

Misc required improvements

 * Use nullptr;
 * Refactor CardInfoWidget to use CardInfoPicture and CardInfoText
instead of duplicating code;
 * Added CardInfo::getColorChar()
 * Fixed some potential crashes
 * removed dead code related to CardInfoWidget
 * Don't require a restart after adding a new custom sets file
 * Bump CMake requirements to 3.1
2016-03-15 22:27:55 +01:00
ctrlaltca
b2c1ae264b Merge pull request #1832 from tooomm/restructure
move sounds+themes folder inside cockatrice
2016-02-24 21:38:09 +01:00
tooomm
754e666eaa updated to new folder locations
- `sounds` and `themes` moved into `cockatrice/`

moved subdirectory reference
`/cmakelists` to `/cockatrice/cmakelists`
2016-02-24 15:41:04 +01:00
Ira Aspen
5a975831d4 Renamed "dlg_add_set.*" to "dlg_add_set_result.*" and updated references. 2016-02-09 01:40:21 +00:00
Ira Aspen
54a759497f Added confirmation dialogue when set added. 2016-02-06 02:29:09 +00:00
Michael Milton
66fda086c3 Client update implementation 2016-01-20 22:26:17 +01:00
Fabio Bas
4d7795ca3a Split pictuloader out of carddatabase 2015-12-26 16:40:17 +01:00
Fabio Bas
bab4a51ebb CPack: Debian package 2015-10-13 22:16:00 +02:00
Fabio Bas
7fe60279de Fix PR #1600 2015-10-09 14:59:42 +02:00
Gavin Bisesi
3ebe42c400 Add dummy googletest
Uses the built in cmake -Dtest=ON

It should download googletest on the fly if needed.

Adds a new make target, `make test`

Ref #167
2015-10-09 14:58:46 +02:00
Fabio Bas
74c58cc2b0 fix qt libraries bundling on osx
fix #1547
2015-10-01 23:35:54 +02:00
Zach
d5adec53a2 Revert "Reimplemented PictureLoader as a singleton" 2015-09-23 03:17:33 -04:00
Zach
064c89ba5c Merge pull request #1556 from ctrlaltca/carddatabase_changes
Reimplemented PictureLoader as a singleton
2015-09-23 01:21:37 -04:00
woogerboy21
62ffcde6bd Added logs tab to allow moderators the ability to review log history/details 2015-09-23 00:50:01 -04:00
Fabio Bas
f6c7f3355f Reimplemented PictureLoader as a singleton
* Removed remaining picture handling from card database and cardinfo
 * removed the “noCard object” hack
2015-09-22 23:09:53 +02:00
Fabio Bas
5aaae5279c revert to using QAudioOutput 2015-09-13 19:37:49 +02:00
Zach
226a8cc017 Merge pull request #1498 from ctrlaltca/sound_whatever
Reworked SoundEngine overhaul
2015-09-12 00:35:20 -04:00
Fabio Bas
0b072e2d60 Remove dependency to qt multimedia/mobility under qt4 and unused phonon plugins 2015-09-11 00:42:37 +02:00
woogerboy21
90cb890cc2 Added the ability or moderation staff to request user ban history 2015-09-10 16:02:45 -04:00
marco
baa61d0571 Merge branch 'master' into Refactor-settings
Conflicts:
	oracle/CMakeLists.txt
2015-09-01 21:28:53 +02:00