Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/plugins/gnc/import/gncimporter.h
Show All 23 Lines | |||||
24 | // QT Includes | 24 | // QT Includes | ||
25 | 25 | | |||
26 | // Project Includes | 26 | // Project Includes | ||
27 | 27 | | |||
28 | #include "kmymoneyplugin.h" | 28 | #include "kmymoneyplugin.h" | ||
29 | 29 | | |||
30 | class MyMoneyGncReader; | 30 | class MyMoneyGncReader; | ||
31 | 31 | | |||
32 | class GNCImporter : public KMyMoneyPlugin::Plugin | 32 | class GNCImporter : public KMyMoneyPlugin::Plugin, public KMyMoneyPlugin::StoragePlugin | ||
33 | { | 33 | { | ||
34 | Q_OBJECT | 34 | Q_OBJECT | ||
35 | Q_INTERFACES(KMyMoneyPlugin::StoragePlugin) | ||||
35 | 36 | | |||
36 | public: | 37 | public: | ||
37 | explicit GNCImporter(QObject *parent, const QVariantList &args); | 38 | explicit GNCImporter(QObject *parent, const QVariantList &args); | ||
38 | ~GNCImporter() override; | 39 | ~GNCImporter() override; | ||
39 | 40 | | |||
40 | QAction *m_action; | 41 | bool open(MyMoneyStorageMgr *storage, const QUrl &url) override; | ||
41 | 42 | bool save(const QUrl &url) override; | |||
42 | private: | 43 | IMyMoneyOperationsFormat* reader() override; | ||
43 | MyMoneyGncReader *m_gncReader; | 44 | QString formatName() const override; | ||
44 | 45 | QString fileExtension() const override; | |||
45 | private Q_SLOTS: | | |||
46 | | ||||
47 | /** | | |||
48 | * Called when the user wishes to import tab delimeted transactions | | |||
49 | * into the current account. An account must be open for this to | | |||
50 | * work. Calls KMyMoneyView::slotAccountImportAscii. | | |||
51 | * | | |||
52 | * @see MyMoneyAccount | | |||
53 | */ | | |||
54 | void slotGNCImport(); | | |||
55 | | ||||
56 | protected: | | |||
57 | void createActions(); | | |||
58 | }; | 46 | }; | ||
59 | 47 | | |||
60 | #endif | 48 | #endif |