korganizer

calprintdefaultplugins.h

00001 /*
00002     This file is part of KOrganizer.
00003 
00004     Copyright (c) 1998 Preston Brown <pbrown@kde.org>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 CALPRINTDEFAULTPLUGINS_H
00026 #define CALPRINTDEFAULTPLUGINS_H
00027 
00028 
00029 #include <klocale.h>
00030 #include "calprintpluginbase.h"
00031 
00032 #ifndef KORG_NOPRINTER
00033 namespace KCal {
00034 class Calendar;
00035 }
00036 
00037 using namespace KCal;
00038 
00039 class CalPrintDay : public CalPrintPluginBase
00040 {
00041   public:
00042     CalPrintDay();
00043     virtual ~CalPrintDay();
00044     virtual QString description() { return i18n("Print da&y"); }
00045     virtual QString info() { return i18n("Prints all events of a single day on one page"); }
00046     virtual QWidget *createConfigWidget( QWidget* );
00047 
00048   public:
00049     void print(QPainter &p, int width, int height);
00050     virtual void readSettingsWidget();
00051     virtual void setSettingsWidget();
00052     virtual void loadConfig();
00053     virtual void saveConfig();
00054     virtual void setDateRange( const QDate& from, const QDate& to );
00055 
00056   protected:
00057     QTime mStartTime, mEndTime;
00058     bool mIncludeTodos;
00059     bool mIncludeAllEvents;
00060 };
00061 
00062 class CalPrintWeek : public CalPrintPluginBase
00063 {
00064   public:
00065     CalPrintWeek();
00066     virtual ~CalPrintWeek();
00067     virtual QString description() { return i18n("Print &week"); }
00068     virtual QString info() { return i18n("Prints all events of one week on one page"); }
00069     virtual QWidget *createConfigWidget(QWidget*);
00070     virtual KPrinter::Orientation orientation();
00071 
00072   public:
00073     void print(QPainter &p, int width, int height);
00074     virtual void readSettingsWidget();
00075     virtual void setSettingsWidget();
00076     virtual void loadConfig();
00077     virtual void saveConfig();
00078     virtual void setDateRange( const QDate& from, const QDate& to );
00079 
00080   protected:
00081     enum eWeekPrintType { Filofax=0, Timetable, SplitWeek } mWeekPrintType;
00082     QTime mStartTime, mEndTime;
00083     bool mIncludeTodos;
00084 };
00085 
00086 class CalPrintMonth : public CalPrintPluginBase
00087 {
00088   public:
00089     CalPrintMonth();
00090     virtual ~CalPrintMonth();
00091     virtual QString description() { return i18n("Print mont&h"); }
00092     virtual QString info() { return i18n("Prints all events of one month on one page"); }
00093     virtual QWidget *createConfigWidget(QWidget*);
00094     virtual KPrinter::Orientation orientation() { return KPrinter::Landscape; }
00095 
00096   public:
00097     void print(QPainter &p, int width, int height);
00098     virtual void readSettingsWidget();
00099     virtual void setSettingsWidget();
00100     virtual void loadConfig();
00101     virtual void saveConfig();
00102     virtual void setDateRange( const QDate& from, const QDate& to );
00103 
00104   protected:
00105     bool mWeekNumbers;
00106     bool mRecurDaily;
00107     bool mRecurWeekly;
00108     bool mIncludeTodos;
00109 };
00110 
00111 class CalPrintTodos : public CalPrintPluginBase
00112 {
00113   public:
00114     CalPrintTodos();
00115     virtual ~CalPrintTodos();
00116     virtual QString description() { return i18n("Print to-&dos"); }
00117     virtual QString info() { return i18n("Prints all to-dos in a (tree-like) list"); }
00118     virtual QWidget *createConfigWidget(QWidget*);
00119 
00120   public:
00121     void print( QPainter &p, int width, int height );
00122     virtual void readSettingsWidget();
00123     virtual void setSettingsWidget();
00124     virtual void loadConfig();
00125     virtual void saveConfig();
00126 
00127   protected:
00128     QString mPageTitle;
00129 
00130     enum eTodoPrintType {
00131       TodosAll = 0, TodosUnfinished, TodosDueRange
00132     } mTodoPrintType;
00133 
00134     enum eTodoSortField {
00135       TodoFieldSummary=0,
00136       TodoFieldStartDate, TodoFieldDueDate,
00137       TodoFieldPriority, TodoFieldPercentComplete,
00138       TodoFieldUnset
00139     } mTodoSortField;
00140 
00141     enum eTodoSortDirection {
00142       TodoDirectionAscending=0, TodoDirectionDescending,
00143       TodoDirectionUnset
00144     } mTodoSortDirection;
00145 
00146     bool mIncludeDescription;
00147     bool mIncludePriority;
00148     bool mIncludeDueDate;
00149     bool mIncludePercentComplete;
00150     bool mConnectSubTodos;
00151     bool mStrikeOutCompleted;
00152     bool mSortField;
00153     bool mSortDirection;
00154 };
00155 
00156 #endif
00157 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys