File indexing completed on 2024-05-19 05:08:12
0001 /* 0002 SPDX-FileCopyrightText: 2020 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef TEMPLATELOADER_H 0007 #define TEMPLATELOADER_H 0008 0009 #include "kmm_templates_export.h" 0010 0011 // ---------------------------------------------------------------------------- 0012 // QT Includes 0013 0014 #include <QObject> 0015 0016 // ---------------------------------------------------------------------------- 0017 // KDE Includes 0018 0019 // ---------------------------------------------------------------------------- 0020 // Project Includes 0021 0022 class TemplatesModel; 0023 class MyMoneyTemplate; 0024 0025 /** 0026 * @author Thomas Baumgart 0027 */ 0028 0029 class TemplateLoaderPrivate; 0030 class KMM_TEMPLATES_EXPORT TemplateLoader : public QObject 0031 { 0032 Q_OBJECT 0033 Q_DISABLE_COPY(TemplateLoader) 0034 Q_DECLARE_PRIVATE(TemplateLoader) 0035 0036 public: 0037 explicit TemplateLoader(QWidget* parent = nullptr); 0038 ~TemplateLoader(); 0039 0040 void load(TemplatesModel* model); 0041 0042 bool importTemplate(const MyMoneyTemplate& tmpl); 0043 0044 private Q_SLOTS: 0045 void slotLoadCountry(); 0046 0047 Q_SIGNALS: 0048 void loadingFinished(); 0049 0050 private: 0051 TemplateLoaderPrivate * const d_ptr; 0052 }; 0053 0054 #endif