File indexing completed on 2024-05-19 05:06:54
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 class KMM_PLUGIN_EXPORT AppInterface : public QObject 0029 { 0030 Q_OBJECT 0031 0032 public: 0033 explicit AppInterface(QObject* parent, const char* name = 0); 0034 virtual ~AppInterface(); 0035 0036 /** 0037 * Makes sure that a MyMoneyFile is open and has been created successfully. 0038 * 0039 * @return Whether the file is open and initialised 0040 */ 0041 virtual bool fileOpen() = 0; 0042 0043 virtual bool isDatabase() = 0; 0044 virtual bool isNativeFile() = 0; 0045 virtual QUrl filenameURL() const = 0; 0046 virtual void writeFilenameURL(const QUrl& url) = 0; 0047 virtual QUrl lastOpenedURL() = 0; 0048 virtual void writeLastUsedFile(const QString& fileName) = 0; 0049 virtual void slotFileOpenRecent(const QUrl& url) = 0; 0050 virtual void addToRecentFiles(const QUrl& url) = 0; 0051 virtual KMyMoneyAppCallback progressCallback() = 0; 0052 virtual void writeLastUsedDir(const QString& directory) = 0; 0053 virtual QString readLastUsedDir() const = 0; 0054 virtual void consistencyCheck(bool alwaysDisplayResult) = 0; 0055 0056 Q_SIGNALS: 0057 void kmmFilePlugin(unsigned int); 0058 }; 0059 0060 } 0061 0062 #endif