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.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp
index 589525e4..ad014c9f 100644
--- a/kdevdesigner/designer/actioneditorimpl.cpp
+++ b/kdevdesigner/designer/actioneditorimpl.cpp
@@ -33,19 +33,19 @@
#include "hierarchyview.h"
#include "formfile.h"
-#include <qaction.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
-#include <qlistview.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qobjectlist.h>
+#include <tqaction.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqlistview.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqobjectlist.h>
#include <klocale.h>
-ActionEditor::ActionEditor( QWidget* parent, const char* name, WFlags fl )
+ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl )
: ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 ),
explicitlyClosed(false)
{
@@ -53,27 +53,27 @@ ActionEditor::ActionEditor( QWidget* parent, const char* name, WFlags fl )
setEnabled( FALSE );
buttonConnect->setEnabled( FALSE );
- QPopupMenu *popup = new QPopupMenu( this );
- popup->insertItem( i18n( "New &Action" ), this, SLOT( newAction() ) );
- popup->insertItem( i18n( "New Action &Group" ), this, SLOT( newActionGroup() ) );
- popup->insertItem( i18n( "New &Dropdown Action Group" ), this, SLOT( newDropDownActionGroup() ) );
+ TQPopupMenu *popup = new TQPopupMenu( this );
+ popup->insertItem( i18n( "New &Action" ), this, TQT_SLOT( newAction() ) );
+ popup->insertItem( i18n( "New Action &Group" ), this, TQT_SLOT( newActionGroup() ) );
+ popup->insertItem( i18n( "New &Dropdown Action Group" ), this, TQT_SLOT( newDropDownActionGroup() ) );
buttonNewAction->setPopup( popup );
buttonNewAction->setPopupDelay( 0 );
- connect( listActions, SIGNAL( insertAction() ), this, SLOT( newAction() ) );
- connect( listActions, SIGNAL( insertActionGroup() ), this, SLOT( newActionGroup() ) );
- connect( listActions, SIGNAL( insertDropDownActionGroup() ), this, SLOT( newDropDownActionGroup() ) );
- connect( listActions, SIGNAL( deleteAction() ), this, SLOT( deleteAction() ) );
- connect( listActions, SIGNAL( connectAction() ), this, SLOT( connectionsClicked() ) );
+ connect( listActions, TQT_SIGNAL( insertAction() ), this, TQT_SLOT( newAction() ) );
+ connect( listActions, TQT_SIGNAL( insertActionGroup() ), this, TQT_SLOT( newActionGroup() ) );
+ connect( listActions, TQT_SIGNAL( insertDropDownActionGroup() ), this, TQT_SLOT( newDropDownActionGroup() ) );
+ connect( listActions, TQT_SIGNAL( deleteAction() ), this, TQT_SLOT( deleteAction() ) );
+ connect( listActions, TQT_SIGNAL( connectAction() ), this, TQT_SLOT( connectionsClicked() ) );
}
-void ActionEditor::closeEvent( QCloseEvent *e )
+void ActionEditor::closeEvent( TQCloseEvent *e )
{
emit hidden();
e->accept();
}
-void ActionEditor::currentActionChanged( QListViewItem *i )
+void ActionEditor::currentActionChanged( TQListViewItem *i )
{
buttonConnect->setEnabled( i != 0 );
if ( !i )
@@ -86,9 +86,9 @@ void ActionEditor::currentActionChanged( QListViewItem *i )
MainWindow::self->objectHierarchy()->hierarchyList()->setCurrent( currentAction );
}
-void ActionEditor::setCurrentAction( QAction *a )
+void ActionEditor::setCurrentAction( TQAction *a )
{
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
while ( it.current() ) {
if ( ( (ActionItem*)it.current() )->action() == a || ( (ActionItem*)it.current() )->actionGroup() == a ) {
listActions->setCurrentItem( it.current() );
@@ -99,14 +99,14 @@ void ActionEditor::setCurrentAction( QAction *a )
}
}
-QAction *ActionEditor::newActionEx()
+TQAction *ActionEditor::newActionEx()
{
ActionItem *i = new ActionItem( listActions, (bool)FALSE );
- QAction *a = i->action();
- QObject::connect( a, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject* ) ) );
+ TQAction *a = i->action();
+ TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->action() );
- QString n = "Action";
+ TQString n = "Action";
formWindow->unify( i->action(), n, TRUE );
i->setText( 0, n );
i->action()->setName( n );
@@ -124,7 +124,7 @@ void ActionEditor::deleteAction()
if ( !currentAction )
return;
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
ActionItem *ai = 0;
while ( it.current() ) {
ai = (ActionItem*)it.current();
@@ -149,7 +149,7 @@ void ActionEditor::newAction()
{
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
- if ( !::qt_cast<QActionGroup*>(actionParent->actionGroup()) )
+ if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) )
actionParent = (ActionItem*)actionParent->parent();
}
@@ -158,11 +158,11 @@ void ActionEditor::newAction()
i = new ActionItem( actionParent );
else
i = new ActionItem( listActions, (bool)FALSE );
- QAction *a = i->action();
- QObject::connect( a, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject* ) ) );
+ TQAction *a = i->action();
+ TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->action() );
- QString n = "Action";
+ TQString n = "Action";
formWindow->unify( i->action(), n, TRUE );
i->setText( 0, n );
i->action()->setName( n );
@@ -185,7 +185,7 @@ void ActionEditor::newActionGroup()
{
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
- if ( !::qt_cast<QActionGroup*>(actionParent->actionGroup()) )
+ if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) )
actionParent = (ActionItem*)actionParent->parent();
}
@@ -194,12 +194,12 @@ void ActionEditor::newActionGroup()
i = new ActionItem( actionParent, TRUE );
else
i = new ActionItem( listActions, TRUE );
- QAction *ag = i->actionGroup();
- QObject::connect( ag, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject* ) ) );
+ TQAction *ag = i->actionGroup();
+ TQObject::connect( ag, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->actionGroup() );
MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", TRUE );
- QString n = "ActionGroup";
+ TQString n = "ActionGroup";
formWindow->unify( i->action(), n, TRUE );
i->setText( 0, n );
i->actionGroup()->setName( n );
@@ -225,23 +225,23 @@ void ActionEditor::setFormWindow( FormWindow *fw )
listActions->clear();
formWindow = fw;
if ( !formWindow ||
- !::qt_cast<QMainWindow*>(formWindow->mainContainer()) ) {
+ !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
setEnabled( FALSE );
} else {
setEnabled( TRUE );
- for ( QAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
+ for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0;
- if ( ::qt_cast<QAction*>(a->parent()) )
+ if ( ::qt_cast<TQAction*>(a->parent()) )
continue;
i = new ActionItem( listActions, a );
i->setText( 0, a->name() );
i->setPixmap( 0, a->iconSet().pixmap() );
// make sure we don't duplicate the connection
- QObject::disconnect( a, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject * ) ) );
- QObject::connect( a, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject* ) ) );
- if ( ::qt_cast<QActionGroup*>(a) ) {
+ TQObject::disconnect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject * ) ) );
+ TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject* ) ) );
+ if ( ::qt_cast<TQActionGroup*>(a) ) {
insertChildActions( i );
}
}
@@ -256,30 +256,30 @@ void ActionEditor::insertChildActions( ActionItem *i )
{
if ( !i->actionGroup() || !i->actionGroup()->children() )
return;
- QObjectListIt it( *i->actionGroup()->children() );
+ TQObjectListIt it( *i->actionGroup()->children() );
while ( it.current() ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
- if ( !::qt_cast<QAction*>(o) )
+ if ( !::qt_cast<TQAction*>(o) )
continue;
- QAction *a = (QAction*)o;
- ActionItem *i2 = new ActionItem( (QListViewItem*)i, a );
+ TQAction *a = (TQAction*)o;
+ ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a );
i->setOpen( TRUE );
i2->setText( 0, a->name() );
i2->setPixmap( 0, a->iconSet().pixmap() );
// make sure we don't duplicate the connection
- QObject::disconnect( o, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject * ) ) );
- QObject::connect( o, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject * ) ) );
- if ( ::qt_cast<QActionGroup*>(a) )
+ TQObject::disconnect( o, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject * ) ) );
+ TQObject::connect( o, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject * ) ) );
+ if ( ::qt_cast<TQActionGroup*>(a) )
insertChildActions( i2 );
}
}
-void ActionEditor::updateActionName( QAction *a )
+void ActionEditor::updateActionName( TQAction *a )
{
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
while ( it.current() ) {
if ( ( (ActionItem*)it.current() )->action() == a )
( (ActionItem*)it.current() )->setText( 0, a->name() );
@@ -289,9 +289,9 @@ void ActionEditor::updateActionName( QAction *a )
}
}
-void ActionEditor::updateActionIcon( QAction *a )
+void ActionEditor::updateActionIcon( TQAction *a )
{
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
while ( it.current() ) {
if ( ( (ActionItem*)it.current() )->action() == a )
( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() );
@@ -309,11 +309,11 @@ void ActionEditor::connectionsClicked()
dlg.exec();
}
-void ActionEditor::removeConnections( QObject *o )
+void ActionEditor::removeConnections( TQObject *o )
{
- QValueList<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, o );
- for ( QValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
+ for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
it2 != conns.end(); ++it2 )
MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
(*it2).receiver, (*it2).slot );