summaryrefslogtreecommitdiffabout
path: root/korganizer/calprintplugins.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/calprintplugins.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'korganizer/calprintplugins.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calprintplugins.h151
1 files changed, 151 insertions, 0 deletions
diff --git a/korganizer/calprintplugins.h b/korganizer/calprintplugins.h
new file mode 100644
index 0000000..7c56131
--- a/dev/null
+++ b/korganizer/calprintplugins.h
@@ -0,0 +1,151 @@
1/*
2 This file is part of KOrganizer.
3
4 Copyright (c) 1998 Preston Brown
5 Copyright (c) 2003 Reinhold Kainhofer <reinhold@kainhofer.com>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 As a special exception, permission is given to link this program
22 with any edition of Qt, and distribute the resulting executable,
23 without including the source code for Qt in the source distribution.
24*/
25#ifndef CALPRINTPLUGINS_H
26#define CALPRINTPLUGINS_H
27
28
29#include <klocale.h>
30#include "calprintbase.h"
31#include "calprintdayconfig_base.h"
32#include "calprintweekconfig_base.h"
33#include "calprintmonthconfig_base.h"
34#include "calprinttodoconfig_base.h"
35
36#ifndef KORG_NOPRINTER
37namespace KCal {
38class Calendar;
39}
40
41using namespace KCal;
42
43class CalPrintDay : public CalPrintBase
44{
45 Q_OBJECT
46 public:
47 CalPrintDay(KPrinter *printer, Calendar *cal, KConfig *cfg);
48 virtual ~CalPrintDay();
49 virtual QString description() { return i18n("Print day"); }
50 virtual QString longDescription() { return i18n("Prints all events of a single day on one page"); }
51 virtual QWidget *configWidget( QWidget* );
52
53 public slots:
54 void print(QPainter &p, int width, int height);
55 virtual void readSettingsWidget();
56 virtual void setSettingsWidget();
57 virtual void loadConfig();
58 virtual void saveConfig();
59 virtual void setDateRange( const QDate& from, const QDate& to );
60
61 protected:
62 QTime mStartTime, mEndTime;
63 bool mIncludeTodos;
64 bool mIncludeAllEvents;
65 CalPrintDayConfig_Base *mConfigWidget;
66};
67
68class CalPrintWeek : public CalPrintBase
69{
70 Q_OBJECT
71 public:
72 CalPrintWeek(KPrinter *printer, Calendar *cal, KConfig *cfg);
73 virtual ~CalPrintWeek();
74 virtual QString description() { return i18n("Print week"); }
75 virtual QString longDescription() { return i18n("Prints all events of one week on one page"); }
76 virtual QWidget *configWidget(QWidget*);
77 virtual KPrinter::Orientation orientation();
78
79 public slots:
80 void print(QPainter &p, int width, int height);
81 virtual void readSettingsWidget();
82 virtual void setSettingsWidget();
83 virtual void loadConfig();
84 virtual void saveConfig();
85 virtual void setDateRange( const QDate& from, const QDate& to );
86
87 protected:
88 enum eWeekPrintType { Filofax=0, Timetable, SplitWeek } mWeekPrintType;
89 QTime mStartTime, mEndTime;
90 bool mIncludeTodos;
91 CalPrintWeekConfig_Base *mConfigWidget;
92};
93
94class CalPrintMonth : public CalPrintBase
95{
96 Q_OBJECT
97 public:
98 CalPrintMonth(KPrinter *printer, Calendar *cal, KConfig *cfg);
99 virtual ~CalPrintMonth();
100 virtual QString description() { return i18n("Print month"); }
101 virtual QString longDescription() { return i18n("Prints all events of one month on one page"); }
102 virtual QWidget *configWidget(QWidget*);
103 virtual KPrinter::Orientation orientation() { return KPrinter::Landscape; }
104
105 public slots:
106 void print(QPainter &p, int width, int height);
107 virtual void readSettingsWidget();
108 virtual void setSettingsWidget();
109 virtual void loadConfig();
110 virtual void saveConfig();
111 virtual void setDateRange( const QDate& from, const QDate& to );
112
113 protected:
114 bool mWeekNumbers;
115 bool mIncludeTodos;
116 CalPrintMonthConfig_Base *mConfigWidget;
117};
118
119class CalPrintTodos : public CalPrintBase
120{
121 Q_OBJECT
122 public:
123 CalPrintTodos(KPrinter *printer, Calendar *cal, KConfig *cfg);
124 virtual ~CalPrintTodos();
125 virtual QString description() { return i18n("Print todos"); }
126 virtual QString longDescription() { return i18n("Prints all todos in a (tree-like) list"); }
127 virtual QWidget *configWidget(QWidget*);
128
129 public slots:
130 void print(QPainter &p, int width, int height);
131 virtual void readSettingsWidget();
132 virtual void setSettingsWidget();
133 virtual void loadConfig();
134 virtual void saveConfig();
135
136 protected:
137 QString mPageTitle;
138
139 enum eTodoPrintType {
140 TodosAll = 0, TodosUnfinished, TodosDueRange
141 } mTodoPrintType;
142
143 bool mIncludeDescription;
144 bool mIncludePriority;
145 bool mIncludeDueDate;
146 bool mConnectSubTodos;
147 CalPrintTodoConfig_Base *mConfigWidget ;
148};
149
150#endif
151#endif