summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/qcompletionedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/qcompletionedit.cpp')
-rw-r--r--kdevdesigner/designer/qcompletionedit.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp
index c00e9b84..f963cf51 100644
--- a/kdevdesigner/designer/qcompletionedit.cpp
+++ b/kdevdesigner/designer/qcompletionedit.cpp
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2001 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,7 +17,7 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email [email protected] for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact [email protected] if any conditions of this licensing are
** not clear to you.
@@ -30,8 +30,8 @@
#include <tqapplication.h>
#include <tqvbox.h>
-QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name )
- : TQLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE )
+TQCompletionEdit::TQCompletionEdit( TQWidget *tqparent, const char *name )
+ : TQLineEdit( tqparent, name ), aAdd( FALSE ), caseSensitive( FALSE )
{
popup = new TQVBox( 0, 0, WType_Popup );
popup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
@@ -51,27 +51,27 @@ QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name )
installEventFilter( this );
}
-bool QCompletionEdit::autoAdd() const
+bool TQCompletionEdit::autoAdd() const
{
return aAdd;
}
-TQStringList QCompletionEdit::completionList() const
+TQStringList TQCompletionEdit::completionList() const
{
return compList;
}
-void QCompletionEdit::setCompletionList( const TQStringList &l )
+void TQCompletionEdit::setCompletionList( const TQStringList &l )
{
compList = l;
}
-void QCompletionEdit::setAutoAdd( bool add )
+void TQCompletionEdit::setAutoAdd( bool add )
{
aAdd = add;
}
-void QCompletionEdit::textDidChange( const TQString &text )
+void TQCompletionEdit::textDidChange( const TQString &text )
{
if ( text.isEmpty() ) {
popup->close();
@@ -81,15 +81,15 @@ void QCompletionEdit::textDidChange( const TQString &text )
placeListBox();
}
-void QCompletionEdit::placeListBox()
+void TQCompletionEdit::placeListBox()
{
if ( listbox->count() == 0 ) {
popup->close();
return;
}
- popup->resize( QMAX( listbox->sizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ),
- listbox->sizeHint().height() + listbox->horizontalScrollBar()->height() + 4 );
+ popup->resize( TQMAX( listbox->tqsizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ),
+ listbox->tqsizeHint().height() + listbox->horizontalScrollBar()->height() + 4 );
TQPoint p( mapToGlobal( TQPoint( 0, 0 ) ) );
if ( p.y() + height() + popup->height() <= TQApplication::desktop()->height() )
@@ -102,7 +102,7 @@ void QCompletionEdit::placeListBox()
setFocus();
}
-void QCompletionEdit::updateListBox()
+void TQCompletionEdit::updateListBox()
{
listbox->clear();
if ( compList.isEmpty() )
@@ -114,9 +114,9 @@ void QCompletionEdit::updateListBox()
}
}
-bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
+bool TQCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == popup || o == listbox || o == listbox->viewport() ) {
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) {
@@ -159,7 +159,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
emit chosen( text() );
return TRUE;
}
- } else if ( o == this ) {
+ } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Up ||
@@ -178,32 +178,32 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
return TQLineEdit::eventFilter( o, e );
}
-void QCompletionEdit::addCompletionEntry( const TQString &entry )
+void TQCompletionEdit::addCompletionEntry( const TQString &entry )
{
- if ( compList.find( entry ) == compList.end() ) {
+ if ( compList.tqfind( entry ) == compList.end() ) {
compList << entry;
compList.sort();
}
}
-void QCompletionEdit::removeCompletionEntry( const TQString &entry )
+void TQCompletionEdit::removeCompletionEntry( const TQString &entry )
{
- TQStringList::Iterator it = compList.find( entry );
+ TQStringList::Iterator it = compList.tqfind( entry );
if ( it != compList.end() )
compList.remove( it );
}
-void QCompletionEdit::setCaseSensitive( bool b )
+void TQCompletionEdit::setCaseSensitive( bool b )
{
caseSensitive = b;
}
-bool QCompletionEdit::isCaseSensitive() const
+bool TQCompletionEdit::isCaseSensitive() const
{
return caseSensitive;
}
-void QCompletionEdit::clear()
+void TQCompletionEdit::clear()
{
TQLineEdit::clear();
compList.clear();