diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /korganizer/printing/calprintpluginbase.h | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/printing/calprintpluginbase.h')
-rw-r--r-- | korganizer/printing/calprintpluginbase.h | 158 |
1 files changed, 79 insertions, 79 deletions
diff --git a/korganizer/printing/calprintpluginbase.h b/korganizer/printing/calprintpluginbase.h index 9312d0042..226998f85 100644 --- a/korganizer/printing/calprintpluginbase.h +++ b/korganizer/printing/calprintpluginbase.h @@ -28,7 +28,7 @@ #ifndef KORG_NOPRINTER -#include <qdatetime.h> +#include <tqdatetime.h> #include <kprinter.h> #include <kdepimmacros.h> #include <libkcal/calendar.h> @@ -77,16 +77,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin /** Returns widget for configuring the print format. */ - virtual QWidget *createConfigWidget( QWidget * ); + virtual TQWidget *createConfigWidget( TQWidget * ); /** Actually do the printing. - \param p QPainter the print result is painted to + \param p TQPainter the print result is painted to \param width Width of printable area \param height Height of printable area */ - virtual void print( QPainter &p, int width, int height ) = 0; + virtual void print( TQPainter &p, int width, int height ) = 0; /** Start printing. */ @@ -117,12 +117,12 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin void setUseColors( bool useColors ); /** Helper functions to hide the KOrg::CoreHelper */ - 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 ); + TQColor categoryBgColor( Incidence *incidence ); + TQColor textColor( const TQColor &color ); + TQTime dayStart(); + bool isWorkingDay( const TQDate &dt ); + TQString holidayString( const TQDate &dt ); + Event *holiday( const TQDate &dt ); /** Determines the column of the given weekday ( 1=Monday, 7=Sunday ), taking the @@ -130,7 +130,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param weekday Index of the weekday */ static int weekdayColumn( int weekday ); - void setCategoryColors( QPainter &p, Incidence *incidence ); + void setCategoryColors( TQPainter &p, Incidence *incidence ); KPrinter::Orientation orientation() const; @@ -168,7 +168,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param linewidth The border width of the box \param rect The rectangle of the box */ - static void drawBox( QPainter &p, int linewidth, const QRect &rect ); + static void drawBox( TQPainter &p, int linewidth, const TQRect &rect ); /** Draw a shaded box with given width at the given coordinates. \param p The printer to be used @@ -176,16 +176,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param brush The brush to fill the box \param rect The rectangle of the box */ - static void drawShadedBox( QPainter &p, int linewidth, const QBrush &brush, const QRect &rect ); + static void drawShadedBox( TQPainter &p, int linewidth, const TQBrush &brush, const TQRect &rect ); /** Print the given string (event summary) in the given rectangle. Margins and justification (centered or not) are automatically adjusted. - \param p QPainter of the printout + \param p TQPainter of the printout \param box Coordinates of the surrounding event box \param str The text to be printed in the box */ - void printEventString( QPainter &p, const QRect &box, const QString &str, int flags = -1 ); + void printEventString( TQPainter &p, const TQRect &box, const TQString &str, int flags = -1 ); /** Print the box for the given event with the given string. @@ -195,27 +195,27 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin color will be deduced, if applicable. \param str The string to print inside the box */ - void showEventBox( QPainter &p, const QRect &box, Incidence *incidence, const QString &str, int flags = -1 ); + void showEventBox( TQPainter &p, const TQRect &box, Incidence *incidence, const TQString &str, int flags = -1 ); /** Draw a subheader box with a shaded background and the given string - \param p QPainter of the printout + \param p TQPainter of the printout \param str Text to be printed inside the box \param box Coordinates of the box */ - void drawSubHeaderBox(QPainter &p, const QString &str, const QRect &box ); + void drawSubHeaderBox(TQPainter &p, const TQString &str, const TQRect &box ); /** Draw an event box with vertical text. - \param p QPainter of the printout + \param p TQPainter of the printout \param box Coordinates of the box \param str ext to be printed inside the box */ - void drawVerticalBox( QPainter &p, const QRect &box, const QString &str ); + void drawVerticalBox( TQPainter &p, const TQRect &box, const TQString &str ); /** Draw a component box with a heading (printed in bold). - \param p QPainter of the printout + \param p TQPainter of the printout \param box Coordinates of the box \param caption Caption string to be printed inside the box \param contents Normal text contents of the box. If contents.isNull(), @@ -233,20 +233,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin the contents, use the return value as the top-value of your custom contents in that case. */ - int drawBoxWithCaption( QPainter &p, const QRect &box, const QString &caption, - const QString &contents, - bool sameLine, bool expand, const QFont &captionFont, const QFont &textFont ); + int drawBoxWithCaption( TQPainter &p, const TQRect &box, const TQString &caption, + const TQString &contents, + bool sameLine, bool expand, const TQFont &captionFont, const TQFont &textFont ); /** - Draw the gray header bar of the printout to the QPainter. + Draw the gray header bar of the printout to the TQPainter. It prints the given text and optionally one or two small - month views, as specified by the two QDate. The printed + month views, as specified by the two TQDate. 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. - \param p QPainter of the printout + \param p TQPainter of the printout \param title The string printed as the title of the page (e.g. the date, date range or todo list title) \param month1 Date specifying the month for the left one of @@ -264,51 +264,51 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin is box.bottom, otherwise it is larger than box.bottom and matches the y-coordinate of the surrounding rectangle. */ - int drawHeader( QPainter &p, QString title, - const QDate &month1, const QDate &month2, - const QRect &box, bool expand = false ); + int drawHeader( TQPainter &p, TQString title, + const TQDate &month1, const TQDate &month2, + const TQRect &box, bool expand = false ); /** Draw a small calendar with the days of a month into the given area. Used for example in the title bar of the sheet. - \param p QPainter of the printout + \param p TQPainter of the printout \param qd Arbitrary Date within the month to be printed. \param box coordinates of the small calendar */ - void drawSmallMonth( QPainter &p, const QDate &qd, const QRect &box ); + void drawSmallMonth( TQPainter &p, const TQDate &qd, const TQRect &box ); /** 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. - \param p QPainter of the printout + \param p TQPainter of the printout \param fromDate First date of the printed dates \param toDate Last date of the printed dates \param box coordinates of the box for the days of the week */ - void drawDaysOfWeek( QPainter &p, - const QDate &fromDate, const QDate &toDate, - const QRect &box ); + void drawDaysOfWeek( TQPainter &p, + const TQDate &fromDate, const TQDate &toDate, + const TQRect &box ); /** Draw a single weekday name in a box inside the given area of the painter. This is called in a loop by drawDaysOfWeek. - \param p QPainter of the printout + \param p TQPainter of the printout \param qd Date of the printed day \param box coordinates of the weekbox */ - void drawDaysOfWeekBox( QPainter &p, const QDate &qd, const QRect &box ); + void drawDaysOfWeekBox( TQPainter &p, const TQDate &qd, const TQRect &box ); /** 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 - \param p QPainter of the printout + \param p TQPainter of the printout \param fromTime Start time of the time range to display \param toTime End time of the time range to display \param box coordinates of the timeline */ - void drawTimeLine( QPainter &p, - const QTime &fromTime, const QTime &toTime, - const QRect &box ); + void drawTimeLine( TQPainter &p, + const TQTime &fromTime, const TQTime &toTime, + const TQRect &box ); /** Draw the all-day box for the agenda print view (the box on top which @@ -316,7 +316,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin 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 ", ". - \param p QPainter of the printout + \param p TQPainter of the printout \param eventList The list of all-day events that are supposed to be printed inside this box \param qd The date of the currently printed day @@ -328,13 +328,13 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param box coordinates of the all day box. \return The height used for the all-day box. */ - int drawAllDayBox( QPainter &p, Event::List &eventList, - const QDate &qd, bool expandable, - const QRect &box ); + int drawAllDayBox( TQPainter &p, Event::List &eventList, + const TQDate &qd, bool expandable, + const TQRect &box ); /** 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. - \param p QPainter of the printout + \param p TQPainter of the printout \param eventList The list of the events that are supposed to be printed inside this box \param qd The date of the currently printed day @@ -350,20 +350,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin to include all events if expandable==true \param box coordinates of the agenda day box. */ - void drawAgendaDayBox( QPainter &p, Event::List &eventList, - const QDate &qd, bool expandable, - QTime &fromTime, QTime &toTime, - const QRect &box ); + void drawAgendaDayBox( TQPainter &p, Event::List &eventList, + const TQDate &qd, bool expandable, + TQTime &fromTime, TQTime &toTime, + const TQRect &box ); - void drawAgendaItem( PrintCellItem *item, QPainter &p, - const QDateTime &startPrintDate, - const QDateTime &endPrintDate, - float minlen, const QRect &box ); + void drawAgendaItem( PrintCellItem *item, TQPainter &p, + const TQDateTime &startPrintDate, + const TQDateTime &endPrintDate, + float minlen, const TQRect &box ); /** 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. - \param p QPainter of the printout + \param p TQPainter of the printout \param qd The date of the currently printed day. All events of the calendar that appear on that day will be printed. \param box coordinates of the day box. @@ -372,8 +372,8 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param printRecurDaily Whether daily recurring incidences should be printed. \param printRecurWeekly Whether weekly recurring incidences should be printed. */ - void drawDayBox( QPainter &p, const QDate &qd, - const QRect &box, + void drawDayBox( TQPainter &p, const TQDate &qd, + const TQRect &box, bool fullDate = false, bool printRecurDaily = true, bool printRecurWeekly = true ); /** @@ -381,12 +381,12 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin 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. - \param p QPainter of the printout + \param p TQPainter of the printout \param qd Arbitrary date within the week to be printed. \param box coordinates of the week box. */ - void drawWeek( QPainter &p, const QDate &qd, - const QRect &box ); + void drawWeek( TQPainter &p, const TQDate &qd, + const TQRect &box ); /** 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 @@ -395,16 +395,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin 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. - \param p QPainter of the printout + \param p TQPainter of the printout \param fromDate First day to be included in the page \param toDate Last day to be included in the page \param fromTime Start time of the displayed time range \param toTime End time of the displayed time range \param box coordinates of the time table. */ - void drawTimeTable( QPainter &p, const QDate &fromDate, const QDate &toDate, - QTime &fromTime, QTime &toTime, - const QRect &box ); + void drawTimeTable( TQPainter &p, const TQDate &fromDate, const TQDate &toDate, + TQTime &fromTime, TQTime &toTime, + const TQRect &box ); /** Draw the month table of the month containing the date qd. Each day gets one @@ -412,20 +412,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin 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). - \param p QPainter of the printout + \param p TQPainter of the printout \param qd Arbitrary date within the month to be printed. \param recurDaily Whether daily recurring incidences should be printed. \param recurWeekly Whether weekly recurring incidences should be printed. \param weeknumbers Whether the week numbers are printed left of each row of the matrix \param box coordinates of the month. */ - void drawMonthTable( QPainter &p, const QDate &qd, bool weeknumbers, + void drawMonthTable( TQPainter &p, const TQDate &qd, bool weeknumbers, bool recurDaily, bool recurWeekly, - const QRect &box ); + const TQRect &box ); /** Draw a vertical representation of the month containing the date dt. Each day gets one line. - \param p QPainter of the printout + \param p TQPainter of the printout \param dt Arbitrary date within the month to be printed \param box coordinates of the box reserved for the month \param maxdays Days to print. If a value of -1 is given, the number of days @@ -437,7 +437,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param holidaysFlags Bitfield consisting of DisplayFlags flags to determine how holidays should be printed. */ - void drawMonth( QPainter &p, const QDate &dt, const QRect &box, int maxdays = -1, int subDailyFlags = TimeBoxes, int holidaysFlags = Text ); + void drawMonth( TQPainter &p, const TQDate &dt, const TQRect &box, int maxdays = -1, int subDailyFlags = TimeBoxes, int holidaysFlags = Text ); /** Internal class representing the start of a todo. @@ -448,7 +448,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin 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. \param count The number of the currently printed to-do (count will be incremented for each to-do drawn) \param todo The to-do to be printed. It's sub-to-dos are recursively drawn, so drawTodo should only be called on the to-dos of the highest level. - \param p QPainter of the printout + \param p TQPainter of the printout \param sortField Specifies on which attribute of the todo you want to sort. \param sortDir Specifies if you want to sort ascending or descending. \param connectSubTodos Whether sub-to-dos shall be connected with their parent by a line (tree-like). @@ -466,7 +466,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param todoList Contains a list of sub-todos for the specified @p todo . \param r Internal (used when printing sub-to-dos to give information about its parent) */ - void drawTodo( int &count, Todo *todo, QPainter &p, + void drawTodo( int &count, Todo *todo, TQPainter &p, TodoSortField sortField, SortDirection sortDir, bool connectSubTodos, bool strikeoutCompleted, bool desc, int posPriority, int posSummary, int posDueDt, @@ -477,25 +477,25 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin /** Draws single journal item. \param journal The item to be printed. - \param p QPainter of the printout + \param p TQPainter of the printout \param x x-coordinate of the upper left coordinate of the first item \param y y-coordinate of the upper left coordinate of the first item \param width width of the whole list \param pageHeight Total height allowed for the list on a page. If an item would be below that line, a new page is started. */ - void drawJournal( Journal * journal, QPainter &p, int x, int &y, + void drawJournal( Journal * journal, TQPainter &p, int x, int &y, int width, int pageHeight ); - void drawJournalField( QPainter &p, QString field, QString text, + void drawJournalField( TQPainter &p, TQString field, TQString 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 ); + void drawSplitHeaderRight( TQPainter &p, const TQDate &fd, const TQDate &td, + const TQDate &cd, int width, int height ); protected: - void drawIncidence( QPainter &p, const QRect &dayBox, const QString &time, - const QString &summary, int &textY ); + void drawIncidence( TQPainter &p, const TQRect &dayBox, const TQString &time, + const TQString &summary, int &textY ); protected: bool mUseColors; |