summaryrefslogtreecommitdiffstats
path: root/libkdepim/kdateedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/kdateedit.cpp')
-rw-r--r--libkdepim/kdateedit.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index c4221556c..1d54920d6 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -34,11 +34,11 @@
#include "kdateedit.h"
-class DateValidator : public QValidator
+class DateValidator : public TQValidator
{
public:
- DateValidator( const TQStringList &keywords, TQWidget* parent, const char* name = 0 )
- : TQValidator( parent, name ), mKeywords( keywords )
+ DateValidator( const TQStringList &keywords, TQWidget* tqparent, const char* name = 0 )
+ : TQValidator( tqparent, name ), mKeywords( keywords )
{}
virtual State validate( TQString &str, int& ) const
@@ -64,8 +64,8 @@ class DateValidator : public QValidator
TQStringList mKeywords;
};
-KDateEdit::KDateEdit( TQWidget *parent, const char *name )
- : TQComboBox( true, parent, name ),
+KDateEdit::KDateEdit( TQWidget *tqparent, const char *name )
+ : TQComboBox( true, tqparent, name ),
mReadOnly( false ),
mDiscardNextMousePress( false )
{
@@ -163,7 +163,7 @@ void KDateEdit::popup()
// 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 tqcontains the date currently displayed.
+ // First, ensure that the list box contains the date currently displayed.
TQDate date = parseDate();
assignDate( date );
updateView();
@@ -171,7 +171,7 @@ void KDateEdit::popup()
TQListBox *lb = listBox();
if (lb) {
lb->setCurrentItem(0);
- TQKeyEvent* keyEvent = new TQKeyEvent(TQEvent::KeyPress, Qt::Key_Enter, 0, 0);
+ TQKeyEvent* keyEvent = new TQKeyEvent(TQEvent::KeyPress, TQt::Key_Enter, 0, 0);
TQApplication::postEvent(lb, keyEvent);
}
}
@@ -191,12 +191,12 @@ void KDateEdit::dateSelected( TQDate date )
void KDateEdit::lineEnterPressed()
{
- bool tqreplaced = false;
+ bool replaced = false;
- TQDate date = parseDate( &tqreplaced );
+ TQDate date = parseDate( &replaced );
if (assignDate( date ) ) {
- if ( tqreplaced )
+ if ( replaced )
updateView();
emit dateChanged( date );
@@ -204,13 +204,13 @@ void KDateEdit::lineEnterPressed()
}
}
-TQDate KDateEdit::parseDate( bool *tqreplaced ) const
+TQDate KDateEdit::parseDate( bool *replaced ) const
{
TQString text = currentText();
TQDate result;
- if ( tqreplaced )
- (*tqreplaced) = false;
+ if ( replaced )
+ (*replaced) = false;
if ( text.isEmpty() )
result = TQDate();
@@ -235,8 +235,8 @@ TQDate KDateEdit::parseDate( bool *tqreplaced ) const
}
result = today.addDays( i );
- if ( tqreplaced )
- (*tqreplaced) = true;
+ if ( replaced )
+ (*replaced) = true;
} else {
result = KGlobal::locale()->readDate( text );
}
@@ -256,15 +256,15 @@ bool KDateEdit::eventFilter( TQObject *object, TQEvent *event )
// Up and down arrow keys step the date
TQKeyEvent* keyEvent = (TQKeyEvent*)event;
- if ( keyEvent->key() == Qt::Key_Return ) {
+ if ( keyEvent->key() == TQt::Key_Return ) {
lineEnterPressed();
return true;
}
int step = 0;
- if ( keyEvent->key() == Qt::Key_Up )
+ if ( keyEvent->key() == TQt::Key_Up )
step = 1;
- else if ( keyEvent->key() == Qt::Key_Down )
+ else if ( keyEvent->key() == TQt::Key_Down )
step = -1;
// TODO: If it's not an input key, but something like Return, Enter, Tab, etc..., don't eat the keypress, but handle it through to the default eventfilter!
if ( step && !mReadOnly ) {
@@ -307,7 +307,7 @@ bool KDateEdit::eventFilter( TQObject *object, TQEvent *event )
void KDateEdit::mousePressEvent( TQMouseEvent *event )
{
- if ( event->button() == Qt::LeftButton && mDiscardNextMousePress ) {
+ if ( event->button() == TQt::LeftButton && mDiscardNextMousePress ) {
mDiscardNextMousePress = false;
return;
}