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