summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/formwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/formwindow.cpp')
-rw-r--r--kdevdesigner/designer/formwindow.cpp162
1 files changed, 81 insertions, 81 deletions
diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp
index 2dc7bb9d..cff5fd2f 100644
--- a/kdevdesigner/designer/formwindow.cpp
+++ b/kdevdesigner/designer/formwindow.cpp
@@ -156,7 +156,7 @@ void FormWindow::init()
setWFlags(getWFlags() & TQt::WStyle_Maximize);
fake = qstrcmp( name(), "qt_fakewindow" ) == 0;
- MetaDataBase::addEntry( TQT_TQOBJECT(this) );
+ MetaDataBase::addEntry( this );
ff->setFormWindow( this );
iface = 0;
proj = 0;
@@ -200,7 +200,7 @@ void FormWindow::init()
TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this );
setMainContainer( w );
- propertyWidget = TQT_TQOBJECT(w);
+ propertyWidget = w;
targetContainer = 0;
hadOwnPalette = FALSE;
@@ -212,7 +212,7 @@ void FormWindow::init()
void FormWindow::setMainWindow( MainWindow *w )
{
mainwindow = w;
- MetaDataBase::addEntry( TQT_TQOBJECT(this) );
+ MetaDataBase::addEntry( this );
initSlots();
}
@@ -236,7 +236,7 @@ FormWindow::~FormWindow()
if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this )
MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 );
- MetaDataBase::clear( TQT_TQOBJECT(this) );
+ MetaDataBase::clear( this );
if ( ff )
ff->setFormWindow( 0 );
delete iface;
@@ -375,7 +375,7 @@ void FormWindow::insertWidget()
pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() );
( (TQLabel*)w )->setPixmap( pix );
}
- int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) );
+ int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) );
if ( WidgetDatabase::isCustomWidget( id ) ) {
TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
@@ -393,7 +393,7 @@ void FormWindow::insertWidget()
}
TQString s = w->name();
- unify( TQT_TQOBJECT(w), s, TRUE );
+ unify( w, s, TRUE );
w->setName( s );
insertWidget( w );
TQRect r( currRect );
@@ -429,7 +429,7 @@ void FormWindow::insertWidget()
const TQObjectList l = insertParent->childrenListObject();
TQObjectListIt it( l );
TQWidgetList lst;
- if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) {
+ if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
for ( ; it.current(); ) {
TQObject *o = it.current();
++it;
@@ -497,12 +497,12 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
return;
if ( checkName ) {
TQString s = w->name();
- unify( TQT_TQOBJECT(w), s, TRUE );
+ unify( w, s, TRUE );
w->setName( s );
}
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
- int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) );
+ MetaDataBase::addEntry( w );
+ int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) );
if ( WidgetDatabase::isCustomWidget( id ) ) {
TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
@@ -526,7 +526,7 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
void FormWindow::removeWidget( TQWidget *w )
{
- MetaDataBase::removeEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::removeEntry( w );
widgets()->take( w );
}
@@ -535,9 +535,9 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w )
CHECK_MAINWINDOW;
switch ( currTool ) {
case POINTER_TOOL: {
- if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
+ if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
raiseChildSelections( w ); // raise selections and select widget
- selectWidget( TQT_TQOBJECT(w) );
+ selectWidget( w );
// if widget is laid out, find the first non-laid out super-widget
TQWidget *realWidget = w; // but store the original one
while ( w->parentWidget() &&
@@ -576,7 +576,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
switch ( currTool ) {
case POINTER_TOOL:
- if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
+ if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
// if the clicked widget is not in a layout, raise it
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
w->raise();
@@ -587,7 +587,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
break;
}
- bool sel = isWidgetSelected( TQT_TQOBJECT(w) );
+ bool sel = isWidgetSelected( w );
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed...
if ( !sel ) { // ...and widget no selectted: unselect all
clearSelection( FALSE );
@@ -600,7 +600,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
if ( !o->isWidgetType() )
continue;
if ( insertedWidgets.find( (TQWidget*)o ) )
- selectWidget( TQT_TQOBJECT(o), FALSE );
+ selectWidget( o, FALSE );
}
setPropertyShowingBlocked( FALSE );
delete l;
@@ -610,12 +610,12 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
}
if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) &&
sel && e->button() == TQt::LeftButton ) { // control pressed and selected, unselect widget
- selectWidget( TQT_TQOBJECT(w), FALSE );
+ selectWidget( w, FALSE );
break;
}
raiseChildSelections( w ); // raise selections and select widget
- selectWidget( TQT_TQOBJECT(w) );
+ selectWidget( w );
// if widget is laid out, find the first non-laid out super-widget
while ( w->parentWidget() &&
@@ -629,7 +629,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
origPressPos = oldPressPos;
checkedSelectionsForMove = FALSE;
moving.clear();
- if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) {
+ if ( w->parentWidget() && !isMainContainer( w->parentWidget() ) && !isCentralWidget( w->parentWidget() ) ) {
targetContainer = w->parentWidget();
hadOwnPalette = w->parentWidget()->ownPalette();
restorePalette = w->parentWidget()->palette();
@@ -641,7 +641,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) {
clearSelection( FALSE );
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
}
@@ -667,13 +667,13 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
saveBackground();
startPos = mapFromGlobal( e->globalPos() );
currentPos = startPos;
- startWidget = designerWidget( TQT_TQOBJECT(w) );
+ startWidget = designerWidget( w );
endWidget = startWidget;
beginUnclippedPainter( FALSE );
drawConnectionLine();
break;
case ORDER_TOOL:
- if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget
+ if ( !isMainContainer( w ) ) { // press on a child widget
orderedWidgets.removeRef( w );
orderedWidgets.append( w );
for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
@@ -693,10 +693,10 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
default: // any insert widget tool
if ( e->button() == TQt::LeftButton ) {
insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow
- if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent
+ if ( !isMainContainer( w ) ) { // press was not on formwindow, check if we can find another parent
TQWidget *wid = w;
for (;;) {
- int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) );
+ int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) );
if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) &&
!::tqt_cast<TQLayoutWidget*>(wid) && !::tqt_cast<TQSplitter*>(wid) ) {
insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it
@@ -719,7 +719,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
CHECK_MAINWINDOW;
switch ( currTool ) {
case ORDER_TOOL:
- if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget
+ if ( !isMainContainer( w ) ) { // press on a child widget
orderedWidgets.clear();
orderedWidgets.append( w );
for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
@@ -736,7 +736,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
updateOrderIndicators();
}
default:
- if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) &&
+ if ( !WidgetFactory::isPassiveInteractor( w ) &&
( isMainContainer( w ) || w == this ) )
mainWindow()->editSource();
break;
@@ -799,9 +799,9 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move
if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected...
- if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time
+ if ( !isWidgetSelected( w ) ) { // and unselect others. Only siblings can be moved at the same time
setPropertyShowingBlocked( TRUE );
- selectWidget( TQT_TQOBJECT(w) );
+ selectWidget( w );
setPropertyShowingBlocked( FALSE );
}
checkSelectionsForMove( w );
@@ -810,7 +810,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
// check whether we would have to reparent the selection and highlight the possible new parent container
TQMapConstIterator<TQWidget*, TQPoint> it = moving.begin();
TQWidget* wa = containerAt( e->globalPos(), it.key() );
- if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) {
+ if ( wa && !isMainContainer( wa ) && !isCentralWidget( wa ) ) {
wa = WidgetFactory::containerOfWidget( wa );
// ok, looks like we moved onto a container
@@ -862,14 +862,14 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
restoreConnectionLine();
wid = tqApp->widgetAt( e->globalPos(), TRUE );
if ( wid )
- wid = designerWidget( TQT_TQOBJECT(wid) );
- if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
+ wid = designerWidget( wid );
+ if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
newendWidget = wid;
if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) )
newendWidget = (TQWidget*)endWidget;
drawRecRect = newendWidget != endWidget;
if ( newendWidget &&
- ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) )
+ ( isMainContainer( newendWidget ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( newendWidget ) )
endWidget = newendWidget;
mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ).
arg( endWidget->name() ) );
@@ -886,7 +886,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
restoreConnectionLine();
wid = tqApp->widgetAt( e->globalPos(), TRUE );
if ( wid )
- wid = designerWidget( TQT_TQOBJECT(wid) );
+ wid = designerWidget( wid );
if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) )
newendWidget = wid;
else
@@ -896,7 +896,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
drawRecRect = newendWidget != endWidget;
if ( !newendWidget )
endWidget = newendWidget;
- else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) )
+ else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( newendWidget ) )
endWidget = newendWidget;
if ( endWidget )
mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ).
@@ -981,7 +981,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) )
emitSelChanged = TRUE;
if ( !::tqt_cast<TQButtonGroup*>(wa) ) {
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE );
+ MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE );
if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) )
( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i );
}
@@ -990,12 +990,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
i->reparent( wa, pos, TRUE );
raiseSelection( i );
raiseChildSelections( i );
- widgetChanged( TQT_TQOBJECT(i) );
+ widgetChanged( i );
mainWindow()->objectHierarchy()->widgetRemoved( i );
mainWindow()->objectHierarchy()->widgetInserted( i );
}
if ( emitSelChanged ) {
- emit showProperties( TQT_TQOBJECT(wa) );
+ emit showProperties( wa );
emit showProperties( propertyWidget );
}
newParent = wa;
@@ -1045,13 +1045,13 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
if ( oldBuddy.isNull() )
oldBuddy = "";
SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ),
- this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(),
+ this, startWidget, mainWindow()->propertyeditor(),
"buddy", startWidget->property( "buddy" ),
endWidget->name(), endWidget->name(),
oldBuddy );
commandHistory()->addCommand( cmd, TRUE );
cmd->execute();
- emitUpdateProperties( TQT_TQOBJECT(startWidget) );
+ emitUpdateProperties( startWidget );
}
}
if ( !toolFixed )
@@ -1163,7 +1163,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
TQObjectList *l = queryList( "TQWidget" );
if ( !l )
return;
- if ( l->find( TQT_TQOBJECT(w) ) != -1 )
+ if ( l->find( w ) != -1 )
e->accept();
delete l;
}
@@ -1185,9 +1185,9 @@ void FormWindow::selectWidget( TQObject *o, bool select )
TQWidget *w = (TQWidget*)o;
- if ( isMainContainer( TQT_TQOBJECT(w) ) ) {
+ if ( isMainContainer( w ) ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
@@ -1196,7 +1196,7 @@ void FormWindow::selectWidget( TQObject *o, bool select )
if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
@@ -1208,7 +1208,7 @@ void FormWindow::selectWidget( TQObject *o, bool select )
if ( select ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(w);
+ propertyWidget = w;
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
if ( !isPropertyShowingBlocked() )
@@ -1238,9 +1238,9 @@ void FormWindow::selectWidget( TQObject *o, bool select )
s->setWidget( 0 );
TQObject *opw = propertyWidget;
if ( !usedSelections.isEmpty() )
- propertyWidget = TQT_TQOBJECT(TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget());
+ propertyWidget = TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget();
else
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
if ( !isPropertyShowingBlocked() )
@@ -1260,7 +1260,7 @@ void FormWindow::updateSelection( TQWidget *w )
{
WidgetSelection *s = usedSelections.find( w );
if ( !w->isVisibleTo( this ) )
- selectWidget( TQT_TQOBJECT(w), FALSE );
+ selectWidget( w, FALSE );
else if ( s )
s->updateGeometry();
}
@@ -1288,7 +1288,7 @@ void FormWindow::clearSelection( bool changePropertyDisplay )
usedSelections.clear();
if ( changePropertyDisplay ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
@@ -1374,7 +1374,7 @@ void FormWindow::selectWidgets()
p = mapFromGlobal( p );
TQRect r( p, ( (TQWidget*)o )->size() );
if ( r.intersects( currRect ) && !r.contains( currRect ) )
- selectWidget( TQT_TQOBJECT(o) );
+ selectWidget( o );
}
}
delete l;
@@ -1428,7 +1428,7 @@ void FormWindow::raiseChildSelections( TQWidget *w )
TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) {
- if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 )
+ if ( l->findRef( it.current()->widget() ) != -1 )
it.current()->show();
}
delete l;
@@ -1460,7 +1460,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w )
if ( it.current()->widget() == mainContainer() )
continue;
++it;
- if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) {
+ if ( l->find( sel->widget() ) == -1 ) {
if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
sel->setWidget( 0 );
} else {
@@ -1483,7 +1483,7 @@ void FormWindow::deleteWidgets()
TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) {
TQWidget *tb = 0;
- if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) )
+ if ( !( tb = mainWindow()->isAToolBarChild( it.current()->widget() ) ) )
widgets.append( it.current()->widget() );
else
( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() );
@@ -1591,7 +1591,7 @@ void FormWindow::focusOutEvent( TQFocusEvent * )
{
if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
}
@@ -1632,7 +1632,7 @@ TQWidget *FormWindow::designerWidget( TQObject *o ) const
if ( !o || !o->isWidgetType() )
return 0;
TQWidget *w = (TQWidget*)o;
- while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) )
+ while ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] || isCentralWidget( w ) )
w = (TQWidget*)w->parent();
return w;
}
@@ -1735,7 +1735,7 @@ void FormWindow::currentToolChanged()
switch ( currTool ) {
case POINTER_TOOL:
if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) )
- emitShowProperties( TQT_TQOBJECT(mainContainer()) );
+ emitShowProperties( mainContainer() );
restoreCursors( this, this );
break;
case ORDER_TOOL:
@@ -1744,7 +1744,7 @@ void FormWindow::currentToolChanged()
orderedWidgets.clear();
showOrderIndicators();
if ( mainWindow()->formWindow() == this )
- emitShowProperties( TQT_TQOBJECT(mainContainer()) );
+ emitShowProperties( mainContainer() );
setCursorToAll( ArrowCursor, this );
}
break;
@@ -1756,13 +1756,13 @@ void FormWindow::currentToolChanged()
mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") );
setCursorToAll( CrossCursor, this );
if ( mainWindow()->formWindow() == this )
- emitShowProperties( TQT_TQOBJECT(mainContainer()) );
+ emitShowProperties( mainContainer() );
break;
default:
mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) );
setCursorToAll( CrossCursor, this );
if ( mainWindow()->formWindow() == this )
- emitShowProperties( TQT_TQOBJECT(mainContainer()) );
+ emitShowProperties( mainContainer() );
break;
}
}
@@ -1824,7 +1824,7 @@ bool FormWindow::checkCustomWidgets()
TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) {
- TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) );
+ TQString className = WidgetFactory::classNameOf( it.current() );
if ( !MetaDataBase::hasCustomWidget( className ) )
missingCustomWidgets << className;
}
@@ -1941,7 +1941,7 @@ void FormWindow::checkAccels()
case 0: // select
clearSelection( FALSE );
for ( wid = (*it).first(); wid; wid = (*it).next() )
- selectWidget( TQT_TQOBJECT(wid), TRUE );
+ selectWidget( wid, TRUE );
return;
case 1: // cancel
return;
@@ -1983,7 +1983,7 @@ void FormWindow::selectAll()
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( ( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets[ (void*)o ] ) {
- selectWidget( TQT_TQOBJECT(o) );
+ selectWidget( o );
}
}
delete l;
@@ -2126,7 +2126,7 @@ void FormWindow::breakLayout( TQWidget *w )
if ( !w || w == this )
break;
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout &&
- WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) {
+ WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
Command *cmd = breakLayoutCommand( w );
if ( cmd )
commands.insert( 0, cmd );
@@ -2155,7 +2155,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w )
TQWidgetList widgets;
for ( TQObject *o = l.first(); o; o = l.next() ) {
if ( o->isWidgetType() &&
- !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) &&
+ !mainWindow()->isAToolBarChild( o ) &&
( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets.find( (TQWidget*)o ) )
widgets.append( (TQWidget*)o );
@@ -2204,7 +2204,7 @@ bool FormWindow::allowMove( TQWidget *w )
{
w = w->parentWidget();
while ( w ) {
- if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
+ if ( ( isMainContainer( w ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
return TRUE;
w = w->parentWidget();
}
@@ -2221,7 +2221,7 @@ void FormWindow::editConnections()
ConnectionDialog dlg( mainwindow );
mainWindow()->statusMessage( i18n( "Edit connections...") );
- dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() );
+ dlg.addConnection( startWidget, endWidget, TQString(), TQString() );
TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) );
dlg.exec();
}
@@ -2435,7 +2435,7 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) {
- if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 )
+ if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 )
return TRUE;
}
}
@@ -2473,7 +2473,7 @@ bool FormWindow::isDatabaseAware() const
void FormWindow::visibilityChanged()
{
if ( currTool != ORDER_TOOL ) {
- emitUpdateProperties( TQT_TQOBJECT(currentWidget()) );
+ emitUpdateProperties( currentWidget() );
} else {
updateOrderIndicators();
repositionOrderIndicators();
@@ -2491,7 +2491,7 @@ TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const
{
TQPoint p = pos;
const TQWidget* i = w;
- while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast<TQWidget*>(i)) ) ) {
+ while ( i && !i->isTopLevel() && !isMainContainer( const_cast<TQWidget*>(i) ) ) {
p = i->mapToParent( p );
i = i->parentWidget();
}
@@ -2538,7 +2538,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
continue;
if ( selected.find( it.current() ) != -1 )
continue;
- if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) &&
+ if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( it.current() ) ) ) &&
it.current() != mainContainer() )
continue;
@@ -2553,8 +2553,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
int wd = widgetDepth( it.current() );
if ( wd == depth && container ) {
- if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) >
- ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) )
+ if ( ( it.current()->parentWidget()->childrenListObject() ).find( it.current() ) >
+ ( container->parentWidget()->childrenListObject() ).find( container ) )
wd++;
}
if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) {
@@ -2586,24 +2586,24 @@ void FormWindow::setMainContainer( TQWidget *w )
l->addWidget( w );
if ( resetPropertyWidget ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mContainer);
+ propertyWidget = mContainer;
if ( opw && opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
}
if ( project() ) {
LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() );
if ( iface && !project()->isCpp() && !isFake() ) {
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function",
+ if ( !MetaDataBase::hasFunction( this, "init()" ) )
+ MetaDataBase::addFunction( this, "init()", "", "private", "function",
project()->language(), "void" );
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function",
+ if ( !MetaDataBase::hasFunction( this, "destroy()" ) )
+ MetaDataBase::addFunction( this, "destroy()", "", "private", "function",
project()->language(), "void" );
- if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) )
- MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" );
- if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) )
- MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()",
- TQT_TQOBJECT(mainContainer()), "destroy" );
+ if ( !MetaDataBase::hasConnection( this, mainContainer(), "shown()", mainContainer(), "init" ) )
+ MetaDataBase::addConnection( this, mainContainer(), "shown()", mainContainer(), "init" );
+ if ( !MetaDataBase::hasConnection( this, mainContainer(), "destroyed()", mainContainer(), "destroy" ) )
+ MetaDataBase::addConnection( this, mainContainer(), "destroyed()",
+ mainContainer(), "destroy" );
}
}
}