diff options
Diffstat (limited to 'libtdeedu')
-rw-r--r-- | libtdeedu/extdate/extcalendarsystemgregorian.cpp | 2 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatepicker.cpp | 28 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatepicker.h | 6 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatetbl.cpp | 36 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatetbl.h | 8 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatetime.cpp | 22 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatetime.h | 6 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatetimeedit.cpp | 70 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatetimeedit.h | 12 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatewidget.cpp | 4 | ||||
-rw-r--r-- | libtdeedu/extdate/test_extdate.cc | 16 | ||||
-rw-r--r-- | libtdeedu/extdate/testwidget.cpp | 4 |
12 files changed, 107 insertions, 107 deletions
diff --git a/libtdeedu/extdate/extcalendarsystemgregorian.cpp b/libtdeedu/extdate/extcalendarsystemgregorian.cpp index 0b167ce9..fc3fe51a 100644 --- a/libtdeedu/extdate/extcalendarsystemgregorian.cpp +++ b/libtdeedu/extdate/extcalendarsystemgregorian.cpp @@ -294,7 +294,7 @@ int ExtCalendarSystemGregorian::weekDayOfPray() const TQString ExtCalendarSystemGregorian::calendarName() const { - return TQString::tqfromLatin1("gregorian"); + return TQString::fromLatin1("gregorian"); } bool ExtCalendarSystemGregorian::isLunar() const diff --git a/libtdeedu/extdate/extdatepicker.cpp b/libtdeedu/extdate/extdatepicker.cpp index 2b267d8e..62186fde 100644 --- a/libtdeedu/extdate/extdatepicker.cpp +++ b/libtdeedu/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::tqcurrentDate() ); + init( ExtDate::currentDate() ); } void ExtDatePicker::init( const ExtDate &dt ) @@ -166,17 +166,17 @@ void ExtDatePicker::init( const ExtDate &dt ) if ( TQApplication::reverseLayout() ) { - yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow"))); - yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow"))); - monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow"))); - monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow"))); + yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow"))); + yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow"))); + monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); + monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); } else { - yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow"))); - yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow"))); - monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow"))); - monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow"))); + yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow"))); + yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow"))); + monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); + monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("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->tqsizeHint()); + picker->resize(picker->sizeHint()); 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::tqcurrentDate()); + setDate(ExtDate::currentDate()); } TQSize -ExtDatePicker::tqsizeHint() const +ExtDatePicker::sizeHint() const { - return TQWidget::tqsizeHint(); + return TQWidget::sizeHint(); } 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() ), - tqtopLevelWidget(), TQT_SLOT( close() ) ); + topLevelWidget(), TQT_SLOT( close() ) ); } else { delete d->closeButton; diff --git a/libtdeedu/extdate/extdatepicker.h b/libtdeedu/extdate/extdatepicker.h index 794ccea6..f8295dfe 100644 --- a/libtdeedu/extdate/extdatepicker.h +++ b/libtdeedu/extdate/extdatepicker.h @@ -62,7 +62,7 @@ public: * initially. **/ ExtDatePicker(TQWidget *parent=0, - ExtDate=ExtDate::tqcurrentDate(), + ExtDate=ExtDate::currentDate(), const char *name=0); /** The usual constructor. The given date will be displayed @@ -92,7 +92,7 @@ public: * size hint, try adding 28 to each of the reported numbers of * pixels. **/ - TQSize tqsizeHint() const; + TQSize sizeHint() const; /** * Sets the date. @@ -138,7 +138,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 tqtopLevelWidget()'s close() + * close-button will cause the ExtDatePicker's topLevelWidget()'s close() * method being called. This is mostly useful for toplevel datepickers * without a window manager decoration. * @see hasCloseButton diff --git a/libtdeedu/extdate/extdatetbl.cpp b/libtdeedu/extdate/extdatetbl.cpp index 55458417..b3dc27bd 100644 --- a/libtdeedu/extdate/extdatetbl.cpp +++ b/libtdeedu/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::tqcurrentDate(); + date_=ExtDate::currentDate(); } setFocusPolicy( TQ_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(tqcolorGroup().base()); + TQBrush brushInvertTitle(colorGroup().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(tqcolorGroup().text()); + painter->setPen(colorGroup().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( tqcolorGroup().mid() ); + painter->setPen( colorGroup().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(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); } else //if ( firstWeekDay < 4 ) // <- this doesn' make sense at all! - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().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(tqcolorGroup().highlight()); - painter->setBrush(tqcolorGroup().highlight()); - pen=TQPen(tqcolorGroup().highlightedText()); + painter->setPen(colorGroup().highlight()); + painter->setBrush(colorGroup().highlight()); + pen=TQPen(colorGroup().highlightedText()); } else { painter->setBrush(paletteBackgroundColor()); painter->setPen(paletteBackgroundColor()); -// painter->setBrush(tqcolorGroup().base()); -// painter->setPen(tqcolorGroup().base()); +// painter->setBrush(colorGroup().base()); +// painter->setPen(colorGroup().base()); } - if ( pCellDate == ExtDate::tqcurrentDate() ) + if ( pCellDate == ExtDate::currentDate() ) { - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().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::tqcurrentDate()); + setDate(ExtDate::currentDate()); return; case Key_Return: case Key_Enter: @@ -390,7 +390,7 @@ ExtDateTable::setFontSize(int size) maxCell.setHeight(TQMAX(maxCell.height(), rect.height())); } // ----- compare with a real wide number and add some space: - rect=metrics.boundingRect(TQString::tqfromLatin1("88")); + rect=metrics.boundingRect(TQString::fromLatin1("88")); maxCell.setWidth(TQMAX(maxCell.width()+2, rect.width())); maxCell.setHeight(TQMAX(maxCell.height()+4, rect.height())); } @@ -519,14 +519,14 @@ void ExtDateTable::focusOutEvent( TQFocusEvent *e ) } TQSize -ExtDateTable::tqsizeHint() const +ExtDateTable::sizeHint() const { if(maxCell.height()>0 && maxCell.width()>0) { return TQSize(maxCell.width()*numCols()+2*frameWidth(), (maxCell.height()+2)*numRows()+2*frameWidth()); } else { - kdDebug() << "ExtDateTable::tqsizeHint: obscure failure - " << endl; + kdDebug() << "ExtDateTable::sizeHint: obscure failure - " << endl; return TQSize(-1, -1); } } @@ -677,7 +677,7 @@ ExtDateInternalMonthPicker::ExtDateInternalMonthPicker } TQSize -ExtDateInternalMonthPicker::tqsizeHint() const +ExtDateInternalMonthPicker::sizeHint() const { return TQSize((max.width()+6)*numCols()+2*frameWidth(), (max.height()+6)*numRows()+2*frameWidth()); diff --git a/libtdeedu/extdate/extdatetbl.h b/libtdeedu/extdate/extdatetbl.h index fbbc880b..de55408c 100644 --- a/libtdeedu/extdate/extdatetbl.h +++ b/libtdeedu/extdate/extdatetbl.h @@ -101,7 +101,7 @@ public: /** * The size hint. */ - TQSize tqsizeHint() const; + TQSize sizeHint() const; /** * Return the result. 0 means no selection (reject()), 1..12 are the * months. @@ -278,7 +278,7 @@ public: * The constructor. */ ExtDateTable(TQWidget *parent=0, - ExtDate date=ExtDate::tqcurrentDate(), + ExtDate date=ExtDate::currentDate(), const char* name=0, WFlags f=0); /** @@ -291,9 +291,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 - * tqsizeHint() simply returns a multiple of maxCell. + * sizeHint() simply returns a multiple of maxCell. */ - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; /** * Set the font size of the date table. */ diff --git a/libtdeedu/extdate/extdatetime.cpp b/libtdeedu/extdate/extdatetime.cpp index d8984eee..fa87a85f 100644 --- a/libtdeedu/extdate/extdatetime.cpp +++ b/libtdeedu/extdate/extdatetime.cpp @@ -377,7 +377,7 @@ int ExtDate::daysTo( const ExtDate & a_date) const return a_date.jd() - jd(); } -ExtDate ExtDate::tqcurrentDate(Qt::TimeSpec ts) +ExtDate ExtDate::currentDate(Qt::TimeSpec ts) { time_t a_current_time; struct tm a_current_time_tm; @@ -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 tqcurrentDateTime(), which returns a ExtDateTime object set + function currentDateTime(), 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 @@ -933,7 +933,7 @@ int ExtDateTime::daysTo( const ExtDateTime &dt ) const Example: \code - ExtDateTime dt = ExtDateTime::tqcurrentDateTime(); + ExtDateTime dt = ExtDateTime::currentDateTime(); 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::tqcurrentDate(), TQTime::currentTime() + \sa ExtDate::currentDate(), TQTime::currentTime() */ -ExtDateTime ExtDateTime::tqcurrentDateTime() +ExtDateTime ExtDateTime::currentDateTime() { - return tqcurrentDateTime( Qt::LocalTime ); + return currentDateTime( Qt::LocalTime ); } /*! Returns the current datetime, as reported by the system clock, for the TimeSpec \a ts. The default TimeSpec is LocalTime. - \sa ExtDate::tqcurrentDate(), TQTime::currentTime(), Qt::TimeSpec + \sa ExtDate::currentDate(), TQTime::currentTime(), Qt::TimeSpec */ -ExtDateTime ExtDateTime::tqcurrentDateTime( Qt::TimeSpec ts ) +ExtDateTime ExtDateTime::currentDateTime( Qt::TimeSpec ts ) { ExtDateTime dt; - dt.setDate( ExtDate::tqcurrentDate(ts) ); + dt.setDate( ExtDate::currentDate(ts) ); TQTime t = t.currentTime(ts); if ( t.hour()==0 && t.minute()==0 ) // midnight or right after? - dt.setDate( ExtDate::tqcurrentDate(ts) ); // fetch date again + dt.setDate( ExtDate::currentDate(ts) ); // fetch date again dt.setTime( t ); return dt; } @@ -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::tqfromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); + int pivot = s.find( TQRegExp(TQString::fromLatin1("[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(); diff --git a/libtdeedu/extdate/extdatetime.h b/libtdeedu/extdate/extdatetime.h index 0ebe324f..479d1fae 100644 --- a/libtdeedu/extdate/extdatetime.h +++ b/libtdeedu/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 tqcurrentDate( Qt::TimeSpec ts = Qt::LocalTime ); + static ExtDate currentDate( Qt::TimeSpec ts = Qt::LocalTime ); #ifndef TQT_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 tqcurrentDateTime(); - static ExtDateTime tqcurrentDateTime( Qt::TimeSpec ); + static ExtDateTime currentDateTime(); + static ExtDateTime currentDateTime( Qt::TimeSpec ); #ifndef TQT_NO_DATESTRING static ExtDateTime fromString( const TQString &s ); static ExtDateTime fromString( const TQString &s, Qt::DateFormat f ); diff --git a/libtdeedu/extdate/extdatetimeedit.cpp b/libtdeedu/extdate/extdatetimeedit.cpp index 796bd858..2d75c12a 100644 --- a/libtdeedu/extdate/extdatetimeedit.cpp +++ b/libtdeedu/extdate/extdatetimeedit.cpp @@ -266,7 +266,7 @@ public: { int fw = 0; if ( frm ) - fw = style.tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + fw = style.pixelMetric(TQStyle::PM_DefaultFrameWidth); parag->truncate( 0 ); parag->append( txt ); @@ -433,9 +433,9 @@ void ExtDateTimeEditor::paintEvent( TQPaintEvent * ) TQSharedDoubleBuffer buffer( this ); const TQBrush &bg = - tqcolorGroup().brush( isEnabled() ? TQColorGroup::Base : TQColorGroup::Background ); + colorGroup().brush( isEnabled() ? TQColorGroup::Base : TQColorGroup::Background ); buffer.painter()->fillRect( 0, 0, width(), height(), bg ); - d->paint( txt, hasFocus(), *buffer.painter(), tqcolorGroup(), rect(), + d->paint( txt, hasFocus(), *buffer.painter(), colorGroup(), rect(), tqstyle() ); buffer.end(); } @@ -740,9 +740,9 @@ public: with a date, e.g. \code - ExtDateEdit *dateEdit = new ExtDateEdit( ExtDate::tqcurrentDate(), this ); - dateEdit->setRange( ExtDate::tqcurrentDate().addDays( -365 ), - ExtDate::tqcurrentDate().addDays( 365 ) ); + ExtDateEdit *dateEdit = new ExtDateEdit( ExtDate::currentDate(), this ); + dateEdit->setRange( ExtDate::currentDate().addDays( -365 ), + ExtDate::currentDate().addDays( 365 ) ); dateEdit->setOrder( ExtDateEdit::MDY ); dateEdit->setAutoAdvance( TRUE ); \endcode @@ -856,7 +856,7 @@ void ExtDateEdit::init() d->max = ExtDate( 50000, 12, 31 ); d->changed = FALSE; - tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); + setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); refcount++; } @@ -970,11 +970,11 @@ void ExtDateEdit::resizeEvent( TQResizeEvent * ) /*! \reimp */ -TQSize ExtDateEdit::tqsizeHint() const +TQSize ExtDateEdit::sizeHint() const { constPolish(); TQFontMetrics fm( font() ); - int fw = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this ); + int fw = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ); int h = TQMAX( fm.lineSpacing(), 14 ) + 2; int w = 2 + fm.width( '9' ) * 8 + fm.width( d->ed->separator() ) * 2 + d->controls->upRect().width() + fw * 4; @@ -985,9 +985,9 @@ TQSize ExtDateEdit::tqsizeHint() const /*! \reimp */ -TQSize ExtDateEdit::tqminimumSizeHint() const +TQSize ExtDateEdit::minimumSizeHint() const { - return tqsizeHint(); + return sizeHint(); } @@ -1268,7 +1268,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. - tqcurrentDate()). That way, attempts to set the date property to an + currentDate()). 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 @@ -1314,8 +1314,8 @@ ExtDate ExtDateEdit::date() const bool ExtDateEdit::outOfRange( int y, int m, int d ) const { if ( ExtDate::isValid( y, m, d ) ) { - ExtDate tqcurrentDate( y, m, d ); - if ( tqcurrentDate > maxValue() || tqcurrentDate < minValue() ) { + ExtDate currentDate( y, m, d ); + if ( currentDate > maxValue() || currentDate < minValue() ) { //## outOfRange should set overwrite? return TRUE; } @@ -1475,7 +1475,7 @@ void ExtDateEdit::fix() changed = TRUE; } - int currentYear = ExtDate::tqcurrentDate().year(); + int currentYear = ExtDate::currentDate().year(); int year = d->y; /* No longer valid for extended dates if ( year < 100 ) { @@ -1764,7 +1764,7 @@ public: // d->max = TQTime( 23, 59, 59 ); // d->changed = FALSE; // -// tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); +// setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); // // refcount++; // } @@ -2187,12 +2187,12 @@ public: // if ( lAM ) // txt = *lAM; // else -// txt = TQString::tqfromLatin1( "AM" ); +// txt = TQString::fromLatin1( "AM" ); // } else { // if ( lPM ) // txt = *lPM; // else -// txt = TQString::tqfromLatin1( "PM" ); +// txt = TQString::fromLatin1( "PM" ); // } // break; // default: @@ -2430,11 +2430,11 @@ public: // // /*! \reimp // */ -// TQSize TQTimeEdit::tqsizeHint() const +// TQSize TQTimeEdit::sizeHint() const // { // constPolish(); // TQFontMetrics fm( font() ); -// int fw = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this ); +// int fw = tqstyle().pixelMetric( 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; @@ -2442,7 +2442,7 @@ public: // if ( lAM ) // w += fm.width( *lAM ) + 4; // else -// w += fm.width( TQString::tqfromLatin1( "AM" ) ) + 4; +// w += fm.width( TQString::fromLatin1( "AM" ) ) + 4; // } // // return TQSize( w, TQMAX(h + fw * 2,20) ).expandedTo( TQApplication::globalStrut() ); @@ -2450,9 +2450,9 @@ public: // // /*! \reimp // */ -// TQSize TQTimeEdit::tqminimumSizeHint() const +// TQSize TQTimeEdit::minimumSizeHint() const // { -// return tqsizeHint(); +// return sizeHint(); // } // // /*! @@ -2507,9 +2507,9 @@ public: It is recommended that the ExtDateTimeEdit is initialised with a datetime, e.g. \code - ExtDateTimeEdit *dateTimeEdit = new ExtDateTimeEdit( ExtDateTime::tqcurrentDateTime(), this ); - dateTimeEdit->dateEdit()->setRange( ExtDateTime::tqcurrentDate(), - ExtDateTime::tqcurrentDate().addDays( 7 ) ); + ExtDateTimeEdit *dateTimeEdit = new ExtDateTimeEdit( ExtDateTime::currentDateTime(), this ); + dateTimeEdit->dateEdit()->setRange( ExtDateTime::currentDate(), + ExtDateTime::currentDate().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 @@ -2573,8 +2573,8 @@ ExtDateTimeEdit::~ExtDateTimeEdit() void ExtDateTimeEdit::resizeEvent( TQResizeEvent * ) { - int dw = de->tqsizeHint().width(); - int tw = te->tqsizeHint().width(); + int dw = de->sizeHint().width(); + int tw = te->sizeHint().width(); int w = width(); int h = height(); int extra = w - ( dw + tw ); @@ -2593,10 +2593,10 @@ void ExtDateTimeEdit::resizeEvent( TQResizeEvent * ) /*! \reimp */ -TQSize ExtDateTimeEdit::tqminimumSizeHint() const +TQSize ExtDateTimeEdit::minimumSizeHint() const { - TQSize dsh = de->tqminimumSizeHint(); - TQSize tsh = te->tqminimumSizeHint(); + TQSize dsh = de->minimumSizeHint(); + TQSize tsh = te->minimumSizeHint(); return TQSize( dsh.width() + tsh.width(), TQMAX( dsh.height(), tsh.height() ) ); } @@ -2615,17 +2615,17 @@ void ExtDateTimeEdit::init() connect( te, TQT_SIGNAL( valueChanged( const TQTime& ) ), this, TQT_SLOT( newValue( const TQTime& ) ) ); setFocusProxy( de ); - tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); + setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); } /*! \reimp */ -TQSize ExtDateTimeEdit::tqsizeHint() const +TQSize ExtDateTimeEdit::sizeHint() const { constPolish(); - TQSize dsh = de->tqsizeHint(); - TQSize tsh = te->tqsizeHint(); + TQSize dsh = de->sizeHint(); + TQSize tsh = te->sizeHint(); return TQSize( dsh.width() + tsh.width(), TQMAX( dsh.height(), tsh.height() ) ); } diff --git a/libtdeedu/extdate/extdatetimeedit.h b/libtdeedu/extdate/extdatetimeedit.h index 4a2aaa16..13520923 100644 --- a/libtdeedu/extdate/extdatetimeedit.h +++ b/libtdeedu/extdate/extdatetimeedit.h @@ -82,8 +82,8 @@ public: YMD /**< Year-Month-Day, also the default */, YDM /**< Year-Day-Month @deprecated Included for completeness. */ }; - TQSize tqsizeHint() const; - TQSize tqminimumSizeHint() const; + TQSize sizeHint() const; + TQSize minimumSizeHint() const; public slots: virtual void setDate( const ExtDate& date ); @@ -169,8 +169,8 @@ private: // TQTimeEdit( const TQTime& time, TQWidget* parent=0, const char* name=0 ); // ~TQTimeEdit(); // -// TQSize tqsizeHint() const; -// TQSize tqminimumSizeHint() const; +// TQSize sizeHint() const; +// TQSize minimumSizeHint() const; // // public slots: // virtual void setTime( const TQTime& time ); @@ -242,8 +242,8 @@ public: const char* name=0 ); ~ExtDateTimeEdit(); - TQSize tqsizeHint() const; - TQSize tqminimumSizeHint() const; + TQSize sizeHint() const; + TQSize minimumSizeHint() const; public slots: virtual void setDateTime( const ExtDateTime & dt ); diff --git a/libtdeedu/extdate/extdatewidget.cpp b/libtdeedu/extdate/extdatewidget.cpp index f1c7269b..041b0d76 100644 --- a/libtdeedu/extdate/extdatewidget.cpp +++ b/libtdeedu/extdate/extdatewidget.cpp @@ -36,7 +36,7 @@ public: ExtDateWidgetSpinBox(int min, int max, TQWidget *parent) : TQSpinBox(min, max, 1, parent) { - editor()->tqsetAlignment(AlignRight); + editor()->setAlignment(AlignRight); } }; @@ -56,7 +56,7 @@ public: ExtDateWidget::ExtDateWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - init(ExtDate::tqcurrentDate()); + init(ExtDate::currentDate()); setDate(ExtDate()); } diff --git a/libtdeedu/extdate/test_extdate.cc b/libtdeedu/extdate/test_extdate.cc index 63b2120b..d70d3e94 100644 --- a/libtdeedu/extdate/test_extdate.cc +++ b/libtdeedu/extdate/test_extdate.cc @@ -277,16 +277,16 @@ void test6() void test7() { std::cout << "Express the current date:\n" << std::endl; - TQDate q = TQDate::tqcurrentDate(TQt::LocalTime); - ExtDate e = ExtDate::tqcurrentDate(TQt::TimeSpec(TQt::LocalTime)); + TQDate q = TQDate::currentDate(TQt::LocalTime); + ExtDate e = ExtDate::currentDate(TQt::TimeSpec(TQt::LocalTime)); std::cout << "TQt::LocalTime :: ExtDate : " << e.toString().local8Bit() << " TQDate : " << q.toString().local8Bit() << std::endl; - q = TQDate::tqcurrentDate(TQt::UTC); - e = ExtDate::tqcurrentDate(TQt::UTC); + q = TQDate::currentDate(TQt::UTC); + e = ExtDate::currentDate(TQt::UTC); std::cout << "TQt::UTC :: ExtDate : " << e.toString().local8Bit() << " TQDate : " << q.toString().local8Bit() << std::endl; - q = TQDate::tqcurrentDate(); - e = ExtDate::tqcurrentDate(); + q = TQDate::currentDate(); + e = ExtDate::currentDate(); 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::tqcurrentDateTime(); - ExtDateTime e = ExtDateTime::tqcurrentDateTime(); + TQDateTime q = TQDateTime::currentDateTime(); + ExtDateTime e = ExtDateTime::currentDateTime(); std::cout << q.toString().local8Bit() << " : " << e.toString().local8Bit() << std::endl; std::cout << "--------------------" << std::endl; diff --git a/libtdeedu/extdate/testwidget.cpp b/libtdeedu/extdate/testwidget.cpp index a6489cce..0267ddeb 100644 --- a/libtdeedu/extdate/testwidget.cpp +++ b/libtdeedu/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::tqcurrentDate(), w ); - edw = new ExtDateWidget( ExtDate::tqcurrentDate(), w ); + kdw = new KDateWidget( TQDate::currentDate(), w ); + edw = new ExtDateWidget( ExtDate::currentDate(), w ); glay->addWidget( kdpLabel, 0, 0 ); glay->addWidget( edpLabel, 0, 1 ); |