korganizer
CalPrintPluginBase Class Reference
#include <calprintpluginbase.h>
Inheritance diagram for CalPrintPluginBase:

Detailed Description
Base class for KOrganizer printing classes.Each sub class represents one calendar print format.
Definition at line 62 of file calprintpluginbase.h.
Public Types | |
enum | DisplayFlags { Text = 0x0001, TimeBoxes = 0x0002 } |
Public Member Functions | |
CalPrintPluginBase () | |
virtual | ~CalPrintPluginBase () |
virtual QWidget * | createConfigWidget (QWidget *) |
virtual void | print (QPainter &p, int width, int height)=0 |
virtual void | doPrint (KPrinter *printer) |
virtual void | loadConfig ()=0 |
virtual void | saveConfig ()=0 |
void | doLoadConfig () |
void | doSaveConfig () |
void | setKOrgCoreHelper (KOrg::CoreHelper *helper) |
bool | useColors () const |
void | setUseColors (bool useColors) |
QColor | categoryBgColor (Incidence *incidence) |
QColor | textColor (const QColor &color) |
QTime | dayStart () |
bool | isWorkingDay (const QDate &dt) |
QString | holidayString (const QDate &dt) |
Event * | holiday (const QDate &dt) |
void | setCategoryColors (QPainter &p, Incidence *incidence) |
KPrinter::Orientation | orientation () const |
int | headerHeight () const |
void | setHeaderHeight (const int height) |
int | subHeaderHeight () const |
void | setSubHeaderHeight (const int height) |
int | margin () const |
void | setMargin (const int margin) |
int | padding () const |
void | setPadding (const int margin) |
int | borderWidth () const |
void | setBorderWidth (const int border) |
const KCalendarSystem * | calendarSystem () const |
void | setCalendarSystem (const KCalendarSystem *calsys) |
void | printEventString (QPainter &p, const QRect &box, const QString &str, int flags=-1) |
void | showEventBox (QPainter &p, const QRect &box, Incidence *incidence, const QString &str, int flags=-1) |
void | drawSubHeaderBox (QPainter &p, const QString &str, const QRect &box) |
void | drawVerticalBox (QPainter &p, const QRect &box, const QString &str) |
int | drawBoxWithCaption (QPainter &p, const QRect &box, const QString &caption, const QString &contents, bool sameLine, bool expand, const QFont &captionFont, const QFont &textFont) |
int | drawHeader (QPainter &p, QString title, const QDate &month1, const QDate &month2, const QRect &box, bool expand=false) |
void | drawSmallMonth (QPainter &p, const QDate &qd, const QRect &box) |
void | drawDaysOfWeek (QPainter &p, const QDate &fromDate, const QDate &toDate, const QRect &box) |
void | drawDaysOfWeekBox (QPainter &p, const QDate &qd, const QRect &box) |
void | drawTimeLine (QPainter &p, const QTime &fromTime, const QTime &toTime, const QRect &box) |
int | drawAllDayBox (QPainter &p, Event::List &eventList, const QDate &qd, bool expandable, const QRect &box) |
void | drawAgendaDayBox (QPainter &p, Event::List &eventList, const QDate &qd, bool expandable, QTime &fromTime, QTime &toTime, const QRect &box) |
void | drawAgendaItem (PrintCellItem *item, QPainter &p, const QDateTime &startPrintDate, const QDateTime &endPrintDate, float minlen, const QRect &box) |
void | drawDayBox (QPainter &p, const QDate &qd, const QRect &box, bool fullDate=false, bool printRecurDaily=true, bool printRecurWeekly=true) |
void | drawWeek (QPainter &p, const QDate &qd, const QRect &box) |
void | drawTimeTable (QPainter &p, const QDate &fromDate, const QDate &toDate, QTime &fromTime, QTime &toTime, const QRect &box) |
void | drawMonthTable (QPainter &p, const QDate &qd, bool weeknumbers, bool recurDaily, bool recurWeekly, const QRect &box) |
void | drawMonth (QPainter &p, const QDate &dt, const QRect &box, int maxdays=-1, int subDailyFlags=TimeBoxes, int holidaysFlags=Text) |
void | drawTodo (int &count, Todo *todo, QPainter &p, TodoSortField sortField, SortDirection sortDir, bool connectSubTodos, bool strikeoutCompleted, bool desc, int posPriority, int posSummary, int posDueDt, int posPercentComplete, int level, int x, int &y, int width, int pageHeight, const Todo::List &todoList, TodoParentStart *r=0) |
void | drawJournal (Journal *journal, QPainter &p, int x, int &y, int width, int pageHeight) |
void | drawJournalField (QPainter &p, QString field, QString text, int x, int &y, int width, int pageHeight) |
void | drawSplitHeaderRight (QPainter &p, const QDate &fd, const QDate &td, const QDate &cd, int width, int height) |
Static Public Member Functions | |
static int | weekdayColumn (int weekday) |
static void | drawBox (QPainter &p, int linewidth, const QRect &rect) |
static void | drawShadedBox (QPainter &p, int linewidth, const QBrush &brush, const QRect &rect) |
Protected Member Functions | |
void | drawIncidence (QPainter &p, const QRect &dayBox, const QString &time, const QString &summary, int &textY) |
Protected Attributes | |
bool | mUseColors |
int | mHeaderHeight |
int | mSubHeaderHeight |
int | mMargin |
int | mPadding |
int | mBorder |
const KCalendarSystem * | mCalSys |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 110 of file calprintpluginbase.cpp. |
Member Function Documentation
|
Helper functions to hide the KOrg::CoreHelper.
Definition at line 246 of file calprintpluginbase.cpp. |
|
Returns widget for configuring the print format.
Implements KOrg::PrintPlugin. Reimplemented in CalPrintJournal, CalPrintList, CalPrintWhatsNext, CalPrintYear, CalPrintIncidence, CalPrintDay, CalPrintWeek, CalPrintMonth, and CalPrintTodos. Definition at line 121 of file calprintpluginbase.cpp. |
|
Load complete config. This also calls loadConfig() of the derived class. Reimplemented from KOrg::PrintPlugin. Definition at line 173 of file calprintpluginbase.cpp. |
|
Start printing.
Implements KOrg::PrintPlugin. Definition at line 142 of file calprintpluginbase.cpp. |
|
Save complete config. This also calls saveConfig() of the derived class. Reimplemented from KOrg::PrintPlugin. Definition at line 189 of file calprintpluginbase.cpp. |
|
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 753 of file calprintpluginbase.cpp. |
|
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 700 of file calprintpluginbase.cpp. |
|
Draw a box with given width at the given coordinates.
Definition at line 347 of file calprintpluginbase.cpp. |
|
Draw a component box with a heading (printed in bold).
Definition at line 420 of file calprintpluginbase.cpp. |
|
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 875 of file calprintpluginbase.cpp. |
|
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 601 of file calprintpluginbase.cpp. |
|
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 619 of file calprintpluginbase.cpp. |
|
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 483 of file calprintpluginbase.cpp. |
|
Draws single journal item.
Definition at line 1587 of file calprintpluginbase.cpp. |
|
Draw a vertical representation of the month containing the date dt. Each day gets one line.
Definition at line 1076 of file calprintpluginbase.cpp. |
|
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 1263 of file calprintpluginbase.cpp. |
|
Draw a shaded box with given width at the given coordinates.
Definition at line 357 of file calprintpluginbase.cpp. |
|
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 533 of file calprintpluginbase.cpp. |
|
Draw a subheader box with a shaded background and the given string.
Definition at line 394 of file calprintpluginbase.cpp. |
|
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 626 of file calprintpluginbase.cpp. |
|
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 1013 of file calprintpluginbase.cpp. |
|
Draws single to-do and its (intented) sub-to-dos, optionally connects them by a tree-like line, and optionally shows due date, summary, description and priority.
Definition at line 1336 of file calprintpluginbase.cpp. |
|
Draw an event box with vertical text.
Definition at line 404 of file calprintpluginbase.cpp. |
|
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 983 of file calprintpluginbase.cpp. |
|
Returns the height of the page header. If the height was explicitly set using setHeaderHeight, that value is returned, otherwise a default value based on the printer orientation.
Definition at line 294 of file calprintpluginbase.cpp. |
|
Load print format configuration from config file.
Implemented in CalPrintJournal, CalPrintList, CalPrintWhatsNext, CalPrintYear, CalPrintIncidence, CalPrintDay, CalPrintWeek, CalPrintMonth, and CalPrintTodos. |
|
Actually do the printing.
Implemented in CalPrintJournal, CalPrintList, CalPrintWhatsNext, CalPrintYear, CalPrintIncidence, CalPrintDay, CalPrintWeek, CalPrintMonth, and CalPrintTodos. |
|
Print the given string (event summary) in the given rectangle. Margins and justification (centered or not) are automatically adjusted.
Definition at line 365 of file calprintpluginbase.cpp. |
|
Write print format configuration to config file.
Implemented in CalPrintJournal, CalPrintList, CalPrintWhatsNext, CalPrintYear, CalPrintIncidence, CalPrintDay, CalPrintWeek, CalPrintMonth, and CalPrintTodos. |
|
HELPER FUNCTIONS.
Reimplemented from KOrg::PrintPlugin. Definition at line 206 of file calprintpluginbase.cpp. |
|
Print the box for the given event with the given string.
Definition at line 373 of file calprintpluginbase.cpp. |
|
Determines the column of the given weekday ( 1=Monday, 7=Sunday ), taking the start of the week setting into account as given in kcontrol.
Definition at line 1561 of file calprintpluginbase.cpp. |
The documentation for this class was generated from the following files: