summaryrefslogtreecommitdiffstats
path: root/tdeui/kxmlguibuilder.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:13:01 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:13:01 -0600
commitdeac2ca49faed824fe83066080714eb6d653615b (patch)
tree8b5bf97c5acaaf5285985b87fa76dbea0f35e4fa /tdeui/kxmlguibuilder.cpp
parent0c9d97065a3d6ceb12d687555a1a33d90db96238 (diff)
downloadtdelibs-deac2ca49faed824fe83066080714eb6d653615b.tar.gz
tdelibs-deac2ca49faed824fe83066080714eb6d653615b.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'tdeui/kxmlguibuilder.cpp')
-rw-r--r--tdeui/kxmlguibuilder.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp
index 32083a2c3..817a54514 100644
--- a/tdeui/kxmlguibuilder.cpp
+++ b/tdeui/kxmlguibuilder.cpp
@@ -116,9 +116,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
id = -1;
if ( element.tagName().lower() == d->tagMainWindow )
{
- KMainWindow *mainwindow = 0;
- if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) )
- mainwindow = static_cast<KMainWindow *>(d->m_widget);
+ TDEMainWindow *mainwindow = 0;
+ if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) )
+ mainwindow = static_cast<TDEMainWindow *>(d->m_widget);
return mainwindow;
}
@@ -127,8 +127,8 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
{
KMenuBar *bar;
- if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) )
- bar = static_cast<KMainWindow *>(d->m_widget)->menuBar();
+ if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) )
+ bar = static_cast<TDEMainWindow *>(d->m_widget)->menuBar();
else
bar = new KMenuBar( d->m_widget );
@@ -145,15 +145,15 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
// And we don't want to set the parent for a standalone popupmenu,
// otherwise its shortcuts appear.
TQWidget* p = parent;
- while ( p && !::tqqt_cast<KMainWindow *>( p ) )
+ while ( p && !::tqqt_cast<TDEMainWindow *>( p ) )
p = p->parentWidget();
TQCString name = element.attribute( d->attrName ).utf8();
- if (!kapp->authorizeKAction(name))
+ if (!kapp->authorizeTDEAction(name))
return 0;
- KPopupMenu *popup = new KPopupMenu( p, name);
+ TDEPopupMenu *popup = new TDEPopupMenu( p, name);
TQString i18nText;
TQDomElement textElem = element.namedItem( d->attrText1 ).toElement();
@@ -205,13 +205,13 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
TQCString name = element.attribute( d->attrName ).utf8();
- KToolBar *bar = static_cast<KToolBar*>(TQT_TQWIDGET(d->m_widget->child( name, "KToolBar" )));
+ TDEToolBar *bar = static_cast<TDEToolBar*>(TQT_TQWIDGET(d->m_widget->child( name, "TDEToolBar" )));
if( !bar )
{
- bar = new KToolBar( d->m_widget, name, honor, false );
+ bar = new TDEToolBar( d->m_widget, name, honor, false );
}
- if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) )
+ if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) )
{
if ( d->m_client && !d->m_client->xmlFile().isEmpty() )
bar->setXMLGUIClient( d->m_client );
@@ -224,9 +224,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
if ( element.tagName().lower() == d->tagStatusBar )
{
- if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) )
+ if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) )
{
- KMainWindow *mainWin = static_cast<KMainWindow *>(d->m_widget);
+ TDEMainWindow *mainWin = static_cast<TDEMainWindow *>(d->m_widget);
mainWin->statusBar()->show();
return mainWin->statusBar();
}
@@ -253,9 +253,9 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD
delete container;
}
- else if ( ::tqqt_cast<KToolBar *>( container ) )
+ else if ( ::tqqt_cast<TDEToolBar *>( container ) )
{
- KToolBar *tb = static_cast<KToolBar *>( container );
+ TDEToolBar *tb = static_cast<TDEToolBar *>( container );
tb->saveState( element );
delete tb;
@@ -271,7 +271,7 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD
}
else if ( ::tqqt_cast<KStatusBar *>( container ) )
{
- if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) )
+ if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) )
container->hide();
else
delete static_cast<KStatusBar *>(container);
@@ -319,9 +319,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo
}
else if ( ::tqqt_cast<TQMenuBar *>( parent ) )
return static_cast<TQMenuBar *>(parent)->insertSeparator( index );
- else if ( ::tqqt_cast<KToolBar *>( parent ) )
+ else if ( ::tqqt_cast<TDEToolBar *>( parent ) )
{
- KToolBar *bar = static_cast<KToolBar *>( parent );
+ TDEToolBar *bar = static_cast<TDEToolBar *>( parent );
bool isLineSep = true;
@@ -339,7 +339,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo
}
}
- int id = KAction::getToolButtonID();
+ int id = TDEAction::getToolButtonID();
if ( isLineSep )
bar->insertLineSeparator( index, id );
@@ -356,7 +356,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo
}
else if ( element.tagName().lower() == d->tagMenuTitle )
{
- if ( ::tqqt_cast<KPopupMenu *>( parent ) )
+ if ( ::tqqt_cast<TDEPopupMenu *>( parent ) )
{
TQString i18nText;
TQCString text = element.text().utf8();
@@ -379,9 +379,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo
}
if ( !icon.isEmpty() )
- return static_cast<KPopupMenu *>(parent)->insertTitle( pix, i18nText, -1, index );
+ return static_cast<TDEPopupMenu *>(parent)->insertTitle( pix, i18nText, -1, index );
else
- return static_cast<KPopupMenu *>(parent)->insertTitle( i18nText, -1, index );
+ return static_cast<TDEPopupMenu *>(parent)->insertTitle( i18nText, -1, index );
}
}
return 0;
@@ -393,8 +393,8 @@ void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id )
static_cast<TQPopupMenu *>(parent)->removeItem( id );
else if ( ::tqqt_cast<TQMenuBar *>( parent ) )
static_cast<TQMenuBar *>(parent)->removeItem( id );
- else if ( ::tqqt_cast<KToolBar *>( parent ) )
- static_cast<KToolBar *>(parent)->removeItemDelayed( id );
+ else if ( ::tqqt_cast<TDEToolBar *>( parent ) )
+ static_cast<TDEToolBar *>(parent)->removeItemDelayed( id );
}
KXMLGUIClient *KXMLGUIBuilder::builderClient() const
@@ -421,18 +421,18 @@ void KXMLGUIBuilder::setBuilderInstance( TDEInstance *instance )
void KXMLGUIBuilder::finalizeGUI( KXMLGUIClient * )
{
- if ( !d->m_widget || !::tqqt_cast<KMainWindow *>( d->m_widget ) )
+ if ( !d->m_widget || !::tqqt_cast<TDEMainWindow *>( d->m_widget ) )
return;
#if 0
- KToolBar *toolbar = 0;
- QListIterator<KToolBar> it( ( (KMainWindow*)d->m_widget )->toolBarIterator() );
+ TDEToolBar *toolbar = 0;
+ QListIterator<TDEToolBar> it( ( (TDEMainWindow*)d->m_widget )->toolBarIterator() );
while ( ( toolbar = it.current() ) ) {
kdDebug() << "KXMLGUIBuilder::finalizeGUI toolbar=" << (void*)toolbar << endl;
++it;
toolbar->positionYourself();
}
#else
- static_cast<KMainWindow *>(d->m_widget)->finalizeGUI( false );
+ static_cast<TDEMainWindow *>(d->m_widget)->finalizeGUI( false );
#endif
}