summaryrefslogtreecommitdiffstats
path: root/korganizer/printing
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/printing')
-rw-r--r--korganizer/printing/calprintdefaultplugins.cpp212
-rw-r--r--korganizer/printing/calprintdefaultplugins.h56
-rw-r--r--korganizer/printing/calprinter.cpp60
-rw-r--r--korganizer/printing/calprinter.h24
-rw-r--r--korganizer/printing/calprintpluginbase.cpp508
-rw-r--r--korganizer/printing/calprintpluginbase.h158
-rw-r--r--korganizer/printing/cellitem.cpp14
-rw-r--r--korganizer/printing/cellitem.h8
8 files changed, 520 insertions, 520 deletions
diff --git a/korganizer/printing/calprintdefaultplugins.cpp b/korganizer/printing/calprintdefaultplugins.cpp
index d12df1e26..bc4c62496 100644
--- a/korganizer/printing/calprintdefaultplugins.cpp
+++ b/korganizer/printing/calprintdefaultplugins.cpp
@@ -26,11 +26,11 @@
#ifndef KORG_NOPRINTER
-#include <qpainter.h>
-#include <qdatetimeedit.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
+#include <tqpainter.h>
+#include <tqdatetimeedit.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -59,7 +59,7 @@ CalPrintIncidence::~CalPrintIncidence()
{
}
-QWidget *CalPrintIncidence::createConfigWidget( QWidget *w )
+TQWidget *CalPrintIncidence::createConfigWidget( TQWidget *w )
{
return new CalPrintIncidenceConfig_Base( w );
}
@@ -124,9 +124,9 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
{
return incidence->accept( *this );
}
- QString mStartCaption, mStartString;
- QString mEndCaption, mEndString;
- QString mDurationCaption, mDurationString;
+ TQString mStartCaption, mStartString;
+ TQString mEndCaption, mEndString;
+ TQString mDurationCaption, mDurationString;
protected:
bool visit( Event *event ) {
@@ -137,7 +137,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
mStartString = (event->doesFloat()) ? (event->dtStartDateStr(false)) : (event->dtStartStr());
} else {
mStartCaption = i18n("No start date");
- mStartString = QString::null;
+ mStartString = TQString::null;
}
if ( event->hasEndDate() ) {
@@ -154,7 +154,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
}
} else {
mEndCaption = i18n("No end date");
- mEndString = QString::null;
+ mEndString = TQString::null;
}
return true;
}
@@ -166,7 +166,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
mStartString = (todo->doesFloat()) ? (todo->dtStartDateStr(false)) : (todo->dtStartStr());
} else {
mStartCaption = i18n("No start date");
- mStartString = QString::null;
+ mStartString = TQString::null;
}
if ( todo->hasDueDate() ) {
@@ -174,7 +174,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
mEndString = (todo->doesFloat()) ? (todo->dtDueDateStr(false)) : (todo->dtDueStr());
} else {
mEndCaption = i18n("No due date");
- mEndString = QString::null;
+ mEndString = TQString::null;
}
return true;
}
@@ -182,19 +182,19 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
mStartCaption = i18n("Start date: ");
// TODO: Add shortfmt param to dtStartStr, dtEndStr and dtDueStr!!!
mStartString = (journal->doesFloat()) ? (journal->dtStartDateStr(false)) : (journal->dtStartStr());
- mEndCaption = QString::null;
- mEndString = QString::null;
+ mEndCaption = TQString::null;
+ mEndString = TQString::null;
return true;
}
};
-int CalPrintIncidence::printCaptionAndText( QPainter &p, const QRect &box, const QString &caption, const QString &text, QFont captionFont, QFont textFont )
+int CalPrintIncidence::printCaptionAndText( TQPainter &p, const TQRect &box, const TQString &caption, const TQString &text, TQFont captionFont, TQFont textFont )
{
- QFontMetrics captionFM( captionFont );
+ TQFontMetrics captionFM( captionFont );
int textWd = captionFM.width( caption );
- QRect textRect( box );
+ TQRect textRect( box );
- QFont oldFont( p.font() );
+ TQFont oldFont( p.font() );
p.setFont( captionFont );
p.drawText( box, Qt::AlignLeft|Qt::AlignTop|Qt::SingleLine, caption );
@@ -207,17 +207,17 @@ int CalPrintIncidence::printCaptionAndText( QPainter &p, const QRect &box, const
return textRect.bottom();
}
-#include <qfontdatabase.h>
-void CalPrintIncidence::print( QPainter &p, int width, int height )
+#include <tqfontdatabase.h>
+void CalPrintIncidence::print( TQPainter &p, int width, int height )
{
KLocale *local = KGlobal::locale();
- QFont oldFont(p.font());
- QFont textFont( "sans-serif", 11, QFont::Normal );
- QFont captionFont( "sans-serif", 11, QFont::Bold );
+ TQFont oldFont(p.font());
+ TQFont textFont( "sans-serif", 11, TQFont::Normal );
+ TQFont captionFont( "sans-serif", 11, TQFont::Bold );
p.setFont( textFont );
int lineHeight = p.fontMetrics().lineSpacing();
- QString cap, txt;
+ TQString cap, txt;
Incidence::List::ConstIterator it;
@@ -257,21 +257,21 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
// | Categories: _____________________ |
// +-----------------------------------+
- QRect box( 0, 0, width, height );
- QRect titleBox( box );
+ TQRect box( 0, 0, width, height );
+ TQRect titleBox( box );
titleBox.setHeight( headerHeight() );
// Draw summary as header, no small calendars in title bar, expand height if needed
- int titleBottom = drawHeader( p, (*it)->summary(), QDate(), QDate(), titleBox, true );
+ int titleBottom = drawHeader( p, (*it)->summary(), TQDate(), TQDate(), titleBox, true );
titleBox.setBottom( titleBottom );
- QRect timesBox( titleBox );
+ TQRect timesBox( titleBox );
timesBox.setTop( titleBox.bottom() + padding() );
timesBox.setHeight( height / 8 );
TimePrintStringsVisitor stringVis;
int h = timesBox.top();
if ( stringVis.act(*it) ) {
- QRect textRect( timesBox.left()+padding(), timesBox.top()+padding(), 0, lineHeight );
+ TQRect textRect( timesBox.left()+padding(), timesBox.top()+padding(), 0, lineHeight );
textRect.setRight( timesBox.center().x() );
h = printCaptionAndText( p, textRect, stringVis.mStartCaption, stringVis.mStartString, captionFont, textFont );
@@ -282,27 +282,27 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
if ( (*it)->doesRecur() ) {
- QRect recurBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
+ TQRect recurBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
// TODO: Convert the recurrence to a string and print it out!
- QString recurString( "TODO: Convert Repeat to String!" );
+ TQString recurString( "TODO: Convert Repeat to String!" );
h = QMAX( printCaptionAndText( p, recurBox, i18n("Repeats: "), recurString, captionFont, textFont ), h );
}
- QRect alarmBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
+ TQRect alarmBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
Alarm::List alarms = (*it)->alarms();
if ( alarms.count() == 0 ) {
cap = i18n("No reminders");
- txt = QString::null;
+ txt = TQString::null;
} else {
cap = i18n("Reminder: ", "%n reminders: ", alarms.count() );
- QStringList alarmStrings;
+ TQStringList alarmStrings;
KCal::Alarm::List::ConstIterator it;
for ( it = alarms.begin(); it != alarms.end(); ++it ) {
Alarm *alarm = *it;
// Alarm offset, copied from koeditoralarms.cpp:
- QString offsetstr;
+ TQString offsetstr;
int offset = 0;
if ( alarm->hasStartOffset() ) {
offset = alarm->startOffset().asSeconds();
@@ -343,7 +343,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
h = QMAX( printCaptionAndText( p, alarmBox, cap, txt, captionFont, textFont ), h );
- QRect organizerBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
+ TQRect organizerBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
h = QMAX( printCaptionAndText( p, organizerBox, i18n("Organizer: "), (*it)->organizer().fullName(), captionFont, textFont ), h );
// Finally, draw the frame around the time information...
@@ -351,7 +351,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
drawBox( p, BOX_BORDER_WIDTH, timesBox );
- QRect locationBox( timesBox );
+ TQRect locationBox( timesBox );
locationBox.setTop( timesBox.bottom() + padding() );
locationBox.setHeight( 0 );
int locationBottom = drawBoxWithCaption( p, locationBox, i18n("Location: "),
@@ -360,20 +360,20 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
// Now start constructing the boxes from the bottom:
- QRect categoriesBox( locationBox );
+ TQRect categoriesBox( locationBox );
categoriesBox.setBottom( box.bottom() );
categoriesBox.setTop( categoriesBox.bottom() - lineHeight - 2*padding() );
- QRect attendeesBox( box.left(), categoriesBox.top()-padding()-box.height()/9, box.width(), box.height()/9 );
+ TQRect attendeesBox( box.left(), categoriesBox.top()-padding()-box.height()/9, box.width(), box.height()/9 );
if ( !mShowAttendees ) {
attendeesBox.setTop( categoriesBox.top() );
}
- QRect attachmentsBox( box.left(), attendeesBox.top()-padding()-box.height()/9, box.width()*3/4 - padding(), box.height()/9 );
- QRect optionsBox( attachmentsBox.right() + padding(), attachmentsBox.top(), 0, 0 );
+ TQRect attachmentsBox( box.left(), attendeesBox.top()-padding()-box.height()/9, box.width()*3/4 - padding(), box.height()/9 );
+ TQRect optionsBox( attachmentsBox.right() + padding(), attachmentsBox.top(), 0, 0 );
optionsBox.setRight( box.right() );
optionsBox.setBottom( attachmentsBox.bottom() );
- QRect notesBox( optionsBox.left(), locationBox.bottom() + padding(), optionsBox.width(), 0 );
+ TQRect notesBox( optionsBox.left(), locationBox.bottom() + padding(), optionsBox.width(), 0 );
notesBox.setBottom( optionsBox.top() - padding() );
// TODO: Adjust boxes depending on the show options...
@@ -385,7 +385,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
// bool mShowAttachments;
- QRect descriptionBox( notesBox );
+ TQRect descriptionBox( notesBox );
descriptionBox.setLeft( box.left() );
descriptionBox.setRight( mShowOptions?(attachmentsBox.right()):(box.right()) );
@@ -396,9 +396,9 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
if ( mShowSubitemsNotes ) {
if ( (*it)->relations().isEmpty() || (*it)->type() != "Todo" ) {
int notesPosition = drawBoxWithCaption( p, notesBox, i18n("Notes:"),
- QString::null, /*sameLine=*/false, /*expand=*/false,
+ TQString::null, /*sameLine=*/false, /*expand=*/false,
captionFont, textFont );
- QPen oldPen( p.pen() );
+ TQPen oldPen( p.pen() );
p.setPen( Qt::DotLine );
while ( (notesPosition += int(1.5*lineHeight)) < notesBox.bottom() ) {
p.drawLine( notesBox.left()+padding(), notesPosition, notesBox.right()-padding(), notesPosition );
@@ -414,19 +414,19 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
if ( mShowAttachments ) {
int attachStart = drawBoxWithCaption( p, attachmentsBox,
- i18n("Attachments:"), QString::null, /*sameLine=*/false,
+ i18n("Attachments:"), TQString::null, /*sameLine=*/false,
/*expand=*/false, captionFont, textFont );
// TODO: Print out the attachments somehow
}
if ( mShowAttendees ) {
Attendee::List attendees = (*it)->attendees();
- QString attendeeCaption;
+ TQString attendeeCaption;
if ( attendees.count() == 0 )
attendeeCaption = i18n("No Attendees");
else
attendeeCaption = i18n("1 Attendee:", "%n Attendees:", attendees.count() );
- QString attendeeString;
+ TQString attendeeString;
for ( Attendee::List::ConstIterator ait = attendees.begin(); ait != attendees.end(); ++ait ) {
if ( !attendeeString.isEmpty() ) attendeeString += "\n";
attendeeString += i18n("Formatting of an attendee: "
@@ -441,7 +441,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
}
if ( mShowOptions ) {
- QString optionsString;
+ TQString optionsString;
if ( !(*it)->statusStr().isEmpty() ) {
optionsString += i18n("Status: %1").arg( (*it)->statusStr() );
optionsString += "\n";
@@ -490,7 +490,7 @@ CalPrintDay::~CalPrintDay()
{
}
-QWidget *CalPrintDay::createConfigWidget( QWidget *w )
+TQWidget *CalPrintDay::createConfigWidget( TQWidget *w )
{
return new CalPrintDayConfig_Base( w );
}
@@ -532,10 +532,10 @@ void CalPrintDay::setSettingsWidget()
void CalPrintDay::loadConfig()
{
if ( mConfig ) {
- QDate dt;
- QTime tm1( dayStart() );
- QDateTime startTm( dt, tm1 );
- QDateTime endTm( dt, tm1.addSecs( 12 * 60 * 60 ) );
+ TQDate dt;
+ TQTime tm1( dayStart() );
+ TQDateTime startTm( dt, tm1 );
+ TQDateTime endTm( dt, tm1.addSecs( 12 * 60 * 60 ) );
mStartTime = mConfig->readDateTimeEntry( "Start time", &startTm ).time();
mEndTime = mConfig->readDateTimeEntry( "End time", &endTm ).time();
mIncludeTodos = mConfig->readBoolEntry( "Include todos", false );
@@ -548,14 +548,14 @@ void CalPrintDay::saveConfig()
{
readSettingsWidget();
if ( mConfig ) {
- mConfig->writeEntry( "Start time", QDateTime( QDate(), mStartTime ) );
- mConfig->writeEntry( "End time", QDateTime( QDate(), mEndTime ) );
+ mConfig->writeEntry( "Start time", TQDateTime( TQDate(), mStartTime ) );
+ mConfig->writeEntry( "End time", TQDateTime( TQDate(), mEndTime ) );
mConfig->writeEntry( "Include todos", mIncludeTodos );
mConfig->writeEntry( "Include all events", mIncludeAllEvents );
}
}
-void CalPrintDay::setDateRange( const QDate& from, const QDate& to )
+void CalPrintDay::setDateRange( const TQDate& from, const TQDate& to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintDayConfig_Base *cfg =
@@ -566,45 +566,45 @@ void CalPrintDay::setDateRange( const QDate& from, const QDate& to )
}
}
-void CalPrintDay::print( QPainter &p, int width, int height )
+void CalPrintDay::print( TQPainter &p, int width, int height )
{
- QDate curDay( mFromDate );
+ TQDate curDay( mFromDate );
do {
- QTime curStartTime( mStartTime );
- QTime curEndTime( mEndTime );
+ TQTime curStartTime( mStartTime );
+ TQTime curEndTime( mEndTime );
// For an invalid time range, simply show one hour, starting at the hour
// before the given start time
if ( curEndTime <= curStartTime ) {
- curStartTime = QTime( curStartTime.hour(), 0, 0 );
+ curStartTime = TQTime( curStartTime.hour(), 0, 0 );
curEndTime = curStartTime.addSecs( 3600 );
}
KLocale *local = KGlobal::locale();
- QRect headerBox( 0, 0, width, headerHeight() );
- drawHeader( p, local->formatDate( curDay ), curDay, QDate(), headerBox );
+ TQRect headerBox( 0, 0, width, headerHeight() );
+ drawHeader( p, local->formatDate( curDay ), curDay, TQDate(), headerBox );
Event::List eventList = mCalendar->events( curDay,
EventSortStartDate,
SortDirectionAscending );
- p.setFont( QFont( "sans-serif", 12 ) );
+ p.setFont( TQFont( "sans-serif", 12 ) );
// TODO: Find a good way to determine the height of the all-day box
- QRect allDayBox( TIMELINE_WIDTH + padding(), headerBox.bottom() + padding(),
+ TQRect allDayBox( TIMELINE_WIDTH + padding(), headerBox.bottom() + padding(),
0, height / 20 );
allDayBox.setRight( width );
int allDayHeight = drawAllDayBox( p, eventList, curDay, true, allDayBox );
- QRect dayBox( allDayBox );
+ TQRect dayBox( allDayBox );
dayBox.setTop( allDayHeight /*allDayBox.bottom()*/ );
dayBox.setBottom( height );
drawAgendaDayBox( p, eventList, curDay, mIncludeAllEvents,
curStartTime, curEndTime, dayBox );
- QRect tlBox( dayBox );
+ TQRect tlBox( dayBox );
tlBox.setLeft( 0 );
tlBox.setWidth( TIMELINE_WIDTH );
drawTimeLine( p, curStartTime, curEndTime, tlBox );
@@ -627,7 +627,7 @@ CalPrintWeek::~CalPrintWeek()
{
}
-QWidget *CalPrintWeek::createConfigWidget( QWidget *w )
+TQWidget *CalPrintWeek::createConfigWidget( TQWidget *w )
{
return new CalPrintWeekConfig_Base( w );
}
@@ -672,10 +672,10 @@ void CalPrintWeek::setSettingsWidget()
void CalPrintWeek::loadConfig()
{
if ( mConfig ) {
- QDate dt;
- QTime tm1( dayStart() );
- QDateTime startTm( dt, tm1 );
- QDateTime endTm( dt, tm1.addSecs( 43200 ) );
+ TQDate dt;
+ TQTime tm1( dayStart() );
+ TQDateTime startTm( dt, tm1 );
+ TQDateTime endTm( dt, tm1.addSecs( 43200 ) );
mStartTime = mConfig->readDateTimeEntry( "Start time", &startTm ).time();
mEndTime = mConfig->readDateTimeEntry( "End time", &endTm ).time();
mIncludeTodos = mConfig->readBoolEntry( "Include todos", false );
@@ -688,8 +688,8 @@ void CalPrintWeek::saveConfig()
{
readSettingsWidget();
if ( mConfig ) {
- mConfig->writeEntry( "Start time", QDateTime( QDate(), mStartTime ) );
- mConfig->writeEntry( "End time", QDateTime( QDate(), mEndTime ) );
+ mConfig->writeEntry( "Start time", TQDateTime( TQDate(), mStartTime ) );
+ mConfig->writeEntry( "End time", TQDateTime( TQDate(), mEndTime ) );
mConfig->writeEntry( "Include todos", mIncludeTodos );
mConfig->writeEntry( "Print type", int( mWeekPrintType ) );
}
@@ -702,7 +702,7 @@ KPrinter::Orientation CalPrintWeek::defaultOrientation()
else return KPrinter::Landscape;
}
-void CalPrintWeek::setDateRange( const QDate &from, const QDate &to )
+void CalPrintWeek::setDateRange( const TQDate &from, const TQDate &to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintWeekConfig_Base *cfg =
@@ -713,9 +713,9 @@ void CalPrintWeek::setDateRange( const QDate &from, const QDate &to )
}
}
-void CalPrintWeek::print( QPainter &p, int width, int height )
+void CalPrintWeek::print( TQPainter &p, int width, int height )
{
- QDate curWeek, fromWeek, toWeek;
+ TQDate curWeek, fromWeek, toWeek;
// correct begin and end to first and last day of week
int weekdayCol = weekdayColumn( mFromDate.dayOfWeek() );
@@ -726,9 +726,9 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
curWeek = fromWeek.addDays( 6 );
KLocale *local = KGlobal::locale();
- QString line1, line2, title;
- QRect headerBox( 0, 0, width, headerHeight() );
- QRect weekBox( headerBox );
+ TQString line1, line2, title;
+ TQRect headerBox( 0, 0, width, headerHeight() );
+ TQRect weekBox( headerBox );
weekBox.setTop( headerBox.bottom() + padding() );
weekBox.setBottom( height );
@@ -743,7 +743,7 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
title = i18n("date from-\nto", "%1 -\n%2");;
}
title = title.arg( line1 ).arg( line2 );
- drawHeader( p, title, curWeek.addDays( -6 ), QDate(), headerBox );
+ drawHeader( p, title, curWeek.addDays( -6 ), TQDate(), headerBox );
drawWeek( p, curWeek, weekBox );
curWeek = curWeek.addDays( 7 );
if ( curWeek <= toWeek )
@@ -762,8 +762,8 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
title = i18n("date from -\nto (week number)", "%1 -\n%2 (Week %3)");
}
title = title.arg( line1 ).arg( line2 ).arg( curWeek.weekNumber() );
- drawHeader( p, title, curWeek, QDate(), headerBox );
- QRect weekBox( headerBox );
+ drawHeader( p, title, curWeek, TQDate(), headerBox );
+ TQRect weekBox( headerBox );
weekBox.setTop( headerBox.bottom() + padding() );
weekBox.setBottom( height );
@@ -776,19 +776,19 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
break;
case SplitWeek: {
- QRect weekBox1( weekBox );
+ TQRect weekBox1( weekBox );
// On the left side there are four days (mo-th) plus the timeline,
// on the right there are only three days (fr-su) plus the timeline. Don't
// use the whole width, but rather give them the same width as on the left.
weekBox1.setRight( int( ( width - TIMELINE_WIDTH ) * 3. / 4. + TIMELINE_WIDTH ) );
do {
- QDate endLeft( fromWeek.addDays( 3 ) );
+ TQDate endLeft( fromWeek.addDays( 3 ) );
int hh = headerHeight();
drawTimeTable( p, fromWeek, endLeft,
mStartTime, mEndTime, weekBox );
mPrinter->newPage();
- drawSplitHeaderRight( p, fromWeek, curWeek, QDate(), width, hh );
+ drawSplitHeaderRight( p, fromWeek, curWeek, TQDate(), width, hh );
drawTimeTable( p, endLeft.addDays( 1 ), curWeek,
mStartTime, mEndTime, weekBox1 );
@@ -817,7 +817,7 @@ CalPrintMonth::~CalPrintMonth()
{
}
-QWidget *CalPrintMonth::createConfigWidget( QWidget *w )
+TQWidget *CalPrintMonth::createConfigWidget( TQWidget *w )
{
return new CalPrintMonthConfig_Base( w );
}
@@ -827,8 +827,8 @@ void CalPrintMonth::readSettingsWidget()
CalPrintMonthConfig_Base *cfg =
dynamic_cast<CalPrintMonthConfig_Base *>( mConfigWidget );
if ( cfg ) {
- mFromDate = QDate( cfg->mFromYear->value(), cfg->mFromMonth->currentItem()+1, 1 );
- mToDate = QDate( cfg->mToYear->value(), cfg->mToMonth->currentItem()+1, 1 );
+ mFromDate = TQDate( cfg->mFromYear->value(), cfg->mFromMonth->currentItem()+1, 1 );
+ mToDate = TQDate( cfg->mToYear->value(), cfg->mToMonth->currentItem()+1, 1 );
mWeekNumbers = cfg->mWeekNumbers->isChecked();
mRecurDaily = cfg->mRecurDaily->isChecked();
@@ -874,7 +874,7 @@ void CalPrintMonth::saveConfig()
}
}
-void CalPrintMonth::setDateRange( const QDate &from, const QDate &to )
+void CalPrintMonth::setDateRange( const TQDate &from, const TQDate &to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintMonthConfig_Base *cfg =
@@ -898,9 +898,9 @@ void CalPrintMonth::setDateRange( const QDate &from, const QDate &to )
}
}
-void CalPrintMonth::print( QPainter &p, int width, int height )
+void CalPrintMonth::print( TQPainter &p, int width, int height )
{
- QDate curMonth, fromMonth, toMonth;
+ TQDate curMonth, fromMonth, toMonth;
fromMonth = mFromDate.addDays( -( mFromDate.day() - 1 ) );
toMonth = mToDate.addDays( mToDate.daysInMonth() - mToDate.day() );
@@ -909,15 +909,15 @@ void CalPrintMonth::print( QPainter &p, int width, int height )
const KCalendarSystem *calSys = calendarSystem();
if ( !calSys ) return;
- QRect headerBox( 0, 0, width, headerHeight() );
- QRect monthBox( 0, 0, width, height );
+ TQRect headerBox( 0, 0, width, headerHeight() );
+ TQRect monthBox( 0, 0, width, height );
monthBox.setTop( headerBox.bottom() + padding() );
do {
- QString title( i18n("monthname year", "%1 %2") );
+ TQString title( i18n("monthname year", "%1 %2") );
title = title.arg( calSys->monthName( curMonth ) )
.arg( curMonth.year() );
- QDate tmp( fromMonth );
+ TQDate tmp( fromMonth );
int weekdayCol = weekdayColumn( tmp.dayOfWeek() );
tmp = tmp.addDays( -weekdayCol );
@@ -947,7 +947,7 @@ CalPrintTodos::~CalPrintTodos()
{
}
-QWidget *CalPrintTodos::createConfigWidget( QWidget *w )
+TQWidget *CalPrintTodos::createConfigWidget( TQWidget *w )
{
return new CalPrintTodoConfig_Base( w );
}
@@ -1051,7 +1051,7 @@ void CalPrintTodos::saveConfig()
}
}
-void CalPrintTodos::print( QPainter &p, int width, int height )
+void CalPrintTodos::print( TQPainter &p, int width, int height )
{
// TODO: Find a good way to guarantee a nicely designed output
int pospriority = 10;
@@ -1062,15 +1062,15 @@ void CalPrintTodos::print( QPainter &p, int width, int height )
int fontHeight = 10;
// Draw the First Page Header
- drawHeader( p, mPageTitle, mFromDate, QDate(),
- QRect( 0, 0, width, headerHeight() ) );
+ drawHeader( p, mPageTitle, mFromDate, TQDate(),
+ TQRect( 0, 0, width, headerHeight() ) );
// Draw the Column Headers
int mCurrentLinePos = headerHeight() + 5;
- QString outStr;
- QFont oldFont( p.font() );
+ TQString outStr;
+ TQFont oldFont( p.font() );
- p.setFont( QFont( "sans-serif", 10, QFont::Bold ) );
+ p.setFont( TQFont( "sans-serif", 10, TQFont::Bold ) );
lineSpacing = p.fontMetrics().lineSpacing();
mCurrentLinePos += lineSpacing;
if ( mIncludePriority ) {
@@ -1103,7 +1103,7 @@ void CalPrintTodos::print( QPainter &p, int width, int height )
posdue = -1;
}
- p.setFont( QFont( "sans-serif", 10 ) );
+ p.setFont( TQFont( "sans-serif", 10 ) );
fontHeight = p.fontMetrics().height();
Todo::List todoList;
diff --git a/korganizer/printing/calprintdefaultplugins.h b/korganizer/printing/calprintdefaultplugins.h
index 463312ff2..79a909a87 100644
--- a/korganizer/printing/calprintdefaultplugins.h
+++ b/korganizer/printing/calprintdefaultplugins.h
@@ -42,8 +42,8 @@ class CalPrintIncidence : public CalPrintPluginBase
public:
CalPrintIncidence();
virtual ~CalPrintIncidence();
- virtual QString description() { return i18n("Print &incidence"); }
- virtual QString info() { return i18n("Prints an incidence on one page"); }
+ virtual TQString description() { return i18n("Print &incidence"); }
+ virtual TQString info() { return i18n("Prints an incidence on one page"); }
virtual int sortID() { return CalPrinterBase::Incidence; }
// Enable the Print Incidence option only if there are selected incidences.
virtual bool enabled()
@@ -54,19 +54,19 @@ class CalPrintIncidence : public CalPrintPluginBase
return false;
}
}
- virtual QWidget *createConfigWidget(QWidget*);
+ virtual TQWidget *createConfigWidget(TQWidget*);
virtual KPrinter::Orientation defaultOrientation()
{ return KPrinter::Portrait; }
public:
- void print( QPainter &p, int width, int height );
+ void print( TQPainter &p, int width, int height );
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
protected:
- int printCaptionAndText( QPainter &p, const QRect &box, const QString &caption,
- const QString &text, QFont captionFont, QFont textFont );
+ int printCaptionAndText( TQPainter &p, const TQRect &box, const TQString &caption,
+ const TQString &text, TQFont captionFont, TQFont textFont );
protected:
@@ -82,22 +82,22 @@ class CalPrintDay : public CalPrintPluginBase
public:
CalPrintDay();
virtual ~CalPrintDay();
- virtual QString description() { return i18n("Print da&y"); }
- virtual QString info() { return i18n("Prints all events of a single day on one page"); }
+ virtual TQString description() { return i18n("Print da&y"); }
+ virtual TQString info() { return i18n("Prints all events of a single day on one page"); }
virtual int sortID() { return CalPrinterBase::Day; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget( QWidget* );
+ virtual TQWidget *createConfigWidget( TQWidget* );
public:
- void print(QPainter &p, int width, int height);
+ void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
- QTime mStartTime, mEndTime;
+ TQTime mStartTime, mEndTime;
bool mIncludeTodos;
bool mIncludeAllEvents;
};
@@ -107,27 +107,27 @@ class CalPrintWeek : public CalPrintPluginBase
public:
CalPrintWeek();
virtual ~CalPrintWeek();
- virtual QString description() { return i18n("Print &week"); }
- virtual QString info() { return i18n("Prints all events of one week on one page"); }
+ virtual TQString description() { return i18n("Print &week"); }
+ virtual TQString info() { return i18n("Prints all events of one week on one page"); }
virtual int sortID() { return CalPrinterBase::Week; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget(QWidget*);
+ virtual TQWidget *createConfigWidget(TQWidget*);
/**
Returns the default orientation for the eWeekPrintType.
*/
virtual KPrinter::Orientation defaultOrientation();
public:
- void print(QPainter &p, int width, int height);
+ void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
enum eWeekPrintType { Filofax=0, Timetable, SplitWeek } mWeekPrintType;
- QTime mStartTime, mEndTime;
+ TQTime mStartTime, mEndTime;
bool mIncludeTodos;
};
@@ -136,20 +136,20 @@ class CalPrintMonth : public CalPrintPluginBase
public:
CalPrintMonth();
virtual ~CalPrintMonth();
- virtual QString description() { return i18n("Print mont&h"); }
- virtual QString info() { return i18n("Prints all events of one month on one page"); }
+ virtual TQString description() { return i18n("Print mont&h"); }
+ virtual TQString info() { return i18n("Prints all events of one month on one page"); }
virtual int sortID() { return CalPrinterBase::Month; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget(QWidget*);
+ virtual TQWidget *createConfigWidget(TQWidget*);
virtual KPrinter::Orientation defaultOrientation() { return KPrinter::Landscape; }
public:
- void print(QPainter &p, int width, int height);
+ void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
bool mWeekNumbers;
@@ -163,21 +163,21 @@ class CalPrintTodos : public CalPrintPluginBase
public:
CalPrintTodos();
virtual ~CalPrintTodos();
- virtual QString description() { return i18n("Print to-&dos"); }
- virtual QString info() { return i18n("Prints all to-dos in a (tree-like) list"); }
+ virtual TQString description() { return i18n("Print to-&dos"); }
+ virtual TQString info() { return i18n("Prints all to-dos in a (tree-like) list"); }
virtual int sortID() { return CalPrinterBase::Todolist; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget(QWidget*);
+ virtual TQWidget *createConfigWidget(TQWidget*);
public:
- void print( QPainter &p, int width, int height );
+ void print( TQPainter &p, int width, int height );
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
protected:
- QString mPageTitle;
+ TQString mPageTitle;
enum eTodoPrintType {
TodosAll = 0, TodosUnfinished, TodosDueRange
diff --git a/korganizer/printing/calprinter.cpp b/korganizer/printing/calprinter.cpp
index 066c9c296..0ab61fdac 100644
--- a/korganizer/printing/calprinter.cpp
+++ b/korganizer/printing/calprinter.cpp
@@ -23,15 +23,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qvbuttongroup.h>
-#include <qwidgetstack.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qsplitter.h>
+#include <tqvbuttongroup.h>
+#include <tqwidgetstack.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqsplitter.h>
#include <kprinter.h>
#include <ksimpleconfig.h>
@@ -46,8 +46,8 @@
#include "calprintdefaultplugins.h"
-CalPrinter::CalPrinter( QWidget *parent, Calendar *calendar, KOrg::CoreHelper *helper )
- : QObject( parent, "CalPrinter" )
+CalPrinter::CalPrinter( TQWidget *parent, Calendar *calendar, KOrg::CoreHelper *helper )
+ : TQObject( parent, "CalPrinter" )
{
mParent = parent;
mConfig = new KSimpleConfig( "korganizer_printing.rc" );
@@ -90,7 +90,7 @@ void CalPrinter::init( Calendar *calendar )
}
}
-void CalPrinter::setDateRange( const QDate &fd, const QDate &td )
+void CalPrinter::setDateRange( const TQDate &fd, const TQDate &td )
{
KOrg::PrintPlugin::List::Iterator it = mPrintPlugins.begin();
for ( ; it != mPrintPlugins.end(); ++it ) {
@@ -98,7 +98,7 @@ void CalPrinter::setDateRange( const QDate &fd, const QDate &td )
}
}
-void CalPrinter::print( int type, const QDate &fd, const QDate &td,
+void CalPrinter::print( int type, const TQDate &fd, const TQDate &td,
Incidence::List selectedIncidences, bool preview )
{
KOrg::PrintPlugin::List::Iterator it = mPrintPlugins.begin();
@@ -111,7 +111,7 @@ void CalPrinter::print( int type, const QDate &fd, const QDate &td,
printDialog.setPrintType( type );
setDateRange( fd, td );
- if ( printDialog.exec() == QDialog::Accepted ) {
+ if ( printDialog.exec() == TQDialog::Accepted ) {
mConfig->writeEntry( "Orientation", printDialog.orientation() );
// Save all changes in the dialog
@@ -168,33 +168,33 @@ void CalPrinter::updateConfig()
/****************************************************************************/
CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- QSplitter *splitter = new QSplitter( page );
- splitter->setOrientation( QSplitter::Horizontal );
+ TQSplitter *splitter = new TQSplitter( page );
+ splitter->setOrientation( TQSplitter::Horizontal );
- mTypeGroup = new QVButtonGroup( i18n("Print Style"), splitter, "buttonGroup" );
+ mTypeGroup = new TQVButtonGroup( i18n("Print Style"), splitter, "buttonGroup" );
// use the minimal width possible = max width of the radio buttons, not extensible
-/* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4,
- (QSizePolicy::SizeType)5, 0, 0,
+/* mTypeGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4,
+ (TQSizePolicy::SizeType)5, 0, 0,
mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/
- QWidget *splitterRight = new QWidget( splitter, "splitterRight" );
- QGridLayout *splitterRightLayout = new QGridLayout( splitterRight );
+ TQWidget *splitterRight = new TQWidget( splitter, "splitterRight" );
+ TQGridLayout *splitterRightLayout = new TQGridLayout( splitterRight );
splitterRightLayout->setMargin( marginHint() );
splitterRightLayout->setSpacing( spacingHint() );
- mConfigArea = new QWidgetStack( splitterRight, "configWidgetStack" );
+ mConfigArea = new TQWidgetStack( splitterRight, "configWidgetStack" );
splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 );
- QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"),
+ TQLabel *orientationLabel = new TQLabel( i18n("Page &orientation:"),
splitterRight, "orientationLabel" );
splitterRightLayout->addWidget( orientationLabel, 1, 0 );
- mOrientationSelection = new QComboBox( splitterRight, "orientationCombo" );
+ mOrientationSelection = new TQComboBox( splitterRight, "orientationCombo" );
mOrientationSelection->insertItem( i18n("Use Default Orientation of Selected Style") );
mOrientationSelection->insertItem( i18n("Use Printer Default") );
mOrientationSelection->insertItem( i18n("Portrait") );
@@ -202,7 +202,7 @@ CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins,
splitterRightLayout->addWidget( mOrientationSelection, 1, 1 );
// signals and slots connections
- connect( mTypeGroup, SIGNAL( clicked( int ) ), SLOT( setPrintType( int ) ) );
+ connect( mTypeGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( setPrintType( int ) ) );
orientationLabel->setBuddy( mOrientationSelection );
// First insert the config widgets into the widget stack. This possibly assigns
@@ -214,10 +214,10 @@ CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins,
mPluginIDs[newid] = (*it);
}
// Insert all plugins with in sorted order; plugins with clashing IDs will be first...
- QMap<int, KOrg::PrintPlugin*>::ConstIterator mapit;
+ TQMap<int, KOrg::PrintPlugin*>::ConstIterator mapit;
for ( mapit = mPluginIDs.begin(); mapit != mPluginIDs.end(); ++mapit ) {
KOrg::PrintPlugin *p = mapit.data();
- QRadioButton *radioButton = new QRadioButton( p->description(), mTypeGroup );
+ TQRadioButton *radioButton = new TQRadioButton( p->description(), mTypeGroup );
radioButton->setEnabled( p->enabled() );
mTypeGroup->insert( radioButton, mapit.key() );
// radioButton->setMinimumHeight( radioButton->sizeHint().height() - 5 );
@@ -266,7 +266,7 @@ void CalPrintDialog::slotOk()
{
mOrientation = (CalPrinter::ePrintOrientation)mOrientationSelection->currentItem();
- QMap<int, KOrg::PrintPlugin*>::Iterator it = mPluginIDs.begin();
+ TQMap<int, KOrg::PrintPlugin*>::Iterator it = mPluginIDs.begin();
for ( ; it != mPluginIDs.end(); ++it ) {
if ( it.data() )
it.data()->readSettingsWidget();
diff --git a/korganizer/printing/calprinter.h b/korganizer/printing/calprinter.h
index e05073e58..a1cea6a24 100644
--- a/korganizer/printing/calprinter.h
+++ b/korganizer/printing/calprinter.h
@@ -27,7 +27,7 @@
#ifndef KORG_NOPRINTER
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdialogbase.h>
#include <korganizer/baseview.h>
#include <korganizer/printplugin.h>
@@ -50,7 +50,7 @@ class QLabel;
different formats (day, week, month). It also provides a way for setting
up the printer and remembering these preferences.
*/
-class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
+class KDE_EXPORT CalPrinter : public TQObject, public KOrg::CalPrinterBase
{
Q_OBJECT
@@ -67,7 +67,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
\param cal calendar to be printed
\param helper is a pointer to the KOrg::CoreHelper object
*/
- CalPrinter( QWidget *par, Calendar *cal, KOrg::CoreHelper *helper );
+ CalPrinter( TQWidget *par, Calendar *cal, KOrg::CoreHelper *helper );
virtual ~CalPrinter();
void init( Calendar *calendar );
@@ -78,7 +78,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
\param start Start date
\param end End date
*/
- void setDateRange( const QDate &start, const QDate &end );
+ void setDateRange( const TQDate &start, const TQDate &end );
public slots:
void updateConfig();
@@ -87,7 +87,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
void doPrint( KOrg::PrintPlugin *selectedStyle, CalPrinter::ePrintOrientation dlgorientation, bool preview = false );
public:
- void print( int type, const QDate &fd, const QDate &td,
+ void print( int type, const TQDate &fd, const TQDate &td,
Incidence::List selectedIncidences = Incidence::List(), bool preview = false );
Calendar *calendar() const;
@@ -98,7 +98,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
private:
Calendar *mCalendar;
- QWidget *mParent;
+ TQWidget *mParent;
KConfig *mConfig;
KOrg::CoreHelper *mCoreHelper;
};
@@ -108,7 +108,7 @@ class CalPrintDialog : public KDialogBase
Q_OBJECT
public:
CalPrintDialog( KOrg::PrintPlugin::List plugins,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
virtual ~CalPrintDialog();
KOrg::PrintPlugin *selectedPlugin();
void setOrientation( CalPrinter::ePrintOrientation orientation );
@@ -122,11 +122,11 @@ class CalPrintDialog : public KDialogBase
void slotOk();
private:
- QVButtonGroup *mTypeGroup;
- QWidgetStack *mConfigArea;
- QMap<int, KOrg::PrintPlugin*> mPluginIDs;
- QString mPreviewText;
- QComboBox *mOrientationSelection;
+ TQVButtonGroup *mTypeGroup;
+ TQWidgetStack *mConfigArea;
+ TQMap<int, KOrg::PrintPlugin*> mPluginIDs;
+ TQString mPreviewText;
+ TQComboBox *mOrientationSelection;
CalPrinter::ePrintOrientation mOrientation;
};
diff --git a/korganizer/printing/calprintpluginbase.cpp b/korganizer/printing/calprintpluginbase.cpp
index 44739db48..6f6762032 100644
--- a/korganizer/printing/calprintpluginbase.cpp
+++ b/korganizer/printing/calprintpluginbase.cpp
@@ -23,10 +23,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -48,10 +48,10 @@ inline int round(const double x)
class CalPrintPluginBase::TodoParentStart
{
public:
- TodoParentStart( QRect pt = QRect(), bool page = true )
+ TodoParentStart( TQRect pt = TQRect(), bool page = true )
: mRect( pt ), mSamePage( page ) {}
- QRect mRect;
+ TQRect mRect;
bool mSamePage;
};
@@ -64,17 +64,17 @@ class CalPrintPluginBase::TodoParentStart
class PrintCellItem : public KOrg::CellItem
{
public:
- PrintCellItem( Event *event, const QDateTime &start, const QDateTime &end )
+ PrintCellItem( Event *event, const TQDateTime &start, const TQDateTime &end )
: mEvent( event ), mStart( start), mEnd( end )
{
}
Event *event() const { return mEvent; }
- QString label() const { return mEvent->summary(); }
+ TQString label() const { return mEvent->summary(); }
- QDateTime start() const { return mStart; }
- QDateTime end() const { return mEnd; }
+ TQDateTime start() const { return mStart; }
+ TQDateTime end() const { return mEnd; }
/** Calculate the start and end date/time of the recurrence that
happens on the given day */
@@ -96,7 +96,7 @@ class PrintCellItem : public KOrg::CellItem
private:
Event *mEvent;
- QDateTime mStart, mEnd;
+ TQDateTime mStart, mEnd;
};
@@ -118,21 +118,21 @@ CalPrintPluginBase::~CalPrintPluginBase()
-QWidget *CalPrintPluginBase::createConfigWidget( QWidget *w )
+TQWidget *CalPrintPluginBase::createConfigWidget( TQWidget *w )
{
- QFrame *wdg = new QFrame( w );
- QVBoxLayout *layout = new QVBoxLayout( wdg );
+ TQFrame *wdg = new TQFrame( w );
+ TQVBoxLayout *layout = new TQVBoxLayout( wdg );
- QLabel *title = new QLabel( description(), wdg );
- QFont titleFont( title->font() );
+ TQLabel *title = new TQLabel( description(), wdg );
+ TQFont titleFont( title->font() );
titleFont.setPointSize( 20 );
titleFont.setBold( true );
title->setFont( titleFont );
layout->addWidget( title );
- layout->addWidget( new QLabel( info(), wdg ) );
+ layout->addWidget( new TQLabel( info(), wdg ) );
layout->addSpacing( 20 );
- layout->addWidget( new QLabel( i18n("This printing style does not "
+ layout->addWidget( new TQLabel( i18n("This printing style does not "
"have any configuration options."),
wdg ) );
layout->addStretch();
@@ -143,7 +143,7 @@ void CalPrintPluginBase::doPrint( KPrinter *printer )
{
if ( !printer ) return;
mPrinter = printer;
- QPainter p;
+ TQPainter p;
mPrinter->setColorMode( mUseColors?(KPrinter::Color):(KPrinter::GrayScale) );
@@ -155,7 +155,7 @@ void CalPrintPluginBase::doPrint( KPrinter *printer )
p.setViewport( margins, margins,
p.viewport().width() - 2*margins,
p.viewport().height() - 2*margins );
-// QRect vp( p.viewport() );
+// TQRect vp( p.viewport() );
// vp.setRight( vp.right()*2 );
// vp.setBottom( vp.bottom()*2 );
// p.setWindow( vp );
@@ -175,7 +175,7 @@ void CalPrintPluginBase::doLoadConfig()
if ( mConfig ) {
KConfigGroupSaver saver( mConfig, description() );
mConfig->sync();
- QDateTime currDate( QDate::currentDate() );
+ TQDateTime currDate( TQDate::currentDate() );
mFromDate = mConfig->readDateTimeEntry( "FromDate", &currDate ).date();
mToDate = mConfig->readDateTimeEntry( "ToDate" ).date();
mUseColors = mConfig->readBoolEntry( "UseColors", true );
@@ -191,8 +191,8 @@ void CalPrintPluginBase::doSaveConfig()
if ( mConfig ) {
KConfigGroupSaver saver( mConfig, description() );
saveConfig();
- mConfig->writeEntry( "FromDate", QDateTime( mFromDate ) );
- mConfig->writeEntry( "ToDate", QDateTime( mToDate ) );
+ mConfig->writeEntry( "FromDate", TQDateTime( mFromDate ) );
+ mConfig->writeEntry( "ToDate", TQDateTime( mToDate ) );
mConfig->writeEntry( "UseColors", mUseColors );
mConfig->sync();
} else {
@@ -226,50 +226,50 @@ KPrinter::Orientation CalPrintPluginBase::orientation() const
-QTime CalPrintPluginBase::dayStart()
+TQTime CalPrintPluginBase::dayStart()
{
- QTime start( 8,0,0 );
+ TQTime start( 8,0,0 );
if ( mCoreHelper ) start = mCoreHelper->dayStart();
return start;
}
-void CalPrintPluginBase::setCategoryColors( QPainter &p, Incidence *incidence )
+void CalPrintPluginBase::setCategoryColors( TQPainter &p, Incidence *incidence )
{
- QColor bgColor = categoryBgColor( incidence );
+ TQColor bgColor = categoryBgColor( incidence );
if ( bgColor.isValid() )
p.setBrush( bgColor );
- QColor tColor( textColor( bgColor ) );
+ TQColor tColor( textColor( bgColor ) );
if ( tColor.isValid() )
p.setPen( tColor );
}
-QColor CalPrintPluginBase::categoryBgColor( Incidence *incidence )
+TQColor CalPrintPluginBase::categoryBgColor( Incidence *incidence )
{
if (mCoreHelper && incidence)
return mCoreHelper->categoryColor( incidence->categories() );
else
- return QColor();
+ return TQColor();
}
-QColor CalPrintPluginBase::textColor( const QColor &color )
+TQColor CalPrintPluginBase::textColor( const TQColor &color )
{
- return (mCoreHelper)?(mCoreHelper->textColor( color )):QColor();
+ return (mCoreHelper)?(mCoreHelper->textColor( color )):TQColor();
}
-bool CalPrintPluginBase::isWorkingDay( const QDate &dt )
+bool CalPrintPluginBase::isWorkingDay( const TQDate &dt )
{
return (mCoreHelper)?( mCoreHelper->isWorkingDay( dt ) ):true;
}
-QString CalPrintPluginBase::holidayString( const QDate &dt )
+TQString CalPrintPluginBase::holidayString( const TQDate &dt )
{
- return (mCoreHelper)?(mCoreHelper->holidayString(dt)):(QString::null);
+ return (mCoreHelper)?(mCoreHelper->holidayString(dt)):(TQString::null);
}
-Event *CalPrintPluginBase::holiday( const QDate &dt )
+Event *CalPrintPluginBase::holiday( const TQDate &dt )
{
- QString hstring( holidayString( dt ) );
+ TQString hstring( holidayString( dt ) );
if ( !hstring.isEmpty() ) {
Event*holiday=new Event();
holiday->setSummary( hstring );
@@ -344,41 +344,41 @@ void CalPrintPluginBase::setBorderWidth( const int borderwidth )
-void CalPrintPluginBase::drawBox( QPainter &p, int linewidth, const QRect &rect )
+void CalPrintPluginBase::drawBox( TQPainter &p, int linewidth, const TQRect &rect )
{
- QPen pen( p.pen() );
- QPen oldpen( pen );
+ TQPen pen( p.pen() );
+ TQPen oldpen( pen );
pen.setWidth( linewidth );
p.setPen( pen );
p.drawRect( rect );
p.setPen( oldpen );
}
-void CalPrintPluginBase::drawShadedBox( QPainter &p, int linewidth, const QBrush &brush, const QRect &rect )
+void CalPrintPluginBase::drawShadedBox( TQPainter &p, int linewidth, const TQBrush &brush, const TQRect &rect )
{
- QBrush oldbrush( p.brush() );
+ TQBrush oldbrush( p.brush() );
p.setBrush( brush );
drawBox( p, linewidth, rect );
p.setBrush( oldbrush );
}
-void CalPrintPluginBase::printEventString( QPainter &p, const QRect &box, const QString &str, int flags )
+void CalPrintPluginBase::printEventString( TQPainter &p, const TQRect &box, const TQString &str, int flags )
{
- QRect newbox( box );
+ TQRect newbox( box );
newbox.addCoords( 3, 1, -1, -1 );
p.drawText( newbox, (flags==-1)?(Qt::AlignTop | Qt::AlignJustify | Qt::BreakAnywhere):flags, str );
}
-void CalPrintPluginBase::showEventBox( QPainter &p, const QRect &box, Incidence *incidence, const QString &str, int flags )
+void CalPrintPluginBase::showEventBox( TQPainter &p, const TQRect &box, Incidence *incidence, const TQString &str, int flags )
{
- QPen oldpen( p.pen() );
- QBrush oldbrush( p.brush() );
- QColor bgColor( categoryBgColor( incidence ) );
+ TQPen oldpen( p.pen() );
+ TQBrush oldbrush( p.brush() );
+ TQColor bgColor( categoryBgColor( incidence ) );
if ( mUseColors & bgColor.isValid() ) {
p.setBrush( bgColor );
} else {
- p.setBrush( QColor( 232, 232, 232 ) );
+ p.setBrush( TQColor( 232, 232, 232 ) );
}
drawBox( p, EVENT_BORDER_WIDTH, box );
@@ -391,21 +391,21 @@ void CalPrintPluginBase::showEventBox( QPainter &p, const QRect &box, Incidence
}
-void CalPrintPluginBase::drawSubHeaderBox(QPainter &p, const QString &str,
- const QRect &box )
+void CalPrintPluginBase::drawSubHeaderBox(TQPainter &p, const TQString &str,
+ const TQRect &box )
{
- drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), box );
- QFont oldfont( p.font() );
- p.setFont( QFont( "sans-serif", 10, QFont::Bold ) );
+ drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), box );
+ TQFont oldfont( p.font() );
+ p.setFont( TQFont( "sans-serif", 10, TQFont::Bold ) );
p.drawText( box, Qt::AlignCenter | Qt::AlignVCenter, str );
p.setFont( oldfont );
}
-void CalPrintPluginBase::drawVerticalBox( QPainter &p, const QRect &box, const QString &str )
+void CalPrintPluginBase::drawVerticalBox( TQPainter &p, const TQRect &box, const TQString &str )
{
p.save();
p.rotate( -90 );
- QRect rotatedBox( -box.top()-box.height(), box.left(), box.height(), box.width() );
+ TQRect rotatedBox( -box.top()-box.height(), box.left(), box.height(), box.width() );
showEventBox( p, rotatedBox, 0, str, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine );
p.restore();
@@ -417,20 +417,20 @@ void CalPrintPluginBase::drawVerticalBox( QPainter &p, const QRect &box, const Q
// Return value: If expand, bottom of the printed box, otherwise vertical end
// of the printed contents inside the box.
-int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox,
- const QString &caption, const QString &contents, bool sameLine, bool expand, const QFont &captionFont, const QFont &textFont )
+int CalPrintPluginBase::drawBoxWithCaption( TQPainter &p, const TQRect &allbox,
+ const TQString &caption, const TQString &contents, bool sameLine, bool expand, const TQFont &captionFont, const TQFont &textFont )
{
- QFont oldFont( p.font() );
-// QFont captionFont( "sans-serif", 11, QFont::Bold );
-// QFont textFont( "sans-serif", 11, QFont::Normal );
-// QFont captionFont( "Tahoma", 11, QFont::Bold );
-// QFont textFont( "Tahoma", 11, QFont::Normal );
+ TQFont oldFont( p.font() );
+// TQFont captionFont( "sans-serif", 11, TQFont::Bold );
+// TQFont textFont( "sans-serif", 11, TQFont::Normal );
+// TQFont captionFont( "Tahoma", 11, TQFont::Bold );
+// TQFont textFont( "Tahoma", 11, TQFont::Normal );
- QRect box( allbox );
+ TQRect box( allbox );
// Bounding rectangle for caption, single-line, clip on the right
- QRect captionBox( box.left() + padding(), box.top() + padding(), 0, 0 );
+ TQRect captionBox( box.left() + padding(), box.top() + padding(), 0, 0 );
p.setFont( captionFont );
captionBox = p.boundingRect( captionBox, Qt::AlignLeft | Qt::AlignTop | Qt::SingleLine, caption );
p.setFont( oldFont );
@@ -440,7 +440,7 @@ int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox,
box.setBottom( captionBox.bottom() + padding() );
// Bounding rectangle for the contents (if any), word break, clip on the bottom
- QRect textBox( captionBox );
+ TQRect textBox( captionBox );
if ( !contents.isEmpty() ) {
if ( sameLine ) {
textBox.setLeft( captionBox.right() + padding() );
@@ -480,8 +480,8 @@ int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox,
///////////////////////////////////////////////////////////////////////////////
-int CalPrintPluginBase::drawHeader( QPainter &p, QString title,
- const QDate &month1, const QDate &month2, const QRect &allbox, bool expand )
+int CalPrintPluginBase::drawHeader( TQPainter &p, TQString title,
+ const TQDate &month1, const TQDate &month2, const TQRect &allbox, bool expand )
{
// print previous month for month view, print current for to-do, day and week
int smallMonthWidth = (allbox.width()/4) - 10;
@@ -490,17 +490,17 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title,
int right = allbox.right();
if ( month1.isValid() ) right -= (20+smallMonthWidth);
if ( month2.isValid() ) right -= (20+smallMonthWidth);
- QRect box( allbox );
- QRect textRect( allbox );
+ TQRect box( allbox );
+ TQRect textRect( allbox );
textRect.addCoords( 5, 0, 0, 0 );
textRect.setRight( right );
- QFont oldFont( p.font() );
- QFont newFont("sans-serif", (textRect.height()<60)?16:18, QFont::Bold);
+ TQFont oldFont( p.font() );
+ TQFont newFont("sans-serif", (textRect.height()<60)?16:18, TQFont::Bold);
if ( expand ) {
p.setFont( newFont );
- QRect boundingR = p.boundingRect( textRect, Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak, title );
+ TQRect boundingR = p.boundingRect( textRect, Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak, title );
p.setFont( oldFont );
int h = boundingR.height();
if ( h > allbox.height() ) {
@@ -509,15 +509,15 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title,
}
}
- drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), box );
+ drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), box );
- QRect monthbox( box.right()-10-smallMonthWidth, box.top(), smallMonthWidth, box.height() );
+ TQRect monthbox( box.right()-10-smallMonthWidth, box.top(), smallMonthWidth, box.height() );
if (month2.isValid()) {
- drawSmallMonth( p, QDate(month2.year(), month2.month(), 1), monthbox );
+ drawSmallMonth( p, TQDate(month2.year(), month2.month(), 1), monthbox );
monthbox.moveBy( -20 - smallMonthWidth, 0 );
}
if (month1.isValid()) {
- drawSmallMonth( p, QDate(month1.year(), month1.month(), 1), monthbox );
+ drawSmallMonth( p, TQDate(month1.year(), month1.month(), 1), monthbox );
monthbox.moveBy( -20 - smallMonthWidth, 0 );
}
@@ -530,38 +530,38 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title,
}
-void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd,
- const QRect &box )
+void CalPrintPluginBase::drawSmallMonth(TQPainter &p, const TQDate &qd,
+ const TQRect &box )
{
int weekdayCol = weekdayColumn( qd.dayOfWeek() );
int month = qd.month();
- QDate monthDate(QDate(qd.year(), qd.month(), 1));
+ TQDate monthDate(TQDate(qd.year(), qd.month(), 1));
// correct begin of week
- QDate monthDate2( monthDate.addDays( -weekdayCol ) );
+ TQDate monthDate2( monthDate.addDays( -weekdayCol ) );
double cellWidth = double(box.width())/double(7);
int rownr = 3 + ( qd.daysInMonth() + weekdayCol - 1 ) / 7;
// 3 Pixel after month name, 2 after day names, 1 after the calendar
double cellHeight = (box.height() - 5) / rownr;
- QFont oldFont( p.font() );
- p.setFont(QFont("sans-serif", int(cellHeight-1), QFont::Normal));
+ TQFont oldFont( p.font() );
+ p.setFont(TQFont("sans-serif", int(cellHeight-1), TQFont::Normal));
// draw the title
if ( mCalSys ) {
- QRect titleBox( box );
+ TQRect titleBox( box );
titleBox.setHeight( int(cellHeight+1) );
p.drawText( titleBox, Qt::AlignTop | Qt::AlignHCenter, mCalSys->monthName( qd ) );
}
// draw days of week
- QRect wdayBox( box );
+ TQRect wdayBox( box );
wdayBox.setTop( int( box.top() + 3 + cellHeight ) );
wdayBox.setHeight( int(2*cellHeight)-int(cellHeight) );
if ( mCalSys ) {
for (int col = 0; col < 7; ++col) {
- QString tmpStr = mCalSys->weekDayName( monthDate2 )[0].upper();
+ TQString tmpStr = mCalSys->weekDayName( monthDate2 )[0].upper();
wdayBox.setLeft( int(box.left() + col*cellWidth) );
wdayBox.setRight( int(box.left() + (col+1)*cellWidth) );
p.drawText( wdayBox, Qt::AlignCenter, tmpStr );
@@ -577,10 +577,10 @@ void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd,
for ( int row = 0; row < (rownr-2); row++ ) {
for ( int col = 0; col < 7; col++ ) {
if ( monthDate.month() == month ) {
- QRect dayRect( int( box.left() + col*cellWidth ), int( calStartY + row*cellHeight ), 0, 0 );
+ TQRect dayRect( int( box.left() + col*cellWidth ), int( calStartY + row*cellHeight ), 0, 0 );
dayRect.setRight( int( box.left() + (col+1)*cellWidth ) );
dayRect.setBottom( int( calStartY + (row+1)*cellHeight ) );
- p.drawText( dayRect, Qt::AlignCenter, QString::number( monthDate.day() ) );
+ p.drawText( dayRect, Qt::AlignCenter, TQString::number( monthDate.day() ) );
}
monthDate = monthDate.addDays(1);
}
@@ -598,12 +598,12 @@ void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd,
* This routine draws a header box over the main part of the calendar
* containing the days of the week.
*/
-void CalPrintPluginBase::drawDaysOfWeek(QPainter &p,
- const QDate &fromDate, const QDate &toDate, const QRect &box )
+void CalPrintPluginBase::drawDaysOfWeek(TQPainter &p,
+ const TQDate &fromDate, const TQDate &toDate, const TQRect &box )
{
double cellWidth = double(box.width()) / double(fromDate.daysTo( toDate )+1);
- QDate cellDate( fromDate );
- QRect dateBox( box );
+ TQDate cellDate( fromDate );
+ TQRect dateBox( box );
int i = 0;
while ( cellDate <= toDate ) {
@@ -616,16 +616,16 @@ void CalPrintPluginBase::drawDaysOfWeek(QPainter &p,
}
-void CalPrintPluginBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd,
- const QRect &box )
+void CalPrintPluginBase::drawDaysOfWeekBox(TQPainter &p, const TQDate &qd,
+ const TQRect &box )
{
- drawSubHeaderBox( p, (mCalSys)?(mCalSys->weekDayName( qd )):(QString::null), box );
+ drawSubHeaderBox( p, (mCalSys)?(mCalSys->weekDayName( qd )):(TQString::null), box );
}
-void CalPrintPluginBase::drawTimeLine(QPainter &p,
- const QTime &fromTime, const QTime &toTime,
- const QRect &box)
+void CalPrintPluginBase::drawTimeLine(TQPainter &p,
+ const TQTime &fromTime, const TQTime &toTime,
+ const TQRect &box)
{
drawBox( p, BOX_BORDER_WIDTH, box );
@@ -636,46 +636,46 @@ void CalPrintPluginBase::drawTimeLine(QPainter &p,
// TODO: Don't use half of the width, but less, for the minutes!
int xcenter = box.left()+box.width()/2;
- QTime curTime( fromTime );
- QTime endTime( toTime );
+ TQTime curTime( fromTime );
+ TQTime endTime( toTime );
if ( fromTime.minute() > 30 )
- curTime = QTime( fromTime.hour()+1, 0, 0 );
+ curTime = TQTime( fromTime.hour()+1, 0, 0 );
else if ( fromTime.minute() > 0 ) {
- curTime = QTime( fromTime.hour(), 30, 0 );
+ curTime = TQTime( fromTime.hour(), 30, 0 );
float yy = currY + minlen*(float)fromTime.secsTo( curTime )/60.;
p.drawLine( xcenter, (int)yy, box.right(), (int)yy );
- curTime = QTime( fromTime.hour()+1, 0, 0 );
+ curTime = TQTime( fromTime.hour()+1, 0, 0 );
}
currY += ( float( fromTime.secsTo(curTime)*minlen ) / 60. );
while ( curTime < endTime ) {
p.drawLine( box.left(), (int)currY, box.right(), (int)currY );
int newY=(int)(currY+cellHeight/2.);
- QString numStr;
+ TQString numStr;
if ( newY < box.bottom() ) {
- QFont oldFont( p.font() );
+ TQFont oldFont( p.font() );
// draw the time:
if ( !KGlobal::locale()->use12Clock() ) {
p.drawLine( xcenter, (int)newY, box.right(), (int)newY);
numStr.setNum(curTime.hour());
if (cellHeight > 30) {
- p.setFont(QFont("sans-serif", 16, QFont::Bold));
+ p.setFont(TQFont("sans-serif", 16, TQFont::Bold));
} else {
- p.setFont(QFont("sans-serif", 12, QFont::Bold));
+ p.setFont(TQFont("sans-serif", 12, TQFont::Bold));
}
p.drawText( box.left()+2, (int)currY+2, box.width()/2-2, (int)cellHeight,
Qt::AlignTop | Qt::AlignRight, numStr);
- p.setFont(QFont("sans-serif", 10, QFont::Normal));
+ p.setFont(TQFont("sans-serif", 10, TQFont::Normal));
p.drawText( xcenter, (int)currY+2, box.width()/2+2, (int)(cellHeight/2)-3,
Qt::AlignTop | Qt::AlignLeft, "00");
} else {
p.drawLine( box.left(), (int)newY, box.right(), (int)newY);
- QTime time( curTime.hour(), 0 );
+ TQTime time( curTime.hour(), 0 );
numStr = KGlobal::locale()->formatTime( time );
if ( box.width() < 60 ) {
- p.setFont(QFont("sans-serif", 8, QFont::Bold)); // for weekprint
+ p.setFont(TQFont("sans-serif", 8, TQFont::Bold)); // for weekprint
} else {
- p.setFont(QFont("sans-serif", 12, QFont::Bold)); // for dayprint
+ p.setFont(TQFont("sans-serif", 12, TQFont::Bold)); // for dayprint
}
p.drawText(box.left()+2, (int)currY+2, box.width()-4, (int)cellHeight/2-3,
Qt::AlignTop|Qt::AlignLeft, numStr);
@@ -697,14 +697,14 @@ void CalPrintPluginBase::drawTimeLine(QPainter &p,
be the total height used for the all-day events. If !expandable, only one
cell will be used, and multiple events are concatenated using ", ".
*/
-int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList,
- const QDate &qd, bool expandable, const QRect &box )
+int CalPrintPluginBase::drawAllDayBox(TQPainter &p, Event::List &eventList,
+ const TQDate &qd, bool expandable, const TQRect &box )
{
Event::List::Iterator it, itold;
int offset=box.top();
- QString multiDayStr;
+ TQString multiDayStr;
Event*hd = holiday( qd );
if ( hd ) eventList.prepend( hd );
@@ -719,7 +719,7 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList,
if ( currEvent && currEvent->doesFloat() ) {
// set the colors according to the categories
if ( expandable ) {
- QRect eventBox( box );
+ TQRect eventBox( box );
eventBox.setTop( offset );
showEventBox( p, eventBox, currEvent, currEvent->summary() );
offset += box.height();
@@ -733,10 +733,10 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList,
if ( hd ) delete hd;
int ret = box.height();
- QRect eventBox( box );
+ TQRect eventBox( box );
if (!expandable) {
if (!multiDayStr.isEmpty()) {
- drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 128, 128, 128 ), eventBox );
+ drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 128, 128, 128 ), eventBox );
printEventString( p, eventBox, multiDayStr );
} else {
drawBox( p, BOX_BORDER_WIDTH, eventBox );
@@ -750,17 +750,17 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList,
}
-void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
- const QDate &qd, bool expandable,
- QTime &fromTime, QTime &toTime,
- const QRect &oldbox )
+void CalPrintPluginBase::drawAgendaDayBox( TQPainter &p, Event::List &events,
+ const TQDate &qd, bool expandable,
+ TQTime &fromTime, TQTime &toTime,
+ const TQRect &oldbox )
{
if ( !isWorkingDay( qd ) ) {
- drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), oldbox );
+ drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), oldbox );
} else {
drawBox( p, BOX_BORDER_WIDTH, oldbox );
}
- QRect box( oldbox );
+ TQRect box( oldbox );
// Account for the border with and cut away that margin from the interior
// box.setRight( box.right()-BOX_BORDER_WIDTH );
@@ -780,7 +780,7 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
// Show at least one hour
// if ( fromTime.secsTo( toTime ) < 3600 ) {
-// fromTime = QTime( fromTime.hour(), 0, 0 );
+// fromTime = TQTime( fromTime.hour(), 0, 0 );
// toTime = fromTime.addSecs( 3600 );
// }
@@ -791,7 +791,7 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
float currY = box.top();
// print grid:
- QTime curTime( QTime( fromTime.hour(), 0, 0 ) );
+ TQTime curTime( TQTime( fromTime.hour(), 0, 0 ) );
currY += fromTime.secsTo( curTime ) * minlen / 60;
while ( curTime < toTime && curTime.isValid() ) {
@@ -800,8 +800,8 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
currY += cellHeight / 2;
if ( ( currY > box.top() ) && ( currY < box.bottom() ) ) {
// enough space for half-hour line
- QPen oldPen( p.pen() );
- p.setPen( QColor( 192, 192, 192 ) );
+ TQPen oldPen( p.pen() );
+ p.setPen( TQColor( 192, 192, 192 ) );
p.drawLine( box.left(), int( currY ), box.right(), int( currY ) );
p.setPen( oldPen );
}
@@ -811,31 +811,31 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
currY += cellHeight / 2;
}
- QDateTime startPrintDate = QDateTime( qd, fromTime );
- QDateTime endPrintDate = QDateTime( qd, toTime );
+ TQDateTime startPrintDate = TQDateTime( qd, fromTime );
+ TQDateTime endPrintDate = TQDateTime( qd, toTime );
// Calculate horizontal positions and widths of events taking into account
// overlapping events
- QPtrList<KOrg::CellItem> cells;
+ TQPtrList<KOrg::CellItem> cells;
cells.setAutoDelete( true );
Event::List::ConstIterator itEvents;
for( itEvents = events.begin(); itEvents != events.end(); ++itEvents ) {
- QValueList<QDateTime> times = (*itEvents)->startDateTimesForDate( qd );
- for ( QValueList<QDateTime>::ConstIterator it = times.begin();
+ TQValueList<TQDateTime> times = (*itEvents)->startDateTimesForDate( qd );
+ for ( TQValueList<TQDateTime>::ConstIterator it = times.begin();
it != times.end(); ++it ) {
cells.append( new PrintCellItem( *itEvents, (*it), (*itEvents)->endDateForStart( *it ) ) );
}
}
- QPtrListIterator<KOrg::CellItem> it1( cells );
+ TQPtrListIterator<KOrg::CellItem> it1( cells );
for( it1.toFirst(); it1.current(); ++it1 ) {
KOrg::CellItem *placeItem = it1.current();
KOrg::CellItem::placeItem( cells, placeItem );
}
-// p.setFont( QFont( "sans-serif", 10 ) );
+// p.setFont( TQFont( "sans-serif", 10 ) );
for( it1.toFirst(); it1.current(); ++it1 ) {
PrintCellItem *placeItem = static_cast<PrintCellItem *>( it1.current() );
@@ -846,16 +846,16 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
-void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
- const QDateTime &startPrintDate,
- const QDateTime &endPrintDate,
- float minlen, const QRect &box )
+void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, TQPainter &p,
+ const TQDateTime &startPrintDate,
+ const TQDateTime &endPrintDate,
+ float minlen, const TQRect &box )
{
Event *event = item->event();
// start/end of print area for event
- QDateTime startTime = item->start();
- QDateTime endTime = item->end();
+ TQDateTime startTime = item->start();
+ TQDateTime endTime = item->end();
if ( ( startTime < endPrintDate && endTime > startPrintDate ) ||
( endTime > startPrintDate && startTime < endPrintDate ) ) {
if ( startTime < startPrintDate ) startTime = startPrintDate;
@@ -866,18 +866,18 @@ void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
minlen / 60. );
int currentHeight = int( box.top() + startPrintDate.secsTo( endTime ) * minlen / 60. ) - currentYPos;
- QRect eventBox( currentX, currentYPos, currentWidth, currentHeight );
+ TQRect eventBox( currentX, currentYPos, currentWidth, currentHeight );
showEventBox( p, eventBox, event, event->summary() );
}
}
//TODO TODO TODO
-void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
- const QRect &box,
+void CalPrintPluginBase::drawDayBox( TQPainter &p, const TQDate &qd,
+ const TQRect &box,
bool fullDate, bool printRecurDaily, bool printRecurWeekly )
{
- QString dayNumStr;
- QString ampm;
+ TQString dayNumStr;
+ TQString ampm;
const KLocale*local = KGlobal::locale();
@@ -890,33 +890,33 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
.arg( qd.day() );
// dayNumStr = local->formatDate(qd);
} else {
- dayNumStr = QString::number( qd.day() );
+ dayNumStr = TQString::number( qd.day() );
}
- QRect subHeaderBox( box );
+ TQRect subHeaderBox( box );
subHeaderBox.setHeight( mSubHeaderHeight );
drawShadedBox( p, BOX_BORDER_WIDTH, p.backgroundColor(), box );
- drawShadedBox( p, 0, QColor( 232, 232, 232 ), subHeaderBox );
+ drawShadedBox( p, 0, TQColor( 232, 232, 232 ), subHeaderBox );
drawBox( p, BOX_BORDER_WIDTH, box );
- QString hstring( holidayString( qd ) );
- QFont oldFont( p.font() );
+ TQString hstring( holidayString( qd ) );
+ TQFont oldFont( p.font() );
- QRect headerTextBox( subHeaderBox );
+ TQRect headerTextBox( subHeaderBox );
headerTextBox.setLeft( subHeaderBox.left()+5 );
headerTextBox.setRight( subHeaderBox.right()-5 );
if (!hstring.isEmpty()) {
- p.setFont( QFont( "sans-serif", 8, QFont::Bold, true ) );
+ p.setFont( TQFont( "sans-serif", 8, TQFont::Bold, true ) );
p.drawText( headerTextBox, Qt::AlignLeft | Qt::AlignVCenter, hstring );
}
- p.setFont(QFont("sans-serif", 10, QFont::Bold));
+ p.setFont(TQFont("sans-serif", 10, TQFont::Bold));
p.drawText( headerTextBox, Qt::AlignRight | Qt::AlignVCenter, dayNumStr);
Event::List eventList = mCalendar->events( qd,
EventSortStartDate,
SortDirectionAscending );
- QString text;
- p.setFont( QFont( "sans-serif", 8 ) );
+ TQString text;
+ p.setFont( TQFont( "sans-serif", 8 ) );
int textY=mSubHeaderHeight+3; // gives the relative y-coord of the next printed entry
Event::List::ConstIterator it;
@@ -954,19 +954,19 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
}
// TODO TODO TODO
-void CalPrintPluginBase::drawIncidence( QPainter &p, const QRect &dayBox, const QString &time, const QString &summary, int &textY )
+void CalPrintPluginBase::drawIncidence( TQPainter &p, const TQRect &dayBox, const TQString &time, const TQString &summary, int &textY )
{
kdDebug(5850) << "summary = " << summary << endl;
int flags = Qt::AlignLeft;
- QFontMetrics fm = p.fontMetrics();
- QRect timeBound = p.boundingRect( dayBox.x() + 5, dayBox.y() + textY,
+ TQFontMetrics fm = p.fontMetrics();
+ TQRect timeBound = p.boundingRect( dayBox.x() + 5, dayBox.y() + textY,
dayBox.width() - 10, fm.lineSpacing(),
flags, time );
p.drawText( timeBound, flags, time );
int summaryWidth = time.isEmpty() ? 0 : timeBound.width() + 4;
- QRect summaryBound = QRect( dayBox.x() + 5 + summaryWidth, dayBox.y() + textY,
+ TQRect summaryBound = TQRect( dayBox.x() + 5 + summaryWidth, dayBox.y() + textY,
dayBox.width() - summaryWidth -5, dayBox.height() );
KWordWrap *ww = KWordWrap::formatText( fm, summaryBound, flags, summary );
@@ -980,9 +980,9 @@ void CalPrintPluginBase::drawIncidence( QPainter &p, const QRect &dayBox, const
///////////////////////////////////////////////////////////////////////////////
-void CalPrintPluginBase::drawWeek(QPainter &p, const QDate &qd, const QRect &box )
+void CalPrintPluginBase::drawWeek(TQPainter &p, const TQDate &qd, const TQRect &box )
{
- QDate weekDate = qd;
+ TQDate weekDate = qd;
bool portrait = ( box.height() > box.width() );
int cellWidth, cellHeight;
int vcells;
@@ -1003,40 +1003,40 @@ void CalPrintPluginBase::drawWeek(QPainter &p, const QDate &qd, const QRect &box
// Saturday and sunday share a cell, so we have to special-case sunday
int hpos = ((i<6)?i:(i-1)) / vcells;
int vpos = ((i<6)?i:(i-1)) % vcells;
- QRect dayBox( box.left()+cellWidth*hpos, box.top()+cellHeight*vpos + ((i==6)?(cellHeight/2):0),
+ TQRect dayBox( box.left()+cellWidth*hpos, box.top()+cellHeight*vpos + ((i==6)?(cellHeight/2):0),
cellWidth, (i<5)?(cellHeight):(cellHeight/2) );
drawDayBox(p, weekDate, dayBox, true);
} // for i through all weekdays
}
-void CalPrintPluginBase::drawTimeTable(QPainter &p,
- const QDate &fromDate, const QDate &toDate,
- QTime &fromTime, QTime &toTime,
- const QRect &box)
+void CalPrintPluginBase::drawTimeTable(TQPainter &p,
+ const TQDate &fromDate, const TQDate &toDate,
+ TQTime &fromTime, TQTime &toTime,
+ const TQRect &box)
{
// timeline is 1 hour:
int alldayHeight = (int)( 3600.*box.height()/(fromTime.secsTo(toTime)+3600.) );
int timelineWidth = TIMELINE_WIDTH;
- QRect dowBox( box );
+ TQRect dowBox( box );
dowBox.setLeft( box.left() + timelineWidth );
dowBox.setHeight( mSubHeaderHeight );
drawDaysOfWeek( p, fromDate, toDate, dowBox );
- QRect tlBox( box );
+ TQRect tlBox( box );
tlBox.setWidth( timelineWidth );
tlBox.setTop( dowBox.bottom() + BOX_BORDER_WIDTH + alldayHeight );
drawTimeLine( p, fromTime, toTime, tlBox );
// draw each day
- QDate curDate(fromDate);
+ TQDate curDate(fromDate);
int i=0;
double cellWidth = double(dowBox.width()) / double(fromDate.daysTo(toDate)+1);
while (curDate<=toDate) {
- QRect allDayBox( dowBox.left()+int(i*cellWidth), dowBox.bottom() + BOX_BORDER_WIDTH,
+ TQRect allDayBox( dowBox.left()+int(i*cellWidth), dowBox.bottom() + BOX_BORDER_WIDTH,
int((i+1)*cellWidth)-int(i*cellWidth), alldayHeight );
- QRect dayBox( allDayBox );
+ TQRect dayBox( allDayBox );
dayBox.setTop( tlBox.top() );
dayBox.setBottom( box.bottom() );
Event::List eventList = mCalendar->events(curDate,
@@ -1057,33 +1057,33 @@ class MonthEventStruct
{
public:
MonthEventStruct() : event(0) {}
- MonthEventStruct( const QDateTime &s, const QDateTime &e, Event *ev)
+ MonthEventStruct( const TQDateTime &s, const TQDateTime &e, Event *ev)
{
event = ev;
start = s;
end = e;
if ( event->doesFloat() ) {
- start = QDateTime( start.date(), QTime(0,0,0) );
- end = QDateTime( end.date().addDays(1), QTime(0,0,0) ).addSecs(-1);
+ start = TQDateTime( start.date(), TQTime(0,0,0) );
+ end = TQDateTime( end.date().addDays(1), TQTime(0,0,0) ).addSecs(-1);
}
}
bool operator<(const MonthEventStruct &mes) { return start < mes.start; }
- QDateTime start;
- QDateTime end;
+ TQDateTime start;
+ TQDateTime end;
Event *event;
};
-void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &box, int maxdays, int subDailyFlags, int holidaysFlags )
+void CalPrintPluginBase::drawMonth( TQPainter &p, const TQDate &dt, const TQRect &box, int maxdays, int subDailyFlags, int holidaysFlags )
{
const KCalendarSystem *calsys = calendarSystem();
- QRect subheaderBox( box );
+ TQRect subheaderBox( box );
subheaderBox.setHeight( subHeaderHeight() );
- QRect borderBox( box );
+ TQRect borderBox( box );
borderBox.setTop( subheaderBox.bottom()+1 );
drawSubHeaderBox( p, calsys->monthName(dt), subheaderBox );
// correct for half the border width
int correction = (BOX_BORDER_WIDTH/*-1*/)/2;
- QRect daysBox( borderBox );
+ TQRect daysBox( borderBox );
daysBox.addCoords( correction, correction, -correction, -correction );
int daysinmonth = calsys->daysInMonth( dt );
@@ -1092,43 +1092,43 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
int d;
float dayheight = float(daysBox.height()) / float( maxdays );
- QColor holidayColor( 240, 240, 240 );
- QColor workdayColor( 255, 255, 255 );
+ TQColor holidayColor( 240, 240, 240 );
+ TQColor workdayColor( 255, 255, 255 );
int dayNrWidth = p.fontMetrics().width( "99" );
// Fill the remaining space (if a month has less days than others) with a crossed-out pattern
if ( daysinmonth<maxdays ) {
- QRect dayBox( box.left(), daysBox.top() + round(dayheight*daysinmonth), box.width(), 0 );
+ TQRect dayBox( box.left(), daysBox.top() + round(dayheight*daysinmonth), box.width(), 0 );
dayBox.setBottom( daysBox.bottom() );
p.fillRect( dayBox, Qt::DiagCrossPattern );
}
// Backgrounded boxes for each day, plus day numbers
- QBrush oldbrush( p.brush() );
+ TQBrush oldbrush( p.brush() );
for ( d = 0; d < daysinmonth; ++d ) {
- QDate day;
+ TQDate day;
calsys->setYMD( day, dt.year(), dt.month(), d+1 );
- QRect dayBox( daysBox.left()/*+rand()%50*/, daysBox.top() + round(dayheight*d), daysBox.width()/*-rand()%50*/, 0 );
+ TQRect dayBox( daysBox.left()/*+rand()%50*/, daysBox.top() + round(dayheight*d), daysBox.width()/*-rand()%50*/, 0 );
// FIXME: When using a border width of 0 for event boxes, don't let the rectangles overlap, i.e. subtract 1 from the top or bottom!
dayBox.setBottom( daysBox.top()+round(dayheight*(d+1)) - 1 );
p.setBrush( isWorkingDay( day )?workdayColor:holidayColor );
p.drawRect( dayBox );
- QRect dateBox( dayBox );
+ TQRect dateBox( dayBox );
dateBox.setWidth( dayNrWidth+3 );
p.drawText( dateBox, Qt::AlignRight | Qt::AlignVCenter | Qt::SingleLine,
- QString::number(d+1) );
+ TQString::number(d+1) );
}
p.setBrush( oldbrush );
int xstartcont = box.left() + dayNrWidth + 5;
- QDate start, end;
+ TQDate start, end;
calsys->setYMD( start, dt.year(), dt.month(), 1 );
end = calsys->addMonths( start, 1 );
end = calsys->addDays( end, -1 );
Event::List events = mCalendar->events( start, end );
- QMap<int, QStringList> textEvents;
- QPtrList<KOrg::CellItem> timeboxItems;
+ TQMap<int, TQStringList> textEvents;
+ TQPtrList<KOrg::CellItem> timeboxItems;
timeboxItems.setAutoDelete( true );
@@ -1141,13 +1141,13 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
// Holidays
Event::List holidays;
holidays.setAutoDelete( true );
- for ( QDate d(start); d <= end; d = d.addDays(1) ) {
+ for ( TQDate d(start); d <= end; d = d.addDays(1) ) {
Event *e = holiday( d );
if ( e ) {
holidays.append( e );
if ( holidaysFlags & TimeBoxes ) {
- timeboxItems.append( new PrintCellItem( e, QDateTime(d, QTime(0,0,0) ),
- QDateTime( d.addDays(1), QTime(0,0,0) ) ) );
+ timeboxItems.append( new PrintCellItem( e, TQDateTime(d, TQTime(0,0,0) ),
+ TQDateTime( d.addDays(1), TQTime(0,0,0) ) ) );
}
if ( holidaysFlags & Text ) {
textEvents[ d.day() ] << e->summary();
@@ -1155,7 +1155,7 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
}
}
- QValueList<MonthEventStruct> monthentries;
+ TQValueList<MonthEventStruct> monthentries;
for ( Event::List::ConstIterator evit = events.begin();
evit != events.end(); ++evit ) {
@@ -1165,8 +1165,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
if ( e->recursOn( start ) ) {
// This occurrence has possibly started before the beginning of the
// month, so obtain the start date before the beginning of the month
- QValueList<QDateTime> starttimes = e->startDateTimesForDate( start );
- QValueList<QDateTime>::ConstIterator it = starttimes.begin();
+ TQValueList<TQDateTime> starttimes = e->startDateTimesForDate( start );
+ TQValueList<TQDateTime>::ConstIterator it = starttimes.begin();
for ( ; it != starttimes.end(); ++it ) {
monthentries.append( MonthEventStruct( *it, e->endDateForStart( *it ), e ) );
}
@@ -1176,13 +1176,13 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
// also return events that have started earlier. These start dates
// however, have already been treated!
Recurrence *recur = e->recurrence();
- QDate d1( start.addDays(1) );
+ TQDate d1( start.addDays(1) );
while ( d1 <= end ) {
if ( recur->recursOn(d1) ) {
TimeList times( recur->recurTimesOn( d1 ) );
for ( TimeList::ConstIterator it = times.begin();
it != times.end(); ++it ) {
- QDateTime d1start( d1, *it );
+ TQDateTime d1start( d1, *it );
monthentries.append( MonthEventStruct( d1start, e->endDateForStart( d1start ), e ) );
}
}
@@ -1194,8 +1194,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
}
qHeapSort( monthentries );
- QValueList<MonthEventStruct>::ConstIterator mit = monthentries.begin();
- QDateTime endofmonth( end, QTime(0,0,0) );
+ TQValueList<MonthEventStruct>::ConstIterator mit = monthentries.begin();
+ TQDateTime endofmonth( end, TQTime(0,0,0) );
endofmonth = endofmonth.addDays(1);
for ( ; mit != monthentries.end(); ++mit ) {
if ( (*mit).start.date() == (*mit).end.date() ) {
@@ -1209,8 +1209,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
}
} else {
// Multi-day events are always shown as time line boxes
- QDateTime thisstart( (*mit).start );
- QDateTime thisend( (*mit).end );
+ TQDateTime thisstart( (*mit).start );
+ TQDateTime thisend( (*mit).end );
if ( thisstart.date()<start ) thisstart = start;
if ( thisend>endofmonth ) thisend = endofmonth;
timeboxItems.append( new PrintCellItem( (*mit).event, thisstart, thisend ) );
@@ -1218,22 +1218,22 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
}
// For Multi-day events, line them up nicely so that the boxes don't overlap
- QPtrListIterator<KOrg::CellItem> it1( timeboxItems );
+ TQPtrListIterator<KOrg::CellItem> it1( timeboxItems );
for( it1.toFirst(); it1.current(); ++it1 ) {
KOrg::CellItem *placeItem = it1.current();
KOrg::CellItem::placeItem( timeboxItems, placeItem );
}
- QDateTime starttime( start, QTime( 0, 0, 0 ) );
+ TQDateTime starttime( start, TQTime( 0, 0, 0 ) );
int newxstartcont = xstartcont;
- QFont oldfont( p.font() );
- p.setFont( QFont( "sans-serif", 7 ) );
+ TQFont oldfont( p.font() );
+ p.setFont( TQFont( "sans-serif", 7 ) );
for( it1.toFirst(); it1.current(); ++it1 ) {
PrintCellItem *placeItem = static_cast<PrintCellItem *>( it1.current() );
int minsToStart = starttime.secsTo( placeItem->start() )/60;
int minsToEnd = starttime.secsTo( placeItem->end() )/60;
- QRect eventBox( xstartcont + placeItem->subCell()*17,
+ TQRect eventBox( xstartcont + placeItem->subCell()*17,
daysBox.top() + round( double( minsToStart*daysBox.height()) / double(maxdays*24*60) ),
14, 0 );
eventBox.setBottom( daysBox.top() + round( double( minsToEnd*daysBox.height()) / double(maxdays*24*60) ) );
@@ -1245,9 +1245,9 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
// For Single-day events, simply print their summaries into the remaining
// space of the day's cell
for ( int d=0; d<daysinmonth; ++d ) {
- QStringList dayEvents( textEvents[d+1] );
- QString txt = dayEvents.join(", ");
- QRect dayBox( xstartcont, daysBox.top()+round(dayheight*d), 0, 0 );
+ TQStringList dayEvents( textEvents[d+1] );
+ TQString txt = dayEvents.join(", ");
+ TQRect dayBox( xstartcont, daysBox.top()+round(dayheight*d), 0, 0 );
dayBox.setRight( box.right() );
dayBox.setBottom( daysBox.top()+round(dayheight*(d+1)) );
printEventString(p, dayBox, txt, Qt::AlignTop | Qt::AlignLeft | Qt::BreakAnywhere );
@@ -1260,15 +1260,15 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
///////////////////////////////////////////////////////////////////////////////
-void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weeknumbers,
+void CalPrintPluginBase::drawMonthTable(TQPainter &p, const TQDate &qd, bool weeknumbers,
bool recurDaily, bool recurWeekly,
- const QRect &box)
+ const TQRect &box)
{
int yoffset = mSubHeaderHeight;
int xoffset = 0;
- QDate monthDate(QDate(qd.year(), qd.month(), 1));
- QDate monthFirst(monthDate);
- QDate monthLast(monthDate.addMonths(1).addDays(-1));
+ TQDate monthDate(TQDate(qd.year(), qd.month(), 1));
+ TQDate monthFirst(monthDate);
+ TQDate monthLast(monthDate.addMonths(1).addDays(-1));
int weekdayCol = weekdayColumn( monthDate.dayOfWeek() );
@@ -1291,26 +1291,26 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn
}
if (weeknumbers) {
- QFont oldFont(p.font());
- QFont newFont(p.font());
+ TQFont oldFont(p.font());
+ TQFont newFont(p.font());
newFont.setPointSize(6);
p.setFont(newFont);
- QDate weekDate(monthDate);
+ TQDate weekDate(monthDate);
for (int row = 0; row<rows; ++row ) {
int calWeek = weekDate.weekNumber();
- QRect rc( box.left(), rowedges[row], coledges[0] - 3 - box.left(), rowedges[row+1]-rowedges[row] );
- p.drawText( rc, Qt::AlignRight | Qt::AlignVCenter, QString::number( calWeek ) );
+ TQRect rc( box.left(), rowedges[row], coledges[0] - 3 - box.left(), rowedges[row+1]-rowedges[row] );
+ p.drawText( rc, Qt::AlignRight | Qt::AlignVCenter, TQString::number( calWeek ) );
weekDate = weekDate.addDays( 7 );
}
p.setFont( oldFont );
}
- QRect daysOfWeekBox( box );
+ TQRect daysOfWeekBox( box );
daysOfWeekBox.setHeight( mSubHeaderHeight );
daysOfWeekBox.setLeft( box.left()+xoffset );
drawDaysOfWeek( p, monthDate, monthDate.addDays( 6 ), daysOfWeekBox );
- QColor back = p.backgroundColor();
+ TQColor back = p.backgroundColor();
bool darkbg = false;
for ( int row = 0; row < rows; ++row ) {
for ( int col = 0; col < 7; ++col ) {
@@ -1319,7 +1319,7 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn
p.setBackgroundColor( back.dark( 120 ) );
darkbg = true;
}
- QRect dayBox( coledges[col], rowedges[row], coledges[col+1]-coledges[col], rowedges[row+1]-rowedges[row] );
+ TQRect dayBox( coledges[col], rowedges[row], coledges[col+1]-coledges[col], rowedges[row+1]-rowedges[row] );
drawDayBox(p, monthDate, dayBox, false, recurDaily, recurWeekly );
if ( darkbg ) {
p.setBackgroundColor( back );
@@ -1333,7 +1333,7 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn
///////////////////////////////////////////////////////////////////////////////
-void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
+void CalPrintPluginBase::drawTodo( int &count, Todo *todo, TQPainter &p,
TodoSortField sortField, SortDirection sortDir,
bool connectSubTodos, bool strikeoutCompleted,
bool desc, int posPriority, int posSummary,
@@ -1342,14 +1342,14 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
int pageHeight, const Todo::List &todoList,
TodoParentStart *r )
{
- QString outStr;
+ TQString outStr;
const KLocale *local = KGlobal::locale();
- QRect rect;
+ TQRect rect;
TodoParentStart startpt;
// This list keeps all starting points of the parent to-dos so the connection
// lines of the tree can easily be drawn (needed if a new page is started)
- static QPtrList<TodoParentStart> startPoints;
+ static TQPtrList<TodoParentStart> startPoints;
if ( level < 1 ) {
startPoints.clear();
}
@@ -1407,7 +1407,7 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
rect.setHeight(18);
// Draw a checkbox
- p.setBrush( QBrush( Qt::NoBrush ) );
+ p.setBrush( TQBrush( Qt::NoBrush ) );
p.drawRect( rect );
if ( todo->isCompleted() ) {
// cross out the rectangle for completed to-dos
@@ -1442,10 +1442,10 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
rect = p.boundingRect( lhs, rect.top(), (rhs-(left + rect.width() + 5)),
-1, Qt::WordBreak, outStr );
- QRect newrect;
+ TQRect newrect;
//FIXME: the following code prints underline rather than strikeout text
#if 0
- QFont f( p.font() );
+ TQFont f( p.font() );
if ( todo->isCompleted() && strikeoutCompleted ) {
f.setStrikeOut( true );
p.setFont( f );
@@ -1484,10 +1484,10 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
//first, draw the progress bar
int progress = (int)(( lwidth*todo->percentComplete())/100.0 + 0.5);
- p.setBrush( QBrush( Qt::NoBrush ) );
+ p.setBrush( TQBrush( Qt::NoBrush ) );
p.drawRect( posPercentComplete, y+3, lwidth, lheight );
if ( progress > 0 ) {
- p.setBrush( QColor( 128, 128, 128 ) );
+ p.setBrush( TQColor( 128, 128, 128 ) );
p.drawRect( posPercentComplete, y+3, progress, lheight );
}
@@ -1563,14 +1563,14 @@ int CalPrintPluginBase::weekdayColumn( int weekday )
return ( weekday + 7 - KGlobal::locale()->weekStartDay() ) % 7;
}
-void CalPrintPluginBase::drawJournalField( QPainter &p, QString field, QString text,
+void CalPrintPluginBase::drawJournalField( TQPainter &p, TQString field, TQString text,
int x, int &y, int width, int pageHeight )
{
if ( text.isEmpty() ) return;
- QString entry( field.arg( text ) );
+ TQString entry( field.arg( text ) );
- QRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, entry) );
+ TQRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, entry) );
if ( rect.bottom() > pageHeight) {
// Start new page...
// FIXME: If it's a multi-line text, draw a few lines on this page, and the
@@ -1579,18 +1579,18 @@ void CalPrintPluginBase::drawJournalField( QPainter &p, QString field, QString t
mPrinter->newPage();
rect = p.boundingRect( x, y, width, -1, Qt::WordBreak, entry);
}
- QRect newrect;
+ TQRect newrect;
p.drawText( rect, Qt::WordBreak, entry, -1, &newrect );
y = newrect.bottom() + 7;
}
-void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int &y,
+void CalPrintPluginBase::drawJournal( Journal * journal, TQPainter &p, int x, int &y,
int width, int pageHeight )
{
- QFont oldFont( p.font() );
- p.setFont( QFont( "sans-serif", 15 ) );
- QString headerText;
- QString dateText( KGlobal::locale()->
+ TQFont oldFont( p.font() );
+ p.setFont( TQFont( "sans-serif", 15 ) );
+ TQString headerText;
+ TQString dateText( KGlobal::locale()->
formatDate( journal->dtStart().date(), false ) );
if ( journal->summary().isEmpty() ) {
@@ -1601,14 +1601,14 @@ void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int
.arg( dateText );
}
- QRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText) );
+ TQRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText) );
if ( rect.bottom() > pageHeight) {
// Start new page...
y=0;
mPrinter->newPage();
rect = p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText );
}
- QRect newrect;
+ TQRect newrect;
p.drawText( rect, Qt::WordBreak, headerText, -1, &newrect );
p.setFont( oldFont );
@@ -1623,17 +1623,17 @@ void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int
}
-void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
- const QDate &td,
- const QDate &,
+void CalPrintPluginBase::drawSplitHeaderRight( TQPainter &p, const TQDate &fd,
+ const TQDate &td,
+ const TQDate &,
int width, int )
{
- QFont oldFont( p.font() );
+ TQFont oldFont( p.font() );
- QPen oldPen( p.pen() );
- QPen pen( Qt::black, 4 );
+ TQPen oldPen( p.pen() );
+ TQPen pen( Qt::black, 4 );
- QString title;
+ TQString title;
if ( mCalSys ) {
if ( fd.month() == td.month() ) {
title = i18n("Date range: Month dayStart - dayEnd", "%1 %2 - %3")
@@ -1649,7 +1649,7 @@ void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
}
}
- QFont serifFont("Times", 30);
+ TQFont serifFont("Times", 30);
p.setFont(serifFont);
int lineSpacing = p.fontMetrics().lineSpacing();
@@ -1662,9 +1662,9 @@ void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
p.drawLine(300, lineSpacing * 1, width, lineSpacing * 1);
p.setPen( oldPen );
- p.setFont(QFont("Times", 20, QFont::Bold, TRUE));
+ p.setFont(TQFont("Times", 20, TQFont::Bold, TRUE));
int newlineSpacing = p.fontMetrics().lineSpacing();
- title += QString::number(fd.year());
+ title += TQString::number(fd.year());
p.drawText( 0, lineSpacing * 1 + 4, width, newlineSpacing,
Qt::AlignRight | Qt::AlignTop, title );
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;
diff --git a/korganizer/printing/cellitem.cpp b/korganizer/printing/cellitem.cpp
index 67e52c58e..73c8aa50b 100644
--- a/korganizer/printing/cellitem.cpp
+++ b/korganizer/printing/cellitem.cpp
@@ -27,26 +27,26 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qintdict.h>
+#include <tqintdict.h>
using namespace KOrg;
-QString CellItem::label() const
+TQString CellItem::label() const
{
return i18n("<undefined>");
}
-QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
+TQPtrList<CellItem> CellItem::placeItem( TQPtrList<CellItem> cells,
CellItem *placeItem )
{
kdDebug(5855) << "Placing " << placeItem->label() << endl;
- QPtrList<KOrg::CellItem> conflictItems;
+ TQPtrList<KOrg::CellItem> conflictItems;
int maxSubCells = 0;
- QIntDict<KOrg::CellItem> subCellDict;
+ TQIntDict<KOrg::CellItem> subCellDict;
// Find all items which are in same cell
- QPtrListIterator<KOrg::CellItem> it2( cells );
+ TQPtrListIterator<KOrg::CellItem> it2( cells );
for( it2.toFirst(); it2.current(); ++it2 ) {
KOrg::CellItem *item = it2.current();
if ( item == placeItem ) continue;
@@ -83,7 +83,7 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
conflictItems.append( placeItem );
placeItem->setSubCells( maxSubCells );
- QPtrListIterator<KOrg::CellItem> it3( conflictItems );
+ TQPtrListIterator<KOrg::CellItem> it3( conflictItems );
for( it3.toFirst(); it3.current(); ++it3 ) {
(*it3)->setSubCells( maxSubCells );
}
diff --git a/korganizer/printing/cellitem.h b/korganizer/printing/cellitem.h
index fa708147e..83759cc8d 100644
--- a/korganizer/printing/cellitem.h
+++ b/korganizer/printing/cellitem.h
@@ -24,8 +24,8 @@
#ifndef KORG_CELLITEM_H
#define KORG_CELLITEM_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
@@ -47,7 +47,7 @@ class KDE_EXPORT CellItem
virtual bool overlaps( CellItem *other ) const = 0;
- virtual QString label() const;
+ virtual TQString label() const;
/**
Place item \arg placeItem into stripe containing items \arg cells in a
@@ -55,7 +55,7 @@ class KDE_EXPORT CellItem
\return Placed items
*/
- static QPtrList<CellItem> placeItem( QPtrList<CellItem> cells,
+ static TQPtrList<CellItem> placeItem( TQPtrList<CellItem> cells,
CellItem *placeItem );
private: