summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/actioneditorimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/actioneditorimpl.cpp')
-rw-r--r--kdevdesigner/designer/actioneditorimpl.cpp43
1 files changed, 22 insertions, 21 deletions
diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp
index ad014c9f..67cb0bdf 100644
--- a/kdevdesigner/designer/actioneditorimpl.cpp
+++ b/kdevdesigner/designer/actioneditorimpl.cpp
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,7 +17,7 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
@@ -45,8 +45,8 @@
#include <klocale.h>
-ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl )
- : ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 ),
+ActionEditor::ActionEditor( TQWidget* tqparent, const char* name, WFlags fl )
+ : ActionEditorBase( tqparent, name, fl ), currentAction( 0 ), formWindow( 0 ),
explicitlyClosed(false)
{
listActions->addColumn( i18n( "Actions" ) );
@@ -139,7 +139,7 @@ void ActionEditor::deleteAction()
++it;
}
if ( formWindow ) {
- formWindow->setActiveObject( formWindow->mainContainer() );
+ formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) );
if ( formWindow->formFile() )
formWindow->formFile()->setModified( TRUE );
}
@@ -149,8 +149,8 @@ void ActionEditor::newAction()
{
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
- if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) )
- actionParent = (ActionItem*)actionParent->parent();
+ if ( !::tqqt_cast<TQActionGroup*>(actionParent->actionGroup()) )
+ actionParent = (ActionItem*)actionParent->tqparent();
}
ActionItem *i = 0;
@@ -185,8 +185,8 @@ void ActionEditor::newActionGroup()
{
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
- if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) )
- actionParent = (ActionItem*)actionParent->parent();
+ if ( !::tqqt_cast<TQActionGroup*>(actionParent->actionGroup()) )
+ actionParent = (ActionItem*)actionParent->tqparent();
}
ActionItem *i = 0;
@@ -225,13 +225,13 @@ void ActionEditor::setFormWindow( FormWindow *fw )
listActions->clear();
formWindow = fw;
if ( !formWindow ||
- !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
+ !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
setEnabled( FALSE );
} else {
setEnabled( TRUE );
for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0;
- if ( ::qt_cast<TQAction*>(a->parent()) )
+ if ( ::tqqt_cast<TQAction*>(a->tqparent()) )
continue;
i = new ActionItem( listActions, a );
i->setText( 0, a->name() );
@@ -241,7 +241,7 @@ void ActionEditor::setFormWindow( FormWindow *fw )
this, TQT_SLOT( removeConnections( TQObject * ) ) );
TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
this, TQT_SLOT( removeConnections( TQObject* ) ) );
- if ( ::qt_cast<TQActionGroup*>(a) ) {
+ if ( ::tqqt_cast<TQActionGroup*>(a) ) {
insertChildActions( i );
}
}
@@ -254,13 +254,14 @@ void ActionEditor::setFormWindow( FormWindow *fw )
void ActionEditor::insertChildActions( ActionItem *i )
{
- if ( !i->actionGroup() || !i->actionGroup()->children() )
+ TQObjectList clo = i->actionGroup()->childrenListObject();
+ if ( !i->actionGroup() || clo.isEmpty() )
return;
- TQObjectListIt it( *i->actionGroup()->children() );
+ TQObjectListIt it( clo );
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::qt_cast<TQAction*>(o) )
+ if ( !::tqqt_cast<TQAction*>(o) )
continue;
TQAction *a = (TQAction*)o;
ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a );
@@ -272,7 +273,7 @@ void ActionEditor::insertChildActions( ActionItem *i )
this, TQT_SLOT( removeConnections( TQObject * ) ) );
TQObject::connect( o, TQT_SIGNAL( destroyed( TQObject * ) ),
this, TQT_SLOT( removeConnections( TQObject * ) ) );
- if ( ::qt_cast<TQActionGroup*>(a) )
+ if ( ::tqqt_cast<TQActionGroup*>(a) )
insertChildActions( i2 );
}
}
@@ -304,7 +305,7 @@ void ActionEditor::updateActionIcon( TQAction *a )
void ActionEditor::connectionsClicked()
{
ConnectionDialog dlg( formWindow->mainWindow() );
- dlg.setDefault( currentAction, formWindow );
+ dlg.setDefault( TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow) );
dlg.addConnection();
dlg.exec();
}
@@ -312,9 +313,9 @@ void ActionEditor::connectionsClicked()
void ActionEditor::removeConnections( TQObject *o )
{
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( formWindow, o );
+ MetaDataBase::connections( TQT_TQOBJECT(formWindow), o );
for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
it2 != conns.end(); ++it2 )
- MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
+ MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal,
(*it2).receiver, (*it2).slot );
}