Replace TQ_*Focus* and TQ_Scale* defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/224/head
Michele Calgaro 8 months ago
parent 34632650f1
commit 1e5d5c92c3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -93,7 +93,7 @@ void KVideoWidget::init(void)
{ {
setMinimumSize(0, 0); setMinimumSize(0, 0);
setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQWidget::ClickFocus );
fullscreenWidget = 0; fullscreenWidget = 0;
poVideo = Arts::VideoPlayObject::null(); poVideo = Arts::VideoPlayObject::null();

@ -404,7 +404,7 @@ KateArgHint::KateArgHint( KateView* parent, const char* name )
m_markCurrentFunction = true; m_markCurrentFunction = true;
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
setFocusProxy( parent ); setFocusProxy( parent );
reset( -1, -1 ); reset( -1, -1 );

@ -131,7 +131,7 @@ KateView::KateView( KateDocument *doc, TQWidget *parent, const char * name )
doc->addView( this ); doc->addView( this );
setFocusProxy( m_viewInternal ); setFocusProxy( m_viewInternal );
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
if (!doc->singleViewMode()) { if (!doc->singleViewMode()) {
setXMLFile( "katepartui.rc" ); setXMLFile( "katepartui.rc" );

@ -123,7 +123,7 @@ ResourceLDAPTDEIO::~ResourceLDAPTDEIO()
void ResourceLDAPTDEIO::enter_loop() void ResourceLDAPTDEIO::enter_loop()
{ {
TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal));
dummy.setFocusPolicy( TQ_NoFocus ); dummy.setFocusPolicy( TQWidget::NoFocus );
tqt_enter_modal(&dummy); tqt_enter_modal(&dummy);
tqApp->enter_loop(); tqApp->enter_loop();
tqt_leave_modal(&dummy); tqt_leave_modal(&dummy);

@ -441,7 +441,7 @@ public:
{ {
// Scale, if needed // Scale, if needed
if(image.width() != (int) w || image.height() != (int) h) if(image.width() != (int) w || image.height() != (int) h)
image = image.smoothScale((int) w, (int) h, TQ_ScaleFree); image = image.smoothScale((int) w, (int) h, TQImage::ScaleFree);
m_engine->painter()->drawImage(x, y, image); m_engine->painter()->drawImage(x, y, image);
} }

@ -957,7 +957,7 @@ bool HTMLGenericFormElementImpl::isFocusable() const
return false; return false;
TQWidget* widget = static_cast<RenderWidget*>(m_render)->widget(); TQWidget* widget = static_cast<RenderWidget*>(m_render)->widget();
return widget && widget->focusPolicy() >= TQ_TabFocus; return widget && widget->focusPolicy() >= TQWidget::TabFocus;
} }
class FocusHandleWidget : public TQWidget class FocusHandleWidget : public TQWidget

@ -634,7 +634,7 @@ void RenderPart::setWidget( TQWidget *widget )
#endif #endif
setQWidget( widget ); setQWidget( widget );
widget->setFocusPolicy(TQ_WheelFocus); widget->setFocusPolicy(TQWidget::WheelFocus);
if(widget->inherits("TDEHTMLView")) if(widget->inherits("TDEHTMLView"))
connect( widget, TQT_SIGNAL( cleared() ), this, TQT_SLOT( slotViewCleared() ) ); connect( widget, TQT_SIGNAL( cleared() ), this, TQT_SLOT( slotViewCleared() ) );

@ -215,8 +215,8 @@ void RenderWidget::setQWidget(TQWidget *widget)
if ( (m_isTDEHTMLWidget = !strcmp(m_widget->name(), "__tdehtml")) && !::tqqt_cast<TQFrame*>(m_widget)) if ( (m_isTDEHTMLWidget = !strcmp(m_widget->name(), "__tdehtml")) && !::tqqt_cast<TQFrame*>(m_widget))
m_widget->setBackgroundMode( TQWidget::NoBackground ); m_widget->setBackgroundMode( TQWidget::NoBackground );
if (m_widget->focusPolicy() > TQ_StrongFocus) if (m_widget->focusPolicy() > TQWidget::StrongFocus)
m_widget->setFocusPolicy(TQ_StrongFocus); m_widget->setFocusPolicy(TQWidget::StrongFocus);
// if we've already received a layout, apply the calculated space to the // if we've already received a layout, apply the calculated space to the
// widget immediately, but we have to have really been full constructed (with a non-null // widget immediately, but we have to have really been full constructed (with a non-null
// style pointer). // style pointer).
@ -673,7 +673,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// currently focused. this avoids accidentally changing a select box // currently focused. this avoids accidentally changing a select box
// or something while wheeling a webpage. // or something while wheeling a webpage.
if (tqApp->focusWidget() != widget() && if (tqApp->focusWidget() != widget() &&
widget()->focusPolicy() <= TQ_StrongFocus) { widget()->focusPolicy() <= TQWidget::StrongFocus) {
TQT_TQWHEELEVENT(e)->ignore(); TQT_TQWHEELEVENT(e)->ignore();
TQApplication::sendEvent(view(), e); TQApplication::sendEvent(view(), e);
filtered = true; filtered = true;

@ -546,7 +546,7 @@ void TDEHTMLView::init()
d->vertPaintBuffer = new TQPixmap(10, PAINT_BUFFER_HEIGHT); d->vertPaintBuffer = new TQPixmap(10, PAINT_BUFFER_HEIGHT);
if(!d->tp) d->tp = new TQPainter(); if(!d->tp) d->tp = new TQPainter();
setFocusPolicy(TQ_StrongFocus); setFocusPolicy(TQWidget::StrongFocus);
viewport()->setFocusProxy(this); viewport()->setFocusProxy(this);
_marginWidth = -1; // undefined _marginWidth = -1; // undefined

@ -410,7 +410,7 @@ void KURLBar::setListBox( KURLBarListBox *view )
m_listBox->setSelectionMode( TDEListBox::Single ); m_listBox->setSelectionMode( TDEListBox::Single );
paletteChange( palette() ); paletteChange( palette() );
m_listBox->setFocusPolicy( TQ_TabFocus ); m_listBox->setFocusPolicy( TQWidget::TabFocus );
connect( m_listBox, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ), connect( m_listBox, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ),
TQT_SLOT( slotSelected( int, TQListBoxItem * ))); TQT_SLOT( slotSelected( int, TQListBoxItem * )));

@ -144,7 +144,7 @@ KDirOperator::KDirOperator(const KURL& _url,
setupActions(); setupActions();
setupMenu(); setupMenu();
setFocusPolicy(TQ_WheelFocus); setFocusPolicy(TQWidget::WheelFocus);
} }
KDirOperator::~KDirOperator() KDirOperator::~KDirOperator()

@ -516,7 +516,7 @@ void tqt_leave_modal( TQWidget *widget );
void NetAccess::enter_loop() void NetAccess::enter_loop()
{ {
TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal));
dummy.setFocusPolicy( TQ_NoFocus ); dummy.setFocusPolicy( TQWidget::NoFocus );
tqt_enter_modal(&dummy); tqt_enter_modal(&dummy);
tqApp->enter_loop(); tqApp->enter_loop();
tqt_leave_modal(&dummy); tqt_leave_modal(&dummy);

@ -58,7 +58,7 @@ KMdiChildArea::KMdiChildArea( TQWidget *parent )
m_captionInactiveForeColor = TDEGlobalSettings::inactiveTextColor(); m_captionInactiveForeColor = TDEGlobalSettings::inactiveTextColor();
m_pZ = new TQPtrList<KMdiChildFrm>; m_pZ = new TQPtrList<KMdiChildFrm>;
m_pZ->setAutoDelete( true ); m_pZ->setAutoDelete( true );
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQWidget::ClickFocus );
m_defaultChildFrmSize = TQSize( 400, 300 ); m_defaultChildFrmSize = TQSize( 400, 300 );
} }

@ -149,15 +149,15 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
redecorateButtons(); redecorateButtons();
m_pWinIcon->setFocusPolicy( TQ_NoFocus ); m_pWinIcon->setFocusPolicy( TQWidget::NoFocus );
m_pUnixIcon->setFocusPolicy( TQ_NoFocus ); m_pUnixIcon->setFocusPolicy( TQWidget::NoFocus );
m_pClose->setFocusPolicy( TQ_NoFocus ); m_pClose->setFocusPolicy( TQWidget::NoFocus );
m_pMinimize->setFocusPolicy( TQ_NoFocus ); m_pMinimize->setFocusPolicy( TQWidget::NoFocus );
m_pMaximize->setFocusPolicy( TQ_NoFocus ); m_pMaximize->setFocusPolicy( TQWidget::NoFocus );
m_pUndock->setFocusPolicy( TQ_NoFocus ); m_pUndock->setFocusPolicy( TQWidget::NoFocus );
setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
setMouseTracking( true ); setMouseTracking( true );
@ -705,7 +705,7 @@ void KMdiChildFrm::setIcon( const TQPixmap& pxm )
if ( p.width() != 18 || p.height() != 18 ) if ( p.width() != 18 || p.height() != 18 )
{ {
TQImage img = p.convertToImage(); TQImage img = p.convertToImage();
p = img.smoothScale( 18, 18, TQ_ScaleMin ); p = img.smoothScale( 18, 18, TQImage::ScaleMin );
} }
const bool do_resize = m_pIconButtonPixmap->size() != p.size(); const bool do_resize = m_pIconButtonPixmap->size() != p.size();
*m_pIconButtonPixmap = p; *m_pIconButtonPixmap = p;
@ -750,7 +750,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
} }
// memorize the focuses in a dictionary because they will get lost during reparenting // memorize the focuses in a dictionary because they will get lost during reparenting
TQDict<TQ_FocusPolicy>* pFocPolDict = new TQDict<TQ_FocusPolicy>; TQDict<TQWidget::FocusPolicy>* pFocPolDict = new TQDict<TQWidget::FocusPolicy>;
pFocPolDict->setAutoDelete( true ); pFocPolDict->setAutoDelete( true );
TQObjectList *list = m_pClient->queryList( "TQWidget" ); TQObjectList *list = m_pClient->queryList( "TQWidget" );
TQObjectListIt it( *list ); // iterate over the buttons TQObjectListIt it( *list ); // iterate over the buttons
@ -768,7 +768,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
widg->setName( tmpStr.latin1() ); widg->setName( tmpStr.latin1() );
i++; i++;
} }
TQ_FocusPolicy* pFocPol = new TQ_FocusPolicy; TQWidget::FocusPolicy* pFocPol = new TQWidget::FocusPolicy;
*pFocPol = widg->focusPolicy(); *pFocPol = widg->focusPolicy();
pFocPolDict->insert( widg->name(), pFocPol ); pFocPolDict->insert( widg->name(), pFocPol );
} }
@ -817,7 +817,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
TQObject::disconnect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) ); TQObject::disconnect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) );
//reparent to desktop widget , no flags , point , show it //reparent to desktop widget , no flags , point , show it
TQDict<TQ_FocusPolicy>* pFocPolDict; TQDict<TQWidget::FocusPolicy>* pFocPolDict;
pFocPolDict = unlinkChildren(); pFocPolDict = unlinkChildren();
// get name of focused child widget // get name of focused child widget
@ -842,7 +842,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
{ // for each found object... { // for each found object...
TQWidget * widg = ( TQWidget* ) obj; TQWidget * widg = ( TQWidget* ) obj;
++it; ++it;
TQ_FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent TQWidget::FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
if ( pFocPol ) if ( pFocPol )
widg->setFocusPolicy( *pFocPol ); widg->setFocusPolicy( *pFocPol );
@ -851,7 +851,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
widg->setFocus(); widg->setFocus();
// get first and last focusable widget // get first and last focusable widget
if ( ( widg->focusPolicy() == TQ_StrongFocus ) || ( widg->focusPolicy() == TQ_TabFocus ) ) if ( ( widg->focusPolicy() == TQWidget::StrongFocus ) || ( widg->focusPolicy() == TQWidget::TabFocus ) )
{ {
if ( firstFocusableChildWidget == 0 ) if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget firstFocusableChildWidget = widg; // first widget
@ -860,7 +860,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
} }
else else
{ {
if ( widg->focusPolicy() == TQ_WheelFocus ) if ( widg->focusPolicy() == TQWidget::WheelFocus )
{ {
if ( firstFocusableChildWidget == 0 ) if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget firstFocusableChildWidget = widg; // first widget
@ -877,14 +877,14 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
m_pClient->setLastFocusableChildWidget( lastFocusableChildWidget ); m_pClient->setLastFocusableChildWidget( lastFocusableChildWidget );
// reset the focus policy of the view // reset the focus policy of the view
m_pClient->setFocusPolicy( TQ_ClickFocus ); m_pClient->setFocusPolicy( TQWidget::ClickFocus );
// lose information about the view (because it's undocked now) // lose information about the view (because it's undocked now)
m_pClient = 0; m_pClient = 0;
} }
//============== linkChildren =============// //============== linkChildren =============//
void KMdiChildFrm::linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict ) void KMdiChildFrm::linkChildren( TQDict<TQWidget::FocusPolicy>* pFocPolDict )
{ {
// reset the focus policies for all widgets in the view (take them from the dictionary) // reset the focus policies for all widgets in the view (take them from the dictionary)
TQObjectList* list = m_pClient->queryList( "TQWidget" ); TQObjectList* list = m_pClient->queryList( "TQWidget" );
@ -894,7 +894,7 @@ void KMdiChildFrm::linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict )
{ // for each found object... { // for each found object...
TQWidget* widg = ( TQWidget* ) obj; TQWidget* widg = ( TQWidget* ) obj;
++it; ++it;
TQ_FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent TQWidget::FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
if ( pFocPol != 0 ) if ( pFocPol != 0 )
widg->setFocusPolicy( *pFocPol ); widg->setFocusPolicy( *pFocPol );
@ -907,14 +907,14 @@ void KMdiChildFrm::linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict )
delete pFocPolDict; delete pFocPolDict;
// reset the focus policies for the rest // reset the focus policies for the rest
m_pWinIcon->setFocusPolicy( TQ_NoFocus ); m_pWinIcon->setFocusPolicy( TQWidget::NoFocus );
m_pUnixIcon->setFocusPolicy( TQ_NoFocus ); m_pUnixIcon->setFocusPolicy( TQWidget::NoFocus );
m_pClient->setFocusPolicy( TQ_ClickFocus ); m_pClient->setFocusPolicy( TQWidget::ClickFocus );
m_pCaption->setFocusPolicy( TQ_NoFocus ); m_pCaption->setFocusPolicy( TQWidget::NoFocus );
m_pUndock->setFocusPolicy( TQ_NoFocus ); m_pUndock->setFocusPolicy( TQWidget::NoFocus );
m_pMinimize->setFocusPolicy( TQ_NoFocus ); m_pMinimize->setFocusPolicy( TQWidget::NoFocus );
m_pMaximize->setFocusPolicy( TQ_NoFocus ); m_pMaximize->setFocusPolicy( TQWidget::NoFocus );
m_pClose->setFocusPolicy( TQ_NoFocus ); m_pClose->setFocusPolicy( TQWidget::NoFocus );
// install the event filter (catch mouse clicks) for the rest // install the event filter (catch mouse clicks) for the rest
m_pWinIcon->installEventFilter( this ); m_pWinIcon->installEventFilter( this );
@ -930,10 +930,10 @@ void KMdiChildFrm::linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict )
//============== unlinkChildren =============// //============== unlinkChildren =============//
TQDict<TQ_FocusPolicy>* KMdiChildFrm::unlinkChildren() TQDict<TQWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
{ {
// memorize the focuses in a dictionary because they will get lost during reparenting // memorize the focuses in a dictionary because they will get lost during reparenting
TQDict<TQ_FocusPolicy>* pFocPolDict = new TQDict<TQ_FocusPolicy>; TQDict<TQWidget::FocusPolicy>* pFocPolDict = new TQDict<TQWidget::FocusPolicy>;
pFocPolDict->setAutoDelete( true ); pFocPolDict->setAutoDelete( true );
TQObjectList *list = m_pClient->queryList( "TQWidget" ); TQObjectList *list = m_pClient->queryList( "TQWidget" );
@ -953,7 +953,7 @@ TQDict<TQ_FocusPolicy>* KMdiChildFrm::unlinkChildren()
w->setName( tmpStr.latin1() ); w->setName( tmpStr.latin1() );
i++; i++;
} }
TQ_FocusPolicy* pFocPol = new TQ_FocusPolicy; TQWidget::FocusPolicy* pFocPol = new TQWidget::FocusPolicy;
*pFocPol = w->focusPolicy(); *pFocPol = w->focusPolicy();
// memorize focus policy // memorize focus policy
pFocPolDict->insert( w->name(), pFocPol ); pFocPolDict->insert( w->name(), pFocPol );
@ -1115,7 +1115,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) ) if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) )
{ {
TQWidget* w = ( TQWidget* ) obj; TQWidget* w = ( TQWidget* ) obj;
if ( ( w->focusPolicy() == TQ_ClickFocus ) || ( w->focusPolicy() == TQ_StrongFocus ) ) if ( ( w->focusPolicy() == TQWidget::ClickFocus ) || ( w->focusPolicy() == TQWidget::StrongFocus ) )
{ {
w->setFocus(); w->setFocus();
} }

@ -422,13 +422,13 @@ protected:
* Restore the focus policies for _all_ widgets in the view using the list given as parameter. * Restore the focus policies for _all_ widgets in the view using the list given as parameter.
* Install the event filter for all direct child widgets of this. (See KMdiChildFrm::eventFilter) * Install the event filter for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
*/ */
void linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict ); void linkChildren( TQDict<TQWidget::FocusPolicy>* pFocPolDict );
/** /**
* Backups all focus policies of _all_ child widgets in the MDI childview since they get lost during a reparent. * Backups all focus policies of _all_ child widgets in the MDI childview since they get lost during a reparent.
* Remove all event filters for all direct child widgets of this. (See KMdiChildFrm::eventFilter) * Remove all event filters for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
*/ */
TQDict<TQ_FocusPolicy>* unlinkChildren(); TQDict<TQWidget::FocusPolicy>* unlinkChildren();
/** /**
* Calculates the corner id for the resize cursor. The return value can be tested for: * Calculates the corner id for the resize cursor. The return value can be tested for:

@ -72,7 +72,7 @@ KMdiChildFrmCaption::KMdiChildFrmCaption( KMdiChildFrm *parent )
m_bActive = false; m_bActive = false;
m_pParent = parent; m_pParent = parent;
setBackgroundMode( NoBackground ); setBackgroundMode( NoBackground );
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
m_bChildInDrag = false; m_bChildInDrag = false;
} }

@ -63,7 +63,7 @@ KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* parentWidget, c
m_szCaption = i18n( "Unnamed" ); m_szCaption = i18n( "Unnamed" );
m_sTabCaption = m_szCaption; m_sTabCaption = m_szCaption;
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQWidget::ClickFocus );
installEventFilter( this ); installEventFilter( this );
// store the current time // store the current time
@ -88,7 +88,7 @@ KMdiChildView::KMdiChildView( TQWidget* parentWidget, const char* name, WFlags f
setGeometry( 0, 0, 0, 0 ); // reset setGeometry( 0, 0, 0, 0 ); // reset
m_szCaption = i18n( "Unnamed" ); m_szCaption = i18n( "Unnamed" );
m_sTabCaption = m_szCaption; m_sTabCaption = m_szCaption;
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQWidget::ClickFocus );
installEventFilter( this ); installEventFilter( this );
// store the current time // store the current time
@ -363,7 +363,7 @@ void KMdiChildView::youAreDetached()
if ( myIconPtr() ) if ( myIconPtr() )
setIcon( *( myIconPtr() ) ); setIcon( *( myIconPtr() ) );
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
emit isDetachedNow(); emit isDetachedNow();
} }
@ -527,8 +527,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
if ( ke->key() == Qt::Key_Tab ) if ( ke->key() == Qt::Key_Tab )
{ {
TQWidget* w = ( TQWidget* ) obj; TQWidget* w = ( TQWidget* ) obj;
TQ_FocusPolicy wfp = w->focusPolicy(); TQWidget::FocusPolicy wfp = w->focusPolicy();
if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || w->focusPolicy() == TQ_WheelFocus ) if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || w->focusPolicy() == TQWidget::WheelFocus )
{ {
if ( m_lastFocusableChildWidget != 0 ) if ( m_lastFocusableChildWidget != 0 )
{ {
@ -578,8 +578,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
TQWidget * widg = ( TQWidget* ) o; TQWidget * widg = ( TQWidget* ) o;
++it; ++it;
widg->removeEventFilter( this ); widg->removeEventFilter( this );
TQ_FocusPolicy wfp = widg->focusPolicy(); TQWidget::FocusPolicy wfp = widg->focusPolicy();
if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || widg->focusPolicy() == TQ_WheelFocus ) if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus )
{ {
if ( m_firstFocusableChildWidget == widg ) if ( m_firstFocusableChildWidget == widg )
m_firstFocusableChildWidget = 0L; // reset first widget m_firstFocusableChildWidget = 0L; // reset first widget
@ -612,8 +612,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
++it; ++it;
widg->installEventFilter( this ); widg->installEventFilter( this );
connect( widg, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slot_childDestroyed() ) ); connect( widg, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slot_childDestroyed() ) );
TQ_FocusPolicy wfp = widg->focusPolicy(); TQWidget::FocusPolicy wfp = widg->focusPolicy();
if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || widg->focusPolicy() == TQ_WheelFocus ) if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus )
{ {
if ( m_firstFocusableChildWidget == 0 ) if ( m_firstFocusableChildWidget == 0 )
m_firstFocusableChildWidget = widg; // first widge m_firstFocusableChildWidget = widg; // first widge

@ -31,7 +31,7 @@ void KMdiFocusList::addWidgetTree( TQWidget* w )
{ {
//this method should never be called twice on the same hierarchy //this method should never be called twice on the same hierarchy
m_list.insert( w, w->focusPolicy() ); m_list.insert( w, w->focusPolicy() );
w->setFocusPolicy( TQ_ClickFocus ); w->setFocusPolicy( TQWidget::ClickFocus );
kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding toplevel" << endl; kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding toplevel" << endl;
connect( w, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) ); connect( w, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) );
TQObjectList *l = w->queryList( "TQWidget" ); TQObjectList *l = w->queryList( "TQWidget" );
@ -41,7 +41,7 @@ void KMdiFocusList::addWidgetTree( TQWidget* w )
{ {
TQWidget * wid = ( TQWidget* ) obj; TQWidget * wid = ( TQWidget* ) obj;
m_list.insert( wid, wid->focusPolicy() ); m_list.insert( wid, wid->focusPolicy() );
wid->setFocusPolicy( TQ_ClickFocus ); wid->setFocusPolicy( TQWidget::ClickFocus );
kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding widget" << endl; kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding widget" << endl;
connect( wid, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) ); connect( wid, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) );
++it; ++it;
@ -51,7 +51,7 @@ void KMdiFocusList::addWidgetTree( TQWidget* w )
void KMdiFocusList::restore() void KMdiFocusList::restore()
{ {
for ( TQMap<TQWidget*, TQ_FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it ) for ( TQMap<TQWidget*, TQWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
{ {
it.key() ->setFocusPolicy( it.data() ); it.key() ->setFocusPolicy( it.data() );
} }

@ -34,7 +34,7 @@ public:
protected slots: protected slots:
void objectHasBeenDestroyed( TQObject* ); void objectHasBeenDestroyed( TQObject* );
private: private:
TQMap<TQWidget*, TQ_FocusPolicy> m_list; TQMap<TQWidget*, TQWidget::FocusPolicy> m_list;
}; };

@ -184,7 +184,7 @@ KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMod
m_pToolViews = new TQMap<TQWidget*, KMdiToolViewAccessor*>; m_pToolViews = new TQMap<TQWidget*, KMdiToolViewAccessor*>;
// This seems to be needed (re-check it after Qt2.0 comed out) // This seems to be needed (re-check it after Qt2.0 comed out)
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQWidget::ClickFocus );
// create the central widget // create the central widget
createMdiManager(); createMdiManager();

@ -67,7 +67,7 @@ KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_
m_pWindow = win_ptr; m_pWindow = win_ptr;
TQToolTip::add TQToolTip::add
( this, win_ptr->caption() ); ( this, win_ptr->caption() );
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
} }
KMdiTaskBarButton::~KMdiTaskBarButton() KMdiTaskBarButton::~KMdiTaskBarButton()
@ -156,7 +156,7 @@ KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock )
m_pButtonList->setAutoDelete( true ); m_pButtonList->setAutoDelete( true );
//QT30 setFontPropagation(TQWidget::SameFont); //QT30 setFontPropagation(TQWidget::SameFont);
setMinimumWidth( 1 ); setMinimumWidth( 1 );
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
parent->moveToolBar( this, dock ); //XXX obsolete! parent->moveToolBar( this, dock ); //XXX obsolete!
} }

@ -690,7 +690,7 @@ bool ReadWritePart::waitSaveComplete()
d->m_waitForSave = true; d->m_waitForSave = true;
TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal));
dummy.setFocusPolicy( TQ_NoFocus ); dummy.setFocusPolicy( TQWidget::NoFocus );
tqt_enter_modal(&dummy); tqt_enter_modal(&dummy);
tqApp->enter_loop(); tqApp->enter_loop();
tqt_leave_modal(&dummy); tqt_leave_modal(&dummy);

@ -351,11 +351,11 @@ void PartManager::addPart( Part *part, bool setActive )
} }
// Prevent focus problems // Prevent focus problems
if ( part->widget() && part->widget()->focusPolicy() == TQ_NoFocus ) if ( part->widget() && part->widget()->focusPolicy() == TQWidget::NoFocus )
{ {
kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of NoFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl; kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of NoFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl;
} }
if ( part->widget() && part->widget()->focusPolicy() == TQ_TabFocus ) if ( part->widget() && part->widget()->focusPolicy() == TQWidget::TabFocus )
{ {
kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of TabFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl; kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of TabFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl;
} }

@ -44,7 +44,7 @@ void KActiveLabel::init()
setVScrollBarMode(TQScrollView::AlwaysOff); setVScrollBarMode(TQScrollView::AlwaysOff);
setHScrollBarMode(TQScrollView::AlwaysOff); setHScrollBarMode(TQScrollView::AlwaysOff);
setFrameStyle(TQFrame::NoFrame); setFrameStyle(TQFrame::NoFrame);
setFocusPolicy( TQ_TabFocus ); setFocusPolicy( TQWidget::TabFocus );
paletteChanged(); paletteChanged();
connect(this, TQT_SIGNAL(linkClicked(const TQString &)), connect(this, TQT_SIGNAL(linkClicked(const TQString &)),

@ -78,7 +78,7 @@ KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQ
setToolTips(); setToolTips();
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
setBackgroundMode( TQWidget::NoBackground ); setBackgroundMode( TQWidget::NoBackground );
} }
@ -442,7 +442,7 @@ KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_f
connect( charTable, TQT_SIGNAL(doubleClicked()),this,TQT_SLOT(slotDoubleClicked())); connect( charTable, TQT_SIGNAL(doubleClicked()),this,TQT_SLOT(slotDoubleClicked()));
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
setFocusProxy( charTable ); setFocusProxy( charTable );
} }

@ -124,7 +124,7 @@ KDateTable::KDateTable(TQWidget *parent, TQDate date_, const char* name, WFlags
kdDebug() << "KDateTable ctor: WARNING: Given date is invalid, using current date." << endl; kdDebug() << "KDateTable ctor: WARNING: Given date is invalid, using current date." << endl;
date_=TQDate::currentDate(); date_=TQDate::currentDate();
} }
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
setNumRows(7); // 6 weeks max + headline setNumRows(7); // 6 weeks max + headline
setNumCols(7); // 7 days a week setNumCols(7); // 7 days a week
setHScrollBarMode(AlwaysOff); setHScrollBarMode(AlwaysOff);
@ -140,7 +140,7 @@ KDateTable::KDateTable(TQWidget *parent, const char* name, WFlags f)
{ {
d = new KDateTablePrivate; d = new KDateTablePrivate;
setFontSize(10); setFontSize(10);
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
setNumRows(7); // 6 weeks max + headline setNumRows(7); // 6 weeks max + headline
setNumCols(7); // 7 days a week setNumCols(7); // 7 days a week
setHScrollBarMode(AlwaysOff); setHScrollBarMode(AlwaysOff);

@ -395,7 +395,7 @@ void KDialogBase::enableButtonSeparator( bool state )
return; return;
} }
mActionSep = new KSeparator( this ); mActionSep = new KSeparator( this );
mActionSep->setFocusPolicy(TQ_NoFocus); mActionSep->setFocusPolicy(TQWidget::NoFocus);
mActionSep->setOrientation( mButtonOrientation == Qt::Horizontal ? mActionSep->setOrientation( mButtonOrientation == Qt::Horizontal ?
TQFrame::HLine : TQFrame::VLine ); TQFrame::HLine : TQFrame::VLine );
mActionSep->show(); mActionSep->show();

@ -1167,7 +1167,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
panner->setOpaqueResize(manager->splitterOpaqueResize()); panner->setOpaqueResize(manager->splitterOpaqueResize());
panner->setKeepSize(manager->splitterKeepSize()); panner->setKeepSize(manager->splitterKeepSize());
panner->setFocusPolicy( TQ_NoFocus ); panner->setFocusPolicy( TQWidget::NoFocus );
target->applyToWidget( panner ); target->applyToWidget( panner );
applyToWidget( panner ); applyToWidget( panner );
target->formerDockPos = target->currentDockPos; target->formerDockPos = target->currentDockPos;

@ -625,7 +625,7 @@ KDockButton_Private::KDockButton_Private( TQWidget *parent, const char * name )
:TQPushButton( parent, name ) :TQPushButton( parent, name )
{ {
moveMouse = false; moveMouse = false;
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
} }
KDockButton_Private::~KDockButton_Private() KDockButton_Private::~KDockButton_Private()
@ -701,7 +701,7 @@ void KDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w)
{ {
if (w) { if (w) {
TQWidget* embeddedWdg = ((KDockWidget*)w)->getWidget(); TQWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQ_ClickFocus) || (embeddedWdg->focusPolicy() == TQ_StrongFocus))) { if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) {
embeddedWdg->setFocus(); embeddedWdg->setFocus();
} }
} }

@ -69,7 +69,7 @@ KKeyButton::KKeyButton(TQWidget *parent, const char *name)
: TQPushButton( parent, name ) : TQPushButton( parent, name )
{ {
d = new KKeyButtonPrivate; d = new KKeyButtonPrivate;
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
m_bEditing = false; m_bEditing = false;
connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureShortcut()) ); connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureShortcut()) );
setShortcut( TDEShortcut(), true ); setShortcut( TDEShortcut(), true );

@ -426,7 +426,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
{ {
/* We have to resize the pixmap to get it complete on the screen */ /* We have to resize the pixmap to get it complete on the screen */
TQImage image=m_originalPixmap.convertToImage(); TQImage image=m_originalPixmap.convertToImage();
m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQ_ScaleMin ) ); m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQImage::ScaleMin ) );
double oldZoomFactor = m_zoomFactor; double oldZoomFactor = m_zoomFactor;
m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width(); m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width();

@ -87,7 +87,7 @@ KURLLabel::KURLLabel (const TQString& url, const TQString& text,
setFont (font()); setFont (font());
setUseCursor (true); setUseCursor (true);
setLinkColor (d->LinkColor); setLinkColor (d->LinkColor);
setFocusPolicy( TQ_StrongFocus ); //better accessibility setFocusPolicy( TQWidget::StrongFocus ); //better accessibility
setMouseTracking (true); setMouseTracking (true);
} }
@ -98,7 +98,7 @@ KURLLabel::KURLLabel (TQWidget* parent, const char* name)
setFont (font()); setFont (font());
setUseCursor (true); setUseCursor (true);
setLinkColor (d->LinkColor); setLinkColor (d->LinkColor);
setFocusPolicy( TQ_StrongFocus ); //better accessibility setFocusPolicy( TQWidget::StrongFocus ); //better accessibility
setMouseTracking (true); setMouseTracking (true);
} }
@ -428,11 +428,11 @@ void KURLLabel::setMargin( int margin )
d->MarginAltered = true; d->MarginAltered = true;
} }
void KURLLabel::setFocusPolicy( TQ_FocusPolicy policy ) void KURLLabel::setFocusPolicy( TQWidget::FocusPolicy policy )
{ {
TQLabel::setFocusPolicy(policy); TQLabel::setFocusPolicy(policy);
if (!d->MarginAltered) { if (!d->MarginAltered) {
TQLabel::setMargin(policy == TQ_NoFocus ? 0 : 3); //better default : better look when focused TQLabel::setMargin(policy == TQWidget::NoFocus ? 0 : 3); //better default : better look when focused
} }
} }

