Add ExportPanel and update Import/Export engines
This commit is contained in:
parent
b533ac0578
commit
67e00fcaa1
|
@ -31,7 +31,7 @@ XMLExportEngine::XMLExportEngine()
|
||||||
KissCount::RegisterExportEngine(this);
|
KissCount::RegisterExportEngine(this);
|
||||||
|
|
||||||
_shortExt = "xml";
|
_shortExt = "xml";
|
||||||
_longExt = _("XML files (*.xml)|*.xml");
|
_longExt = _("KissCount XML files (*.xml)|*.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLExportEngine::~XMLExportEngine()
|
XMLExportEngine::~XMLExportEngine()
|
||||||
|
@ -64,6 +64,7 @@ bool XMLExportEngine::SaveAccounts()
|
||||||
// xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "default", (const xmlChar*) (account._default ? "1" : "0"));
|
// xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "default", (const xmlChar*) (account._default ? "1" : "0"));
|
||||||
// xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "is_owner", (const xmlChar*) (account.is_owner ? "1" : "0"));
|
// xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "is_owner", (const xmlChar*) (account.is_owner ? "1" : "0"));
|
||||||
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "virtual", (const xmlChar*) (account._virtual ? "1" : "0"));
|
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "virtual", (const xmlChar*) (account._virtual ? "1" : "0"));
|
||||||
|
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "hidden", (const xmlChar*) (account.hidden ? "1" : "0"));
|
||||||
xmlTextWriterEndElement(_writer);
|
xmlTextWriterEndElement(_writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,6 +102,7 @@ bool XMLExportEngine::SaveCategories()
|
||||||
|
|
||||||
xmlTextWriterStartElement(_writer, (const xmlChar*) "category");
|
xmlTextWriterStartElement(_writer, (const xmlChar*) "category");
|
||||||
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "id", (const xmlChar*) QString::number(category.id).toStdString().c_str());
|
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "id", (const xmlChar*) QString::number(category.id).toStdString().c_str());
|
||||||
|
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "parent", (const xmlChar*) QString::number(category.parent).toStdString().c_str());
|
||||||
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "name", (const xmlChar*) category.name.toStdString().c_str());
|
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "name", (const xmlChar*) category.name.toStdString().c_str());
|
||||||
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "font", (const xmlChar*) category.font.toStdString().c_str());
|
xmlTextWriterWriteAttribute(_writer, (const xmlChar*) "font", (const xmlChar*) category.font.toStdString().c_str());
|
||||||
rgb = category.backcolor.blue();
|
rgb = category.backcolor.blue();
|
||||||
|
|
|
@ -67,6 +67,7 @@ void GrisbiImportEngine::LoadAccount(GrisbiImportEngine* _this, const char** att
|
||||||
ac._default = false;
|
ac._default = false;
|
||||||
ac.is_owner = true;
|
ac.is_owner = true;
|
||||||
ac._virtual = false;
|
ac._virtual = false;
|
||||||
|
ac.hidden = false;
|
||||||
_this->_unresolvedAccounts.push_back(ac);
|
_this->_unresolvedAccounts.push_back(ac);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ int OFXImportEngine::account_cb(const struct OfxAccountData data, void * account
|
||||||
ac._default = false;
|
ac._default = false;
|
||||||
ac.is_owner = true;
|
ac.is_owner = true;
|
||||||
ac._virtual = false;
|
ac._virtual = false;
|
||||||
|
ac.hidden = false;
|
||||||
_this->_unresolvedAccounts.push_back(ac);
|
_this->_unresolvedAccounts.push_back(ac);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,9 @@ void XMLImportEngine::LoadAccount(XMLImportEngine* _this, const char** attrs)
|
||||||
|
|
||||||
else if (!strcmp(attrs[i], "virtual"))
|
else if (!strcmp(attrs[i], "virtual"))
|
||||||
ac._virtual = (QString(attrs[i+1]) == "1");
|
ac._virtual = (QString(attrs[i+1]) == "1");
|
||||||
|
|
||||||
|
else if (!strcmp(attrs[i], "hidden"))
|
||||||
|
ac.hidden = (QString(attrs[i+1]) == "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
UNESCAPE_CHARS(ac.name);
|
UNESCAPE_CHARS(ac.name);
|
||||||
|
@ -115,6 +118,9 @@ void XMLImportEngine::LoadCategory(XMLImportEngine* _this, const char** attrs)
|
||||||
else if (!strcmp(attrs[i], "id"))
|
else if (!strcmp(attrs[i], "id"))
|
||||||
cat.id = id = QString(attrs[i+1]).toInt();
|
cat.id = id = QString(attrs[i+1]).toInt();
|
||||||
|
|
||||||
|
else if (!strcmp(attrs[i], "parent"))
|
||||||
|
cat.parent = id = QString(attrs[i+1]).toInt();
|
||||||
|
|
||||||
else if (!strcmp(attrs[i], "font"))
|
else if (!strcmp(attrs[i], "font"))
|
||||||
cat.font = QString(attrs[i+1]);
|
cat.font = QString(attrs[i+1]);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
//#include "UsersDialog.hpp"
|
//#include "UsersDialog.hpp"
|
||||||
#include "StatsPanel.hpp"
|
#include "StatsPanel.hpp"
|
||||||
//#include "ImportPanel.hpp"
|
//#include "ImportPanel.hpp"
|
||||||
//#include "ExportPanel.hpp"
|
#include "ExportPanel.hpp"
|
||||||
|
|
||||||
#include "wxUI.hpp"
|
#include "wxUI.hpp"
|
||||||
#include "view.hpp"
|
#include "view.hpp"
|
||||||
|
@ -169,7 +169,7 @@ void wxUI::InitPanels()
|
||||||
ADD_PANEL(SearchPanel);
|
ADD_PANEL(SearchPanel);
|
||||||
ADD_PANEL(PreferencesPanel);
|
ADD_PANEL(PreferencesPanel);
|
||||||
// ADD_PANEL(ImportPanel, 4);
|
// ADD_PANEL(ImportPanel, 4);
|
||||||
// ADD_PANEL(ExportPanel, 5);
|
ADD_PANEL(ExportPanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxUI::LoadPanels()
|
void wxUI::LoadPanels()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user