summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/listboxrename.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /kdevdesigner/designer/listboxrename.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/listboxrename.cpp')
-rw-r--r--kdevdesigner/designer/listboxrename.cpp42
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 );