Commit 43d47e10 authored by twanvl's avatar twanvl

implemented apprentice export

parent d302d206
......@@ -47,7 +47,7 @@ menu:
add keyword: &Add Keyword Ctrl++
remove keyword: &Remove Select Keyword Del
format: &Format
format: F&ormat
bold: &Bold Ctrl+B
italic: &Italic Ctrl+I
symbols: &Symbols Ctrl+M
......@@ -161,6 +161,9 @@ help:
(When off, the cards are exported
and copied at 100% size and normal rotation)
# apprentice export
set code: A set code is a two character code that is used by Apprentice to refer to a set.
# Symbol editor
new symbol: Create a new symbol
open symbol: Open a symbol
......@@ -366,6 +369,10 @@ label:
cards to export: Cards to export
filename is ignored: (filename is ignored)
# apprentice export
set code: Set &Code:
apprentice export cancled: Export to Apprentice is cancled
# Image slicer
original: Original:
result: Result:
......@@ -443,6 +450,7 @@ title:
print preview: Print Preview
# export
export images: Export Images
export cancled: Export Cancled
############################################################## Action (undo/redo) names
action:
......
......@@ -55,6 +55,16 @@ class Card {
}
throw InternalError(_("Expected a card field with name '")+name+_("'"));
}
template <typename T> const T& value(const String& name) const {
for(IndexMap<FieldP, ValueP>::const_iterator it = data.begin() ; it != data.end() ; ++it) {
if ((*it)->fieldP->name == name) {
const T* ret = dynamic_cast<const T*>(it->get());
if (!ret) throw InternalError(_("Card field with name '")+name+_("' doesn't have the right type"));
return *ret;
}
}
throw InternalError(_("Expected a card field with name '")+name+_("'"));
}
DECLARE_REFLECTION();
};
......
This diff is collapsed.
......@@ -94,5 +94,8 @@ Bitmap export_bitmap(const SetP& set, const CardP& card);
/// Export a set to Magic Workstation format
void export_mws(Window* parent, const SetP& set);
/// Export a set to Apprentice
void export_apprentice(Window* parent, const SetP& set);
// ----------------------------------------------------------------------------- : EOF
#endif
......@@ -458,8 +458,7 @@ void SetWindow::onFileExportHTML(wxCommandEvent&) {
}
void SetWindow::onFileExportApprentice(wxCommandEvent&) {
// ApprenticeExportWindow wnd(&this, set);
// wnd.ShowModal();
export_apprentice(this, set);
}
void SetWindow::onFileExportMWS(wxCommandEvent&) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment