diff options
Diffstat (limited to 'plugins/src/accessible/widgets/tqaccessiblewidget.cpp')
-rw-r--r-- | plugins/src/accessible/widgets/tqaccessiblewidget.cpp | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/plugins/src/accessible/widgets/tqaccessiblewidget.cpp b/plugins/src/accessible/widgets/tqaccessiblewidget.cpp index 6c5f30307..02c57eff8 100644 --- a/plugins/src/accessible/widgets/tqaccessiblewidget.cpp +++ b/plugins/src/accessible/widgets/tqaccessiblewidget.cpp @@ -33,7 +33,7 @@ TQString buddyString( TQWidget *widget ) { TQWidget *parent = widget->parentWidget(); - TQObjectList *ol = parent->queryList( "TQLabel", 0, FALSE, FALSE ); + TQObjectList *ol = parent->queryList( "TQLabel", 0, false, false ); if ( !ol || !ol->count() ) { delete ol; return TQString::null; @@ -80,10 +80,10 @@ TQString hotKey( const TQString &text ) TQString n = text; int fa = 0; - bool ac = FALSE; + bool ac = false; while ( ( fa = n.find( "&", fa ) ) != -1 ) { if ( n.at(fa+1) != '&' ) { - ac = TRUE; + ac = true; break; } } @@ -139,7 +139,7 @@ int TQAccessibleWidget::controlAt( int x, int y ) const TQPoint rp = w->mapFromGlobal( TQPoint( x, y ) ); - TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE ); + TQObjectList *list = w->queryList( "TQWidget", 0, false, false ); if ( !list || list->isEmpty() ) return 0; @@ -187,14 +187,14 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const switch ( dir ) { case NavFirstChild: { - TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE ); + TQObjectList *list = w->queryList( "TQWidget", 0, false, false ); bool has = !list->isEmpty(); delete list; return has ? 1 : -1; } case NavLastChild: { - TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE ); + TQObjectList *list = w->queryList( "TQWidget", 0, false, false ); bool has = !list->isEmpty(); delete list; return has ? childCount() : -1; @@ -203,7 +203,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const case NavPrevious: { TQWidget *parent = w->parentWidget(); - TQObjectList *sl = parent ? parent->queryList( "TQWidget", 0, FALSE, FALSE ) : 0; + TQObjectList *sl = parent ? parent->queryList( "TQWidget", 0, false, false ) : 0; if ( !sl ) return -1; TQObject *sib; @@ -243,7 +243,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const if ( !w2 ) return -1; - TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE ); + TQObjectList *list = w->queryList( "TQWidget", 0, false, false ); int index = list->findRef( w2 ); delete list; return ( index != -1 ) ? index+1 : -1; @@ -258,7 +258,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const /*! \reimp */ int TQAccessibleWidget::childCount() const { - TQObjectList *cl = widget()->queryList( "TQWidget", 0, FALSE, FALSE ); + TQObjectList *cl = widget()->queryList( "TQWidget", 0, false, false ); if ( !cl ) return 0; @@ -271,7 +271,7 @@ int TQAccessibleWidget::childCount() const TQRESULT TQAccessibleWidget::queryChild( int control, TQAccessibleInterface **iface ) const { *iface = 0; - TQObjectList *cl = widget()->queryList( "TQWidget", 0, FALSE, FALSE ); + TQObjectList *cl = widget()->queryList( "TQWidget", 0, false, false ); if ( !cl ) return TQS_FALSE; @@ -301,7 +301,7 @@ bool TQAccessibleWidget::doDefaultAction( int control ) #else Q_UNUSED(control) #endif - return FALSE; + return false; } /*! \reimp */ @@ -413,9 +413,9 @@ bool TQAccessibleWidget::setFocus( int control ) #endif if ( widget()->focusPolicy() != TQWidget::NoFocus ) { widget()->setFocus(); - return TRUE; + return true; } - return FALSE; + return false; } /*! \reimp */ @@ -424,7 +424,7 @@ bool TQAccessibleWidget::setSelected( int, bool, bool ) #if defined(QT_DEBUG) tqWarning( "TQAccessibleWidget::setSelected: This function not supported for simple widgets." ); #endif - return FALSE; + return false; } /*! \reimp */ @@ -503,7 +503,7 @@ TQAccessibleButton::TQAccessibleButton( TQObject *o, Role role, TQString descrip bool TQAccessibleButton::doDefaultAction( int control ) { if ( !widget()->isEnabled() ) - return FALSE; + return false; Role r = role(control); if ( r == PushButton || r == CheckBox || r == RadioButton ) { @@ -513,7 +513,7 @@ bool TQAccessibleButton::doDefaultAction( int control ) tb->openPopup(); } - return TRUE; + return true; } /*! \reimp */ @@ -791,14 +791,14 @@ bool TQAccessibleSpinWidget::doDefaultAction( int control ) switch( control ) { case 1: if ( !((TQSpinWidget*)widget())->isUpEnabled() ) - return FALSE; + return false; ((TQSpinWidget*)widget())->stepUp(); - return TRUE; + return true; case 2: if ( !((TQSpinWidget*)widget())->isDownEnabled() ) - return FALSE; + return false; ((TQSpinWidget*)widget())->stepDown(); - return TRUE; + return true; default: break; } @@ -987,18 +987,18 @@ bool TQAccessibleScrollBar::doDefaultAction( int control ) switch ( control ) { case 1: scrollBar()->subtractLine(); - return TRUE; + return true; case 2: scrollBar()->subtractPage(); - return TRUE; + return true; case 4: scrollBar()->addPage(); - return TRUE; + return true; case 5: scrollBar()->addLine(); - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -1164,12 +1164,12 @@ bool TQAccessibleSlider::doDefaultAction( int control ) switch ( control ) { case 1: slider()->subtractLine(); - return TRUE; + return true; case 3: slider()->addLine(); - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -1605,33 +1605,33 @@ TQAccessible::State TQAccessibleTabBar::state( int control ) const bool TQAccessibleTabBar::doDefaultAction( int control ) { if ( !control ) - return FALSE; + return false; if ( control > tabBar()->count() ) { TQAccessibleInterface *iface; TQAccessibleWidget::queryChild( control - tabBar()->count(), &iface ); if ( !iface ) - return FALSE; + return false; return iface->doDefaultAction( 0 ); } TQTab *tab = tabBar()->tabAt( control - 1 ); if ( !tab || !tab->isEnabled() ) - return FALSE; + return false; tabBar()->setCurrentTab( tab ); - return TRUE; + return true; } /*! \reimp */ bool TQAccessibleTabBar::setSelected( int control, bool on, bool extend ) { if ( !control || !on || extend || control > tabBar()->count() ) - return FALSE; + return false; TQTab *tab = tabBar()->tabAt( control - 1 ); if ( !tab || !tab->isEnabled() ) - return FALSE; + return false; tabBar()->setCurrentTab( tab ); - return TRUE; + return true; } /*! \reimp */ @@ -1808,9 +1808,9 @@ TQAccessible::State TQAccessibleComboBox::state( int /*control*/ ) const bool TQAccessibleComboBox::doDefaultAction( int control ) { if ( control != 2 ) - return FALSE; + return false; comboBox()->popup(); - return TRUE; + return true; } /*! @@ -2014,20 +2014,20 @@ bool TQAccessibleTitleBar::doDefaultAction( int control ) titleBar()->window()->showNormal(); else titleBar()->window()->showMinimized(); - return TRUE; + return true; case 4: if ( titleBar()->window()->isMaximized() ) titleBar()->window()->showNormal(); else titleBar()->window()->showMaximized(); - return TRUE; + return true; case 5: titleBar()->window()->close(); - return TRUE; + return true; default: break; } - return FALSE; + return false; } @@ -2295,9 +2295,9 @@ bool TQAccessibleListBox::setFocus( int control ) TQListBoxItem *item = listBox()->item( control -1 ); if ( !item ) - return FALSE; + return false; listBox()->setCurrentItem( item ); - return TRUE; + return true; } /*! \reimp */ @@ -2306,11 +2306,11 @@ bool TQAccessibleListBox::setSelected( int control, bool on, bool extend ) if ( !control || ( extend && listBox()->selectionMode() != TQListBox::Extended && listBox()->selectionMode() != TQListBox::Multi ) ) - return FALSE; + return false; TQListBoxItem *item = listBox()->item( control -1 ); if ( !item ) - return FALSE; + return false; if ( !extend ) { listBox()->setSelected( item, on ); } else { @@ -2322,7 +2322,7 @@ bool TQAccessibleListBox::setSelected( int control, bool on, bool extend ) } } - return TRUE; + return true; } /*! \reimp */ @@ -2509,9 +2509,9 @@ bool TQAccessibleListView::setFocus( int control ) TQListViewItem *item = findLVItem( listView(), control ); if ( !item ) - return FALSE; + return false; listView()->setCurrentItem( item ); - return TRUE; + return true; } /*! \reimp */ @@ -2520,17 +2520,17 @@ bool TQAccessibleListView::setSelected( int control, bool on, bool extend ) if ( !control || ( extend && listView()->selectionMode() != TQListView::Extended && listView()->selectionMode() != TQListView::Multi ) ) - return FALSE; + return false; TQListViewItem *item = findLVItem( listView(), control ); if ( !item ) - return FALSE; + return false; if ( !extend ) { listView()->setSelected( item, on ); } else { TQListViewItem *current = listView()->currentItem(); if ( !current ) - return FALSE; + return false; bool down = item->itemPos() > current->itemPos(); TQListViewItemIterator it( current ); while ( it.current() ) { @@ -2543,7 +2543,7 @@ bool TQAccessibleListView::setSelected( int control, bool on, bool extend ) --it; } } - return TRUE; + return true; } /*! \reimp */ @@ -2697,9 +2697,9 @@ bool TQAccessibleIconView::setFocus( int control ) TQIconViewItem *item = findIVItem( iconView(), control ); if ( !item ) - return FALSE; + return false; iconView()->setCurrentItem( item ); - return TRUE; + return true; } /*! \reimp */ @@ -2708,41 +2708,41 @@ bool TQAccessibleIconView::setSelected( int control, bool on, bool extend ) if ( !control || ( extend && iconView()->selectionMode() != TQIconView::Extended && iconView()->selectionMode() != TQIconView::Multi ) ) - return FALSE; + return false; TQIconViewItem *item = findIVItem( iconView(), control ); if ( !item ) - return FALSE; + return false; if ( !extend ) { - iconView()->setSelected( item, on, TRUE ); + iconView()->setSelected( item, on, true ); } else { TQIconViewItem *current = iconView()->currentItem(); if ( !current ) - return FALSE; - bool down = FALSE; + return false; + bool down = false; TQIconViewItem *temp = current; while ( ( temp = temp->nextItem() ) ) { if ( temp == item ) { - down = TRUE; + down = true; break; } } temp = current; if ( down ) { while ( ( temp = temp->nextItem() ) ) { - iconView()->setSelected( temp, on, TRUE ); + iconView()->setSelected( temp, on, true ); if ( temp == item ) break; } } else { while ( ( temp = temp->prevItem() ) ) { - iconView()->setSelected( temp, on, TRUE ); + iconView()->setSelected( temp, on, true ); if ( temp == item ) break; } } } - return TRUE; + return true; } /*! \reimp */ |