summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/connectionitems.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/connectionitems.cpp')
-rw-r--r--kdevdesigner/designer/connectionitems.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp
index 895b35ee..efb2406a 100644
--- a/kdevdesigner/designer/connectionitems.cpp
+++ b/kdevdesigner/designer/connectionitems.cpp
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 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.
@@ -49,11 +49,11 @@ static const char* const ignore_slots[] = {
"update()",
"update(int,int,int,int)",
"update(const TQRect&)",
- "repaint()",
- "repaint(bool)",
- "repaint(int,int,int,int,bool)",
- "repaint(const TQRect&,bool)",
- "repaint(const TQRegion&,bool)",
+ "tqrepaint()",
+ "tqrepaint(bool)",
+ "tqrepaint(int,int,int,int,bool)",
+ "tqrepaint(const TQRect&,bool)",
+ "tqrepaint(const TQRegion&,bool)",
"show()",
"hide()",
"iconify()",
@@ -170,7 +170,7 @@ void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg,
p->setFont( f );
}
- p->drawText( x + 2, 0, w - x - 4, h, alignment(), currentText() );
+ p->drawText( x + 2, 0, w - x - 4, h, tqalignment(), currentText() );
p->setFont( oldf );
}
@@ -183,14 +183,14 @@ void ConnectionItem::setConnection( ConnectionContainer *c )
static void appendChildActions( TQAction *action, TQStringList &lst )
{
- TQObjectListIt it( *action->children() );
+ TQObjectListIt it( action->childrenListObject() );
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::qt_cast<TQAction*>(o) )
+ if ( !::tqqt_cast<TQAction*>(o) )
continue;
lst << o->name();
- if ( o->children() && ::qt_cast<TQActionGroup*>(o) )
+ if ( !o->childrenListObject().isEmpty() && ::tqqt_cast<TQActionGroup*>(o) )
appendChildActions( (TQAction*)o, lst );
}
}
@@ -203,7 +203,7 @@ static TQStringList flatActions( const TQPtrList<TQAction> &l )
while ( it.current() ) {
TQAction *action = it.current();
lst << action->name();
- if ( action->children() && ::qt_cast<TQActionGroup*>(action) )
+ if ( !action->childrenListObject().isEmpty() && ::tqqt_cast<TQActionGroup*>(action) )
appendChildActions( action, lst );
++it;
}
@@ -220,14 +220,14 @@ SenderItem::SenderItem( TQTable *table, FormWindow *fw )
TQPtrDictIterator<TQWidget> it( *formWindow->widgets() );
while ( it.current() ) {
- if ( lst.find( it.current()->name() ) != lst.end() ) {
+ if ( lst.tqfind( it.current()->name() ) != lst.end() ) {
++it;
continue;
}
if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
- !::qt_cast<QLayoutWidget*>(it.current()) &&
- !::qt_cast<Spacer*>(it.current()) &&
- !::qt_cast<SizeHandle*>(it.current()) &&
+ !::tqqt_cast<TQLayoutWidget*>(it.current()) &&
+ !::tqqt_cast<Spacer*>(it.current()) &&
+ !::tqqt_cast<SizeHandle*>(it.current()) &&
qstrcmp( it.current()->name(), "central widget" ) != 0 ) {
lst << it.current()->name();
}
@@ -277,14 +277,14 @@ ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw )
TQPtrDictIterator<TQWidget> it( *formWindow->widgets() );
while ( it.current() ) {
- if ( lst.find( it.current()->name() ) != lst.end() ) {
+ if ( lst.tqfind( it.current()->name() ) != lst.end() ) {
++it;
continue;
}
if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
- !::qt_cast<QLayoutWidget*>(it.current()) &&
- !::qt_cast<Spacer*>(it.current()) &&
- !::qt_cast<SizeHandle*>(it.current()) &&
+ !::tqqt_cast<TQLayoutWidget*>(it.current()) &&
+ !::tqqt_cast<Spacer*>(it.current()) &&
+ !::tqqt_cast<SizeHandle*>(it.current()) &&
qstrcmp( it.current()->name(), "central widget" ) != 0 ) {
lst << it.current()->name();
}
@@ -338,7 +338,7 @@ SignalItem::SignalItem( TQTable *table, FormWindow *fw )
void SignalItem::senderChanged( TQObject *sender )
{
- TQStrList sigs = sender->metaObject()->signalNames( TRUE );
+ TQStrList sigs = sender->tqmetaObject()->signalNames( TRUE );
sigs.remove( "destroyed()" );
sigs.remove( "destroyed(TQObject*)" );
sigs.remove( "accessibilityChanged(int)" );
@@ -346,15 +346,15 @@ void SignalItem::senderChanged( TQObject *sender )
TQStringList lst = TQStringList::fromStrList( sigs );
- if ( ::qt_cast<CustomWidget*>(sender) ) {
+ if ( ::tqqt_cast<CustomWidget*>(sender) ) {
MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget();
for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin();
it != w->lstSignals.end(); ++it )
lst << MetaDataBase::normalizeFunction( *it );
}
- if ( sender == formWindow->mainContainer() ) {
- TQStringList extra = MetaDataBase::signalList( formWindow );
+ if ( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(formWindow->mainContainer()) ) {
+ TQStringList extra = MetaDataBase::signalList( TQT_TQOBJECT(formWindow) );
if ( !extra.isEmpty() )
lst += extra;
}
@@ -406,9 +406,9 @@ void SlotItem::signalChanged( const TQString &signal )
bool SlotItem::ignoreSlot( const char* slot ) const
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( qstrcmp( slot, "update()" ) == 0 &&
- ::qt_cast<TQDataBrowser*>(lastReceiver) )
+ ::tqqt_cast<TQDataBrowser*>(lastReceiver) )
return FALSE;
#endif
@@ -417,14 +417,14 @@ bool SlotItem::ignoreSlot( const char* slot ) const
return TRUE;
}
- if ( !formWindow->isMainContainer( (TQWidget*)lastReceiver ) ) {
+ if ( !formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) {
if ( qstrcmp( slot, "close()" ) == 0 )
return TRUE;
}
if ( qstrcmp( slot, "setFocus()" ) == 0 )
if ( lastReceiver->isWidgetType() &&
- ( (TQWidget*)lastReceiver )->focusPolicy() == TQWidget::NoFocus )
+ ( (TQWidget*)lastReceiver )->focusPolicy() == TQ_NoFocus )
return TRUE;
return FALSE;
@@ -441,27 +441,27 @@ void SlotItem::updateSlotList()
}
TQString signal = MetaDataBase::normalizeFunction( lastSignal );
- int n = lastReceiver->metaObject()->numSlots( TRUE );
+ int n = lastReceiver->tqmetaObject()->numSlots( TRUE );
TQStringList slts;
for( int i = 0; i < n; ++i ) {
// accept only public slots. For the form window, also accept protected slots
- const QMetaData* md = lastReceiver->metaObject()->slot( i, TRUE );
- if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->access == QMetaData::Public) ||
- (formWindow->isMainContainer( (TQWidget*)lastReceiver ) &&
- lastReceiver->metaObject()->slot(i, TRUE)->access ==
- QMetaData::Protected) ) &&
- !ignoreSlot( md->name ) &&
- checkConnectArgs( signal.latin1(), lastReceiver, md->name ) )
- if ( lst.find( md->name ) == lst.end() )
- lst << MetaDataBase::normalizeFunction( md->name );
+ const TQMetaData* md = lastReceiver->tqmetaObject()->slot( i, TRUE );
+ if ( ( (lastReceiver->tqmetaObject()->slot( i, TRUE )->tqt_mo_access == TQMetaData::Public) ||
+ (formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) &&
+ lastReceiver->tqmetaObject()->slot(i, TRUE)->tqt_mo_access ==
+ TQMetaData::Protected) ) &&
+ !ignoreSlot( md->tqt_mo_ci_name ) &&
+ checkConnectArgs( signal.latin1(), lastReceiver, md->tqt_mo_ci_name ) )
+ if ( lst.tqfind( md->tqt_mo_ci_name ) == lst.end() )
+ lst << MetaDataBase::normalizeFunction( md->tqt_mo_ci_name );
}
LanguageInterface *iface =
MetaDataBase::languageInterface( formWindow->project()->language() );
if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) {
- if ( formWindow->isMainContainer( (TQWidget*)lastReceiver ) ) {
- TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( formWindow );
+ if ( formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) {
+ TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( TQT_TQOBJECT(formWindow) );
if ( !moreSlots.isEmpty() ) {
for ( TQValueList<MetaDataBase::Function>::Iterator it = moreSlots.begin();
it != moreSlots.end(); ++it ) {
@@ -470,7 +470,7 @@ void SlotItem::updateSlotList()
continue;
s = MetaDataBase::normalizeFunction( s );
if ( checkConnectArgs( signal.latin1(), lastReceiver, s ) ) {
- if ( lst.find( (*it).function ) == lst.end() )
+ if ( lst.tqfind( (*it).function ) == lst.end() )
lst << s;
}
}
@@ -478,7 +478,7 @@ void SlotItem::updateSlotList()
}
}
- if ( ::qt_cast<CustomWidget*>(lastReceiver) ) {
+ if ( ::tqqt_cast<CustomWidget*>(lastReceiver) ) {
MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget();
for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin();
it != w->lstSlots.end(); ++it ) {
@@ -487,7 +487,7 @@ void SlotItem::updateSlotList()
continue;
s = MetaDataBase::normalizeFunction( s );
if ( checkConnectArgs( signal.latin1(), lastReceiver, s ) ) {
- if ( lst.find( (*it).function ) == lst.end() )
+ if ( lst.tqfind( (*it).function ) == lst.end() )
lst << s;
}
}