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