CalPrintBase Class Reference
Base class for KOrganizer printing classes. More...
#include <calprintbase.h>
Inheritance diagram for CalPrintBase:

Public Slots | |
virtual void | readSettingsWidget () |
virtual void | setSettingsWidget () |
virtual void | setDateRange (const QDate &from, const QDate &to) |
Public Member Functions | |
CalPrintBase (KPrinter *pr, Calendar *cal, KConfig *cfg) | |
virtual QString | description ()=0 |
virtual QString | longDescription ()=0 |
virtual QWidget * | configWidget (QWidget *) |
virtual void | print (QPainter &p, int width, int height)=0 |
virtual void | doPrint () |
virtual KPrinter::Orientation | orientation () |
virtual void | loadConfig ()=0 |
virtual void | saveConfig ()=0 |
void | doLoadConfig () |
void | doSaveConfig () |
Protected Member Functions | |
int | weekdayColumn (int weekday) |
void | drawHeader (QPainter &p, QString title, const QDate &month1, const QDate &month2, int x, int y, int width, int height) |
void | drawSmallMonth (QPainter &p, const QDate &qd, int x, int y, int width, int height) |
void | drawDaysOfWeek (QPainter &p, const QDate &fromDate, const QDate &toDate, int x, int y, int width, int height) |
void | drawDaysOfWeekBox (QPainter &p, const QDate &qd, int x, int y, int width, int height) |
void | drawTimeLine (QPainter &p, const QTime &fromTime, const QTime &toTime, int x, int y, int width, int height) |
void | drawAllDayBox (QPainter &p, Event::List &eventList, const QDate &qd, bool expandable, int x, int y, int width, int &height) |
void | drawAgendaDayBox (QPainter &p, Event::List &eventList, const QDate &qd, bool expandable, QTime &fromTime, QTime &toTime, int x, int y, int width, int height) |
void | drawAgendaItem (PrintCellItem *item, QPainter &p, const QDate &, const QDateTime &startPrintDate, const QDateTime &endPrintDate, float minlen, int x, int y, int width) |
void | drawDayBox (QPainter &p, const QDate &qd, int x, int y, int width, int height, bool fullDate=false) |
void | drawWeek (QPainter &p, const QDate &qd, int x, int y, int width, int height) |
void | drawTimeTable (QPainter &p, const QDate &fromDate, const QDate &toDate, QTime &fromTime, QTime &toTime, int x, int y, int width, int height) |
void | drawMonth (QPainter &p, const QDate &qd, bool weeknumbers, int x, int y, int width, int height) |
void | drawTodo (int &count, Todo *item, QPainter &p, bool connectSubTodos, bool desc, int pospriority, int possummary, int posDueDt, int level, int x, int &y, int width, int pageHeight, const Todo::List &todoList, TodoParentStart *r=0) |
void | drawSplitHeaderRight (QPainter &p, const QDate &fd, const QDate &td, const QDate &cd, int width, int height) |
int | weekDayColumn (int weekday) |
Protected Attributes | |
QDate | mFromDate |
QDate | mToDate |
bool | mUseColors |
KPrinter * | mPrinter |
Calendar * | mCalendar |
KConfig * | mConfig |
QWidget * | mConfigWidget |
Static Protected Attributes | |
int | mSubHeaderHeight = 20 |
int | mHeaderHeight = 72 |
int | mMargin = 36 |
Detailed Description
Base class for KOrganizer printing classes.Each sub class represents one calendar print format.
Definition at line 49 of file calprintbase.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 133 of file calprintbase.cpp. References CalPrintBase(). Referenced by CalPrintBase(). |
Member Function Documentation
|
Returns short description of print format.
Referenced by configWidget(), doLoadConfig(), and doSaveConfig(). |
|
Returns long description of print format.
Referenced by configWidget(). |
|
Returns widget for configuring the print format.
Definition at line 144 of file calprintbase.cpp. References configWidget(), description(), and longDescription(). Referenced by configWidget(). |
|
Actually do the printing.
Referenced by doPrint(). |
|
Start printing.
Definition at line 165 of file calprintbase.cpp. References print(). |
|
Orientation of printout. Default is Portrait. If your plugin wants to use some other orientation as default (e.g. depending on some config settings), implement this function in your subclass and return the desired orientation. Definition at line 96 of file calprintbase.h. |
|
Load print format configuration from config file.
Referenced by doLoadConfig(). |
|
Write print format configuration to config file.
Referenced by doSaveConfig(). |
|
Load complete config. This also calls loadConfig() of the derived class. Definition at line 185 of file calprintbase.cpp. References description(), and loadConfig(). |
|
Save complete config. This also calls saveConfig() of the derived class. Definition at line 200 of file calprintbase.cpp. References description(), and saveConfig(). |
|
Read settings from configuration widget and apply them to current object.
Definition at line 121 of file calprintbase.h. |
|
Set configuration widget to reflect settings of current object.
Definition at line 125 of file calprintbase.h. |
|
Set date range which should be printed.
Definition at line 130 of file calprintbase.h. References setDateRange(). Referenced by CalPrinter::setDateRange(), and setDateRange(). |
|
Draw the gray header bar of the printout to the QPainter. It prints the given text and optionally one or two small month views, as specified by the two QDate. The printed text can also contain a line feed. If month2 is invalid, only the month that contains month1 is printed. E.g. the filofax week view draws just the current month, while the month view draws the previous and the next month.
Definition at line 216 of file calprintbase.cpp. References drawHeader(), and drawSmallMonth(). Referenced by drawHeader(). |
|
Draw a small calendar with the days of a month into the given area. Used for example in the title bar of the sheet.
Definition at line 254 of file calprintbase.cpp. References drawSmallMonth(). Referenced by drawHeader(), and drawSmallMonth(). |
|
Draw a horizontal bar with the weekday names of the given date range in the given area of the painter. This is used for the weekday-bar on top of the timetable view and the month view.
Definition at line 315 of file calprintbase.cpp. References drawDaysOfWeek(), and drawDaysOfWeekBox(). Referenced by drawDaysOfWeek(), drawMonth(), and drawTimeTable(). |
|
Draw a single weekday name in a box inside the given area of the painter. This is called in a loop by drawDaysOfWeek.
Definition at line 331 of file calprintbase.cpp. References drawDaysOfWeekBox(). Referenced by drawDaysOfWeek(), and drawDaysOfWeekBox(). |
|
Draw a (vertical) time scale from time fromTime to toTime inside the given area of the painter. Every hour will have a one-pixel line over the whole width, every half-hour the line will only span the left half of the width. This is used in the day and timetable print styles
Definition at line 348 of file calprintbase.cpp. References drawTimeLine(). Referenced by drawTimeLine(), and drawTimeTable(). |
|
Draw the all-day box for the agenda print view (the box on top which doesn't have a time on the time scale associated). If expandable is set, height is the cell height of a single cell, and the returned height will be the total height used for the all-day events. If !expandable, only one cell will be used, and multiple events are concatenated using ", ".
Definition at line 415 of file calprintbase.cpp. References drawAllDayBox(). Referenced by drawAllDayBox(), and drawTimeTable(). |
|
Draw the agenda box for the day print style (the box showing all events of that day). Also draws a grid with half-hour spacing of the grid lines.
Definition at line 485 of file calprintbase.cpp. References drawAgendaDayBox(). Referenced by drawAgendaDayBox(), and drawTimeTable(). |
|
Draw the box containing a list of all events of the given day (with their times, of course). Used in the Filofax and the month print style.
Definition at line 624 of file calprintbase.cpp. References drawDayBox(). Referenced by drawDayBox(), drawMonth(), and drawWeek(). |
|
Draw the week (filofax) table of the week containing the date qd. The first three days of the week will be shown in the first column (using drawDayBox), the remaining four in the second column, where the last two days of the week (typically Saturday and Sunday) only get half the height of the other day boxes.
Definition at line 723 of file calprintbase.cpp. References drawDayBox(), and drawWeek(). Referenced by drawWeek(). |
|
Draw the timetable view of the given time range from fromDate to toDate. On the left side the time scale is printed (using drawTimeLine), then each day gets one column (printed using drawAgendaDayBox), and the events are displayed as boxes (like in korganizer's day/week view). The first cell of each column contains the all-day events (using drawAllDayBox with expandable=false). The given time range cannot be expanded to include all events.
Definition at line 758 of file calprintbase.cpp. References drawAgendaDayBox(), drawAllDayBox(), drawDaysOfWeek(), drawTimeLine(), and drawTimeTable(). Referenced by drawTimeTable(). |
|
Draw the month table of the month containing the date qd. Each day gets one box (using drawDayBox) that contains a list of all events on that day. They are arranged in a matrix, with the first column being the first day of the week (so it might display some days of the previous and the next month). Above the matrix there is a bar showing the weekdays (drawn using drawDaysOfWeek).
Definition at line 792 of file calprintbase.cpp. References drawDayBox(), drawDaysOfWeek(), and drawMonth(). Referenced by drawMonth(). |
|
Draws single todo item and its (intented) subitems, optionally connects them by a tree-like line, and optionally shows due date, summary, description and priority.
Definition at line 850 of file calprintbase.cpp. References drawTodo(). Referenced by drawTodo(). |
|
Determines the column of the given weekday ( 1=Monday, 7=Sunday ), taking the start of the week setting into account as given in kcontrol.
|
The documentation for this class was generated from the following files: