File indexing completed on 2024-05-12 16:42:54
0001 /* 0002 SPDX-FileCopyrightText: 2008 Thomas Baumgart <ipwizard@users.sourceforge.net> 0003 SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KMMAPPINTERFACE_H 0008 #define KMMAPPINTERFACE_H 0009 0010 // ---------------------------------------------------------------------------- 0011 // QT Includes 0012 0013 #include <QUrl> 0014 0015 // ---------------------------------------------------------------------------- 0016 // KDE Includes 0017 0018 // ---------------------------------------------------------------------------- 0019 // Project Includes 0020 0021 #include "appinterface.h" 0022 0023 class KMyMoneyApp; 0024 0025 namespace KMyMoneyPlugin 0026 { 0027 /** 0028 * This class represents the implementation of the 0029 * AppInterface. 0030 */ 0031 class KMMAppInterface : public AppInterface 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 explicit KMMAppInterface(KMyMoneyApp* app, QObject* parent, const char* name = 0); 0037 ~KMMAppInterface() override = default; 0038 0039 /** 0040 * Makes sure that a MyMoneyFile is open and has been created successfully. 0041 * 0042 * @return Whether the file is open and initialised 0043 */ 0044 bool fileOpen() override; 0045 0046 bool isDatabase() override; 0047 bool isNativeFile() override; 0048 QUrl filenameURL() const override; 0049 void writeFilenameURL(const QUrl &url) override; 0050 QUrl lastOpenedURL() override; 0051 void writeLastUsedFile(const QString& fileName) override; 0052 void slotFileOpenRecent(const QUrl &url) override; 0053 void addToRecentFiles(const QUrl& url) override; 0054 KMyMoneyAppCallback progressCallback() override; 0055 void writeLastUsedDir(const QString &directory) override; 0056 QString readLastUsedDir() const override; 0057 void consistencyCheck(bool alwaysDisplayResult) override; 0058 0059 private: 0060 KMyMoneyApp* m_app; 0061 }; 0062 0063 } 0064 0065 #endif