diff options
Diffstat (limited to 'tdeui/kdatetbl.cpp')
| -rw-r--r-- | tdeui/kdatetbl.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index e2facec33..7d76c3fc1 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -1,4 +1,4 @@ -/* -*- C++ -*- +/* This file is part of the KDE libraries Copyright (C) 1997 Tim D. Gilman (tdgilman@best.org) (C) 1998-2001 Mirko Boehm (mirko@kde.org) @@ -84,7 +84,7 @@ public: KDateValidator::KDateValidator(TQWidget* parent, const char* name) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { } @@ -124,7 +124,7 @@ KDateTable::KDateTable(TQWidget *parent, TQDate date_, const char* name, WFlags kdDebug() << "KDateTable ctor: WARNING: Given date is invalid, using current date." << endl; date_=TQDate::currentDate(); } - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setNumRows(7); // 6 weeks max + headline setNumCols(7); // 7 days a week setHScrollBarMode(AlwaysOff); @@ -140,7 +140,7 @@ KDateTable::KDateTable(TQWidget *parent, const char* name, WFlags f) { d = new KDateTablePrivate; setFontSize(10); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setNumRows(7); // 6 weeks max + headline setNumCols(7); // 7 days a week setHScrollBarMode(AlwaysOff); @@ -158,12 +158,12 @@ KDateTable::~KDateTable() void KDateTable::initAccels() { TDEAccel* accel = new TDEAccel(this, "date table accel"); - accel->insert(TDEStdAccel::Next, TQT_TQOBJECT(this), TQT_SLOT(nextMonth())); - accel->insert(TDEStdAccel::Prior, TQT_TQOBJECT(this), TQT_SLOT(previousMonth())); - accel->insert(TDEStdAccel::Home, TQT_TQOBJECT(this), TQT_SLOT(beginningOfMonth())); - accel->insert(TDEStdAccel::End, TQT_TQOBJECT(this), TQT_SLOT(endOfMonth())); - accel->insert(TDEStdAccel::BeginningOfLine, TQT_TQOBJECT(this), TQT_SLOT(beginningOfWeek())); - accel->insert(TDEStdAccel::EndOfLine, TQT_TQOBJECT(this), TQT_SLOT(endOfWeek())); + accel->insert(TDEStdAccel::Next, this, TQ_SLOT(nextMonth())); + accel->insert(TDEStdAccel::Prior, this, TQ_SLOT(previousMonth())); + accel->insert(TDEStdAccel::Home, this, TQ_SLOT(beginningOfMonth())); + accel->insert(TDEStdAccel::End, this, TQ_SLOT(endOfMonth())); + accel->insert(TDEStdAccel::BeginningOfLine, this, TQ_SLOT(beginningOfWeek())); + accel->insert(TDEStdAccel::EndOfLine, this, TQ_SLOT(endOfWeek())); accel->readSettings(); } @@ -351,22 +351,22 @@ void KDateTable::previousMonth() void KDateTable::beginningOfMonth() { - setDate(TQT_TQDATE_OBJECT(date.addDays(1 - date.day()))); + setDate(date.addDays(1 - date.day())); } void KDateTable::endOfMonth() { - setDate(TQT_TQDATE_OBJECT(date.addDays(date.daysInMonth() - date.day()))); + setDate(date.addDays(date.daysInMonth() - date.day())); } void KDateTable::beginningOfWeek() { - setDate(TQT_TQDATE_OBJECT(date.addDays(1 - date.dayOfWeek()))); + setDate(date.addDays(1 - date.dayOfWeek())); } void KDateTable::endOfWeek() { - setDate(TQT_TQDATE_OBJECT(date.addDays(7 - date.dayOfWeek()))); + setDate(date.addDays(7 - date.dayOfWeek())); } void @@ -374,22 +374,22 @@ KDateTable::keyPressEvent( TQKeyEvent *e ) { switch( e->key() ) { case Key_Up: - setDate(TQT_TQDATE_OBJECT(date.addDays(-7))); + setDate(date.addDays(-7)); break; case Key_Down: - setDate(TQT_TQDATE_OBJECT(date.addDays(7))); + setDate(date.addDays(7)); break; case Key_Left: - setDate(TQT_TQDATE_OBJECT(date.addDays(-1))); + setDate(date.addDays(-1)); break; case Key_Right: - setDate(TQT_TQDATE_OBJECT(date.addDays(1))); + setDate(date.addDays(1)); break; case Key_Minus: - setDate(TQT_TQDATE_OBJECT(date.addDays(-1))); + setDate(date.addDays(-1)); break; case Key_Plus: - setDate(TQT_TQDATE_OBJECT(date.addDays(1))); + setDate(date.addDays(1)); break; case Key_N: setDate(TQDate::currentDate()); @@ -447,7 +447,7 @@ KDateTable::setFontSize(int size) void KDateTable::wheelEvent ( TQWheelEvent * e ) { - setDate(TQT_TQDATE_OBJECT(date.addMonths( -(int)(e->delta()/120)) )); + setDate(date.addMonths( -(int)(e->delta()/120)) ); e->accept(); } @@ -497,7 +497,7 @@ KDateTable::contentsMousePressEvent(TQMouseEvent *e) emit tableClicked(); - if ( e->button() == Qt::RightButton && d->popupMenuEnabled ) + if ( e->button() == TQt::RightButton && d->popupMenuEnabled ) { TDEPopupMenu *menu = new TDEPopupMenu(); menu->insertTitle( TDEGlobal::locale()->formatDate(clickedDate) ); @@ -609,7 +609,7 @@ void KDateTable::unsetCustomDatePainting( const TQDate &date ) KDateInternalWeekSelector::KDateInternalWeekSelector (TQWidget* parent, const char* name) : TQLineEdit(parent, name), - val(new TQIntValidator(TQT_TQOBJECT(this))), + val(new TQIntValidator(this)), result(0) { TQFont font; @@ -618,7 +618,7 @@ KDateInternalWeekSelector::KDateInternalWeekSelector setFont(font); setFrameStyle(TQFrame::NoFrame); setValidator(val); - connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(weekEnteredSlot())); + connect(this, TQ_SIGNAL(returnPressed()), TQ_SLOT(weekEnteredSlot())); } void @@ -756,7 +756,7 @@ KDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col) void KDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e) { - if(!isEnabled() || e->button() != Qt::LeftButton) + if(!isEnabled() || e->button() != TQt::LeftButton) { KNotifyClient::beep(); return; @@ -783,7 +783,7 @@ KDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e) void KDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e) { - if (e->state() & Qt::LeftButton) + if (e->state() & TQt::LeftButton) { int row, col; TQPoint mouseCoord; @@ -850,7 +850,7 @@ KDateInternalMonthPicker::contentsMouseReleaseEvent(TQMouseEvent *e) KDateInternalYearSelector::KDateInternalYearSelector (TQWidget* parent, const char* name) : TQLineEdit(parent, name), - val(new TQIntValidator(TQT_TQOBJECT(this))), + val(new TQIntValidator(this)), result(0) { TQFont font; @@ -861,7 +861,7 @@ KDateInternalYearSelector::KDateInternalYearSelector // we have to respect the limits of TQDate here, I fear: val->setRange(0, 8000); setValidator(val); - connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(yearEnteredSlot())); + connect(this, TQ_SIGNAL(returnPressed()), TQ_SLOT(yearEnteredSlot())); } void @@ -1008,7 +1008,7 @@ TDEPopupFrame::exec(TQPoint pos) popup(pos); repaint(); d->exec = true; - const TQGuardedPtr<TQObject> that = TQT_TQOBJECT(this); + const TQGuardedPtr<TQObject> that = this; tqApp->enter_loop(); if ( !that ) return TQDialog::Rejected; |
