Commit graph

13 commits

Author SHA1 Message Date
ctrlaltca
b29bd9e070
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
2018-01-27 10:41:32 +01:00
Zach H
dcc632e0d4
Fix a crash (#3011) 2018-01-18 11:53:57 -05:00
ctrlaltca
8ad448a23c fix #2600 (#2638) 2017-04-25 00:29:32 -04: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
Fabio Bas
4d7795ca3a Split pictuloader out of carddatabase 2015-12-26 16:40:17 +01:00
Zach
d5adec53a2 Revert "Reimplemented PictureLoader as a singleton" 2015-09-23 03:17:33 -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
marco
e9e75961f4 Redesigning deck editor to work with docks
Moved setting files & Added code for a future portable build
2015-08-07 23:44:40 +02:00
Fabio Bas
d6ce1852a1 Fix deckeditor jitter problem; fix #1143 2015-06-18 23:13:12 +02:00
Fabio Bas
3af5804073 Reworked deck editor 2015-06-13 20:37:51 +02:00
Fabio Bas
f88621fd97 Use QPixmapCache for card images
Drop CardInfo’s own pixmap caches; use QPixmapCache instead.
Use QPixmap references instead of pointers.
Being stored in QPixmapCache, all card images are now subjected to
QPixmapCache’s size limit
2014-12-24 16:18:55 +01:00
sylvanbasilisk
cd4d04be3e change tabs into 4 spaces in new files 2014-03-25 02:29:45 +00:00
sylvanbasilisk
f77054f20d refactor cardframe as a parent of a text card frame and a picture card frame
cardframe is now a stacked widget that prefers to show the card picture
only so that the screen can be more space efficient and the card pixel
map can be displayed as a larger size. however if the card pixel map
can not be loaded for some reason, the cardframe class will automatically
switch to the text version of the card.

a menu item was added under the database menu to allow for users to
prefer card text only.
2014-01-29 00:19:34 +00:00