Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/dialogs/settings/ksettingsplugins.h
- This file was copied from kmymoney/plugins/qif/export/qifexporterplugin.h.
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | qifexporterplugin.h | 2 | ksettingsplugins.h | ||
3 | ------------------- | 3 | ------------------- | ||
4 | copyright : (C) 2017 by Łukasz Wojniłowicz | 4 | (C) 2017 by Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> | ||
5 | email : lukasz.wojnilowicz@gmail.com | | |||
6 | ***************************************************************************/ | 5 | ***************************************************************************/ | ||
7 | 6 | | |||
8 | /*************************************************************************** | 7 | /*************************************************************************** | ||
9 | * * | 8 | * * | ||
10 | * This program is free software; you can redistribute it and/or modify * | 9 | * This program is free software; you can redistribute it and/or modify * | ||
11 | * it under the terms of the GNU General Public License as published by * | 10 | * it under the terms of the GNU General Public License as published by * | ||
12 | * the Free Software Foundation; either version 2 of the License, or * | 11 | * the Free Software Foundation; either version 2 of the License, or * | ||
13 | * (at your option) any later version. * | 12 | * (at your option) any later version. * | ||
14 | * * | 13 | * * | ||
15 | ***************************************************************************/ | 14 | ***************************************************************************/ | ||
16 | 15 | | |||
17 | #ifndef QIFEXPORTERPLUGIN_H | 16 | #ifndef KSETTINGSPLUGINS_H | ||
18 | #define QIFEXPORTERPLUGIN_H | 17 | #define KSETTINGSPLUGINS_H | ||
19 | 18 | | |||
20 | // ---------------------------------------------------------------------------- | 19 | // ---------------------------------------------------------------------------- | ||
21 | // KDE Includes | 20 | // QT Includes | ||
21 | | ||||
22 | #include <QWidget> | ||||
22 | 23 | | |||
23 | // ---------------------------------------------------------------------------- | 24 | // ---------------------------------------------------------------------------- | ||
24 | // QT Includes | 25 | // KDE Includes | ||
25 | 26 | | |||
27 | // ---------------------------------------------------------------------------- | ||||
26 | // Project Includes | 28 | // Project Includes | ||
27 | 29 | | |||
28 | #include "kmymoneyplugin.h" | 30 | class KPluginSelector; | ||
29 | 31 | | |||
30 | class MyMoneyQifReader; | 32 | class KSettingsPluginsPrivate; | ||
31 | 33 | class KSettingsPlugins : public QWidget | |||
32 | class QIFExporterPlugin : public KMyMoneyPlugin::Plugin | | |||
33 | { | 34 | { | ||
34 | Q_OBJECT | 35 | Q_OBJECT | ||
35 | Q_PLUGIN_METADATA(IID "org.kmymoney.plugins.qifexport" FILE "qifexport.json") | 36 | Q_DISABLE_COPY(KSettingsPlugins) | ||
36 | 37 | | |||
37 | public: | 38 | public: | ||
38 | explicit QIFExporterPlugin(); | 39 | explicit KSettingsPlugins(QWidget* parent = nullptr); | ||
39 | ~QIFExporterPlugin(); | 40 | ~KSettingsPlugins(); | ||
40 | | ||||
41 | QAction *m_action; | | |||
42 | | ||||
43 | MyMoneyQifReader *m_qifReader; | | |||
44 | 41 | | |||
45 | public Q_SLOTS: | 42 | public Q_SLOTS: | ||
46 | /** | 43 | void slotResetToDefaults(); | ||
47 | * Called when the user wishes to export some transaction to a | 44 | void slotSavePluginConfiguration(); | ||
48 | * QIF formatted file. An account must be open for this to work. | | |||
49 | * Uses MyMoneyQifWriter() for the actual output. | | |||
50 | */ | | |||
51 | void slotQifExport(); | | |||
52 | 45 | | |||
53 | protected: | 46 | Q_SIGNALS: | ||
54 | void createActions(); | 47 | void changed(bool); | ||
55 | }; | 48 | void settingsChanged(const QString &dialogName); | ||
49 | | ||||
50 | private: | ||||
51 | KSettingsPluginsPrivate* const d_ptr; | ||||
52 | Q_DECLARE_PRIVATE(KSettingsPlugins) | ||||
56 | 53 | | |||
54 | private Q_SLOTS: | ||||
55 | void slotPluginsSelectionChanged(bool changed); | ||||
56 | }; | ||||
57 | #endif | 57 | #endif | ||
58 | |