refs #560, allow to load / save from view/model

* added load/save functions
* changed menu from multiple bool members to flag
* shortcut for save
* cleaned up filter dialog handling
This commit is contained in:
Klaus Basan
2015-12-19 03:37:13 +01:00
parent 8aa449bc13
commit 9fcc846b7a
7 changed files with 226 additions and 54 deletions

View File

@@ -604,6 +604,18 @@ namespace BlackGui
return mimeData;
}
template <typename ObjectType, typename ContainerType, bool UseCompare>
QJsonObject CListModelBase<ObjectType, ContainerType, UseCompare>::toJson() const
{
return container().toJson();
}
template <typename ObjectType, typename ContainerType, bool UseCompare>
QString CListModelBase<ObjectType, ContainerType, UseCompare>::toJsonString(QJsonDocument::JsonFormat format) const
{
return container().toJsonString(format);
}
// see here for the reason of thess forward instantiations
// http://www.parashift.com/c++-faq/separate-template-class-defn-from-decl.html
template class CListModelBase<BlackMisc::Aviation::CLivery, BlackMisc::Aviation::CLiveryList, true>;