diff options
Diffstat (limited to 'src/editor.cpp')
-rw-r--r-- | src/editor.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/editor.cpp b/src/editor.cpp index 82fcbea..b088fcd 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -47,7 +47,6 @@ #include <algorithm> -// XXX: QT 4: Replace this with qBinaryFind(). using std::binary_search; class CalcResultLabel : public TQLabel @@ -233,16 +232,16 @@ Editor::Editor( TQWidget* parent, const char* name ): setTabChangesFocus( true ); setLinkUnderline( false ); - connect( d->completion, TQT_SIGNAL( selectedCompletion( const TQString& ) ), - TQT_SLOT( autoComplete( const TQString& ) ) ); - connect( this, TQT_SIGNAL( textChanged() ), TQT_SLOT( checkAutoComplete() ) ); - connect( d->completionTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( triggerAutoComplete() ) ); + connect( d->completion, TQ_SIGNAL( selectedCompletion( const TQString& ) ), + TQ_SLOT( autoComplete( const TQString& ) ) ); + connect( this, TQ_SIGNAL( textChanged() ), TQ_SLOT( checkAutoComplete() ) ); + connect( d->completionTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( triggerAutoComplete() ) ); - connect( this, TQT_SIGNAL( textChanged() ), TQT_SLOT( checkMatching() ) ); - connect( d->matchingTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( doMatchingLeft() ) ); - connect( d->matchingTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( doMatchingRight() ) ); - connect( this, TQT_SIGNAL( textChanged() ), TQT_SLOT( checkAutoCalc() ) ); - connect( d->autoCalcTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( autoCalc() ) ); + connect( this, TQ_SIGNAL( textChanged() ), TQ_SLOT( checkMatching() ) ); + connect( d->matchingTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( doMatchingLeft() ) ); + connect( d->matchingTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( doMatchingRight() ) ); + connect( this, TQ_SIGNAL( textChanged() ), TQ_SLOT( checkAutoCalc() ) ); + connect( d->autoCalcTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( autoCalc() ) ); d->autoCalcLabel = new CalcResultLabel( 0, "autocalc", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); d->autoCalcLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); @@ -268,7 +267,7 @@ TQSize Editor::sizeHint() const int h = TQMAX(fm.lineSpacing(), 14); int w = fm.width( 'x' ) * 20; int m = frameWidth() * 2; - return( style().tqsizeFromContents(TQStyle::CT_LineEdit, this, + return( style().sizeFromContents(TQStyle::CT_LineEdit, this, TQSize( w + m, h + m + 4 ). expandedTo(TQApplication::globalStrut()))); } @@ -639,7 +638,7 @@ void Editor::autoCalc() d->autoCalcLabel->raise(); // do not show it forever - TQTimer::singleShot( 5000, d->autoCalcLabel, TQT_SLOT( hide()) ); + TQTimer::singleShot( 5000, d->autoCalcLabel, TQ_SLOT( hide()) ); } else { @@ -778,7 +777,7 @@ EditorCompletion::~EditorCompletion() bool EditorCompletion::eventFilter( TQObject *obj, TQEvent *ev ) { - if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->completionPopup) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->completionListBox) ) + if ( obj == d->completionPopup || obj == d->completionListBox ) { if ( ev->type() == TQEvent::KeyPress ) @@ -850,7 +849,7 @@ void EditorCompletion::showCompletion( const TQStringList &choices ) if(!shown) { d->completionPopup->show(); - TQTimer::singleShot ( 0, this, TQT_SLOT(moveCompletionPopup()) ); + TQTimer::singleShot ( 0, this, TQ_SLOT(moveCompletionPopup()) ); } else { @@ -893,5 +892,3 @@ void EditorCompletion::moveCompletionPopup() } #include "editor.moc" - -// vim: set et sw=2 ts=8: |