diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
commit | eaa7ee2e0bbca40ba3173c4304f81957e8964291 (patch) | |
tree | 4f793aa48a5080aedc94ce6e519c3b86708f2b88 /tqtinterface/qt4/src/widgets/tqlistbox.cpp | |
parent | 79a9d7a46a20d4a0923bc06fc471fdc2176ef865 (diff) | |
download | experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.tar.gz experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
Diffstat (limited to 'tqtinterface/qt4/src/widgets/tqlistbox.cpp')
-rw-r--r-- | tqtinterface/qt4/src/widgets/tqlistbox.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tqtinterface/qt4/src/widgets/tqlistbox.cpp b/tqtinterface/qt4/src/widgets/tqlistbox.cpp index b829780..3b84d03 100644 --- a/tqtinterface/qt4/src/widgets/tqlistbox.cpp +++ b/tqtinterface/qt4/src/widgets/tqlistbox.cpp @@ -89,7 +89,7 @@ public: variableWidth( FALSE ), inMenuMode( FALSE ) {} - int tqfindItemByName( int item, const TQString &text ); + int findItemByName( int item, const TQString &text ); ~TQListBoxPrivate(); TQListBoxItem * head, *last, *cache; @@ -340,7 +340,7 @@ TQListBoxPrivate::~TQListBoxPrivate() /*! \obsolete - \fn int TQListBox::tqfindItem( int yPos ) const + \fn int TQListBox::findItem( int yPos ) const Returns the index of the item a point (0, \a yPos). \sa index() itemAt() */ @@ -488,11 +488,11 @@ void TQListBoxItem::setSelectable( bool b ) { if ( !listBox() ) return; - bool *sel = listBox()->d->selectable.tqfind( this ); + bool *sel = listBox()->d->selectable.find( this ); if ( !sel ) listBox()->d->selectable.insert( this, new bool( b ) ); else - listBox()->d->selectable.tqreplace( this, new bool( b ) ); + listBox()->d->selectable.replace( this, new bool( b ) ); } /*! @@ -506,7 +506,7 @@ bool TQListBoxItem::isSelectable() const { if ( !listBox() ) return TRUE; - bool *sel = listBox()->d->selectable.tqfind( ( (TQListBoxItem*)this ) ); + bool *sel = listBox()->d->selectable.find( ( (TQListBoxItem*)this ) ); if ( !sel ) return TRUE; else @@ -852,7 +852,7 @@ int TQListBoxPixmap::rtti() const The TQListBox's items are TQListBoxItem objects. TQListBox provides methods to insert new items as strings, as pixmaps, and as TQListBoxItem * (insertItem() with various arguments), and to - tqreplace an existing item with a new string, pixmap or TQListBoxItem + replace an existing item with a new string, pixmap or TQListBoxItem (changeItem() with various arguments). You can also remove items singly with removeItem() or clear() the entire list box. Note that if you create a TQListBoxItem yourself and insert it, TQListBox @@ -876,7 +876,7 @@ int TQListBoxPixmap::rtti() const still supports this mode of operation). Everything can be done using the new objects, and most things can be done using indexes. - Each item in a TQListBox tqcontains a TQListBoxItem. One of the items + Each item in a TQListBox contains a TQListBoxItem. One of the items can be the current item. The currentChanged() signal and the highlighted() signal are emitted when a new item becomes current, e.g. because the user clicks on it or TQListBox::setCurrentItem() @@ -2260,7 +2260,7 @@ void TQListBox::mouseMoveEvent( TQMouseEvent *e ) // hack to keep the combo (and what else?) working: if we get a // move outside the listbox without having seen a press, discard // it. - if ( !TQRect( 0, 0, visibleWidth(), visibleHeight() ).tqcontains( e->pos() ) && + if ( !TQRect( 0, 0, visibleWidth(), visibleHeight() ).contains( e->pos() ) && ( (d->mousePressColumn < 0 && d->mousePressRow < 0) || (e->state() == Qt::NoButton && !d->pressedItem) ) ) return; @@ -2643,14 +2643,14 @@ void TQListBox::keyPressEvent( TQKeyEvent *e ) curItem = 0; if ( !d->inputTimer->isActive() ) { d->currInputString = e->text(); - curItem = d->tqfindItemByName( ++curItem, d->currInputString ); + curItem = d->findItemByName( ++curItem, d->currInputString ); } else { d->inputTimer->stop(); d->currInputString += e->text(); int oldCurItem = curItem; - curItem = d->tqfindItemByName( curItem, d->currInputString ); + curItem = d->findItemByName( curItem, d->currInputString ); if ( curItem < 0 ) { - curItem = d->tqfindItemByName( ++oldCurItem, e->text() ); + curItem = d->findItemByName( ++oldCurItem, e->text() ); d->currInputString = e->text(); } } @@ -3531,7 +3531,7 @@ TQListBoxItem * TQListBox::itemAt( const TQPoint& p ) const // take into acount frame margin to get to viewport np -= viewport()->pos(); - if (!TQT_TQRECT_OBJECT(viewport()->rect()).tqcontains(np)) + if (!TQT_TQRECT_OBJECT(viewport()->rect()).contains(np)) return 0; // take into account contents position @@ -3910,7 +3910,7 @@ int TQListBox::rowAt( int y ) const if ( y < 0 ) return -1; - // tqfind the top item, use bsearch for speed + // find the top item, use bsearch for speed int l = 0; int r = d->rowPos.size() - 2; if ( r < 0 ) @@ -4281,7 +4281,7 @@ void TQListBox::takeItem( const TQListBoxItem * item ) Finds the next item after start beginning with \a text. */ -int TQListBoxPrivate::tqfindItemByName( int start, const TQString &text ) +int TQListBoxPrivate::findItemByName( int start, const TQString &text ) { if ( start < 0 || (uint)start >= listBox->count() ) start = 0; @@ -4322,7 +4322,7 @@ void TQListBox::clearInputString() \sa TQt::StringComparisonMode */ -TQListBoxItem *TQListBox::tqfindItem( const TQString &text, TQt::ComparisonFlags compare ) const +TQListBoxItem *TQListBox::findItem( const TQString &text, TQt::ComparisonFlags compare ) const { if ( text.isEmpty() ) return 0; @@ -4343,7 +4343,7 @@ TQListBoxItem *TQListBox::tqfindItem( const TQString &text, TQt::ComparisonFlags TQListBoxItem *beginsWithItem = 0; TQListBoxItem *endsWithItem = 0; - TQListBoxItem *tqcontainsItem = 0; + TQListBoxItem *containsItem = 0; if ( item ) { for ( ; item; item = item->n ) { @@ -4355,11 +4355,11 @@ TQListBoxItem *TQListBox::tqfindItem( const TQString &text, TQt::ComparisonFlags if ( compare & TQt::ExactMatch && itmtxt == comtxt ) return item; if ( compare & TQt::BeginsWith && !beginsWithItem && itmtxt.startsWith( comtxt ) ) - beginsWithItem = tqcontainsItem = item; + beginsWithItem = containsItem = item; if ( compare & TQt::EndsWith && !endsWithItem && itmtxt.endsWith( comtxt ) ) - endsWithItem = tqcontainsItem = item; - if ( compare & TQt::Contains && !tqcontainsItem && itmtxt.tqcontains( comtxt ) ) - tqcontainsItem = item; + endsWithItem = containsItem = item; + if ( compare & TQt::Contains && !containsItem && itmtxt.contains( comtxt ) ) + containsItem = item; } if ( d->current && d->head ) { @@ -4373,11 +4373,11 @@ TQListBoxItem *TQListBox::tqfindItem( const TQString &text, TQt::ComparisonFlags if ( compare & TQt::ExactMatch && itmtxt == comtxt ) return item; if ( compare & TQt::BeginsWith && !beginsWithItem && itmtxt.startsWith( comtxt ) ) - beginsWithItem = tqcontainsItem = item; + beginsWithItem = containsItem = item; if ( compare & TQt::EndsWith && !endsWithItem && itmtxt.endsWith( comtxt ) ) - endsWithItem = tqcontainsItem = item; - if ( compare & TQt::Contains && !tqcontainsItem && itmtxt.tqcontains( comtxt ) ) - tqcontainsItem = item; + endsWithItem = containsItem = item; + if ( compare & TQt::Contains && !containsItem && itmtxt.contains( comtxt ) ) + containsItem = item; } } } @@ -4387,8 +4387,8 @@ TQListBoxItem *TQListBox::tqfindItem( const TQString &text, TQt::ComparisonFlags return beginsWithItem; else if ( endsWithItem ) return endsWithItem; - else if ( tqcontainsItem ) - return tqcontainsItem; + else if ( containsItem ) + return containsItem; return 0; } |