/* Db.cpp * * Copyright (C) 2013-2016 Jaye Evins * * This file is part of gLabels-qt. * * gLabels-qt is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * gLabels-qt is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with gLabels-qt. If not, see . */ #include "Db.h" #include "Config.h" #include "StrUtil.h" #include "FileUtil.h" #include "Settings.h" #include "XmlCategoryParser.h" #include "XmlPaperParser.h" #include "XmlTemplateParser.h" #include "XmlTemplateCreator.h" #include "XmlVendorParser.h" #include #include #include namespace glabels { namespace model { // // Private // namespace { const QString empty = ""; bool partNameLessThan( const Template& a, const Template& b ) { return StrUtil::comparePartNames( a.name(), b.name() ) < 0; } } // // Static data // QList Db::mPapers; QMap Db::mPapersNameMap; QMap Db::mPapersIdMap; QStringList Db::mPaperIds; QStringList Db::mPaperNames; QList Db::mCategories; QMap Db::mCategoriesNameMap; QMap Db::mCategoriesIdMap; QStringList Db::mCategoryIds; QStringList Db::mCategoryNames; QList Db::mVendors; QMap Db::mVendorsNameMap; QStringList Db::mVendorNames; QList