diff options
Diffstat (limited to 'tqtinterface/qt4/src/widgets/tqmenudata.cpp')
-rw-r--r-- | tqtinterface/qt4/src/widgets/tqmenudata.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/tqtinterface/qt4/src/widgets/tqmenudata.cpp b/tqtinterface/qt4/src/widgets/tqmenudata.cpp index 2f0fd80..2061254 100644 --- a/tqtinterface/qt4/src/widgets/tqmenudata.cpp +++ b/tqtinterface/qt4/src/widgets/tqmenudata.cpp @@ -96,7 +96,7 @@ TQMenuDataData::TQMenuDataData() respectively. By default, newly created menu items are visible. They can be hidden (and shown again) with setItemVisible(). - Menu items are stored in a list. Use tqfindItem() to tqfind an item by + Menu items are stored in a list. Use findItem() to find an item by its list position or by its menu identifier. (See also indexOf() and idAt().) @@ -278,7 +278,7 @@ int TQMenuData::insertAny( const TQString *text, const TQPixmap *pixmap, mi->text_data = text?*text:TQString(); #else TQString newText( *text ); - newText.truncate( newText.tqfindRev( '\t' ) ); + newText.truncate( newText.findRev( '\t' ) ); mi->text_data = newText.isEmpty()?TQString():newText; #endif #ifndef TQT_NO_ACCEL @@ -308,10 +308,10 @@ int TQMenuData::insertAny( const TQString *text, const TQPixmap *pixmap, /*! \internal - Internal function that tqfinds the menu item where \a popup is located, + Internal function that finds the menu item where \a popup is located, storing its index at \a index if \a index is not NULL. */ -TQMenuItem *TQMenuData::tqfindPopup( TQPopupMenu *popup, int *index ) +TQMenuItem *TQMenuData::findPopup( TQPopupMenu *popup, int *index ) { int i = 0; TQMenuItem *mi = mitems->first(); @@ -329,7 +329,7 @@ TQMenuItem *TQMenuData::tqfindPopup( TQPopupMenu *popup, int *index ) void TQMenuData::removePopup( TQPopupMenu *popup ) { int index = 0; - TQMenuItem *mi = tqfindPopup( popup, &index ); + TQMenuItem *mi = findPopup( popup, &index ); if ( mi ) { mi->popup_menu = 0; removeItemAt( index ); @@ -802,7 +802,7 @@ int TQMenuData::insertSeparator( int index ) void TQMenuData::removeItem( int id ) { TQMenuData *tqparent; - if ( tqfindItem( id, &tqparent ) ) + if ( findItem( id, &tqparent ) ) tqparent->removeItemAt(tqparent->indexOf(id)); } @@ -872,7 +872,7 @@ void TQMenuData::clear() TQKeySequence TQMenuData::accel( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); if ( mi ) return mi->key(); return TQKeySequence(); @@ -883,7 +883,7 @@ TQKeySequence TQMenuData::accel( int id ) const An accelerator key consists of a key code and a combination of the modifiers \c SHIFT, \c CTRL, \c ALT or \c UNICODE_ACCEL (OR'ed or - added). The header file \c tqnamespace.h tqcontains a list of key + added). The header file \c tqnamespace.h contains a list of key codes. Defining an accelerator key produces a text that is added to the @@ -927,7 +927,7 @@ TQKeySequence TQMenuData::accel( int id ) const void TQMenuData::setAccel( const TQKeySequence& key, int id ) { TQMenuData *tqparent; - TQMenuItem *mi = tqfindItem( id, &tqparent ); + TQMenuItem *mi = findItem( id, &tqparent ); if ( mi ) { mi->accel_key = key; tqparent->menuContentsChanged(); @@ -945,7 +945,7 @@ void TQMenuData::setAccel( const TQKeySequence& key, int id ) TQIconSet* TQMenuData::iconSet( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); return mi ? mi->iconSet() : 0; } @@ -958,7 +958,7 @@ TQIconSet* TQMenuData::iconSet( int id ) const TQString TQMenuData::text( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); return mi ? mi->text() : TQString::null; } @@ -971,7 +971,7 @@ TQString TQMenuData::text( int id ) const TQPixmap *TQMenuData::pixmap( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); return mi ? mi->pixmap() : 0; } @@ -1013,7 +1013,7 @@ TQPixmap *TQMenuData::pixmap( int id ) const void TQMenuData::changeItem( int id, const TQString &text ) { TQMenuData *tqparent; - TQMenuItem *mi = tqfindItem( id, &tqparent ); + TQMenuItem *mi = findItem( id, &tqparent ); if ( mi ) { // item found if ( mi->text_data == text ) // same string return; @@ -1023,7 +1023,7 @@ void TQMenuData::changeItem( int id, const TQString &text ) } mi->text_data = text; #ifndef TQT_NO_ACCEL - if ( !mi->accel_key && text.tqfind( '\t' ) != -1 ) + if ( !mi->accel_key && text.find( '\t' ) != -1 ) mi->accel_key = TQt::Key_unknown; #endif tqparent->menuContentsChanged(); @@ -1042,7 +1042,7 @@ void TQMenuData::changeItem( int id, const TQString &text ) void TQMenuData::changeItem( int id, const TQPixmap &pixmap ) { TQMenuData *tqparent; - TQMenuItem *mi = tqfindItem( id, &tqparent ); + TQMenuItem *mi = findItem( id, &tqparent ); if ( mi ) { // item found register TQPixmap *i = mi->pixmap_data; bool fast_refresh = i != 0 && @@ -1104,7 +1104,7 @@ void TQMenuData::changeItem( int id, const TQIconSet &icon, const TQPixmap &pixm void TQMenuData::changeItemIconSet( int id, const TQIconSet &icon ) { TQMenuData *tqparent; - TQMenuItem *mi = tqfindItem( id, &tqparent ); + TQMenuItem *mi = findItem( id, &tqparent ); if ( mi ) { // item found register TQIconSet *i = mi->iconset_data; bool fast_refresh = i != 0; @@ -1130,7 +1130,7 @@ void TQMenuData::changeItemIconSet( int id, const TQIconSet &icon ) bool TQMenuData::isItemEnabled( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); return mi ? mi->isEnabled() : FALSE; } @@ -1144,7 +1144,7 @@ bool TQMenuData::isItemEnabled( int id ) const void TQMenuData::setItemEnabled( int id, bool enable ) { TQMenuData *tqparent; - TQMenuItem *mi = tqfindItem( id, &tqparent ); + TQMenuItem *mi = findItem( id, &tqparent ); if ( mi && (bool)mi->is_enabled != enable ) { mi->is_enabled = enable; #if !defined(TQT_NO_ACCEL) && !defined(TQT_NO_POPUPMENU) @@ -1176,7 +1176,7 @@ bool TQMenuData::isItemActive( int id ) const bool TQMenuData::isItemChecked( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); return mi ? mi->isChecked() : FALSE; } @@ -1191,7 +1191,7 @@ bool TQMenuData::isItemChecked( int id ) const void TQMenuData::setItemChecked( int id, bool check ) { TQMenuData *tqparent; - TQMenuItem *mi = tqfindItem( id, &tqparent ); + TQMenuItem *mi = findItem( id, &tqparent ); if ( mi && (bool)mi->is_checked != check ) { mi->is_checked = check; #ifndef TQT_NO_POPUPMENU @@ -1211,7 +1211,7 @@ void TQMenuData::setItemChecked( int id, bool check ) bool TQMenuData::isItemVisible( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); return mi ? mi->isVisible() : FALSE; } @@ -1225,7 +1225,7 @@ bool TQMenuData::isItemVisible( int id ) const void TQMenuData::setItemVisible( int id, bool visible ) { TQMenuData *tqparent; - TQMenuItem *mi = tqfindItem( id, &tqparent ); + TQMenuItem *mi = findItem( id, &tqparent ); if ( mi && (bool)mi->is_visible != visible ) { mi->is_visible = visible; tqparent->menuContentsChanged(); @@ -1245,9 +1245,9 @@ void TQMenuData::setItemVisible( int id, bool visible ) \sa indexOf() */ -TQMenuItem *TQMenuData::tqfindItem( int id ) const +TQMenuItem *TQMenuData::findItem( int id ) const { - return tqfindItem( id, 0 ); + return findItem( id, 0 ); } @@ -1266,7 +1266,7 @@ TQMenuItem *TQMenuData::tqfindItem( int id ) const \sa indexOf() */ -TQMenuItem * TQMenuData::tqfindItem( int id, TQMenuData ** tqparent ) const +TQMenuItem * TQMenuData::findItem( int id, TQMenuData ** tqparent ) const { if ( tqparent ) *tqparent = (TQMenuData *)this; // ### @@ -1288,7 +1288,7 @@ TQMenuItem * TQMenuData::tqfindItem( int id, TQMenuData ** tqparent ) const TQPopupMenu *p = mi->popup_menu; if (!p->avoid_circularity) { p->avoid_circularity = 1; - mi = mi->popup_menu->tqfindItem( id, tqparent ); + mi = mi->popup_menu->findItem( id, tqparent ); p->avoid_circularity = 0; if ( mi ) // found item return mi; @@ -1303,7 +1303,7 @@ TQMenuItem * TQMenuData::tqfindItem( int id, TQMenuData ** tqparent ) const Returns the index of the menu item with identifier \a id, or -1 if there is no item with this identifier. - \sa idAt(), tqfindItem() + \sa idAt(), findItem() */ int TQMenuData::indexOf( int id ) const @@ -1359,7 +1359,7 @@ void TQMenuData::setId( int index, int id ) \sa connectItem(), disconnectItem(), itemParameter() */ bool TQMenuData::setItemParameter( int id, int param ) { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); if ( !mi ) // no such identifier return FALSE; if ( !mi->signal_data ) { // create new signal @@ -1381,7 +1381,7 @@ bool TQMenuData::setItemParameter( int id, int param ) { */ int TQMenuData::itemParameter( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); if ( !mi || !mi->signal_data ) return id; return mi->signal_data->value().toInt(); @@ -1401,7 +1401,7 @@ int TQMenuData::itemParameter( int id ) const bool TQMenuData::connectItem( int id, const TQT_BASE_OBJECT_NAME *receiver, const char* member ) { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); if ( !mi ) // no such identifier return FALSE; if ( !mi->signal_data ) { // create new signal @@ -1426,7 +1426,7 @@ bool TQMenuData::connectItem( int id, const TQT_BASE_OBJECT_NAME *receiver, bool TQMenuData::disconnectItem( int id, const TQT_BASE_OBJECT_NAME *receiver, const char* member ) { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); if ( !mi || !mi->signal_data ) // no identifier or no signal return FALSE; return mi->signal_data->disconnect( receiver, member ); @@ -1442,7 +1442,7 @@ void TQMenuData::setWhatsThis( int id, const TQString& text ) { TQMenuData *tqparent; - TQMenuItem *mi = tqfindItem( id, &tqparent ); + TQMenuItem *mi = findItem( id, &tqparent ); if ( mi ) { mi->setWhatsThis( text ); tqparent->menuContentsChanged(); @@ -1458,7 +1458,7 @@ void TQMenuData::setWhatsThis( int id, const TQString& text ) TQString TQMenuData::whatsThis( int id ) const { - TQMenuItem *mi = tqfindItem( id ); + TQMenuItem *mi = findItem( id ); return mi? mi->whatsThis() : TQString::null; } |