Implemented NewSetWindow, added events to GalleryList

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@48 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-20 20:02:30 +00:00
parent 77d255ee8e
commit 46cf4dbb64
17 changed files with 259 additions and 25 deletions
+7 -1
View File
@@ -8,17 +8,23 @@
#include <data/set.hpp>
#include <data/game.hpp>
#include <data/stylesheet.hpp>
#include <data/card.hpp>
#include <data/field.hpp>
#include <script/value.hpp>
// ----------------------------------------------------------------------------- : Set
Set::Set() {}
Set::Set(const GameP& game)
: game(game)
{}
Set::Set() {}
Set::Set(const StyleSheetP& stylesheet)
: stylesheet(stylesheet)
, game(stylesheet->game)
{}
String Set::typeName() const { return _("set"); }
+4 -2
View File
@@ -17,7 +17,7 @@
DECLARE_POINTER_TYPE(Card);
DECLARE_POINTER_TYPE(Set);
DECLARE_POINTER_TYPE(Game);
DECLARE_POINTER_TYPE(Stylesheet);
DECLARE_POINTER_TYPE(StyleSheet);
DECLARE_POINTER_TYPE(Field);
DECLARE_POINTER_TYPE(Value);
@@ -30,11 +30,13 @@ class Set : public Packaged {
Set();
/// Create a set using the given game
Set(const GameP& game);
/// Create a set using the given stylesheet, and its game
Set(const StyleSheetP& stylesheet);
/// The game this set uses
GameP game;
/// The default stylesheet
StylesheetP stylesheet;
StyleSheetP stylesheet;
/// The values on the fields of the set
/** The indices should correspond to the set_fields in the Game */
IndexMap<FieldP, ValueP> data;
+1 -1
View File
@@ -37,7 +37,7 @@ IMPLEMENT_REFLECTION(ColumnSettings) {
}
IMPLEMENT_REFLECTION(GameSettings) {
REFLECT(default_style);
REFLECT(default_stylesheet);
REFLECT(default_export);
// REFLECT_N("cardlist columns", columns);
REFLECT(sort_cards_by);
+1 -1
View File
@@ -43,7 +43,7 @@ class ColumnSettings {
/// Settings for a Game
class GameSettings {
public:
String default_style;
String default_stylesheet;
String default_export;
map<String, ColumnSettings> columns;
String sort_cards_by;
+4 -1
View File
@@ -8,4 +8,7 @@
#include <data/stylesheet.hpp>
// ----------------------------------------------------------------------------- :
// ----------------------------------------------------------------------------- : StyleSheet
String StyleSheet::typeNameStatic() { return _("style"); }
String StyleSheet::typeName() const { return _("style"); }
+8 -1
View File
@@ -17,10 +17,17 @@ DECLARE_POINTER_TYPE(Game);
// ----------------------------------------------------------------------------- : StyleSheet
/// A collection of style information for card and set fields
class StyleSheet : Packaged {
class StyleSheet : public Packaged {
public:
GameP game;
static String typeNameStatic();
virtual String typeName() const;
virtual String fullName() const;
virtual InputStreamP openIconFile();
private:
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : EOF