summaryrefslogtreecommitdiffstats
path: root/korganizer/printing/calprintdefaultplugins.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /korganizer/printing/calprintdefaultplugins.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/printing/calprintdefaultplugins.cpp')
-rw-r--r--korganizer/printing/calprintdefaultplugins.cpp212
1 files changed, 106 insertions, 106 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;