korganizer Library API Documentation

calprintplugins.h

00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 1998 Preston Brown 00005 Copyright (c) 2003 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 00021 As a special exception, permission is given to link this program 00022 with any edition of Qt, and distribute the resulting executable, 00023 without including the source code for Qt in the source distribution. 00024 */ 00025 #ifndef CALPRINTPLUGINS_H 00026 #define CALPRINTPLUGINS_H 00027 00028 00029 #include <klocale.h> 00030 #include "calprintbase.h" 00031 00032 #ifndef KORG_NOPRINTER 00033 namespace KCal { 00034 class Calendar; 00035 } 00036 00037 using namespace KCal; 00038 00039 class CalPrintDay : public CalPrintBase 00040 { 00041 Q_OBJECT 00042 public: 00043 CalPrintDay(KPrinter *printer, Calendar *cal, KConfig *cfg); 00044 virtual ~CalPrintDay(); 00045 virtual QString description() { return i18n("Print day"); } 00046 virtual QString longDescription() { return i18n("Prints all events of a single day on one page"); } 00047 virtual QWidget *configWidget( QWidget* ); 00048 00049 public slots: 00050 void print(QPainter &p, int width, int height); 00051 virtual void readSettingsWidget(); 00052 virtual void setSettingsWidget(); 00053 virtual void loadConfig(); 00054 virtual void saveConfig(); 00055 virtual void setDateRange( const QDate& from, const QDate& to ); 00056 00057 protected: 00058 QTime mStartTime, mEndTime; 00059 bool mIncludeTodos; 00060 bool mIncludeAllEvents; 00061 }; 00062 00063 class CalPrintWeek : public CalPrintBase 00064 { 00065 Q_OBJECT 00066 public: 00067 CalPrintWeek(KPrinter *printer, Calendar *cal, KConfig *cfg); 00068 virtual ~CalPrintWeek(); 00069 virtual QString description() { return i18n("Print week"); } 00070 virtual QString longDescription() { return i18n("Prints all events of one week on one page"); } 00071 virtual QWidget *configWidget(QWidget*); 00072 virtual KPrinter::Orientation orientation(); 00073 00074 public slots: 00075 void print(QPainter &p, int width, int height); 00076 virtual void readSettingsWidget(); 00077 virtual void setSettingsWidget(); 00078 virtual void loadConfig(); 00079 virtual void saveConfig(); 00080 virtual void setDateRange( const QDate& from, const QDate& to ); 00081 00082 protected: 00083 enum eWeekPrintType { Filofax=0, Timetable, SplitWeek } mWeekPrintType; 00084 QTime mStartTime, mEndTime; 00085 bool mIncludeTodos; 00086 }; 00087 00088 class CalPrintMonth : public CalPrintBase 00089 { 00090 Q_OBJECT 00091 public: 00092 CalPrintMonth(KPrinter *printer, Calendar *cal, KConfig *cfg); 00093 virtual ~CalPrintMonth(); 00094 virtual QString description() { return i18n("Print month"); } 00095 virtual QString longDescription() { return i18n("Prints all events of one month on one page"); } 00096 virtual QWidget *configWidget(QWidget*); 00097 virtual KPrinter::Orientation orientation() { return KPrinter::Landscape; } 00098 00099 public slots: 00100 void print(QPainter &p, int width, int height); 00101 virtual void readSettingsWidget(); 00102 virtual void setSettingsWidget(); 00103 virtual void loadConfig(); 00104 virtual void saveConfig(); 00105 virtual void setDateRange( const QDate& from, const QDate& to ); 00106 00107 protected: 00108 bool mWeekNumbers; 00109 bool mIncludeTodos; 00110 }; 00111 00112 class CalPrintTodos : public CalPrintBase 00113 { 00114 Q_OBJECT 00115 public: 00116 CalPrintTodos(KPrinter *printer, Calendar *cal, KConfig *cfg); 00117 virtual ~CalPrintTodos(); 00118 virtual QString description() { return i18n("Print todos"); } 00119 virtual QString longDescription() { return i18n("Prints all todos in a (tree-like) list"); } 00120 virtual QWidget *configWidget(QWidget*); 00121 00122 public slots: 00123 void print(QPainter &p, int width, int height); 00124 virtual void readSettingsWidget(); 00125 virtual void setSettingsWidget(); 00126 virtual void loadConfig(); 00127 virtual void saveConfig(); 00128 00129 protected: 00130 QString mPageTitle; 00131 00132 enum eTodoPrintType { 00133 TodosAll = 0, TodosUnfinished, TodosDueRange 00134 } mTodoPrintType; 00135 00136 bool mIncludeDescription; 00137 bool mIncludePriority; 00138 bool mIncludeDueDate; 00139 bool mConnectSubTodos; 00140 }; 00141 00142 #endif 00143 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:55 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003