diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-04 02:22:38 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-04 02:22:38 +0000 |
commit | 98a12d05a48814bec3870b9a6d5865475cfa1c95 (patch) | |
tree | a711801e47696fb0cf162abd7330e0b5b480ba39 /libkdeedu/extdate | |
parent | 421a1845137c7c396b5d03bce53237fcb149d602 (diff) | |
download | tdeedu-98a12d05a48814bec3870b9a6d5865475cfa1c95.tar.gz tdeedu-98a12d05a48814bec3870b9a6d5865475cfa1c95.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1211429 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdeedu/extdate')
-rw-r--r-- | libkdeedu/extdate/extcalendarsystem.cpp | 2 | ||||
-rw-r--r-- | libkdeedu/extdate/extcalendarsystem.h | 2 | ||||
-rw-r--r-- | libkdeedu/extdate/extcalendarsystemgregorian.cpp | 4 | ||||
-rw-r--r-- | libkdeedu/extdate/extcalendarsystemgregorian.h | 2 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatepicker.cpp | 28 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatepicker.h | 6 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatetbl.cpp | 58 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatetbl.h | 8 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatetime.cpp | 66 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatetime.h | 6 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatetimeedit.cpp | 122 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatetimeedit.h | 12 | ||||
-rw-r--r-- | libkdeedu/extdate/extdatewidget.cpp | 12 | ||||
-rw-r--r-- | libkdeedu/extdate/test_extdate.cc | 16 | ||||
-rw-r--r-- | libkdeedu/extdate/testwidget.cpp | 4 |
15 files changed, 174 insertions, 174 deletions
diff --git a/libkdeedu/extdate/extcalendarsystem.cpp b/libkdeedu/extdate/extcalendarsystem.cpp index f453bb6f..976301a8 100644 --- a/libkdeedu/extdate/extcalendarsystem.cpp +++ b/libkdeedu/extdate/extcalendarsystem.cpp @@ -4,7 +4,7 @@ Copyright (c) 2004 Jason Harris <jharris@30doradus.org> This class has been derived from ExtCalendarSystem; - the changesd made just replace TQDate objects with ExtDate objects. + the changesd made just tqreplace TQDate objects with ExtDate objects. These changes by Jason Harris <jharris@30doradus.org> This library is free software; you can redistribute it and/or diff --git a/libkdeedu/extdate/extcalendarsystem.h b/libkdeedu/extdate/extcalendarsystem.h index be7ba336..1ec6cb94 100644 --- a/libkdeedu/extdate/extcalendarsystem.h +++ b/libkdeedu/extdate/extcalendarsystem.h @@ -4,7 +4,7 @@ Copyright (c) 2004 Jason Harris <jharris@30doradus.org> This class has been derived from KCalendarSystem; - the changesd made just replace TQDate objects with ExtDate objects. + the changesd made just tqreplace TQDate objects with ExtDate objects. These changes by Jason Harris <jharris@30doradus.org> This library is free software; you can redistribute it and/or diff --git a/libkdeedu/extdate/extcalendarsystemgregorian.cpp b/libkdeedu/extdate/extcalendarsystemgregorian.cpp index 47338f4b..d19c86de 100644 --- a/libkdeedu/extdate/extcalendarsystemgregorian.cpp +++ b/libkdeedu/extdate/extcalendarsystemgregorian.cpp @@ -4,7 +4,7 @@ Copyright (c) 2004 Jason Harris <jharris@30doradus.org> This class has been derived from KCalendarSystemGregorian; - the changesd made just replace TQDate objects with ExtDate objects. + the changesd made just tqreplace TQDate objects with ExtDate objects. These changes by Jason Harris <jharris@30doradus.org> This library is free software; you can redistribute it and/or @@ -294,7 +294,7 @@ int ExtCalendarSystemGregorian::weekDayOfPray() const TQString ExtCalendarSystemGregorian::calendarName() const { - return TQString::fromLatin1("gregorian"); + return TQString::tqfromLatin1("gregorian"); } bool ExtCalendarSystemGregorian::isLunar() const diff --git a/libkdeedu/extdate/extcalendarsystemgregorian.h b/libkdeedu/extdate/extcalendarsystemgregorian.h index 6d1035c9..fd13e04b 100644 --- a/libkdeedu/extdate/extcalendarsystemgregorian.h +++ b/libkdeedu/extdate/extcalendarsystemgregorian.h @@ -4,7 +4,7 @@ Copyright (c) 2004 Jason Harris <jharris@30doradus.org> This class has been derived from KCalendarSystemGregorian; - the changesd made just replace TQDate objects with ExtDate objects. + the changesd made just tqreplace TQDate objects with ExtDate objects. These changes by Jason Harris <jharris@30doradus.org> This library is free software; you can redistribute it and/or diff --git a/libkdeedu/extdate/extdatepicker.cpp b/libkdeedu/extdate/extdatepicker.cpp index ad524863..87e56881 100644 --- a/libkdeedu/extdate/extdatepicker.cpp +++ b/libkdeedu/extdate/extdatepicker.cpp @@ -98,7 +98,7 @@ ExtDatePicker::ExtDatePicker(TQWidget *parent, ExtDate dt, const char *name, WFl ExtDatePicker::ExtDatePicker( TQWidget *parent, const char *name ) : TQFrame(parent,name) { - init( ExtDate::currentDate() ); + init( ExtDate::tqcurrentDate() ); } void ExtDatePicker::init( const ExtDate &dt ) @@ -166,17 +166,17 @@ void ExtDatePicker::init( const ExtDate &dt ) if ( TQApplication::reverseLayout() ) { - yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow"))); - yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow"))); - monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); - monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); + yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow"))); + yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow"))); + monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow"))); + monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow"))); } else { - yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow"))); - yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow"))); - monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); - monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); + yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow"))); + yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow"))); + monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow"))); + monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow"))); } connect(table, TQT_SIGNAL(dateChanged(const ExtDate&)), TQT_SLOT(dateChangedSlot(const ExtDate&))); connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot())); @@ -386,7 +386,7 @@ ExtDatePicker::selectYearClicked() KPopupFrame* popup = new KPopupFrame(this); ExtDateInternalYearSelector* picker = new ExtDateInternalYearSelector(popup); // ----- - picker->resize(picker->sizeHint()); + picker->resize(picker->tqsizeHint()); popup->setMainWidget(picker); connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int))); picker->setFocus(); @@ -446,13 +446,13 @@ ExtDatePicker::lineEnterPressed() void ExtDatePicker::todayButtonClicked() { - setDate(ExtDate::currentDate()); + setDate(ExtDate::tqcurrentDate()); } QSize -ExtDatePicker::sizeHint() const +ExtDatePicker::tqsizeHint() const { - return TQWidget::sizeHint(); + return TQWidget::tqsizeHint(); } void @@ -512,7 +512,7 @@ ExtDatePicker::setCloseButton( bool enable ) TQToolTip::add(d->closeButton, i18n("Close")); d->closeButton->setPixmap( SmallIcon("remove") ); connect( d->closeButton, TQT_SIGNAL( clicked() ), - topLevelWidget(), TQT_SLOT( close() ) ); + tqtopLevelWidget(), TQT_SLOT( close() ) ); } else { delete d->closeButton; diff --git a/libkdeedu/extdate/extdatepicker.h b/libkdeedu/extdate/extdatepicker.h index 8c745b52..216df369 100644 --- a/libkdeedu/extdate/extdatepicker.h +++ b/libkdeedu/extdate/extdatepicker.h @@ -61,7 +61,7 @@ public: * initially. **/ ExtDatePicker(TQWidget *parent=0, - ExtDate=ExtDate::currentDate(), + ExtDate=ExtDate::tqcurrentDate(), const char *name=0); /** The usual constructor. The given date will be displayed @@ -91,7 +91,7 @@ public: * size hint, try adding 28 to each of the reported numbers of * pixels. **/ - TQSize sizeHint() const; + TQSize tqsizeHint() const; /** * Sets the date. @@ -137,7 +137,7 @@ public: /** * By calling this method with @p enable = true, ExtDatePicker will show * a little close-button in the upper button-row. Clicking the - * close-button will cause the ExtDatePicker's topLevelWidget()'s close() + * close-button will cause the ExtDatePicker's tqtopLevelWidget()'s close() * method being called. This is mostly useful for toplevel datepickers * without a window manager decoration. * @see hasCloseButton diff --git a/libkdeedu/extdate/extdatetbl.cpp b/libkdeedu/extdate/extdatetbl.cpp index ca403a68..213ee277 100644 --- a/libkdeedu/extdate/extdatetbl.cpp +++ b/libkdeedu/extdate/extdatetbl.cpp @@ -124,7 +124,7 @@ ExtDateTable::ExtDateTable(TQWidget *parent, ExtDate date_, const char* name, WF if(!date_.isValid()) { kdDebug() << "ExtDateTable ctor: WARNING: Given date is invalid, using current date." << endl; - date_=ExtDate::currentDate(); + date_=ExtDate::tqcurrentDate(); } setFocusPolicy( TQWidget::StrongFocus ); setNumRows(7); // 6 weeks max + headline @@ -204,7 +204,7 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col) normalday=false; TQBrush brushTitle(); - TQBrush brushInvertTitle(colorGroup().base()); + TQBrush brushInvertTitle(tqcolorGroup().base()); TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) ); TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) ); if (!normalday) @@ -221,7 +221,7 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col) } painter->drawText(0, 0, w, h-1, AlignCenter, d->calendar->weekDayName(daynum, true), -1, &rect); - painter->setPen(colorGroup().text()); + painter->setPen(tqcolorGroup().text()); painter->moveTo(0, h-1); painter->lineTo(w-1, h-1); // ----- draw the weekday: @@ -238,7 +238,7 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col) // ° painting a day of the previous month or // ° painting a day of the following month // TODO: don't hardcode gray here! Use a color with less contrast to the background than normal text. - painter->setPen( colorGroup().mid() ); + painter->setPen( tqcolorGroup().mid() ); // painter->setPen(gray); } else { // paint a day of the current month if ( d->useCustomColors ) @@ -263,9 +263,9 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col) } painter->setPen( mode->fgColor ); } else - painter->setPen(colorGroup().text()); + painter->setPen(tqcolorGroup().text()); } else //if ( firstWeekDay < 4 ) // <- this doesn' make sense at all! - painter->setPen(colorGroup().text()); + painter->setPen(tqcolorGroup().text()); } pen=painter->pen(); @@ -276,19 +276,19 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col) if( ((offset+dy) == (pos+1)) && hasFocus()) { // draw the currently selected date - painter->setPen(colorGroup().highlight()); - painter->setBrush(colorGroup().highlight()); - pen=colorGroup().highlightedText(); + painter->setPen(tqcolorGroup().highlight()); + painter->setBrush(tqcolorGroup().highlight()); + pen=tqcolorGroup().highlightedText(); } else { painter->setBrush(paletteBackgroundColor()); painter->setPen(paletteBackgroundColor()); -// painter->setBrush(colorGroup().base()); -// painter->setPen(colorGroup().base()); +// painter->setBrush(tqcolorGroup().base()); +// painter->setPen(tqcolorGroup().base()); } - if ( pCellDate == ExtDate::currentDate() ) + if ( pCellDate == ExtDate::tqcurrentDate() ) { - painter->setPen(colorGroup().text()); + painter->setPen(tqcolorGroup().text()); } if ( paintRect ) painter->drawRect(0, 0, w, h); @@ -347,7 +347,7 @@ ExtDateTable::keyPressEvent( TQKeyEvent *e ) setDate(date.addDays(1)); return; case Key_N: - setDate(ExtDate::currentDate()); + setDate(ExtDate::tqcurrentDate()); return; case Key_Return: case Key_Enter: @@ -390,7 +390,7 @@ ExtDateTable::setFontSize(int size) maxCell.setHeight(QMAX(maxCell.height(), rect.height())); } // ----- compare with a real wide number and add some space: - rect=metrics.boundingRect(TQString::fromLatin1("88")); + rect=metrics.boundingRect(TQString::tqfromLatin1("88")); maxCell.setWidth(QMAX(maxCell.width()+2, rect.width())); maxCell.setHeight(QMAX(maxCell.height()+4, rect.height())); } @@ -494,7 +494,7 @@ ExtDateTable::setDate(const ExtDate& date_) numDaysPrevMonth=d->calendar->daysInMonth(temp); if(changed) { - repaintContents(false); + tqrepaintContents(false); } return true; } @@ -505,28 +505,28 @@ ExtDateTable::getDate() const return date; } -// what are those repaintContents() good for? (pfeiffer) +// what are those tqrepaintContents() good for? (pfeiffer) void ExtDateTable::focusInEvent( TQFocusEvent *e ) { -// repaintContents(false); +// tqrepaintContents(false); TQGridView::focusInEvent( e ); } void ExtDateTable::focusOutEvent( TQFocusEvent *e ) { -// repaintContents(false); +// tqrepaintContents(false); TQGridView::focusOutEvent( e ); } QSize -ExtDateTable::sizeHint() const +ExtDateTable::tqsizeHint() const { if(maxCell.height()>0 && maxCell.width()>0) { return TQSize(maxCell.width()*numCols()+2*frameWidth(), (maxCell.height()+2)*numRows()+2*frameWidth()); } else { - kdDebug() << "ExtDateTable::sizeHint: obscure failure - " << endl; + kdDebug() << "ExtDateTable::tqsizeHint: obscure failure - " << endl; return TQSize(-1, -1); } } @@ -554,7 +554,7 @@ void ExtDateTable::setCustomDatePainting(const ExtDate &date, const TQColor &fgC mode->fgColor=fgColor; mode->bgColor=bgColor; - d->customPaintingModes.replace( date.toString(), mode ); + d->customPaintingModes.tqreplace( date.toString(), mode ); d->useCustomColors=true; update(); } @@ -617,7 +617,7 @@ ExtDateInternalWeekSelector::setMaxWeek(int max) } // ### CFM To avoid binary incompatibility. -// In future releases, remove this and replace by a ExtDate +// In future releases, remove this and tqreplace by a ExtDate // private member, needed in ExtDateInternalMonthPicker::paintCell class ExtDateInternalMonthPicker::ExtDateInternalMonthPrivate { public: @@ -677,7 +677,7 @@ ExtDateInternalMonthPicker::ExtDateInternalMonthPicker } QSize -ExtDateInternalMonthPicker::sizeHint() const +ExtDateInternalMonthPicker::tqsizeHint() const { return TQSize((max.width()+6)*numCols()+2*frameWidth(), (max.height()+6)*numRows()+2*frameWidth()); @@ -779,7 +779,7 @@ ExtDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e) updateCell( row, col /*, false */ ); // mark the new active cell } } - if ( tmpRow > -1 ) // repaint the former active cell + if ( tmpRow > -1 ) // tqrepaint the former active cell updateCell( tmpRow, tmpCol /*, true */ ); } } @@ -888,7 +888,7 @@ KPopupFrame::keyPressEvent(TQKeyEvent* e) if(e->key()==Key_Escape) { result=0; // rejected - qApp->exit_loop(); + tqApp->exit_loop(); } } @@ -896,7 +896,7 @@ void KPopupFrame::close(int r) { result=r; - qApp->exit_loop(); + tqApp->exit_loop(); } void @@ -947,8 +947,8 @@ int KPopupFrame::exec(TQPoint pos) { popup(pos); - repaint(); - qApp->enter_loop(); + tqrepaint(); + tqApp->enter_loop(); hide(); return result; } diff --git a/libkdeedu/extdate/extdatetbl.h b/libkdeedu/extdate/extdatetbl.h index 8aa3281a..cf768e37 100644 --- a/libkdeedu/extdate/extdatetbl.h +++ b/libkdeedu/extdate/extdatetbl.h @@ -99,7 +99,7 @@ public: /** * The size hint. */ - TQSize sizeHint() const; + TQSize tqsizeHint() const; /** * Return the result. 0 means no selection (reject()), 1..12 are the * months. @@ -273,7 +273,7 @@ public: * The constructor. */ ExtDateTable(TQWidget *parent=0, - ExtDate date=ExtDate::currentDate(), + ExtDate date=ExtDate::tqcurrentDate(), const char* name=0, WFlags f=0); /** @@ -286,9 +286,9 @@ public: * To save some time, the size of the largest used cell content is * calculated in each paintCell() call, since all calculations have * to be done there anyway. The size is stored in maxCell. The - * sizeHint() simply returns a multiple of maxCell. + * tqsizeHint() simply returns a multiple of maxCell. */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; /** * Set the font size of the date table. */ diff --git a/libkdeedu/extdate/extdatetime.cpp b/libkdeedu/extdate/extdatetime.cpp index fe32cf91..97d8a4bd 100644 --- a/libkdeedu/extdate/extdatetime.cpp +++ b/libkdeedu/extdate/extdatetime.cpp @@ -212,7 +212,7 @@ int ExtDate::weekNumber( int *yearNum ) const if ( day1.daysTo( *this ) < 0 ) { if ( yearNum ) *yearNum = year() - 1; - //The last week of the year always contains Dec 28th (ISO 8601) + //The last week of the year always tqcontains Dec 28th (ISO 8601) ExtDate lastDec28( year()-1, 12, 28 ); return lastDec28.weekNumber(); } @@ -293,16 +293,16 @@ TQString ExtDate::toString( const TQString& format ) const TQString result( format ); - result.replace( "%Y", TQString().sprintf( "%d", year() ) ); - result.replace( "%y", TQString().sprintf( "%02d", (year() % 100) ) ); - result.replace( "%n", TQString().sprintf( "%d", month() ) ); - result.replace( "%m", TQString().sprintf( "%02d", month() ) ); - result.replace( "%e", TQString().sprintf( "%d", day() ) ); - result.replace( "%d", TQString().sprintf( "%02d", day() ) ); - result.replace( "%b", shortMonthName( month() ) ); - result.replace( "%B", longMonthName( month() ) ); - result.replace( "%a", shortDayName( dayOfWeek() ) ); - result.replace( "%A", longDayName( dayOfWeek() ) ); + result.tqreplace( "%Y", TQString().sprintf( "%d", year() ) ); + result.tqreplace( "%y", TQString().sprintf( "%02d", (year() % 100) ) ); + result.tqreplace( "%n", TQString().sprintf( "%d", month() ) ); + result.tqreplace( "%m", TQString().sprintf( "%02d", month() ) ); + result.tqreplace( "%e", TQString().sprintf( "%d", day() ) ); + result.tqreplace( "%d", TQString().sprintf( "%02d", day() ) ); + result.tqreplace( "%b", shortMonthName( month() ) ); + result.tqreplace( "%B", longMonthName( month() ) ); + result.tqreplace( "%a", shortDayName( dayOfWeek() ) ); + result.tqreplace( "%A", longDayName( dayOfWeek() ) ); return result; } @@ -377,7 +377,7 @@ int ExtDate::daysTo( const ExtDate & a_date) const return a_date.jd() - jd(); } -ExtDate ExtDate::currentDate(Qt::TimeSpec ts) +ExtDate ExtDate::tqcurrentDate(Qt::TimeSpec ts) { time_t a_current_time; struct tm a_current_time_tm; @@ -551,7 +551,7 @@ int ExtDate::dayOfYear(int y, int m, int d) \ingroup time - A ExtDateTime object contains a calendar date and a clock time (a + A ExtDateTime object tqcontains a calendar date and a clock time (a "datetime"). It is a combination of the ExtDate and TQTime classes. It can read the current datetime from the system clock. It provides functions for comparing datetimes and for manipulating a @@ -559,7 +559,7 @@ int ExtDate::dayOfYear(int y, int m, int d) A ExtDateTime object is typically created either by giving a date and time explicitly in the constructor, or by using the static - function currentDateTime(), which returns a ExtDateTime object set + function tqcurrentDateTime(), which returns a ExtDateTime object set to the system clock's time. The date and time can be changed with setDate() and setTime(). A datetime can also be set using the setTime_t() function, which takes a POSIX-standard "number of @@ -833,13 +833,13 @@ TQString ExtDateTime::toString( const TQString& format ) const int h = time().hour(); - result.replace( "%H", TQString().sprintf( "%02d", h ) ); - result.replace( "%k", TQString().sprintf( "%d", h ) ); - result.replace( "%I", TQString().sprintf( "%02d", ( h > 12 ) ? h-12 : h ) ); - result.replace( "%l", TQString().sprintf( "%d", ( h > 12 ) ? h-12 : h ) ); - result.replace( "%M", TQString().sprintf( "%02d", time().minute() ) ); - result.replace( "%S", TQString().sprintf( "%02d", time().second() ) ); - result.replace( "%p", TQString().sprintf( "%s", ( h > 12 ) ? "pm" : "am" ) ); + result.tqreplace( "%H", TQString().sprintf( "%02d", h ) ); + result.tqreplace( "%k", TQString().sprintf( "%d", h ) ); + result.tqreplace( "%I", TQString().sprintf( "%02d", ( h > 12 ) ? h-12 : h ) ); + result.tqreplace( "%l", TQString().sprintf( "%d", ( h > 12 ) ? h-12 : h ) ); + result.tqreplace( "%M", TQString().sprintf( "%02d", time().minute() ) ); + result.tqreplace( "%S", TQString().sprintf( "%02d", time().second() ) ); + result.tqreplace( "%p", TQString().sprintf( "%s", ( h > 12 ) ? "pm" : "am" ) ); return result; } @@ -933,7 +933,7 @@ int ExtDateTime::daysTo( const ExtDateTime &dt ) const Example: \code - ExtDateTime dt = ExtDateTime::currentDateTime(); + ExtDateTime dt = ExtDateTime::tqcurrentDateTime(); ExtDateTime xmas( ExtDate(dt.date().year(),12,24), TQTime(17,00) ); kdDebug( ) << "There are " << dt.secsTo(xmas) << " seconds to Christmas" << endl; \endcode @@ -1023,28 +1023,28 @@ bool ExtDateTime::operator>=( const ExtDateTime &dt ) const Returns the current datetime, as reported by the system clock. - \sa ExtDate::currentDate(), TQTime::currentTime() + \sa ExtDate::tqcurrentDate(), TQTime::currentTime() */ -ExtDateTime ExtDateTime::currentDateTime() +ExtDateTime ExtDateTime::tqcurrentDateTime() { - return currentDateTime( Qt::LocalTime ); + return tqcurrentDateTime( Qt::LocalTime ); } /*! Returns the current datetime, as reported by the system clock, for the TimeSpec \a ts. The default TimeSpec is LocalTime. - \sa ExtDate::currentDate(), TQTime::currentTime(), Qt::TimeSpec + \sa ExtDate::tqcurrentDate(), TQTime::currentTime(), Qt::TimeSpec */ -ExtDateTime ExtDateTime::currentDateTime( Qt::TimeSpec ts ) +ExtDateTime ExtDateTime::tqcurrentDateTime( Qt::TimeSpec ts ) { ExtDateTime dt; - dt.setDate( ExtDate::currentDate(ts) ); + dt.setDate( ExtDate::tqcurrentDate(ts) ); TQTime t = t.currentTime(ts); if ( t.hour()==0 && t.minute()==0 ) // midnight or right after? - dt.setDate( ExtDate::currentDate(ts) ); // fetch date again + dt.setDate( ExtDate::tqcurrentDate(ts) ); // fetch date again dt.setTime( t ); return dt; } @@ -1084,7 +1084,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) } if ( f == Qt::ISODate ) { - if ( s.length() <= 10 || ! s.contains( ':' ) ) { //no time specified + if ( s.length() <= 10 || ! s.tqcontains( ':' ) ) { //no time specified TQTime t = TQTime(0,0,0); return ExtDateTime( ExtDate::fromString( s.mid(0,10), Qt::ISODate ) ); } else { @@ -1099,7 +1099,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) TQTime time; TQString sd = s; int hour, minute, second; - int pivot = s.find( TQRegExp(TQString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); + int pivot = s.find( TQRegExp(TQString::tqfromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); if ( pivot != -1 ) { hour = s.mid( pivot, 2 ).toInt(); minute = s.mid( pivot+3, 2 ).toInt(); @@ -1123,12 +1123,12 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) #ifndef QT_NO_DATASTREAM KDE_EXPORT TQDataStream &operator<<( TQDataStream & ostream, const ExtDate & date) { - return ostream << (Q_UINT32)(date.jd()); + return ostream << (TQ_UINT32)(date.jd()); } KDE_EXPORT TQDataStream &operator>>( TQDataStream & ostream, ExtDate & date) { - Q_UINT32 julday; + TQ_UINT32 julday; ostream >> julday; date.setJD( julday ); return ostream; diff --git a/libkdeedu/extdate/extdatetime.h b/libkdeedu/extdate/extdatetime.h index 0830af83..c398b7c5 100644 --- a/libkdeedu/extdate/extdatetime.h +++ b/libkdeedu/extdate/extdatetime.h @@ -88,7 +88,7 @@ public: bool operator>( const ExtDate &d ) const { return m_jd > d.jd(); } bool operator>=( const ExtDate &d ) const { return m_jd >= d.jd(); } - static ExtDate currentDate( Qt::TimeSpec ts = Qt::LocalTime ); + static ExtDate tqcurrentDate( Qt::TimeSpec ts = Qt::LocalTime ); #ifndef QT_NO_DATESTRING static ExtDate fromString( const TQString &s ); static ExtDate fromString( const TQString &s, Qt::DateFormat f ); @@ -162,8 +162,8 @@ public: bool operator>( const ExtDateTime &dt ) const; bool operator>=( const ExtDateTime &dt ) const; - static ExtDateTime currentDateTime(); - static ExtDateTime currentDateTime( Qt::TimeSpec ); + static ExtDateTime tqcurrentDateTime(); + static ExtDateTime tqcurrentDateTime( Qt::TimeSpec ); #ifndef QT_NO_DATESTRING static ExtDateTime fromString( const TQString &s ); static ExtDateTime fromString( const TQString &s, Qt::DateFormat f ); diff --git a/libkdeedu/extdate/extdatetimeedit.cpp b/libkdeedu/extdate/extdatetimeedit.cpp index 203f1dbb..f2db94fb 100644 --- a/libkdeedu/extdate/extdatetimeedit.cpp +++ b/libkdeedu/extdate/extdatetimeedit.cpp @@ -135,7 +135,7 @@ static void readLocaleSettings() #ifndef Q_WS_WIN TQString sep = d.mid( QMIN( dpos, mpos ) + 2, QABS( dpos - mpos ) - 2 ); - if ( d.contains( sep ) == 2 ) { + if ( d.tqcontains( sep ) == 2 ) { *lDateSep = sep; } #endif @@ -266,7 +266,7 @@ public: { int fw = 0; if ( frm ) - fw = style.pixelMetric(TQStyle::PM_DefaultFrameWidth); + fw = style.tqpixelMetric(TQStyle::PM_DefaultFrameWidth); parag->truncate( 0 ); parag->append( txt ); @@ -295,7 +295,7 @@ public: TQRect r( rect.x(), rect.y(), rect.width() - 2 * ( 2 + fw ), rect.height() ); parag->pseudoDocument()->docRect = r; - parag->invalidate(0); + parag->tqinvalidate(0); parag->format(); int xoff = 2 + fw - offset; @@ -411,7 +411,7 @@ bool ExtDateTimeEditor::event( TQEvent *e ) { if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) { if ( e->type() == TQEvent::FocusOut ) - qApp->sendEvent( cw, e ); + tqApp->sendEvent( cw, e ); update( rect() ); } else if ( e->type() == TQEvent::AccelOverride ) { TQKeyEvent* ke = (TQKeyEvent*) e; @@ -460,9 +460,9 @@ void ExtDateTimeEditor::paintEvent( TQPaintEvent * ) QSharedDoubleBuffer buffer( this ); const TQBrush &bg = - colorGroup().brush( isEnabled() ? TQColorGroup::Base : TQColorGroup::Background ); + tqcolorGroup().brush( isEnabled() ? TQColorGroup::Base : TQColorGroup::Background ); buffer.painter()->fillRect( 0, 0, width(), height(), bg ); - d->paint( txt, hasFocus(), *buffer.painter(), colorGroup(), rect(), + d->paint( txt, hasFocus(), *buffer.painter(), tqcolorGroup(), rect(), style() ); buffer.end(); } @@ -492,7 +492,7 @@ void ExtDateTimeEditor::mousePressEvent( TQMouseEvent *e ) int sec = sectionAt( p ); if ( sec != -1 ) { cw->setFocusSection( sec ); - repaint( rect(), FALSE ); + tqrepaint( rect(), FALSE ); } } @@ -508,13 +508,13 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) case Key_Right: if ( d->focusSection() < (int)d->sectionCount()-1 ) { if ( cw->setFocusSection( focusSection()+1 ) ) - repaint( rect(), FALSE ); + tqrepaint( rect(), FALSE ); } return TRUE; case Key_Left: if ( d->focusSection() > 0 ) { if ( cw->setFocusSection( focusSection()-1 ) ) - repaint( rect(), FALSE ); + tqrepaint( rect(), FALSE ); } return TRUE; case Key_Up: @@ -544,12 +544,12 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) ::qt_cast<ExtDateTimeEdit*>(w) ) break; hadDateEdit = hadDateEdit || ::qt_cast<ExtDateEdit*>(w); - w = w->parentWidget(); + w = w->tqparentWidget(); } if ( w ) { if ( !::qt_cast<ExtDateTimeEdit*>(w) ) { - w = w->parentWidget(); + w = w->tqparentWidget(); } else { ExtDateTimeEdit *ed = (ExtDateTimeEdit*)w; if ( hadDateEdit && ke->key() == Key_Tab ) { @@ -560,11 +560,11 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) return TRUE; } else { while ( w && !::qt_cast<ExtDateTimeEdit*>(w) ) - w = w->parentWidget(); + w = w->tqparentWidget(); } } - qApp->sendEvent( w, e ); + tqApp->sendEvent( w, e ); return TRUE; } } break; @@ -574,7 +574,7 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) // do the same thing as KEY_RIGHT when the user presses the separator key if ( d->focusSection() < 2 ) { if ( cw->setFocusSection( focusSection()+1 ) ) - repaint( rect(), FALSE ); + tqrepaint( rect(), FALSE ); } return TRUE; } else if ( !txt.isEmpty() && ::qt_cast<QTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) { @@ -767,9 +767,9 @@ public: with a date, e.g. \code - ExtDateEdit *dateEdit = new ExtDateEdit( ExtDate::currentDate(), this ); - dateEdit->setRange( ExtDate::currentDate().addDays( -365 ), - ExtDate::currentDate().addDays( 365 ) ); + ExtDateEdit *dateEdit = new ExtDateEdit( ExtDate::tqcurrentDate(), this ); + dateEdit->setRange( ExtDate::tqcurrentDate().addDays( -365 ), + ExtDate::tqcurrentDate().addDays( 365 ) ); dateEdit->setOrder( ExtDateEdit::MDY ); dateEdit->setAutoAdvance( TRUE ); \endcode @@ -883,7 +883,7 @@ void ExtDateEdit::init() d->max = ExtDate( 50000, 12, 31 ); d->changed = FALSE; - setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); + tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); refcount++; } @@ -997,11 +997,11 @@ void ExtDateEdit::resizeEvent( TQResizeEvent * ) /*! \reimp */ -TQSize ExtDateEdit::sizeHint() const +TQSize ExtDateEdit::tqsizeHint() const { constPolish(); TQFontMetrics fm( font() ); - int fw = style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ); + int fw = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this ); int h = QMAX( fm.lineSpacing(), 14 ) + 2; int w = 2 + fm.width( '9' ) * 8 + fm.width( d->ed->separator() ) * 2 + d->controls->upRect().width() + fw * 4; @@ -1012,9 +1012,9 @@ TQSize ExtDateEdit::sizeHint() const /*! \reimp */ -TQSize ExtDateEdit::minimumSizeHint() const +TQSize ExtDateEdit::tqminimumSizeHint() const { - return sizeHint(); + return tqsizeHint(); } @@ -1160,7 +1160,7 @@ void ExtDateEdit::setOrder( ExtDateEdit::Order order ) } if ( isVisible() ) - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->tqrepaint( d->ed->rect(), FALSE ); } @@ -1198,7 +1198,7 @@ void ExtDateEdit::stepUp() emit valueChanged( date() ); } - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->tqrepaint( d->ed->rect(), FALSE ); } @@ -1232,7 +1232,7 @@ void ExtDateEdit::stepDown() emit valueChanged( date() ); } - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->tqrepaint( d->ed->rect(), FALSE ); } /*! @@ -1295,7 +1295,7 @@ void ExtDateEdit::setDay( int day ) If the date property is not valid, the editor displays all zeroes and ExtDateEdit::date() will return an invalid date. It is strongly recommended that the editor is given a default date value (e.g. - currentDate()). That way, attempts to set the date property to an + tqcurrentDate()). That way, attempts to set the date property to an invalid date will fail. When changing the date property, if the date is less than @@ -1319,7 +1319,7 @@ void ExtDateEdit::setDate( const ExtDate& date ) emit valueChanged( date ); } d->changed = FALSE; - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->tqrepaint( d->ed->rect(), FALSE ); } ExtDate ExtDateEdit::date() const @@ -1341,8 +1341,8 @@ ExtDate ExtDateEdit::date() const bool ExtDateEdit::outOfRange( int y, int m, int d ) const { if ( ExtDate::isValid( y, m, d ) ) { - ExtDate currentDate( y, m, d ); - if ( currentDate > maxValue() || currentDate < minValue() ) { + ExtDate tqcurrentDate( y, m, d ); + if ( tqcurrentDate > maxValue() || tqcurrentDate < minValue() ) { //## outOfRange should set overwrite? return TRUE; } @@ -1454,8 +1454,8 @@ void ExtDateEdit::addNumber( int sec, int num ) emit valueChanged( date() ); } d->overwrite = overwrite; - d->timerId = startTimer( qApp->doubleClickInterval()*4 ); - d->ed->repaint( d->ed->rect(), FALSE ); + d->timerId = startTimer( tqApp->doubleClickInterval()*4 ); + d->ed->tqrepaint( d->ed->rect(), FALSE ); } @@ -1502,7 +1502,7 @@ void ExtDateEdit::fix() changed = TRUE; } - int currentYear = ExtDate::currentDate().year(); + int currentYear = ExtDate::tqcurrentDate().year(); int year = d->y; /* No longer valid for extended dates if ( year < 100 ) { @@ -1608,7 +1608,7 @@ void ExtDateEdit::removeFirstNumber( int sec ) d->d = txt.toInt(); d->dayCache = d->d; } - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->tqrepaint( d->ed->rect(), FALSE ); } /*! \reimp @@ -1634,7 +1634,7 @@ void ExtDateEdit::removeLastNumber( int sec ) d->d = txt.toInt(); d->dayCache = d->d; } - d->ed->repaint( d->ed->rect(), FALSE ); + d->ed->tqrepaint( d->ed->rect(), FALSE ); } /*! @@ -1791,7 +1791,7 @@ public: // d->max = TQTime( 23, 59, 59 ); // d->changed = FALSE; // -// setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); +// tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); // // refcount++; // } @@ -1909,7 +1909,7 @@ public: // emit valueChanged( time ); // } // d->changed = FALSE; -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->tqrepaint( d->ed->rect(), FALSE ); // } // // TQTime QTimeEdit::time() const @@ -2039,7 +2039,7 @@ public: // d->changed = TRUE; // emit valueChanged( time() ); // } -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->tqrepaint( d->ed->rect(), FALSE ); // } // // @@ -2088,7 +2088,7 @@ public: // d->changed = TRUE; // emit valueChanged( time() ); // } -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->tqrepaint( d->ed->rect(), FALSE ); // } // // @@ -2214,12 +2214,12 @@ public: // if ( lAM ) // txt = *lAM; // else -// txt = TQString::fromLatin1( "AM" ); +// txt = TQString::tqfromLatin1( "AM" ); // } else { // if ( lPM ) // txt = *lPM; // else -// txt = TQString::fromLatin1( "PM" ); +// txt = TQString::tqfromLatin1( "PM" ); // } // break; // default: @@ -2369,8 +2369,8 @@ public: // if ( accepted ) // emit valueChanged( time() ); // d->overwrite = overwrite; -// d->timerId = startTimer( qApp->doubleClickInterval()*4 ); -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->timerId = startTimer( tqApp->doubleClickInterval()*4 ); +// d->ed->tqrepaint( d->ed->rect(), FALSE ); // } // // @@ -2410,7 +2410,7 @@ public: // d->s = txt.toInt(); // break; // } -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->tqrepaint( d->ed->rect(), FALSE ); // } // // /*! \reimp @@ -2445,7 +2445,7 @@ public: // d->s = txt.toInt(); // break; // } -// d->ed->repaint( d->ed->rect(), FALSE ); +// d->ed->tqrepaint( d->ed->rect(), FALSE ); // } // // /*! \reimp @@ -2457,11 +2457,11 @@ public: // // /*! \reimp // */ -// TQSize QTimeEdit::sizeHint() const +// TQSize QTimeEdit::tqsizeHint() const // { // constPolish(); // TQFontMetrics fm( font() ); -// int fw = style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ); +// int fw = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this ); // int h = fm.lineSpacing() + 2; // int w = 2 + fm.width( '9' ) * 6 + fm.width( d->ed->separator() ) * 2 + // d->controls->upRect().width() + fw * 4; @@ -2469,7 +2469,7 @@ public: // if ( lAM ) // w += fm.width( *lAM ) + 4; // else -// w += fm.width( TQString::fromLatin1( "AM" ) ) + 4; +// w += fm.width( TQString::tqfromLatin1( "AM" ) ) + 4; // } // // return TQSize( w, QMAX(h + fw * 2,20) ).expandedTo( TQApplication::globalStrut() ); @@ -2477,9 +2477,9 @@ public: // // /*! \reimp // */ -// TQSize QTimeEdit::minimumSizeHint() const +// TQSize QTimeEdit::tqminimumSizeHint() const // { -// return sizeHint(); +// return tqsizeHint(); // } // // /*! @@ -2534,9 +2534,9 @@ public: It is recommended that the ExtDateTimeEdit is initialised with a datetime, e.g. \code - ExtDateTimeEdit *dateTimeEdit = new ExtDateTimeEdit( ExtDateTime::currentDateTime(), this ); - dateTimeEdit->dateEdit()->setRange( ExtDateTime::currentDate(), - ExtDateTime::currentDate().addDays( 7 ) ); + ExtDateTimeEdit *dateTimeEdit = new ExtDateTimeEdit( ExtDateTime::tqcurrentDateTime(), this ); + dateTimeEdit->dateEdit()->setRange( ExtDateTime::tqcurrentDate(), + ExtDateTime::tqcurrentDate().addDays( 7 ) ); \endcode Here we've created a new ExtDateTimeEdit set to the current date and time, and set the date to have a minimum date of now and a maximum @@ -2600,8 +2600,8 @@ ExtDateTimeEdit::~ExtDateTimeEdit() void ExtDateTimeEdit::resizeEvent( TQResizeEvent * ) { - int dw = de->sizeHint().width(); - int tw = te->sizeHint().width(); + int dw = de->tqsizeHint().width(); + int tw = te->tqsizeHint().width(); int w = width(); int h = height(); int extra = w - ( dw + tw ); @@ -2620,10 +2620,10 @@ void ExtDateTimeEdit::resizeEvent( TQResizeEvent * ) /*! \reimp */ -TQSize ExtDateTimeEdit::minimumSizeHint() const +TQSize ExtDateTimeEdit::tqminimumSizeHint() const { - TQSize dsh = de->minimumSizeHint(); - TQSize tsh = te->minimumSizeHint(); + TQSize dsh = de->tqminimumSizeHint(); + TQSize tsh = te->tqminimumSizeHint(); return TQSize( dsh.width() + tsh.width(), QMAX( dsh.height(), tsh.height() ) ); } @@ -2642,17 +2642,17 @@ void ExtDateTimeEdit::init() connect( te, TQT_SIGNAL( valueChanged( const TQTime& ) ), this, TQT_SLOT( newValue( const TQTime& ) ) ); setFocusProxy( de ); - setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); + tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); } /*! \reimp */ -TQSize ExtDateTimeEdit::sizeHint() const +TQSize ExtDateTimeEdit::tqsizeHint() const { constPolish(); - TQSize dsh = de->sizeHint(); - TQSize tsh = te->sizeHint(); + TQSize dsh = de->tqsizeHint(); + TQSize tsh = te->tqsizeHint(); return TQSize( dsh.width() + tsh.width(), QMAX( dsh.height(), tsh.height() ) ); } diff --git a/libkdeedu/extdate/extdatetimeedit.h b/libkdeedu/extdate/extdatetimeedit.h index 4bcf78c8..d0998362 100644 --- a/libkdeedu/extdate/extdatetimeedit.h +++ b/libkdeedu/extdate/extdatetimeedit.h @@ -81,8 +81,8 @@ public: YMD /**< Year-Month-Day, also the default */, YDM /**< Year-Day-Month @deprecated Included for completeness. */ }; - TQSize sizeHint() const; - TQSize minimumSizeHint() const; + TQSize tqsizeHint() const; + TQSize tqminimumSizeHint() const; public slots: virtual void setDate( const ExtDate& date ); @@ -167,8 +167,8 @@ private: // QTimeEdit( const TQTime& time, TQWidget* parent=0, const char* name=0 ); // ~QTimeEdit(); // -// TQSize sizeHint() const; -// TQSize minimumSizeHint() const; +// TQSize tqsizeHint() const; +// TQSize tqminimumSizeHint() const; // // public slots: // virtual void setTime( const TQTime& time ); @@ -239,8 +239,8 @@ public: const char* name=0 ); ~ExtDateTimeEdit(); - TQSize sizeHint() const; - TQSize minimumSizeHint() const; + TQSize tqsizeHint() const; + TQSize tqminimumSizeHint() const; public slots: virtual void setDateTime( const ExtDateTime & dt ); diff --git a/libkdeedu/extdate/extdatewidget.cpp b/libkdeedu/extdate/extdatewidget.cpp index 5f5d19d6..93947dbc 100644 --- a/libkdeedu/extdate/extdatewidget.cpp +++ b/libkdeedu/extdate/extdatewidget.cpp @@ -36,7 +36,7 @@ public: ExtDateWidgetSpinBox(int min, int max, TQWidget *parent) : TQSpinBox(min, max, 1, parent) { - editor()->setAlignment(AlignRight); + editor()->tqsetAlignment(AlignRight); } }; @@ -56,7 +56,7 @@ public: ExtDateWidget::ExtDateWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - init(ExtDate::currentDate()); + init(ExtDate::tqcurrentDate()); setDate(ExtDate()); } @@ -74,8 +74,8 @@ ExtDateWidget::ExtDateWidget( const ExtDate &date, TQWidget *parent, // { // d = new ExtDateWidgetPrivate; // KLocale *locale = KGlobal::locale(); -// TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); -// layout->setAutoAdd(true); +// TQHBoxLayout *tqlayout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); +// tqlayout->setAutoAdd(true); // d->m_day = new ExtDateWidgetSpinBox(1, 1, this); // d->m_month = new TQComboBox(false, this); // for (int i = 1; ; ++i) @@ -98,8 +98,8 @@ void ExtDateWidget::init(const ExtDate& date) { d = new ExtDateWidgetPrivate; //KLocale *locale = KGlobal::locale(); - TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); + tqlayout->setAutoAdd(true); d->m_day = new ExtDateWidgetSpinBox(1, 1, this); d->m_month = new TQComboBox(false, this); for (int i = 1; ; ++i) diff --git a/libkdeedu/extdate/test_extdate.cc b/libkdeedu/extdate/test_extdate.cc index d63d1558..0cb212d9 100644 --- a/libkdeedu/extdate/test_extdate.cc +++ b/libkdeedu/extdate/test_extdate.cc @@ -277,16 +277,16 @@ void test6() void test7() { std::cout << "Express the current date:\n" << std::endl; - TQDate q = TQDate::currentDate(Qt::LocalTime); - ExtDate e = ExtDate::currentDate(Qt::TimeSpec(Qt::LocalTime)); + TQDate q = TQDate::tqcurrentDate(Qt::LocalTime); + ExtDate e = ExtDate::tqcurrentDate(Qt::TimeSpec(Qt::LocalTime)); std::cout << "Qt::LocalTime :: ExtDate : " << e.toString().local8Bit() << " TQDate : " << q.toString().local8Bit() << std::endl; - q = TQDate::currentDate(Qt::UTC); - e = ExtDate::currentDate(Qt::UTC); + q = TQDate::tqcurrentDate(Qt::UTC); + e = ExtDate::tqcurrentDate(Qt::UTC); std::cout << "Qt::UTC :: ExtDate : " << e.toString().local8Bit() << " TQDate : " << q.toString().local8Bit() << std::endl; - q = TQDate::currentDate(); - e = ExtDate::currentDate(); + q = TQDate::tqcurrentDate(); + e = ExtDate::tqcurrentDate(); std::cout << "<default> :: ExtDate : " << e.toString().local8Bit() << " TQDate : " << q.toString().local8Bit() << std::endl; std::cout << "--------------------" << std::endl; @@ -311,8 +311,8 @@ void test8() { void test9() { std::cout << "TQDateTime : ExtDateTime: \n" << std::endl; - TQDateTime q = TQDateTime::currentDateTime(); - ExtDateTime e = ExtDateTime::currentDateTime(); + TQDateTime q = TQDateTime::tqcurrentDateTime(); + ExtDateTime e = ExtDateTime::tqcurrentDateTime(); std::cout << q.toString().local8Bit() << " : " << e.toString().local8Bit() << std::endl; std::cout << "--------------------" << std::endl; diff --git a/libkdeedu/extdate/testwidget.cpp b/libkdeedu/extdate/testwidget.cpp index 0267ddeb..a6489cce 100644 --- a/libkdeedu/extdate/testwidget.cpp +++ b/libkdeedu/extdate/testwidget.cpp @@ -39,8 +39,8 @@ TestWidget::TestWidget( TQWidget *p=0, const char *name=0 ) : KMainWindow( p, na edpEdit = new KLineEdit(w); edpEdit->setReadOnly( TRUE ); - kdw = new KDateWidget( TQDate::currentDate(), w ); - edw = new ExtDateWidget( ExtDate::currentDate(), w ); + kdw = new KDateWidget( TQDate::tqcurrentDate(), w ); + edw = new ExtDateWidget( ExtDate::tqcurrentDate(), w ); glay->addWidget( kdpLabel, 0, 0 ); glay->addWidget( edpLabel, 0, 1 ); |