@ -163,7 +163,7 @@ public:
*/ */
#ifdef qdoc #ifdef qdoc
#else #else
virtual void setFocusPolicy ( TQ_FocusPolicy policy ); virtual void setFocusPolicy ( TQWidget::FocusPolicy policy );
#endif #endif
/** /**

@ -630,7 +630,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f)
// See L0660, L0671, L0685. // See L0660, L0671, L0685.
initialize(); initialize();
window = 0; window = 0;
setFocusPolicy(TQ_StrongFocus); setFocusPolicy(TQWidget::StrongFocus);
setKeyCompression( false ); setKeyCompression( false );
// L0910: Trick Qt to create extraData(); // L0910: Trick Qt to create extraData();

@ -677,7 +677,7 @@ int TDESelectAction::plug( TQWidget *widget, int index )
TQComboBox *cb = bar->getCombo( id_ ); TQComboBox *cb = bar->getCombo( id_ );
if ( cb ) if ( cb )
{ {
if (!isEditable()) cb->setFocusPolicy(TQ_NoFocus); if (!isEditable()) cb->setFocusPolicy(TQWidget::NoFocus);
cb->setMinimumWidth( cb->sizeHint().width() ); cb->setMinimumWidth( cb->sizeHint().width() );
if ( d->m_comboWidth > 0 ) if ( d->m_comboWidth > 0 )
{ {

@ -61,7 +61,7 @@ TDECompletionBox::TDECompletionBox( TQWidget *parent, const char *name )
if ( parent ) if ( parent )
setFocusProxy( parent ); setFocusProxy( parent );
else else
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
setVScrollBarMode( Auto ); setVScrollBarMode( Auto );
setHScrollBarMode( AlwaysOff ); setHScrollBarMode( AlwaysOff );

@ -129,7 +129,7 @@ TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id,
this, TQT_SLOT( modeChange() )); this, TQT_SLOT( modeChange() ));
} }
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
// connect all of our slots and start trapping events // connect all of our slots and start trapping events
connect(this, TQT_SIGNAL( clicked() ), connect(this, TQT_SIGNAL( clicked() ),
@ -162,7 +162,7 @@ TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id,
this, TQT_SLOT( modeChange() )); this, TQT_SLOT( modeChange() ));
} }
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
// connect all of our slots and start trapping events // connect all of our slots and start trapping events
connect(this, TQT_SIGNAL( clicked() ), connect(this, TQT_SIGNAL( clicked() ),

Loading…
Cancel
Save