Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/plugins/views/onlinejoboutbox/onlinejoboutboxview.cpp
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | onlinejoboutboxview.cpp | ||||
3 | ------------------- | ||||
4 | | ||||
5 | copyright : (C) 2018 by Łukasz Wojniłowicz | ||||
6 | email : lukasz.wojnilowicz@gmail.com | ||||
7 | ***************************************************************************/ | ||||
8 | | ||||
9 | /*************************************************************************** | ||||
10 | * * | ||||
11 | * This program is free software; you can redistribute it and/or modify * | ||||
12 | * it under the terms of the GNU General Public License as published by * | ||||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||||
14 | * (at your option) any later version. * | ||||
15 | * * | ||||
16 | ***************************************************************************/ | ||||
17 | | ||||
18 | #include "onlinejoboutboxview.h" | ||||
19 | | ||||
20 | // ---------------------------------------------------------------------------- | ||||
21 | // QT Includes | ||||
22 | | ||||
23 | // ---------------------------------------------------------------------------- | ||||
24 | // KDE Includes | ||||
25 | | ||||
26 | #include <KPluginFactory> | ||||
27 | #include <KLocalizedString> | ||||
28 | | ||||
29 | // ---------------------------------------------------------------------------- | ||||
30 | // Project Includes | ||||
31 | | ||||
32 | #include "viewinterface.h" | ||||
33 | #include "konlinejoboutboxview.h" | ||||
34 | | ||||
35 | OnlineJobOutboxView::OnlineJobOutboxView(QObject *parent, const QVariantList &args) : | ||||
36 | KMyMoneyPlugin::Plugin(parent, "onlinejoboutboxview"/*must be the same as X-KDE-PluginInfo-Name*/), | ||||
37 | m_view(nullptr) | ||||
38 | { | ||||
39 | Q_UNUSED(args) | ||||
40 | setComponentName("onlinejoboutboxview", i18n("Reports view")); | ||||
41 | // For information, announce that we have been loaded. | ||||
42 | qDebug("Plugins: onlinejoboutboxview loaded"); | ||||
43 | } | ||||
44 | | ||||
45 | OnlineJobOutboxView::~OnlineJobOutboxView() | ||||
46 | { | ||||
47 | qDebug("Plugins: onlinejoboutboxview unloaded"); | ||||
48 | } | ||||
49 | | ||||
50 | void OnlineJobOutboxView::plug() | ||||
51 | { | ||||
52 | m_view = new KOnlineJobOutboxView; | ||||
53 | viewInterface()->addView(m_view, i18n("Outbox"), View::OnlineJobOutbox); | ||||
54 | } | ||||
55 | | ||||
56 | void OnlineJobOutboxView::unplug() | ||||
57 | { | ||||
58 | viewInterface()->removeView(View::OnlineJobOutbox); | ||||
59 | } | ||||
60 | | ||||
61 | K_PLUGIN_FACTORY_WITH_JSON(OnlineJobOutboxViewFactory, "onlinejoboutboxview.json", registerPlugin<OnlineJobOutboxView>();) | ||||
62 | | ||||
63 | #include "onlinejoboutboxview.moc" |