summaryrefslogtreecommitdiffstats
path: root/kommander/factory/kommanderfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/factory/kommanderfactory.cpp')
-rw-r--r--kommander/factory/kommanderfactory.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp
index 57737fb7..f3cbb0e1 100644
--- a/kommander/factory/kommanderfactory.cpp
+++ b/kommander/factory/kommanderfactory.cpp
@@ -131,7 +131,7 @@ TQWidget *KommanderFactory::create( const TQString &uiFile, TQObject *connector,
if (!qwf_currFileName)
qwf_currFileName = new TQString();
*qwf_currFileName = uiFile;
- TQWidget *w = KommanderFactory::create( TQT_TQIODEVICE(&f), connector, parent, name );
+ TQWidget *w = KommanderFactory::create( &f, connector, parent, name );
if ( !qwf_forms )
qwf_forms = new TQMap<TQWidget*, TQString>;
qwf_forms->insert( w, uiFile );
@@ -517,7 +517,7 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
// hide layout widgets
w = parent;
} else {
- obj = TQT_TQOBJECT(KommanderFactory::createWidget( className, parent, 0 ));
+ obj = KommanderFactory::createWidget( className, parent, 0 );
if ( !obj )
{
return 0;
@@ -563,7 +563,7 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
layout = createLayout( 0, 0, KommanderFactory::HBox );
else
layout = createLayout( w, layout, KommanderFactory::HBox );
- obj = TQT_TQOBJECT(layout);
+ obj = layout;
n = n.firstChild().toElement();
if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
@@ -574,7 +574,7 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
layout = createLayout( 0, 0, KommanderFactory::Grid );
else
layout = createLayout( w, layout, KommanderFactory::Grid );
- obj = TQT_TQOBJECT(layout);
+ obj = layout;
n = n.firstChild().toElement();
if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
@@ -585,7 +585,7 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
layout = createLayout( 0, 0, KommanderFactory::VBox );
else
layout = createLayout( w, layout, KommanderFactory::VBox );
- obj = TQT_TQOBJECT(layout);
+ obj = layout;
n = n.firstChild().toElement();
if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
@@ -636,7 +636,7 @@ TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* layout, L
if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
- gb->setColumnLayout( 0, Qt::Vertical );
+ gb->setColumnLayout( 0, TQt::Vertical );
gb->layout()->setMargin( 0 );
gb->layout()->setSpacing( 0 );
TQLayout *l;
@@ -827,7 +827,7 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T
}
if ( prop == "geometry" ) {
- if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) {
+ if ( obj == toplevel ) {
toplevel->resize( v.toRect().size() );
return;
}
@@ -844,7 +844,7 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
int rowspan = e.attribute( "rowspan" ).toInt();
int colspan = e.attribute( "colspan" ).toInt();
- Qt::Orientation orient = Qt::Horizontal;
+ TQt::Orientation orient = TQt::Horizontal;
int w = 0, h = 0;
TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred;
while ( !n.isNull() ) {
@@ -852,9 +852,9 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
TQString prop = n.attribute( "name" );
if ( prop == "orientation" ) {
if ( n.firstChild().firstChild().toText().data() == "Horizontal" )
- orient = Qt::Horizontal;
+ orient = TQt::Horizontal;
else
- orient = Qt::Vertical;
+ orient = TQt::Vertical;
} else if ( prop == "sizeType" ) {
if ( n.firstChild().firstChild().toText().data() == "Fixed" )
sizeType = TQSizePolicy::Fixed;
@@ -880,14 +880,14 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
rowspan = 1;
if ( colspan < 1 )
colspan = 1;
- TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum,
- orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum );
+ TQSpacerItem *item = new TQSpacerItem( w, h, orient == TQt::Horizontal ? sizeType : TQSizePolicy::Minimum,
+ orient == TQt::Vertical ? sizeType : TQSizePolicy::Minimum );
if ( layout ) {
if ( layout->inherits( "TQBoxLayout" ) )
( (TQBoxLayout*)layout )->addItem( item );
else
( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
- orient == Qt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter );
+ orient == TQt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter );
}
}
@@ -1022,7 +1022,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
if ( n2.tagName() == "sender" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || name == toplevel->name() ) {
- conn.sender = TQT_TQOBJECT(toplevel);
+ conn.sender = toplevel;
} else {
if ( name == "this" )
name = toplevel->name();
@@ -1040,7 +1040,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
} else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || name == toplevel->name() ) {
- conn.receiver = TQT_TQOBJECT(toplevel);
+ conn.receiver = toplevel;
} else {
TQObjectList *l = toplevel->queryList( 0, name.utf8(), false );
if ( l ) {
@@ -1061,7 +1061,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
TQObject *sender = 0, *receiver = 0;
TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
- sender = TQT_TQOBJECT(toplevel);
+ sender = toplevel;
} else {
if ( !l || !l->first() ) {
delete l;
@@ -1075,7 +1075,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
sender = findAction( conn.sender->name() );
if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
- receiver = TQT_TQOBJECT(toplevel);
+ receiver = toplevel;
} else {
l = toplevel->queryList( 0, conn.receiver->name(), false );
if ( !l || !l->first() ) {
@@ -1097,7 +1097,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
TQStrList slotList = receiver->metaObject()->slotNames( true );
// if this is a connection to a custom slot and we have a connector, try this as receiver
- if ( slotList.find( conn.slot ) == -1 && TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel) && connector ) {
+ if ( slotList.find( conn.slot ) == -1 && receiver == toplevel && connector ) {
slotList = connector->metaObject()->slotNames( true );
receiver = connector;
}
@@ -1386,9 +1386,9 @@ void KommanderFactory::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
- loadChildAction( TQT_TQOBJECT(toplevel), n );
+ loadChildAction( toplevel, n );
} else if ( n.tagName() == "actiongroup" ) {
- loadChildAction( TQT_TQOBJECT(toplevel), n );
+ loadChildAction( toplevel, n );
}
n = n.nextSibling().toElement();
}
@@ -1416,7 +1416,7 @@ void KommanderFactory::loadToolBars( const TQDomElement &e )
} else if ( n2.tagName() == "widget" ) {
(void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) );
} else if ( n2.tagName() == "property" ) {
- setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() );
+ setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
}
@@ -1447,7 +1447,7 @@ void KommanderFactory::loadMenuBar( const TQDomElement &e )
}
mb->insertItem( translate( n.attribute( "text" ) ), popup );
} else if ( n.tagName() == "property" ) {
- setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() );
+ setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
}
n = n.nextSibling().toElement();
}