mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Added 'export all card images' functionality
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@232 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -26,6 +26,13 @@ IMPLEMENT_REFLECTION_ENUM(CheckUpdates) {
|
||||
VALUE_N("never", CHECK_NEVER);
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION_ENUM(FilenameConflicts) {
|
||||
VALUE_N("keep old", CONFLICT_KEEP_OLD);
|
||||
VALUE_N("overwrite", CONFLICT_OVERWRITE);
|
||||
VALUE_N("number", CONFLICT_NUMBER);
|
||||
VALUE_N("number overwrite", CONFLICT_NUMBER_OVERWRITE);
|
||||
}
|
||||
|
||||
const int COLUMN_NOT_INITIALIZED = -100000;
|
||||
|
||||
ColumnSettings::ColumnSettings()
|
||||
@@ -43,6 +50,8 @@ IMPLEMENT_REFLECTION(ColumnSettings) {
|
||||
|
||||
GameSettings::GameSettings()
|
||||
: sort_cards_ascending(true)
|
||||
, images_export_filename(_("{card.name}.jpg"))
|
||||
, images_export_conflicts(CONFLICT_NUMBER_OVERWRITE)
|
||||
{}
|
||||
|
||||
IMPLEMENT_REFLECTION(GameSettings) {
|
||||
@@ -51,6 +60,8 @@ IMPLEMENT_REFLECTION(GameSettings) {
|
||||
REFLECT_N("cardlist columns", columns);
|
||||
REFLECT(sort_cards_by);
|
||||
REFLECT(sort_cards_ascending);
|
||||
REFLECT(images_export_filename);
|
||||
REFLECT(images_export_conflicts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,14 @@ enum CheckUpdates
|
||||
, CHECK_NEVER
|
||||
};
|
||||
|
||||
/// How to handle filename conflicts
|
||||
enum FilenameConflicts
|
||||
{ CONFLICT_KEEP_OLD // always keep old file
|
||||
, CONFLICT_OVERWRITE // always overwrite
|
||||
, CONFLICT_NUMBER // always add numbers ("file.1.something")
|
||||
, CONFLICT_NUMBER_OVERWRITE // only add numbers for conflicts inside a set, overwrite old stuff
|
||||
};
|
||||
|
||||
/// Settings of a single column in the card list
|
||||
class ColumnSettings {
|
||||
public:
|
||||
@@ -50,6 +58,8 @@ class GameSettings {
|
||||
map<String, ColumnSettings> columns;
|
||||
String sort_cards_by;
|
||||
bool sort_cards_ascending;
|
||||
String images_export_filename;
|
||||
FilenameConflicts images_export_conflicts;
|
||||
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
@@ -57,8 +57,9 @@ StatsCategory::StatsCategory(const StatsDimensionP& dim)
|
||||
{}
|
||||
|
||||
IMPLEMENT_REFLECTION_ENUM(GraphType) {
|
||||
VALUE_N("bar", GRAPH_TYPE_BAR);
|
||||
VALUE_N("pie", GRAPH_TYPE_PIE);
|
||||
VALUE_N("bar", GRAPH_TYPE_BAR);
|
||||
VALUE_N("pie", GRAPH_TYPE_PIE);
|
||||
VALUE_N("scatter", GRAPH_TYPE_SCATTER);
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(StatsCategory) {
|
||||
|
||||
@@ -42,6 +42,7 @@ class StatsDimension {
|
||||
enum GraphType
|
||||
{ GRAPH_TYPE_BAR
|
||||
, GRAPH_TYPE_PIE
|
||||
, GRAPH_TYPE_SCATTER
|
||||
};
|
||||
|
||||
/// A category for statistics
|
||||
|
||||
Reference in New Issue
Block a user