diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /libkdepim/kdateedit.cpp | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/kdateedit.cpp')
-rw-r--r-- | libkdepim/kdateedit.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp index 1791d4dab..c4221556c 100644 --- a/libkdepim/kdateedit.cpp +++ b/libkdepim/kdateedit.cpp @@ -49,7 +49,7 @@ class DateValidator : public QValidator if ( length <= 0 ) return Intermediate; - if ( mKeywords.contains( str.lower() ) ) + if ( mKeywords.tqcontains( str.lower() ) ) return Acceptable; bool ok = false; @@ -72,13 +72,13 @@ KDateEdit::KDateEdit( TQWidget *parent, const char *name ) // need at least one entry for popup to work setMaxCount( 1 ); - mDate = TQDate::currentDate(); + mDate = TQDate::tqcurrentDate(); TQString today = KGlobal::locale()->formatDate( mDate, true ); insertItem( today ); setCurrentItem( 0 ); changeItem( today, 0 ); - setMinimumSize( sizeHint() ); + setMinimumSize( tqsizeHint() ); connect( lineEdit(), TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( lineEnterPressed() ) ); @@ -138,13 +138,13 @@ void KDateEdit::popup() TQPoint popupPoint = mapToGlobal( TQPoint( 0,0 ) ); - int dateFrameHeight = mPopup->sizeHint().height(); + int dateFrameHeight = mPopup->tqsizeHint().height(); if ( popupPoint.y() + height() + dateFrameHeight > desk.bottom() ) popupPoint.setY( popupPoint.y() - dateFrameHeight ); else popupPoint.setY( popupPoint.y() + height() ); - int dateFrameWidth = mPopup->sizeHint().width(); + int dateFrameWidth = mPopup->tqsizeHint().width(); if ( popupPoint.x() + dateFrameWidth > desk.right() ) popupPoint.setX( desk.right() - dateFrameWidth ); @@ -157,13 +157,13 @@ void KDateEdit::popup() if ( mDate.isValid() ) mPopup->setDate( mDate ); else - mPopup->setDate( TQDate::currentDate() ); + mPopup->setDate( TQDate::tqcurrentDate() ); mPopup->popup( popupPoint ); // The combo box is now shown pressed. Make it show not pressed again // by causing its (invisible) list box to emit a 'selected' signal. - // First, ensure that the list box contains the date currently displayed. + // First, ensure that the list box tqcontains the date currently displayed. TQDate date = parseDate(); assignDate( date ); updateView(); @@ -191,12 +191,12 @@ void KDateEdit::dateSelected( TQDate date ) void KDateEdit::lineEnterPressed() { - bool replaced = false; + bool tqreplaced = false; - TQDate date = parseDate( &replaced ); + TQDate date = parseDate( &tqreplaced ); if (assignDate( date ) ) { - if ( replaced ) + if ( tqreplaced ) updateView(); emit dateChanged( date ); @@ -204,18 +204,18 @@ void KDateEdit::lineEnterPressed() } } -TQDate KDateEdit::parseDate( bool *replaced ) const +TQDate KDateEdit::parseDate( bool *tqreplaced ) const { TQString text = currentText(); TQDate result; - if ( replaced ) - (*replaced) = false; + if ( tqreplaced ) + (*tqreplaced) = false; if ( text.isEmpty() ) result = TQDate(); - else if ( mKeywordMap.contains( text.lower() ) ) { - TQDate today = TQDate::currentDate(); + else if ( mKeywordMap.tqcontains( text.lower() ) ) { + TQDate today = TQDate::tqcurrentDate(); int i = mKeywordMap[ text.lower() ]; if ( i >= 100 ) { /* A day name has been entered. Convert to offset from today. @@ -235,8 +235,8 @@ TQDate KDateEdit::parseDate( bool *replaced ) const } result = today.addDays( i ); - if ( replaced ) - (*replaced) = true; + if ( tqreplaced ) + (*tqreplaced) = true; } else { result = KGlobal::locale()->readDate( text ); } @@ -286,7 +286,7 @@ bool KDateEdit::eventFilter( TQObject *object, TQEvent *event ) case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonPress: { TQMouseEvent *mouseEvent = (TQMouseEvent*)event; - if ( !mPopup->rect().contains( mouseEvent->pos() ) ) { + if ( !mPopup->rect().tqcontains( mouseEvent->pos() ) ) { TQPoint globalPos = mPopup->mapToGlobal( mouseEvent->pos() ); if ( TQApplication::widgetAt( globalPos, true ) == this ) { // The date picker is being closed by a click on the |