diff options
Diffstat (limited to 'kdevdesigner/designer/listboxrename.cpp')
-rw-r--r-- | kdevdesigner/designer/listboxrename.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kdevdesigner/designer/listboxrename.cpp b/kdevdesigner/designer/listboxrename.cpp index 464ef412..d51381dd 100644 --- a/kdevdesigner/designer/listboxrename.cpp +++ b/kdevdesigner/designer/listboxrename.cpp @@ -24,46 +24,46 @@ ** **********************************************************************/ -#include <qheader.h> -#include <qlineedit.h> -#include <qtimer.h> +#include <tqheader.h> +#include <tqlineedit.h> +#include <tqtimer.h> #include "listboxrename.h" class EditableListBoxItem : public QListBoxItem { public: - void setText( const QString & text ) + void setText( const TQString & text ) { - QListBoxItem::setText( text ); + TQListBoxItem::setText( text ); } }; -ListBoxRename::ListBoxRename( QListBox * eventSource, const char * name ) - : QObject( eventSource, name ), +ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name ) + : TQObject( eventSource, name ), clickedItem( 0 ), activity( FALSE ) { src = eventSource; src->installEventFilter( this ); - ed = new QLineEdit( src->viewport() ); + ed = new TQLineEdit( src->viewport() ); ed->hide(); ed->setFrame( FALSE ); - QObject::connect( ed, SIGNAL( returnPressed() ), - this, SLOT( renameClickedItem() ) ); + TQObject::connect( ed, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( renameClickedItem() ) ); } -bool ListBoxRename::eventFilter( QObject *, QEvent * event ) +bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) { switch ( event->type() ) { - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: { - QPoint pos = ((QMouseEvent *) event)->pos(); + TQPoint pos = ((TQMouseEvent *) event)->pos(); if ( clickedItem && clickedItem->isSelected() && (clickedItem == src->itemAt( pos )) ) { - QTimer::singleShot( 500, this, SLOT( showLineEdit() ) ); + TQTimer::singleShot( 500, this, TQT_SLOT( showLineEdit() ) ); activity = FALSE; // no drags or clicks for 500 ms before we start the renaming } else { // new item clicked activity = TRUE; @@ -73,16 +73,16 @@ bool ListBoxRename::eventFilter( QObject *, QEvent * event ) } break; - case QEvent::MouseMove: + case TQEvent::MouseMove: - if ( ((QMouseEvent *) event)->state() & Qt::LeftButton ) { + if ( ((TQMouseEvent *) event)->state() & Qt::LeftButton ) { activity = TRUE; // drag } break; - case QEvent::KeyPress: + case TQEvent::KeyPress: - switch ( ((QKeyEvent *) event)->key() ) { + switch ( ((TQKeyEvent *) event)->key() ) { case Qt::Key_F2: @@ -110,10 +110,10 @@ bool ListBoxRename::eventFilter( QObject *, QEvent * event ) } break; - case QEvent::Resize: + case TQEvent::Resize: if ( clickedItem && ed && !ed->isHidden() ) { - QRect rect = src->itemRect( clickedItem ); + TQRect rect = src->itemRect( clickedItem ); ed->resize( rect.right() - rect.left() - 1, rect.bottom() - rect.top() - 1 ); } @@ -130,7 +130,7 @@ void ListBoxRename::showLineEdit() { if ( !clickedItem || activity ) return; - QRect rect = src->itemRect( clickedItem ); + TQRect rect = src->itemRect( clickedItem ); ed->resize( rect.right() - rect.left() - 1, rect.bottom() - rect.top() - 1 ); ed->move( rect.left() + 1, rect.top() + 1 ); |