diff options
Diffstat (limited to 'src/widgets/tqmenudata.cpp')
| -rw-r--r-- | src/widgets/tqmenudata.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/widgets/tqmenudata.cpp b/src/widgets/tqmenudata.cpp index e0b7deca9..6cc3c554b 100644 --- a/src/widgets/tqmenudata.cpp +++ b/src/widgets/tqmenudata.cpp @@ -110,8 +110,8 @@ TQMenuDataData::TQMenuDataData() TQMenuItem::TQMenuItem() :ident( -1 ), iconset_data( 0 ), pixmap_data( 0 ), popup_menu( 0 ), - widget_item( 0 ), signal_data( 0 ), is_separator( FALSE ), is_enabled( TRUE ), - is_checked( FALSE ), is_dirty( TRUE ), is_visible( TRUE ), d( 0) + widget_item( 0 ), signal_data( 0 ), is_separator( false ), is_enabled( true ), + is_checked( false ), is_dirty( true ), is_visible( true ), d( 0) {} TQMenuItem::~TQMenuItem() @@ -159,14 +159,14 @@ TQMenuData::TQMenuData() actItem = -1; // no active menu item mitems = new TQMenuItemList; // create list of menu items TQ_CHECK_PTR( mitems ); - mitems->setAutoDelete( TRUE ); + mitems->setAutoDelete( true ); parentMenu = 0; // assume top level - isPopupMenu = FALSE; - isMenuBar = FALSE; - mouseBtDn = FALSE; - badSize = TRUE; + isPopupMenu = false; + isMenuBar = false; + mouseBtDn = false; + badSize = true; avoid_circularity = 0; - actItemDown = FALSE; + actItemDown = false; d = new TQMenuDataData; } @@ -272,7 +272,7 @@ int TQMenuData::insertAny( const TQString *text, const TQPixmap *pixmap, if ( iconset && !iconset->isNull() ) mi->iconset_data = new TQIconSet( *iconset ); } else if ( text == 0 && pixmap == 0 && popup == 0 ) { - mi->is_separator = TRUE; // separator + mi->is_separator = true; // separator } else { #ifndef Q_OS_TEMP mi->text_data = text?*text:TQString(); @@ -1119,8 +1119,8 @@ void TQMenuData::changeItemIconSet( int id, const TQIconSet &icon ) /*! - Returns TRUE if the item with identifier \a id is enabled; - otherwise returns FALSE + Returns true if the item with identifier \a id is enabled; + otherwise returns false \sa setItemEnabled(), isItemVisible() */ @@ -1128,11 +1128,11 @@ void TQMenuData::changeItemIconSet( int id, const TQIconSet &icon ) bool TQMenuData::isItemEnabled( int id ) const { TQMenuItem *mi = findItem( id ); - return mi ? mi->isEnabled() : FALSE; + return mi ? mi->isEnabled() : false; } /*! - If \a enable is TRUE, enables the menu item with identifier \a id; + If \a enable is true, enables the menu item with identifier \a id; otherwise disables the menu item with identifier \a id. \sa isItemEnabled() @@ -1154,19 +1154,19 @@ void TQMenuData::setItemEnabled( int id, bool enable ) /*! - Returns TRUE if the menu item with the id \a id is currently - active; otherwise returns FALSE. + Returns true if the menu item with the id \a id is currently + active; otherwise returns false. */ bool TQMenuData::isItemActive( int id ) const { if ( actItem == -1 ) - return FALSE; + return false; return indexOf( id ) == actItem; } /*! - Returns TRUE if the menu item with the id \a id has been checked; - otherwise returns FALSE. + Returns true if the menu item with the id \a id has been checked; + otherwise returns false. \sa setItemChecked() */ @@ -1174,13 +1174,13 @@ bool TQMenuData::isItemActive( int id ) const bool TQMenuData::isItemChecked( int id ) const { TQMenuItem *mi = findItem( id ); - return mi ? mi->isChecked() : FALSE; + return mi ? mi->isChecked() : false; } /*! - If \a check is TRUE, checks the menu item with id \a id; otherwise + If \a check is true, checks the menu item with id \a id; otherwise unchecks the menu item with id \a id. Calls - TQPopupMenu::setCheckable( TRUE ) if necessary. + TQPopupMenu::setCheckable( true ) if necessary. \sa isItemChecked() */ @@ -1193,15 +1193,15 @@ void TQMenuData::setItemChecked( int id, bool check ) mi->is_checked = check; #ifndef TQT_NO_POPUPMENU if ( parent->isPopupMenu && !((TQPopupMenu *)parent)->isCheckable() ) - ((TQPopupMenu *)parent)->setCheckable( TRUE ); + ((TQPopupMenu *)parent)->setCheckable( true ); #endif parent->menuStateChanged(); } } /*! - Returns TRUE if the menu item with the id \a id is visible; - otherwise returns FALSE. + Returns true if the menu item with the id \a id is visible; + otherwise returns false. \sa setItemVisible() */ @@ -1209,11 +1209,11 @@ void TQMenuData::setItemChecked( int id, bool check ) bool TQMenuData::isItemVisible( int id ) const { TQMenuItem *mi = findItem( id ); - return mi ? mi->isVisible() : FALSE; + return mi ? mi->isVisible() : false; } /*! - If \a visible is TRUE, shows the menu item with id \a id; otherwise + If \a visible is true, shows the menu item with id \a id; otherwise hides the menu item with id \a id. \sa isItemVisible(), isItemEnabled() @@ -1358,13 +1358,13 @@ void TQMenuData::setId( int index, int id ) bool TQMenuData::setItemParameter( int id, int param ) { TQMenuItem *mi = findItem( id ); if ( !mi ) // no such identifier - return FALSE; + return false; if ( !mi->signal_data ) { // create new signal mi->signal_data = new TQSignal; TQ_CHECK_PTR( mi->signal_data ); } mi->signal_data->setValue( param ); - return TRUE; + return true; } @@ -1400,7 +1400,7 @@ bool TQMenuData::connectItem( int id, const TQObject *receiver, { TQMenuItem *mi = findItem( id ); if ( !mi ) // no such identifier - return FALSE; + return false; if ( !mi->signal_data ) { // create new signal mi->signal_data = new TQSignal; TQ_CHECK_PTR( mi->signal_data ); @@ -1425,7 +1425,7 @@ bool TQMenuData::disconnectItem( int id, const TQObject *receiver, { TQMenuItem *mi = findItem( id ); if ( !mi || !mi->signal_data ) // no identifier or no signal - return FALSE; + return false; return mi->signal_data->disconnect( receiver, member ); } @@ -1481,12 +1481,12 @@ TQString TQMenuData::whatsThis( int id ) const TQPopupMenu::insertItem(). By default, a custom item can also have an icon and a keyboard - accelerator. You can reimplement fullSpan() to return TRUE if you + accelerator. You can reimplement fullSpan() to return true if you want the item to span the entire popup menu width. This is particularly useful for labels. If you want the custom item to be treated just as a separator, - reimplement isSeparator() to return TRUE. + reimplement isSeparator() to return true. Note that you can insert pixmaps or bitmaps as items into a popup menu without needing to create a TQCustomMenuItem. However, custom @@ -1537,23 +1537,23 @@ void TQCustomMenuItem::setFont( const TQFont& /* font */ ) /*! - Returns TRUE if this item wants to span the entire popup menu - width; otherwise returns FALSE. The default is FALSE, meaning that + Returns true if this item wants to span the entire popup menu + width; otherwise returns false. The default is false, meaning that the menu may show an icon and an accelerator key for this item as well. */ bool TQCustomMenuItem::fullSpan() const { - return FALSE; + return false; } /*! - Returns TRUE if this item is just a separator; otherwise returns - FALSE. + Returns true if this item is just a separator; otherwise returns + false. */ bool TQCustomMenuItem::isSeparator() const { - return FALSE; + return false; } @@ -1562,8 +1562,8 @@ bool TQCustomMenuItem::isSeparator() const Paints this item. When this function is invoked, the painter \a p is set to a font and foreground color suitable for a menu item - text using color group \a cg. The item is active if \a act is TRUE - and enabled if \a enabled is TRUE. The geometry values \a x, \a y, + text using color group \a cg. The item is active if \a act is true + and enabled if \a enabled is true. The geometry values \a x, \a y, \a w and \a h specify where to draw the item. Do not draw any background, this has already been done by the |
