summaryrefslogtreecommitdiffstats
path: root/korganizer/koagenda.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/koagenda.cpp')
-rw-r--r--korganizer/koagenda.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index b242c3065..7ced83b36 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -396,7 +396,7 @@ bool KOAgenda::eventFilter ( TQObject *object, TQEvent *event )
case ( TQEvent::Leave ):
if ( !mActionItem )
setCursor( arrowCursor );
- if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(viewport()) )
+ if ( object == viewport() )
emit leaveAgenda();
return true;
@@ -422,7 +422,7 @@ bool KOAgenda::eventFilter_drag( TQObject *object, TQDropEvent *de )
{
#ifndef KORG_NODND
TQPoint viewportPos;
- if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) && TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(this) ) {
+ if ( object != viewport() && object != this ) {
viewportPos = TQT_TQWIDGET( object )->mapToParent( de->pos() );
} else {
viewportPos = de->pos();
@@ -462,7 +462,7 @@ bool KOAgenda::eventFilter_drag( TQObject *object, TQDropEvent *de )
// FIXME: This is a bad hack, as the viewportToContents seems to be off by
// 2000 (which is the left upper corner of the viewport). It works correctly
// for agendaItems.
- if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(this) ) {
+ if ( object == this ) {
pos = viewportPos + TQPoint( contentsX(), contentsY() );
} else {
pos = viewportToContents( viewportPos );
@@ -565,7 +565,7 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e )
TQPoint viewportPos;
bool accepted=false;
if ( ( e->state() & ShiftButton) == ShiftButton ) {
- if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) ) {
+ if ( object != viewport() ) {
viewportPos = ( (TQWidget *) object )->mapToParent( e->pos() );
} else {
viewportPos = e->pos();
@@ -579,7 +579,7 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e )
}
if ( ( e->state() & ControlButton ) == ControlButton ){
- if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) ) {
+ if ( object != viewport() ) {
viewportPos = ( (TQWidget *)object )->mapToParent( e->pos() );
} else {
viewportPos = e->pos();
@@ -597,7 +597,7 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e )
bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
{
TQPoint viewportPos;
- if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) {
+ if (object != viewport()) {
viewportPos = ((TQWidget *)object)->mapToParent(me->pos());
} else {
viewportPos = me->pos();
@@ -606,7 +606,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
switch (me->type()) {
case TQEvent::MouseButtonPress:
// kdDebug(5850) << "koagenda: filtered button press" << endl;
- if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) {
+ if (object != viewport()) {
if (me->button() == Qt::RightButton) {
mClickedItem = dynamic_cast<KOAgendaItem *>(object);
if (mClickedItem) {
@@ -683,7 +683,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
// avoid an offset of a few pixels. Don't ask me why...
TQPoint indicatorPos = gridToContents(contentsToGrid(
viewportToContents( viewportPos )));
- if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) {
+ if (object != viewport()) {
KOAgendaItem *moveItem = dynamic_cast<KOAgendaItem *>(object);
if (moveItem && !moveItem->incidence()->isReadOnly() ) {
if (!mActionItem)
@@ -722,7 +722,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
break; }
case TQEvent::MouseButtonDblClick:
- if (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(viewport())) {
+ if (object == viewport()) {
selectItem(0);
TQPair<ResourceCalendar *, TQString>p = mCalendarView->viewSubResourceCalendar();
emit newEventSignal( p.first, p.second );