Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/plugins/appinterface.h
Show All 26 Lines | |||||
27 | 27 | | |||
28 | // ---------------------------------------------------------------------------- | 28 | // ---------------------------------------------------------------------------- | ||
29 | // Project Includes | 29 | // Project Includes | ||
30 | 30 | | |||
31 | #include <kmm_plugin_export.h> | 31 | #include <kmm_plugin_export.h> | ||
32 | 32 | | |||
33 | class QTimer; | 33 | class QTimer; | ||
34 | 34 | | |||
35 | class IMyMoneyOperationsFormat; | ||||
36 | | ||||
35 | namespace KMyMoneyPlugin | 37 | namespace KMyMoneyPlugin | ||
36 | { | 38 | { | ||
37 | class KMM_PLUGIN_EXPORT AppInterface : public QObject | 39 | class KMM_PLUGIN_EXPORT AppInterface : public QObject | ||
38 | { | 40 | { | ||
39 | Q_OBJECT | 41 | Q_OBJECT | ||
40 | 42 | | |||
41 | public: | 43 | public: | ||
42 | explicit AppInterface(QObject* parent, const char* name = 0); | 44 | explicit AppInterface(QObject* parent, const char* name = 0); | ||
43 | virtual ~AppInterface(); | 45 | virtual ~AppInterface(); | ||
44 | 46 | | |||
47 | /** | ||||
48 | * Makes sure that a MyMoneyFile is open and has been created successfully. | ||||
49 | * | ||||
50 | * @return Whether the file is open and initialised | ||||
51 | */ | ||||
52 | virtual bool fileOpen() = 0; | ||||
53 | | ||||
54 | virtual bool isDatabase() = 0; | ||||
45 | virtual QUrl filenameURL() const = 0; | 55 | virtual QUrl filenameURL() const = 0; | ||
46 | virtual QUrl lastOpenedURL() = 0; | 56 | virtual QUrl lastOpenedURL() = 0; | ||
47 | virtual void writeLastUsedFile(const QString& fileName) = 0; | 57 | virtual void writeLastUsedFile(const QString& fileName) = 0; | ||
48 | virtual void slotFileOpenRecent(const QUrl &url) = 0; | 58 | virtual void slotFileOpenRecent(const QUrl &url) = 0; | ||
49 | virtual void addToRecentFiles(const QUrl& url) = 0; | 59 | virtual void addToRecentFiles(const QUrl& url) = 0; | ||
50 | virtual void updateCaption(bool skipActions = false) = 0; | 60 | virtual void updateCaption(bool skipActions = false) = 0; | ||
51 | virtual QTimer* autosaveTimer() = 0; | 61 | virtual QTimer* autosaveTimer() = 0; | ||
62 | | ||||
63 | Q_SIGNALS: | ||||
64 | void kmmFilePlugin(unsigned int); | ||||
52 | }; | 65 | }; | ||
53 | 66 | | |||
54 | } | 67 | } | ||
55 | 68 | | |||
56 | #endif | 69 | #endif |