Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/plugins/checkprinting/checkprinting.h
- This file was moved from kmymoney/plugins/printcheck/printcheck.h.
Show All 11 Lines | |||||
12 | * This program is distributed in the hope that it will be useful, * | 12 | * This program is distributed in the hope that it will be useful, * | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
15 | * GNU General Public License for more details. * | 15 | * GNU General Public License for more details. * | ||
16 | * * | 16 | * * | ||
17 | * You should have received a copy of the GNU General Public License * | 17 | * You should have received a copy of the GNU General Public License * | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/> * | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/> * | ||
19 | ***************************************************************************/ | 19 | ***************************************************************************/ | ||
20 | #ifndef PRINTCHECK_H | 20 | #ifndef CHECKPRINTING_H | ||
21 | #define PRINTCHECK_H | 21 | #define CHECKPRINTING_H | ||
22 | 22 | | |||
23 | #include <memory> | 23 | #include <memory> | ||
24 | 24 | | |||
25 | #include "kmymoneyplugin.h" | 25 | #include "kmymoneyplugin.h" | ||
26 | #include "selectedtransactions.h" | 26 | #include "selectedtransactions.h" | ||
27 | 27 | | |||
28 | class KPluginInfo; | 28 | class KPluginInfo; | ||
29 | class QPrinter; | 29 | class QPrinter; | ||
30 | class QObject; | 30 | class QObject; | ||
31 | class PrintCheck : public KMyMoneyPlugin::Plugin | 31 | class CheckPrinting : public KMyMoneyPlugin::Plugin | ||
32 | { | 32 | { | ||
33 | Q_OBJECT | 33 | Q_OBJECT | ||
34 | 34 | | |||
35 | public: | 35 | public: | ||
36 | explicit PrintCheck(QObject *parent, const QVariantList &args); | 36 | explicit CheckPrinting(QObject *parent, const QVariantList &args); | ||
37 | ~PrintCheck() override; | 37 | ~CheckPrinting() override; | ||
38 | 38 | | |||
39 | public Q_SLOTS: | 39 | public Q_SLOTS: | ||
40 | void plug() override; | 40 | void plug() override; | ||
41 | void unplug() override; | 41 | void unplug() override; | ||
42 | void configurationChanged() override; | 42 | void configurationChanged() override; | ||
43 | 43 | | |||
44 | private: | 44 | private: | ||
45 | void readCheckTemplate(); | 45 | void readCheckTemplate(); | ||
46 | 46 | | |||
47 | bool canBePrinted(const KMyMoneyRegister::SelectedTransaction & selectedTransaction) const; | 47 | bool canBePrinted(const KMyMoneyRegister::SelectedTransaction & selectedTransaction) const; | ||
48 | void markAsPrinted(const KMyMoneyRegister::SelectedTransaction & selectedTransaction); | 48 | void markAsPrinted(const KMyMoneyRegister::SelectedTransaction & selectedTransaction); | ||
49 | 49 | | |||
50 | protected Q_SLOTS: | 50 | protected Q_SLOTS: | ||
51 | void slotPrintCheck(); | 51 | void slotPrintCheck(); | ||
52 | void slotTransactionsSelected(const KMyMoneyRegister::SelectedTransactions& transactions); | 52 | void slotTransactionsSelected(const KMyMoneyRegister::SelectedTransactions& transactions); | ||
53 | 53 | | |||
54 | private: | 54 | private: | ||
55 | struct Private; | 55 | struct Private; | ||
56 | std::unique_ptr<Private> d; | 56 | std::unique_ptr<Private> d; | ||
57 | QPrinter *m_currentPrinter; | 57 | QPrinter *m_currentPrinter; | ||
58 | }; | 58 | }; | ||
59 | 59 | | |||
60 | #endif // PRINTCHECK_H | 60 | #endif | ||
61 | 61 | |