68
65
* shield object from.
70
67
ShieldStyle(XML_Helper* helper);
70
//! Default constructor.
71
ShieldStyle(ShieldStyle::Type type);
73
74
virtual ~ShieldStyle();
79
//! Get the size of this shield.
80
guint32 getType() const {return d_type;}
82
//! Get the image of the shield.
83
PixMask* getImage() const {return d_image;}
85
//! Returns the mask of the shield.
86
PixMask* getMask() const {return d_mask;}
88
//! Returns the basename of the picture's filename.
89
std::string getImageName() const {return d_image_name;}
77
94
//! Set the basic image of the shield.
78
95
void setImage(PixMask* image) {d_image = image;};
83
100
//! Set the basename of the shield picture's filename.
84
101
void setImageName(std::string name) {d_image_name = name;}
88
//! Get the size of this shield.
89
guint32 getType() const {return d_type;}
91
//! Get the image of the shield.
92
PixMask* getImage() {return d_image;}
94
//! Returns the mask of the shield.
95
PixMask* getMask() {return d_mask;}
97
//! Returns the basename of the picture's filename.
98
std::string getImageName() const {return d_image_name;}
104
// Methods that operate on class data and modify the class.
106
//! Load the images for this shieldstyle from the given file.
107
void instantiateImages(std::string filename, Shieldset *s);
109
//! Destroy the images associated with this shieldstyle.
110
void uninstantiateImages();
113
// Methods that operate on class data but do not modify the class.
115
//! Save the shieldstyle to an opened shieldset configuration file.
116
bool save(XML_Helper *helper) const;
121
//! Convert a ShieldStyle::Type enumerated value to a string.
122
static std::string shieldStyleTypeToString(const ShieldStyle::Type type);
124
//! Convert a ShieldStyle::Type string to an enumerated value.
125
static ShieldStyle::Type shieldStyleTypeFromString(const std::string str);
102
128
//! The size of the shield. (small, medium, or large)