Changeset View
Changeset View
Standalone View
Standalone View
src/printing/printplugin.h
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #ifndef CALENDARSUPPORT_PRINTING_PRINTPLUGIN_H | 20 | #ifndef CALENDARSUPPORT_PRINTING_PRINTPLUGIN_H | ||
21 | #define CALENDARSUPPORT_PRINTING_PRINTPLUGIN_H | 21 | #define CALENDARSUPPORT_PRINTING_PRINTPLUGIN_H | ||
22 | 22 | | |||
23 | #include "plugin.h" | 23 | #include "plugin.h" | ||
24 | 24 | | |||
25 | #include <Akonadi/Calendar/ETMCalendar> | 25 | #include <Akonadi/Calendar/ETMCalendar> | ||
26 | 26 | | |||
27 | #include <KCalCore/Incidence> | 27 | #include <KCalendarCore/Incidence> | ||
28 | #include <KConfig> | 28 | #include <KConfig> | ||
29 | 29 | | |||
30 | #include <QPrinter> | 30 | #include <QPrinter> | ||
31 | #include <QDate> | 31 | #include <QDate> | ||
32 | 32 | | |||
33 | namespace CalendarSupport { | 33 | namespace CalendarSupport { | ||
34 | /** | 34 | /** | ||
35 | Base class of Calendar printer class. | 35 | Base class of Calendar printer class. | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 79 | { | |||
80 | mConfig = cfg; | 80 | mConfig = cfg; | ||
81 | } | 81 | } | ||
82 | 82 | | |||
83 | virtual void setCalendar(const Akonadi::ETMCalendar::Ptr &cal) | 83 | virtual void setCalendar(const Akonadi::ETMCalendar::Ptr &cal) | ||
84 | { | 84 | { | ||
85 | mCalendar = cal; | 85 | mCalendar = cal; | ||
86 | } | 86 | } | ||
87 | 87 | | |||
88 | virtual void setSelectedIncidences(const KCalCore::Incidence::List &inc) | 88 | virtual void setSelectedIncidences(const KCalendarCore::Incidence::List &inc) | ||
89 | { | 89 | { | ||
90 | mSelectedIncidences = inc; | 90 | mSelectedIncidences = inc; | ||
91 | } | 91 | } | ||
92 | 92 | | |||
93 | virtual KCalCore::Incidence::List selectedIncidences() const | 93 | virtual KCalendarCore::Incidence::List selectedIncidences() const | ||
94 | { | 94 | { | ||
95 | return mSelectedIncidences; | 95 | return mSelectedIncidences; | ||
96 | } | 96 | } | ||
97 | 97 | | |||
98 | /** | 98 | /** | ||
99 | Returns KConfig group name where store settings | 99 | Returns KConfig group name where store settings | ||
100 | */ | 100 | */ | ||
101 | virtual QString groupName() const = 0; | 101 | virtual QString groupName() const = 0; | ||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Line(s) | 199 | protected: | |||
201 | QDate mToDate; | 201 | QDate mToDate; | ||
202 | 202 | | |||
203 | protected: | 203 | protected: | ||
204 | QPointer<QWidget> mConfigWidget; | 204 | QPointer<QWidget> mConfigWidget; | ||
205 | /** The printer object. This will only be available in the doPrint method | 205 | /** The printer object. This will only be available in the doPrint method | ||
206 | of the selected plugin */ | 206 | of the selected plugin */ | ||
207 | QPrinter *mPrinter = nullptr; | 207 | QPrinter *mPrinter = nullptr; | ||
208 | Akonadi::ETMCalendar::Ptr mCalendar; | 208 | Akonadi::ETMCalendar::Ptr mCalendar; | ||
209 | KCalCore::Incidence::List mSelectedIncidences; | 209 | KCalendarCore::Incidence::List mSelectedIncidences; | ||
210 | KConfig *mConfig = nullptr; | 210 | KConfig *mConfig = nullptr; | ||
211 | }; | 211 | }; | ||
212 | 212 | | |||
213 | class PrintPluginFactory : public PluginFactory | 213 | class PrintPluginFactory : public PluginFactory | ||
214 | { | 214 | { | ||
215 | Q_OBJECT | 215 | Q_OBJECT | ||
216 | public: | 216 | public: | ||
217 | PrintPlugin *createPluginFactory() override = 0; | 217 | PrintPlugin *createPluginFactory() override = 0; | ||
218 | }; | 218 | }; | ||
219 | } | 219 | } | ||
220 | 220 | | |||
221 | #endif | 221 | #endif |