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.
|
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 description(), and longDescription(). |
|
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. Referenced by CalPrinter::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.
References drawSmallMonth(). |
|
Draw a small calendar with the days of a month into the given area. Used for example in the title bar of the sheet.
Referenced by drawHeader(). |
|
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.
References drawDaysOfWeekBox(). Referenced by 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.
Referenced by drawDaysOfWeek(). |
|
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
Referenced by 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 ", ".
Referenced by 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.
Referenced by 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.
Referenced by 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.
References drawDayBox(). |
|
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.
References drawAgendaDayBox(), drawAllDayBox(), drawDaysOfWeek(), and drawTimeLine(). |
|
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).
References drawDayBox(), and drawDaysOfWeek(). |
|
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.
|
|
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: