diff options
Diffstat (limited to 'kdevdesigner/designer/mainwindow.cpp')
-rw-r--r-- | kdevdesigner/designer/mainwindow.cpp | 922 |
1 files changed, 461 insertions, 461 deletions
diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 8ea48706..b4b5c1ac 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.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 [email protected] for -** information about Qt Commercial License Agreements. +** information about TQt Commercial License Agreements. ** ** Contact [email protected] if any conditions of this licensing are ** not clear to you. @@ -65,7 +65,7 @@ #include "formsettings.h" #include "preferences.h" #include "pixmapcollectioneditor.h" -#ifndef QT_NO_SQL +#ifndef TQT_NO_SQL #include "dbconnectionimpl.h" #endif //#include "connectioneditor.h" @@ -114,7 +114,7 @@ #include <tqtooltip.h> #include <tqsizegrip.h> #include <tqtextview.h> -#include <qassistantclient.h> +#include <tqassistantclient.h> #include <stdlib.h> #include "kdevdesigner_part.h" @@ -142,7 +142,7 @@ static TQString textNoAccel( const TQString& text) { TQString t = text; int i; - while ( (i = t.find('&') )>= 0 ) { + while ( (i = t.tqfind('&') )>= 0 ) { t.remove(i,1); } return t; @@ -152,7 +152,7 @@ static TQString textNoAccel( const TQString& text) MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, const TQString &plgDir ) : TQMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ), grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ), - fileFilter( i18n( "Qt User-Interface Files (*.ui)" ) ), client( asClient ), + fileFilter( i18n( "TQt User-Interface Files (*.ui)" ) ), client( asClient ), previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part) { // extern void qInitImages_designercore(); @@ -184,9 +184,9 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons setupPluginManagers(); /* if ( !single ) - qApp->setMainWidget( this );*/ + tqApp->setMainWidget( this );*/ TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory ); -#ifndef Q_WS_MACX +#ifndef TQ_WS_MACX setIcon( BarIcon( "designer_appicon.png", KDevDesignerPartFactory::instance() ) ); #endif @@ -201,8 +201,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons singleProject = single; statusBar()->clear(); -#if defined(QT_NON_COMMERCIAL) - statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of Qt - " +#if defined(TQT_NON_COMMERCIAL) + statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of TQt - " "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 ); #else statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 ); @@ -219,9 +219,9 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons setupEditActions(); setupProjectActions(); setupSearchActions(); - layoutToolBar = new TQToolBar( this, "Layout" ); - layoutToolBar->setCloseMode( TQDockWindow::Undocked ); - addToolBar( layoutToolBar, i18n( "Layout" ) ); + tqlayoutToolBar = new TQToolBar( this, "Layout" ); + tqlayoutToolBar->setCloseMode( TQDockWindow::Undocked ); + addToolBar( tqlayoutToolBar, i18n( "Layout" ) ); interpreterPluginManager = 0; setupToolActions(); setupLayoutActions(); @@ -246,17 +246,17 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons emit hasActiveWindow( FALSE ); lastPressWidget = 0; - qApp->installEventFilter( this ); + tqApp->installEventFilter( this ); - TQSize as( qApp->desktop()->size() ); + TQSize as( tqApp->desktop()->size() ); as -= TQSize( 30, 30 ); resize( TQSize( 1200, 1000 ).boundedTo( as ) ); - connect( qApp->clipboard(), TQT_SIGNAL( dataChanged() ), + connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), this, TQT_SLOT( clipboardChanged() ) ); clipboardChanged(); - layoutChilds = FALSE; - layoutSelected = FALSE; + tqlayoutChilds = FALSE; + tqlayoutSelected = FALSE; breakLayout = FALSE; backPix = TRUE; @@ -273,10 +273,10 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons delete w; w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); delete w; - setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); - actionEditor->parentWidget()->hide(); + setAppropriate( (TQDockWindow*)actionEditor->tqparentWidget(), FALSE ); + actionEditor->tqparentWidget()->hide(); - assistant = new QAssistantClient( assistantPath(), this ); + assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); statusBar()->setSizeGripEnabled( TRUE ); set_splash_status( "Initialization Done." ); @@ -286,7 +286,7 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons if ( autoSaveEnabled ) autoSaveTimer->start( autoSaveInterval * 1000 ); - setFocusPolicy( StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); } MainWindow::~MainWindow() @@ -355,7 +355,7 @@ void MainWindow::setupPropertyEditor() dw->setResizeEnabled( TRUE ); dw->setCloseMode( TQDockWindow::Always ); propertyEditor = new PropertyEditor( dw ); - addToolBar( dw, Qt::DockRight ); + addToolBar( dw, TQt::DockRight ); dw->setWidget( propertyEditor ); dw->setFixedExtentWidth( 250 ); dw->setCaption( i18n( "Property Editor/Signal Handlers" ) ); @@ -383,7 +383,7 @@ void MainWindow::setupOutputWindow() TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); dw->setResizeEnabled( TRUE ); dw->setCloseMode( TQDockWindow::Always ); - addToolBar( dw, Qt::DockBottom ); + addToolBar( dw, TQt::DockBottom ); oWindow = new OutputWindow( dw ); dw->setWidget( oWindow ); dw->setFixedExtentHeight( 150 ); @@ -398,7 +398,7 @@ void MainWindow::setupHierarchyView() dw->setResizeEnabled( TRUE ); dw->setCloseMode( TQDockWindow::Always ); hierarchyView = new HierarchyView( dw ); - addToolBar( dw, Qt::DockRight ); + addToolBar( dw, TQt::DockRight ); dw->setWidget( hierarchyView ); dw->setCaption( i18n( "Object Explorer" ) ); @@ -408,7 +408,7 @@ void MainWindow::setupHierarchyView() "<p>The Object Explorer provides an overview of the relationships " "between the widgets in a form. You can use the clipboard functions using " "a context menu for each item in the view. It is also useful for selecting widgets " - "in forms that have complex layouts.</p>" + "in forms that have complex tqlayouts.</p>" "<p>The columns can be resized by dragging the separator in the list's header.</p>" "<p>The second tab shows all the form's slots, class variables, includes, etc.</p>") ); dw->show(); @@ -420,14 +420,14 @@ void MainWindow::setupWorkspace() dw->setResizeEnabled( TRUE ); dw->setCloseMode( TQDockWindow::Always ); TQVBox *vbox = new TQVBox( dw ); - QCompletionEdit *edit = new QCompletionEdit( vbox ); + TQCompletionEdit *edit = new TQCompletionEdit( vbox ); TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) ); TQAccel *a = new TQAccel( this ); a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) ); wspace = new Workspace( vbox, this ); wspace->setBufferEdit( edit ); wspace->setCurrentProject( currentProject ); - addToolBar( dw, Qt::DockRight ); + addToolBar( dw, TQt::DockRight ); dw->setWidget( vbox ); dw->setCaption( i18n( "Project Overview" ) ); @@ -442,7 +442,7 @@ void MainWindow::setupWorkspace() void MainWindow::setupActionEditor() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 ); - addDockWindow( dw, Qt::DockTornOff ); + addDockWindow( dw, TQt::DockTornOff ); dw->setResizeEnabled( TRUE ); dw->setCloseMode( TQDockWindow::Always ); actionEditor = new ActionEditor( dw ); @@ -465,14 +465,14 @@ void MainWindow::setupToolbox() TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); dw->setResizeEnabled( TRUE ); dw->setCloseMode( TQDockWindow::Always ); - addToolBar( dw, Qt::DockLeft ); + addToolBar( dw, TQt::DockLeft ); toolBox = new TQToolBox( dw ); dw->setWidget( toolBox ); dw->setFixedExtentWidth( 160 ); dw->setCaption( i18n( "Toolbox" ) ); dw->show(); - setDockEnabled( dw, Qt::DockTop, FALSE ); - setDockEnabled( dw, Qt::DockBottom, FALSE ); + setDockEnabled( dw, TQt::DockTop, FALSE ); + setDockEnabled( dw, TQt::DockBottom, FALSE ); commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" ); commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame ); commonWidgetsToolBar->setOrientation( Qt::Vertical ); @@ -537,7 +537,7 @@ int MainWindow::currentTool() const { if ( !actionCurrentTool ) return POINTER_TOOL; - return TQString::fromLatin1(actionCurrentTool->name()).toInt(); + return TQString::tqfromLatin1(actionCurrentTool->name()).toInt(); } void MainWindow::runProjectPrecondition() @@ -582,7 +582,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) TQStringList databases; TQPtrDictIterator<TQWidget> wit( *fw->widgets() ); while ( wit.current() ) { - TQStringList lst = MetaDataBase::fakeProperty( wit.current(), "database" ).toStringList(); + TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList(); if ( !lst.isEmpty() ) databases << lst [ 0 ]; ++wit; @@ -601,12 +601,12 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) Resource resource( this ); resource.setWidget( fw ); TQValueList<Resource::Image> images; - resource.save( &buffer ); + resource.save( TQT_TQIODEVICE(&buffer) ); buffer.close(); buffer.open( IO_ReadOnly ); - TQWidget *w = TQWidgetFactory::create( &buffer ); + TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&buffer) ); if ( w ) { previewedForm = w; if ( palet ) { @@ -662,21 +662,21 @@ void MainWindow::previewForm( const TQString & style ) p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); p.setColor( TQPalette::Inactive, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); p.setColor( TQPalette::Disabled, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Active, TQColorGroup::Highlight, Qt::white ); + p.setColor( TQPalette::Active, TQColorGroup::Highlight, TQt::white ); p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Inactive, TQColorGroup::Highlight, Qt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::Highlight, TQt::white ); p.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Disabled, TQColorGroup::Highlight, Qt::white ); + p.setColor( TQPalette::Disabled, TQColorGroup::Highlight, TQt::white ); p.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Active, TQColorGroup::Foreground, Qt::white ); - p.setColor( TQPalette::Active, TQColorGroup::Text, Qt::white ); - p.setColor( TQPalette::Active, TQColorGroup::ButtonText, Qt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, Qt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::Text, Qt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::ButtonText, Qt::white ); - p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, Qt::lightGray ); - p.setColor( TQPalette::Disabled, TQColorGroup::Text, Qt::lightGray ); - p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, Qt::lightGray ); + p.setColor( TQPalette::Active, TQColorGroup::Foreground, TQt::white ); + p.setColor( TQPalette::Active, TQColorGroup::Text, TQt::white ); + p.setColor( TQPalette::Active, TQColorGroup::ButtonText, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::ButtonText, TQt::white ); + p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); + p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); + p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); w = previewFormInternal( st, &p ); } else if ( style == "SGI" ) { @@ -729,20 +729,20 @@ void MainWindow::previewForm( const TQString & style ) if ( !w ) return; - w->insertChild( st ); + w->insertChild( TQT_TQOBJECT(st) ); w->show(); } void MainWindow::helpContents() { - TQWidget *focusWidget = qApp->focusWidget(); + TQWidget *tqfocusWidget = tqApp->tqfocusWidget(); bool showClassDocu = TRUE; - while ( focusWidget ) { - if ( focusWidget->isA( "PropertyList" ) ) { + while ( tqfocusWidget ) { + if ( tqfocusWidget->isA( "PropertyList" ) ) { showClassDocu = FALSE; break; } - focusWidget = focusWidget->parentWidget(); + tqfocusWidget = tqfocusWidget->tqparentWidget(); } TQString source = "designer-manual.html"; @@ -753,10 +753,10 @@ void MainWindow::helpContents() TQTextStream ts( &f ); while ( !ts.eof() ) { TQString s = ts.readLine(); - int from = s.find( "\"" ); + int from = s.tqfind( "\"" ); if ( from == -1 ) continue; - int to = s.findRev( "\"" ); + int to = s.tqfindRev( "\"" ); if ( to == -1 ) continue; propertyDocumentation[ s.mid( from + 1, to - from - 1 ) ] = s.mid( to + 2 ) + "-prop"; @@ -767,23 +767,23 @@ void MainWindow::helpContents() if ( propertyEditor->widget() && !showClassDocu ) { if ( !propertyEditor->currentProperty().isEmpty() ) { - TQMetaObject* mo = propertyEditor->metaObjectOfCurrentProperty(); + TQMetaObject* mo = propertyEditor->tqmetaObjectOfCurrentProperty(); TQString s; TQString cp = propertyEditor->currentProperty(); - if ( cp == "layoutMargin" ) { - source = propertyDocumentation[ "QLayout/margin" ]; - } else if ( cp == "layoutSpacing" ) { - source = propertyDocumentation[ "QLayout/spacing" ]; + if ( cp == "tqlayoutMargin" ) { + source = propertyDocumentation[ "TQLayout/margin" ]; + } else if ( cp == "tqlayoutSpacing" ) { + source = propertyDocumentation[ "TQLayout/spacing" ]; } else if ( cp == "toolTip" ) { source = "tqtooltip.html#details"; } else if ( mo && qstrcmp( mo->className(), "Spacer" ) == 0 ) { if ( cp != "name" ) source = "tqsizepolicy.html#SizeType"; else - source = propertyDocumentation[ "QObject/name" ]; + source = propertyDocumentation[ "TQObject/name" ]; } else { - while ( mo && !propertyDocumentation.contains( ( s = TQString( mo->className() ) + "/" + cp ) ) ) - mo = mo->superClass(); + while ( mo && !propertyDocumentation.tqcontains( ( s = TQString( mo->className() ) + "/" + cp ) ) ) + mo = mo->tqsuperClass(); if ( mo ) source = "p:" + propertyDocumentation[s]; } @@ -793,8 +793,8 @@ void MainWindow::helpContents() if ( source.isEmpty() || source == "designer-manual.html" ) { if ( classname.lower() == "spacer" ) source = "qspaceritem.html#details"; - else if ( classname == "QLayoutWidget" ) - source = "layout.html"; + else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + source = "tqlayout.html"; else source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; } @@ -821,18 +821,18 @@ void MainWindow::helpAbout() LanguageInterface *iface = MetaDataBase::languageInterface( eProject->language() ); dlg.aboutLicense->setText( iface->aboutText() ); } - dlg.aboutVersion->setText(TQString("Version ") + TQString(QT_VERSION_STR)); - dlg.resize( dlg.width(), dlg.layout()->heightForWidth(dlg.width()) ); + dlg.aboutVersion->setText(TQString("Version ") + TQString(TQT_VERSION_STR)); + dlg.resize( dlg.width(), dlg.tqlayout()->heightForWidth(dlg.width()) ); dlg.exec(); } -void MainWindow::helpAboutQt() +void MainWindow::helpAboutTQt() { - TQMessageBox::aboutQt( this, "Qt Designer" ); + TQMessageBox::aboutTQt( this, "TQt Designer" ); } #if defined(_WS_WIN_) -#include <qt_windows.h> +#include <tqt_windows.h> #include <tqprocess.h> #endif @@ -847,16 +847,16 @@ void MainWindow::helpRegister() TQString command; TQString sub( "htmlfile\\shell" ); #if defined(UNICODE) - if ( TQApplication::winVersion() & Qt::WV_NT_based ) { + if ( TQApplication::winVersion() & TQt::WV_NT_based ) { unsigned char data[256]; res = RegOpenKeyExW( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); res = RegOpenKeyExW( key, (TCHAR*)sub.ucs2(), 0, KEY_READ, &subkey ); res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); - command = qt_winQString( data ) + "\\command"; + command = qt_winTQString( data ) + "\\command"; size = 255; res = RegOpenKeyExW( subkey, (TCHAR*)command.ucs2(), 0, KEY_READ, &subkey ); res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); - command = qt_winQString( data ); + command = qt_winTQString( data ); } else #endif { @@ -876,8 +876,8 @@ void MainWindow::helpRegister() TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" ); if ( !process.start() ) - TQMessageBox::information( this, "Register Qt", "Launching your web browser failed.\n" - "To register Qt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); + TQMessageBox::information( this, "Register TQt", "Launching your web browser failed.\n" + "To register TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); #endif } @@ -886,14 +886,14 @@ void MainWindow::showProperties( TQObject *o ) if ( !o->isWidgetType() ) { propertyEditor->setWidget( o, lastActiveFormWindow ); if ( lastActiveFormWindow ) - hierarchyView->setFormWindow( lastActiveFormWindow, lastActiveFormWindow->mainContainer() ); + hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) ); else hierarchyView->setFormWindow( 0, 0 ); return; } TQWidget *w = (TQWidget*)o; setupHierarchyView(); - FormWindow *fw = (FormWindow*)isAFormWindowChild( w ); + FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) ); if ( fw ) { if ( fw->numSelectedWidgets() > 1 ) { TQWidgetList wl = fw->selectedWidgets(); @@ -903,16 +903,16 @@ void MainWindow::showProperties( TQObject *o ) } propertyEditor->setWidget( new PropertyObject( wl ), fw ); } else { - propertyEditor->setWidget( w, fw ); + propertyEditor->setWidget( TQT_TQOBJECT(w), fw ); } - hierarchyView->setFormWindow( fw, w ); + hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) ); } else { propertyEditor->setWidget( 0, 0 ); hierarchyView->setFormWindow( 0, 0 ); } if ( currentTool() == POINTER_TOOL && fw && - ( !qworkspace->activeWindow() || !::qt_cast<SourceEditor*>(qworkspace->activeWindow()) ) ) + ( !qworkspace->activeWindow() || !::tqqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) ) fw->setFocus(); } @@ -929,23 +929,23 @@ void MainWindow::updateProperties( TQObject * ) bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) { - if ( ::qt_cast<MenuBarEditor*>(o) || ::qt_cast<PopupMenuEditor*>(o) || + if ( ::tqqt_cast<MenuBarEditor*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) || ( o && - ( ::qt_cast<MenuBarEditor*>(o->parent()) || - ::qt_cast<PopupMenuEditor*>(o->parent()) ) ) ) { + ( ::tqqt_cast<MenuBarEditor*>(o->tqparent()) || + ::tqqt_cast<PopupMenuEditor*>(o->tqparent()) ) ) ) { - if ( e->type() == TQEvent::Accel && ::qt_cast<PopupMenuEditor*>(o) ) { + if ( e->type() == TQEvent::Accel && ::tqqt_cast<PopupMenuEditor*>(o) ) { return TRUE; // consume accel events - } else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<MenuBarEditor*>(o) ) { + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast<MenuBarEditor*>(o) ) { TQPoint pos = ((TQMouseEvent*)e)->pos(); - MenuBarEditor *m = ::qt_cast<MenuBarEditor*>(o); + MenuBarEditor *m = ::tqqt_cast<MenuBarEditor*>(o); showProperties( o ); if ( m->findItem( pos ) >= m->count() ) m->setFocus(); - } else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<PopupMenuEditor*>(o) ) { - PopupMenuEditor *m = ::qt_cast<PopupMenuEditor*>(o); + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast<PopupMenuEditor*>(o) ) { + PopupMenuEditor *m = ::tqqt_cast<PopupMenuEditor*>(o); PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); - if ( m->find( i->action() ) != -1 && !i->isSeparator() ) + if ( m->tqfind( i->action() ) != -1 && !i->isSeparator() ) showProperties( i->action() ); } return TQMainWindow::eventFilter( o, e ); @@ -962,9 +962,9 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { w = (TQWidget*)o; while ( w ) { - if ( ::qt_cast<PropertyList*>(w) ) + if ( ::tqqt_cast<PropertyList*>(w) ) break; - w = w->parentWidget( TRUE ); + w = w->tqparentWidget( TRUE ); } if ( w ) { propertyEditor->propertyList()->showCurrentWhatsThis(); @@ -978,7 +978,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( (TQKeyEvent*)e )->key() == Key_E ) && ( (TQKeyEvent*)e )->state() & ControlButton ) { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (TQKeyEvent*)e )->ignore(); return TRUE; } @@ -987,44 +987,44 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::ContextMenu: case TQEvent::MouseButtonPress: if ( o && currentTool() == POINTER_TOOL && - ( ::qt_cast<MenuBarEditor*>(o) || - ::qt_cast<PopupMenuEditor*>(o) || - ::qt_cast<QDesignerToolBar*>(o) || - ( ::qt_cast<TQComboBox*>(o) || - ::qt_cast<TQToolButton*>(o) || - ::qt_cast<QDesignerToolBarSeparator*>(o) ) && - o->parent() - && ( ::qt_cast<QDesignerToolBar*>(o->parent()) - || ::qt_cast<QDesignerWidgetStack*>(o->parent())) ) ) { + ( ::tqqt_cast<MenuBarEditor*>(o) || + ::tqqt_cast<PopupMenuEditor*>(o) || + ::tqqt_cast<TQDesignerToolBar*>(o) || + ( ::tqqt_cast<TQComboBox*>(o) || + ::tqqt_cast<TQToolButton*>(o) || + ::tqqt_cast<TQDesignerToolBarSeparator*>(o) ) && + o->tqparent() + && ( ::tqqt_cast<TQDesignerToolBar*>(o->tqparent()) + || ::tqqt_cast<TQDesignerWidgetStack*>(o->tqparent())) ) ) { TQWidget *w = (TQWidget*)o; - if ( ::qt_cast<TQToolButton*>(w) || - ::qt_cast<TQComboBox*>(w) || - ::qt_cast<PopupMenuEditor*>(w) || - ::qt_cast<QDesignerToolBarSeparator*>(w) ) - w = w->parentWidget(); - TQWidget *pw = w->parentWidget(); + if ( ::tqqt_cast<TQToolButton*>(w) || + ::tqqt_cast<TQComboBox*>(w) || + ::tqqt_cast<PopupMenuEditor*>(w) || + ::tqqt_cast<TQDesignerToolBarSeparator*>(w) ) + w = w->tqparentWidget(); + TQWidget *pw = w->tqparentWidget(); while ( pw ) { - if ( ::qt_cast<FormWindow*>(pw) ) { - ( (FormWindow*)pw )->emitShowProperties( w ); - if ( !::qt_cast<QDesignerToolBar*>(o) ) - return ( !::qt_cast<TQToolButton*>(o) && - !::qt_cast<MenuBarEditor*>(o) && - !::qt_cast<TQComboBox*>(o) && - !::qt_cast<QDesignerToolBarSeparator*>(o) ); + if ( ::tqqt_cast<FormWindow*>(pw) ) { + ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); + if ( !::tqqt_cast<TQDesignerToolBar*>(o) ) + return ( !::tqqt_cast<TQToolButton*>(o) && + !::tqqt_cast<MenuBarEditor*>(o) && + !::tqqt_cast<TQComboBox*>(o) && + !::tqqt_cast<TQDesignerToolBarSeparator*>(o) ); } - pw = pw->parentWidget(); + pw = pw->tqparentWidget(); } } - if ( o && ( ::qt_cast<QDesignerToolBar*>(o) || o->inherits("QDockWindowHandle") ) + if ( o && ( ::tqqt_cast<TQDesignerToolBar*>(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) && e->type() == TQEvent::ContextMenu ) break; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) break; - if ( ::qt_cast<TQSizeGrip*>(o) ) + if ( ::tqqt_cast<TQSizeGrip*>(o) ) break; if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) ) break; if ( !w->hasFocus() ) w->setFocus(); @@ -1049,11 +1049,11 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) lastPressWidget = 0; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) break; - if ( ::qt_cast<TQSizeGrip*>(o) ) + if ( ::tqqt_cast<TQSizeGrip*>(o) ) break; if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) ) break; passiveInteractor = WidgetFactory::isPassiveInteractor( o ); if ( !passiveInteractor ) @@ -1069,15 +1069,15 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; w = isAFormWindowChild( o ); if ( lastPressWidget != (TQWidget*)o && w && - !::qt_cast<SizeHandle*>(o) && !::qt_cast<OrderIndicator*>(o) && - !::qt_cast<PopupMenuEditor*>(o) && !::qt_cast<TQMenuBar*>(o) && - !::qt_cast<TQSizeGrip*>(o) ) + !::tqqt_cast<SizeHandle*>(o) && !::tqqt_cast<OrderIndicator*>(o) && + !::tqqt_cast<PopupMenuEditor*>(o) && !::tqqt_cast<TQMenuBar*>(o) && + !::tqqt_cast<TQSizeGrip*>(o) ) return TRUE; - if ( o && ::qt_cast<TQSizeGrip*>(o) ) + if ( o && ::tqqt_cast<TQSizeGrip*>(o) ) break; if ( lastPressWidget != (TQWidget*)o || - ( !w || ::qt_cast<SizeHandle*>(o) ) || - ::qt_cast<OrderIndicator*>(o) ) + ( !w || ::tqqt_cast<SizeHandle*>(o) ) || + ::tqqt_cast<OrderIndicator*>(o) ) break; passiveInteractor = WidgetFactory::isPassiveInteractor( o ); if ( !passiveInteractor ) @@ -1090,14 +1090,14 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return FALSE; } if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { - if ( ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + if ( ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { qWorkspace()->activeWindow()->setFocus(); return TRUE; } } if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) ) break; ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) @@ -1105,10 +1105,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::MouseButtonDblClick: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) { - if ( ::qt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() && - o->parent() && ::qt_cast<TQToolBar*>(o->parent()) && formWindow() ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) ) { + if ( ::tqqt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() && + o->tqparent() && ::tqqt_cast<TQToolBar*>(o->tqparent()) && formWindow() ) formWindow()->setToolFixed(); break; } @@ -1122,8 +1122,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::KeyRelease: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) ) break; ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) @@ -1131,27 +1131,27 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::Hide: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) ) break; - if ( ( (FormWindow*)w )->isWidgetSelected( (TQWidget*)o ) ) - ( (FormWindow*)w )->selectWidget( (TQWidget*)o, FALSE ); + if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) + ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); break; case TQEvent::Enter: case TQEvent::Leave: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) || - ::qt_cast<MenuBarEditor*>(o) ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) || + ::tqqt_cast<MenuBarEditor*>(o) ) break; return TRUE; case TQEvent::Resize: case TQEvent::Move: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) ) break; - if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) { + if ( WidgetFactory::tqlayoutType( (TQWidget*)o->tqparent() ) != WidgetFactory::NoLayout ) { ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); if ( e->type() != TQEvent::Resize ) ( (FormWindow*)w )->updateChildSelections( (TQWidget*)o ); @@ -1161,31 +1161,31 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) { if ( lastActiveFormWindow && lastActiveFormWindow->project() ) { TQStringList lst = - MetaDataBase::fakeProperty( lastActiveFormWindow, "database" ).toStringList(); + MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList(); lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] ); } } break; case TQEvent::DragEnter: - if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); return TRUE; } break; case TQEvent::DragMove: - if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); return TRUE; } break; case TQEvent::Drop: - if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { workspace()->contentsDropEvent( (TQDropEvent*)e ); return TRUE; } break; case TQEvent::Show: - if ( o != this ) + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) ) break; if ( ((TQShowEvent*)e)->spontaneous() ) break; @@ -1195,33 +1195,33 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::Wheel: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqqt_cast<SizeHandle*>(o) || + ::tqqt_cast<OrderIndicator*>(o) ) break; return TRUE; case TQEvent::FocusIn: - if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) + if ( !::tqqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) return TRUE; //FIXME if ( hierarchyView->formDefinitionView()->isRenaming() - && ( o->inherits( "Editor" ) || ::qt_cast<FormWindow*>(o) ) ) + && ( o->inherits( "Editor" ) || ::tqqt_cast<FormWindow*>(o) ) ) TQApplication::sendPostedEvents(); if ( o->inherits( "Editor" ) ) { TQWidget *w = (TQWidget*)o; while ( w ) { - if ( ::qt_cast<SourceEditor*>(w) ) + if ( ::tqqt_cast<SourceEditor*>(w) ) break; - w = w->parentWidget( TRUE ); + w = w->tqparentWidget( TRUE ); } - if ( ::qt_cast<SourceEditor*>(w) ) + if ( ::tqqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->checkTimeStamp(); - } else if ( ::qt_cast<FormWindow*>(o) ) { + } else if ( ::tqqt_cast<FormWindow*>(o) ) { FormWindow *fw = (FormWindow*)o; if ( fw->formFile() && fw->formFile()->editor() ) fw->formFile()->editor()->checkTimeStamp(); } break; case TQEvent::FocusOut: - if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) + if ( !::tqqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) return TRUE; break; default: @@ -1233,12 +1233,12 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const { - if ( ::qt_cast<TQWizard*>(o->parent()) && !::qt_cast<TQPushButton*>(o) ) + if ( ::tqqt_cast<TQWizard*>(o->tqparent()) && !::tqqt_cast<TQPushButton*>(o) ) return 0; while ( o ) { - if ( ::qt_cast<FormWindow*>(o) ) + if ( ::tqqt_cast<FormWindow*>(o) ) return (TQWidget*)o; - o = o->parent(); + o = o->tqparent(); } return 0; } @@ -1246,11 +1246,11 @@ TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const { while ( o ) { - if ( ::qt_cast<QDesignerToolBar*>(o) ) + if ( ::tqqt_cast<TQDesignerToolBar*>(o) ) return (TQWidget*)o; - if ( ::qt_cast<FormWindow*>(o) ) + if ( ::tqqt_cast<FormWindow*>(o) ) return 0; - o = o->parent(); + o = o->tqparent(); } return 0; } @@ -1259,10 +1259,10 @@ FormWindow *MainWindow::formWindow() { if ( qworkspace->activeWindow() ) { FormWindow *fw = 0; - if ( ::qt_cast<FormWindow*>(qworkspace->activeWindow()) ) + if ( ::tqqt_cast<FormWindow*>(qworkspace->activeWindow()) ) fw = (FormWindow*)qworkspace->activeWindow(); else if ( lastActiveFormWindow && - qworkspace->windowList().find( lastActiveFormWindow ) != -1) + qworkspace->windowList().tqfind( lastActiveFormWindow ) != -1) fw = lastActiveFormWindow; return fw; } @@ -1279,7 +1279,7 @@ void MainWindow::insertFormWindow( FormWindow *fw ) { if ( fw ) TQWhatsThis::add( fw, i18n( "<b>The Form Window</b>" - "<p>Use the various tools to add widgets or to change the layout " + "<p>Use the various tools to add widgets or to change the tqlayout " "and behavior of the components in the form. Select one or multiple " "widgets to move them or lay them out. If a single widget is chosen it can " "be resized using the resize handles.</p>" @@ -1307,12 +1307,12 @@ void MainWindow::insertFormWindow( FormWindow *fw ) } fw->show(); fw->currentToolChanged(); - if ( fw->caption().isEmpty() && qstrlen( fw->name() ) ) + if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) ) fw->setCaption( fw->name() ); fw->mainContainer()->setCaption( fw->caption() ); - WidgetFactory::saveDefaultProperties( fw->mainContainer(), + WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()), WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( fw->mainContainer() ) ) ); + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) ); activeWindowChanged( fw ); emit formWindowsChanged(); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { @@ -1356,13 +1356,13 @@ bool MainWindow::unregisterClient( FormWindow *w ) TQPtrList<SourceEditor> waitingForDelete; waitingForDelete.setAutoDelete( TRUE ); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->object() == w ) + if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) ) waitingForDelete.append( e ); } if ( actionEditor->form() == w ) { actionEditor->setFormWindow( 0 ); - actionEditor->parentWidget()->hide(); + actionEditor->tqparentWidget()->hide(); } return TRUE; @@ -1371,7 +1371,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) void MainWindow::activeWindowChanged( TQWidget *w ) { TQWidget *old = formWindow(); - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqqt_cast<FormWindow*>(w) ) { FormWindow *fw = (FormWindow*)w; FormWindow *ofw = lastActiveFormWindow; lastActiveFormWindow = fw; @@ -1384,16 +1384,16 @@ void MainWindow::activeWindowChanged( TQWidget *w ) formWindow()->clearSelection(); } workspace()->activeFormChanged( fw ); - setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), - ::qt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) ); - if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { + setAppropriate( (TQDockWindow*)actionEditor->tqparentWidget(), + ::tqqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) ); + if ( appropriate( (TQDockWindow*)actionEditor->tqparentWidget() ) ) { if ( actionEditor->wantToBeShown() ) - actionEditor->parentWidget()->show(); + actionEditor->tqparentWidget()->show(); } else { TQWidget *mc = 0; - if ( ofw && (mc = ofw->mainContainer()) && ::qt_cast<TQMainWindow*>(mc) ) - actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); - actionEditor->parentWidget()->hide(); + if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast<TQMainWindow*>(mc) ) + actionEditor->setWantToBeShown( !actionEditor->tqparentWidget()->isHidden() ); + actionEditor->tqparentWidget()->hide(); } actionEditor->setFormWindow( lastActiveFormWindow ); @@ -1421,12 +1421,12 @@ void MainWindow::activeWindowChanged( TQWidget *w ) emit hasActiveForm( FALSE ); propertyEditor->clear(); hierarchyView->clear(); - updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null ); + updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); } selectionChanged(); - if ( ::qt_cast<SourceEditor*>(w) ) { + if ( ::tqqt_cast<SourceEditor*>(w) ) { SourceEditor *se = (SourceEditor*)w; TQGuardedPtr<FormWindow> fw = se->formWindow(); if ( se->formWindow() && @@ -1479,16 +1479,16 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, const TQString &undoCmd, const TQString &redoCmd ) { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; // do not set a formWindow related command actionEditUndo->setEnabled( undoAvailable ); actionEditRedo->setEnabled( redoAvailable ); if ( !undoCmd.isEmpty() ) - actionEditUndo->setMenuText( i18n( "&Undo: %1" ).arg( undoCmd ) ); + actionEditUndo->setMenuText( i18n( "&Undo: %1" ).tqarg( undoCmd ) ); else actionEditUndo->setMenuText( i18n( "&Undo: Not Available" ) ); if ( !redoCmd.isEmpty() ) - actionEditRedo->setMenuText( i18n( "&Redo: %1" ).arg( redoCmd ) ); + actionEditRedo->setMenuText( i18n( "&Redo: %1" ).tqarg( redoCmd ) ); else actionEditRedo->setMenuText( i18n( "&Redo: Not Available" ) ); @@ -1504,7 +1504,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, void MainWindow::updateEditorUndoRedo() { if ( !qWorkspace()->activeWindow() || - !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); @@ -1524,7 +1524,7 @@ void MainWindow::popupFormWindowMenu( const TQPoint & gp, FormWindow *fw ) setupRMBSpecialCommands( ids, commands, fw ); setupRMBProperties( ids, commands, fw ); - qApp->processEvents(); + tqApp->processEvents(); int r = rmbFormWindow->exec( gp ); handleRMBProperties( r, commands, fw ); @@ -1542,7 +1542,7 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg setupRMBSpecialCommands( ids, commands, w ); setupRMBProperties( ids, commands, w ); - qApp->processEvents(); + tqApp->processEvents(); int r = rmbWidgets->exec( gp ); handleRMBProperties( r, commands, w ); @@ -1554,18 +1554,18 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w ) { - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* text = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "text", TRUE ), TRUE ); if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) text = 0; - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* title = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "title", TRUE ), TRUE ); if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) title = 0; const TQMetaProperty* pagetitle = - w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); + w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "pageTitle", TRUE ), TRUE ); if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) pagetitle = 0; const TQMetaProperty* pixmap = - w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); + w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "pixmap", TRUE ), TRUE ); if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) pixmap = 0; @@ -1580,7 +1580,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) ); props.insert( "pixmap", id ); } - if ( text && text->designable(w) && !::qt_cast<TQTextEdit*>(w) ) { + if ( text && text->designable(w) && !::tqqt_cast<TQTextEdit*>(w) ) { ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) ); props.insert( "text", id ); } @@ -1595,15 +1595,15 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int } } -#ifdef QT_CONTAINER_CUSTOM_WIDGETS -static QWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS +static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) { WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( w ), &iface ); + widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface ); if ( !iface ) return 0; - QWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 ); + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); if ( !iface2 ) return 0; iface->release(); @@ -1616,19 +1616,19 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, { int id; - if ( ::qt_cast<TQTabWidget*>(w) ) { + if ( ::tqqt_cast<TQTabWidget*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); - if ( ( (QDesignerTabWidget*)w )->count() > 1) { + if ( ( (TQDesignerTabWidget*)w )->count() > 1) { ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); commands.insert( "remove", id ); } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - } else if ( ::qt_cast<QDesignerWidgetStack*>(w) ) { + } else if ( ::tqqt_cast<TQDesignerWidgetStack*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); - if ( ( (QDesignerWidgetStack*)w )->count() > 1) { + if ( ( (TQDesignerWidgetStack*)w )->count() > 1) { ids << ( id = rmbWidgets->insertItem( i18n("Previous Page"), -1, 0 ) ); commands.insert( "prevpage", id ); ids << ( id = rmbWidgets->insertItem( i18n("Next Page"), -1, 0 ) ); @@ -1639,7 +1639,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - } else if ( ::qt_cast<TQToolBox*>(w) ) { + } else if ( ::tqqt_cast<TQToolBox*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (TQToolBox*)w )->count() > 1 ) { @@ -1648,33 +1648,33 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); -#ifdef QT_CONTAINER_CUSTOM_WIDGETS +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS } else if ( WidgetDatabase:: isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { - QWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface && iface->supportsPages( WidgetFactory::classNameOf( w ) ) ) { + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); - if ( iface->count( WidgetFactory::classNameOf( w ), w ) > 1 ) { + if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) { ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) ); commands.insert( "remove", id ); } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - if ( iface->currentIndex( WidgetFactory::classNameOf( w ), w ) != -1 ) { + if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) { ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) ); commands.insert( "rename", id ); } } if ( iface ) iface->release(); -#endif // QT_CONTAINER_CUSTOM_WIDGETS +#endif // TQT_CONTAINER_CUSTOM_WIDGETS } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) ); @@ -1687,7 +1687,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, { int id; - if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) { + if ( ::tqqt_cast<TQWizard*>(fw->mainContainer()) ) { if ( ids.isEmpty() ) ids << rmbFormWindow->insertSeparator( 0 ); @@ -1705,7 +1705,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) ); commands.insert( "edit", id ); - } else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) { + } else if ( ::tqqt_cast<TQMainWindow*>(fw->mainContainer()) ) { if ( ids.isEmpty() ) ids << rmbFormWindow->insertSeparator( 0 ); ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) ); @@ -1720,108 +1720,108 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid if ( id == props[ "text" ] ) { bool ok = FALSE; bool oldDoWrap = FALSE; - if ( ::qt_cast<TQLabel*>(w) ) { - int align = w->property( "alignment" ).toInt(); + if ( ::tqqt_cast<TQLabel*>(w) ) { + int align = w->property( "tqalignment" ).toInt(); if ( align & WordBreak ) oldDoWrap = TRUE; } bool doWrap = oldDoWrap; TQString text; - if ( ::qt_cast<TQTextView*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) { - text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::qt_cast<TQButton*>(w), &doWrap ); + if ( ::tqqt_cast<TQTextView*>(w) || ::tqqt_cast<TQLabel*>(w) || ::tqqt_cast<TQButton*>(w) ) { + text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_cast<TQButton*>(w), &doWrap ); ok = !text.isNull(); } else { - text = QInputDialog::getText( i18n("Text"), i18n( "New text" ), + text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), TQLineEdit::Normal, w->property("text").toString(), &ok, this ); } if ( ok ) { if ( oldDoWrap != doWrap ) { - TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + TQString pn( i18n( "Set 'wordwrap' of '%1'" ).tqarg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "wordwrap", TQVariant( oldDoWrap, 0 ), - TQVariant( doWrap, 0 ), TQString::null, TQString::null ); + TQVariant( doWrap, 0 ), TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); } - TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + TQString pn( i18n( "Set the 'text' of '%1'" ).tqarg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "text", w->property( "text" ), - text, TQString::null, TQString::null ); + text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "text", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); } } else if ( id == props[ "title" ] ) { bool ok = FALSE; - TQString title = QInputDialog::getText( i18n("Title"), i18n( "New title" ), + TQString title = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); if ( ok ) { - TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + TQString pn( i18n( "Set the 'title' of '%2'" ).tqarg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "title", w->property( "title" ), - title, TQString::null, TQString::null ); + title, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "title", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); } } else if ( id == props[ "pagetitle" ] ) { bool ok = FALSE; - TQString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); if ( ok ) { - TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).tqarg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "pageTitle", w->property( "pageTitle" ), - text, TQString::null, TQString::null ); + text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "pageTitle", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE ); } } else if ( id == props[ "pixmap" ] ) { - TQPixmap oldPix = w->property( "pixmap" ).toPixmap(); + TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix ); if ( !pix.isNull() ) { - TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + TQString pn( i18n( "Set the 'pixmap' of '%2'" ).tqarg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "pixmap", w->property( "pixmap" ), - pix, TQString::null, TQString::null ); + pix, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE ); } } } void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w ) { - if ( ::qt_cast<TQTabWidget*>(w) ) { + if ( ::tqqt_cast<TQTabWidget*>(w) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( id == commands[ "add" ] ) { AddTabPageCommand *cmd = - new AddTabPageCommand( i18n( "Add Page to %1" ).arg( tw->name() ), formWindow(), + new AddTabPageCommand( i18n( "Add Page to %1" ).tqarg( tw->name() ), formWindow(), tw, "Tab" ); formWindow()->commandHistory()->addCommand( cmd ); cmd->execute(); } else if ( id == commands[ "remove" ] ) { if ( tw->currentPage() ) { - QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; + TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dtw->pageTitle() ).arg( tw->name() ), + tqarg( dtw->pageTitle() ).tqarg( tw->name() ), formWindow(), tw, tw->currentPage() ); formWindow()->commandHistory()->addCommand( cmd ); cmd->execute(); } } - } else if ( ::qt_cast<TQToolBox*>(w) ) { + } else if ( ::tqqt_cast<TQToolBox*>(w) ) { TQToolBox *tb = (TQToolBox*)w; if ( id == commands[ "add" ] ) { AddToolBoxPageCommand *cmd = - new AddToolBoxPageCommand( i18n( "Add Page to %1" ).arg( tb->name() ), + new AddToolBoxPageCommand( i18n( "Add Page to %1" ).tqarg( tb->name() ), formWindow(), tb, "Page" ); formWindow()->commandHistory()->addCommand( cmd ); @@ -1837,11 +1837,11 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command cmd->execute(); } } - } else if ( ::qt_cast<TQWidgetStack*>(w) ) { - QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w; + } else if ( ::tqqt_cast<TQWidgetStack*>(w) ) { + TQDesignerWidgetStack *ws = (TQDesignerWidgetStack*)w; if ( id == commands[ "add" ] ) { AddWidgetStackPageCommand *cmd = - new AddWidgetStackPageCommand( i18n( "Add Page to %1" ).arg( ws->name() ), + new AddWidgetStackPageCommand( i18n( "Add Page to %1" ).tqarg( ws->name() ), formWindow(), ws ); formWindow()->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -1849,50 +1849,50 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command if ( ws->visibleWidget() ) { DeleteWidgetStackPageCommand *cmd = new DeleteWidgetStackPageCommand( i18n( "Delete Page %1 of %2" ). - arg( ws->currentPage() ).arg( ws->name() ), + tqarg( ws->currentPage() ).tqarg( ws->name() ), formWindow(), ws, ws->visibleWidget() ); formWindow()->commandHistory()->addCommand( cmd ); cmd->execute(); } } else if ( id == commands[ "nextpage" ] ) { int currentPage = w->property( "currentPage" ).toInt(); - TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) ); + TQString pn( i18n( "Raise next page of '%2'" ).tqarg( w->name() ) ); SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "currentPage", currentPage, - currentPage + 1, TQString::null, TQString::null ); + currentPage + 1, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); } else if ( id == commands[ "prevpage" ] ) { int currentPage = w->property( "currentPage" ).toInt(); - TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) ); + TQString pn( i18n( "Raise previous page of '%2'" ).tqarg( w->name() ) ); SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "currentPage", currentPage, - currentPage -1, TQString::null, TQString::null ); + currentPage -1, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); } -#ifdef QT_CONTAINER_CUSTOM_WIDGETS +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS } else if ( WidgetDatabase:: isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { if ( id == commands[ "add" ] ) { AddContainerPageCommand *cmd = - new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ), + new AddContainerPageCommand( i18n( "Add Page to %1" ).tqarg( w->name() ), formWindow(), w, "Page" ); formWindow()->commandHistory()->addCommand( cmd ); cmd->execute(); } else if ( id == commands[ "remove" ] ) { - QWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { - TQString wClassName = WidgetFactory::classNameOf( w ); + TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); int index = iface->currentIndex( wClassName, w ); DeleteContainerPageCommand *cmd = new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ). - arg( iface->pageLabel( wClassName, + tqarg( iface->pageLabel( wClassName, w, index ) ). arg( w->name() ), formWindow(), w, index ); @@ -1901,12 +1901,12 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command iface->release(); } } else if ( id == commands[ "rename" ] ) { - QWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { bool ok = FALSE; - TQString wClassName = WidgetFactory::classNameOf( w ); + TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); int index = iface->currentIndex( wClassName, w ); - TQString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), TQLineEdit::Normal, iface->pageLabel( wClassName, w, index ), @@ -1925,33 +1925,33 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command iface->release(); } } -#endif // QT_CONTAINER_CUSTOM_WIDGETS +#endif // TQT_CONTAINER_CUSTOM_WIDGETS } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { if ( id == commands[ "edit" ] ) WidgetFactory::editWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() ); + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); } } void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw ) { - if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) { + if ( ::tqqt_cast<TQWizard*>(fw->mainContainer()) ) { TQWizard *wiz = (TQWizard*)fw->mainContainer(); if ( id == commands[ "add" ] ) { AddWizardPageCommand *cmd = - new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wiz->name() ), + new AddWizardPageCommand( i18n( "Add Page to %1" ).tqarg( wiz->name() ), formWindow(), wiz, "WizardPage" ); formWindow()->commandHistory()->addCommand( cmd ); cmd->execute(); } else if ( id == commands[ "remove" ] ) { if ( wiz->currentPage() ) { - QDesignerWizard *dw = (QDesignerWizard*)wiz; + TQDesignerWizard *dw = (TQDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dw->pageTitle() ).arg( wiz->name() ), + tqarg( dw->pageTitle() ).tqarg( wiz->name() ), formWindow(), wiz, wiz->indexOf( wiz->currentPage() ) ); formWindow()->commandHistory()->addCommand( cmd ); @@ -1964,11 +1964,11 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command } else if ( id == commands[ "rename" ] ) { bool ok = FALSE; - QDesignerWizard *dw = (QDesignerWizard*)wiz; - TQString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), TQLineEdit::Normal, dw->pageTitle(), &ok, this ); if ( ok ) { - TQString pn( i18n( "Rename page %1 of %2" ).arg( dw->pageTitle() ).arg( wiz->name() ) ); + TQString pn( i18n( "Rename page %1 of %2" ).tqarg( dw->pageTitle() ).tqarg( wiz->name() ) ); RenameWizardPageCommand *cmd = new RenameWizardPageCommand( pn, formWindow() , wiz, wiz->indexOf( wiz->currentPage() ), text ); @@ -1976,17 +1976,17 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command cmd->execute(); } } - } else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) { + } else if ( ::tqqt_cast<TQMainWindow*>(fw->mainContainer()) ) { TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); if ( id == commands[ "add_toolbar" ] ) { AddToolBarCommand *cmd = - new AddToolBarCommand( i18n( "Add Toolbar to '%1'" ).arg( formWindow()->name() ), + new AddToolBarCommand( i18n( "Add Toolbar to '%1'" ).tqarg( formWindow()->name() ), formWindow(), mw ); formWindow()->commandHistory()->addCommand( cmd ); cmd->execute(); } else if ( id == commands[ "add_menu_item" ] ) { AddMenuCommand *cmd = - new AddMenuCommand( i18n( "Add Menu to '%1'" ).arg( formWindow()->name() ), + new AddMenuCommand( i18n( "Add Menu to '%1'" ).tqarg( formWindow()->name() ), formWindow(), mw ); formWindow()->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -1996,15 +1996,15 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command void MainWindow::clipboardChanged() { - TQString text( qApp->clipboard()->text() ); + TQString text( tqApp->clipboard()->text() ); TQString start( "<!DOCTYPE UI-SELECTION>" ); actionEditPaste->setEnabled( text.left( start.length() ) == start ); } void MainWindow::selectionChanged() { - layoutChilds = FALSE; - layoutSelected = FALSE; + tqlayoutChilds = FALSE; + tqlayoutSelected = FALSE; breakLayout = FALSE; if ( !formWindow() ) { actionEditCut->setEnabled( FALSE ); @@ -2041,7 +2041,7 @@ void MainWindow::selectionChanged() int unlaidout = 0; int laidout = 0; for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) + if ( !w->tqparentWidget() || WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ) unlaidout++; else laidout++; @@ -2053,27 +2053,27 @@ void MainWindow::selectionChanged() actionEditGridLayout->setEnabled( unlaidout > 1 ); actionEditBreakLayout->setEnabled( laidout > 0 ); actionEditAdjustSize->setEnabled( laidout > 0 ); - layoutSelected = unlaidout > 1; + tqlayoutSelected = unlaidout > 1; breakLayout = laidout > 0; } else if ( selectedWidgets == 1 ) { TQWidget *w = widgets.first(); - bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) || + bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || w == formWindow()->mainContainer(); - actionEditAdjustSize->setEnabled( !w->parentWidget() || - WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); + actionEditAdjustSize->setEnabled( !w->tqparentWidget() || + WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ); if ( !isContainer ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE ); - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); + if ( w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) { + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); breakLayout = TRUE; } else { actionEditBreakLayout->setEnabled( FALSE ); } } else { - if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { + if ( WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); @@ -2084,24 +2084,24 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled( TRUE ); actionEditGridLayout->setEnabled( TRUE ); actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; + tqlayoutChilds = TRUE; } - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); + if ( w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) { + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); breakLayout = TRUE; } } else { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); breakLayout = TRUE; } } } else if ( selectedWidgets == 0 ) { actionEditAdjustSize->setEnabled( TRUE ); TQWidget *w = formWindow()->mainContainer(); - if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { + if ( WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); @@ -2112,7 +2112,7 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled( TRUE ); actionEditGridLayout->setEnabled( TRUE ); actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; + tqlayoutChilds = TRUE; } } else { actionEditHLayout->setEnabled( FALSE ); @@ -2132,7 +2132,7 @@ void MainWindow::selectionChanged() static TQString fixArgs( const TQString &s2 ) { TQString s = s2; - return s.replace( ',', ';' ); + return s.tqreplace( ',', ';' ); } void MainWindow::writeConfig() @@ -2177,18 +2177,18 @@ void MainWindow::writeConfig() config.writeEntry( keybase + "Geometries/MainwindowWidth", width() ); config.writeEntry( keybase + "Geometries/MainwindowHeight", height() ); config.writeEntry( keybase + "Geometries/MainwindowMaximized", isMaximized() ); - config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->parentWidget()->height() ); - config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->parentWidget()->height() ); - config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->tqparentWidget()->x() ); + config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->tqparentWidget()->y() ); + config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->tqparentWidget()->width() ); + config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->tqparentWidget()->height() ); + config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->tqparentWidget()->x() ); + config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->tqparentWidget()->y() ); + config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->tqparentWidget()->width() ); + config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->tqparentWidget()->height() ); + config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->tqparentWidget()->x() ); + config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->tqparentWidget()->y() ); + config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->tqparentWidget()->width() ); + config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->tqparentWidget()->height() ); config.writeEntry( keybase + "View/TextLabels", usesTextLabel() ); config.writeEntry( keybase + "View/BigIcons", usesBigPixmaps() ); @@ -2211,8 +2211,8 @@ void MainWindow::writeConfig() l << w->className; l << w->includeFile; l << TQString::number( (int)w->includePolicy ); - l << TQString::number( w->sizeHint.width() ); - l << TQString::number( w->sizeHint.height() ); + l << TQString::number( w->tqsizeHint.width() ); + l << TQString::number( w->tqsizeHint.height() ); l << TQString::number( w->lstSignals.count() ); for ( TQValueList<TQCString>::ConstIterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) l << TQString( fixArgs( *it ) ); @@ -2242,7 +2242,7 @@ void MainWindow::writeConfig() static TQString fixArgs2( const TQString &s2 ) { TQString s = s2; - return s.replace( ';', ',' ); + return s.tqreplace( ';', ',' ); } void MainWindow::readConfig() @@ -2261,7 +2261,7 @@ void MainWindow::readConfig() if ( !ok ) { if ( oWindow ) { oWindow->shuttingDown(); - ( (TQDockWindow*)oWindow->parent() )->hide(); + ( (TQDockWindow*)oWindow->tqparent() )->hide(); } TQPixmap pix; pix.load( backPixName ); @@ -2273,7 +2273,7 @@ void MainWindow::readConfig() } if ( !readPreviousConfig ) { fileFilter = config.readEntry( keybase + "FileFilter", fileFilter ); - templPath = config.readEntry( keybase + "TemplatePath", TQString::null ); + templPath = config.readEntry( keybase + "TemplatePath", TQString() ); databaseAutoEdit = config.readBoolEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); shStartDialog = config.readBoolEntry( keybase + "ShowStartDialog", shStartDialog ); autoSaveEnabled = config.readBoolEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); @@ -2290,14 +2290,14 @@ void MainWindow::readConfig() } // We know that the oldSettingsKey() will return 3.1 if ( keybase == DesignerApplication::oldSettingsKey() ) { - if (keybase.contains("3.1")) + if (keybase.tqcontains("3.1")) recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles", ',' ); else recentlyFiles = config.readListEntry(keybase + "RecentlyOpenedFiles"); if ( recentlyFiles.count() == 1 && recentlyFiles[0].isNull() ) recentlyFiles.clear(); - if (keybase.contains("3.1")) + if (keybase.tqcontains("3.1")) recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects", ',' ); else recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects"); @@ -2315,7 +2315,7 @@ void MainWindow::readConfig() if ( !pix.isNull() ) qworkspace->setBackgroundPixmap( pix ); } else { - qworkspace->setBackgroundColor( TQColor( (QRgb)config.readNumEntry( keybase + "Background/Color" ) ) ); + qworkspace->setBackgroundColor( TQColor( (TQRgb)config.readNumEntry( keybase + "Background/Color" ) ) ); } if ( !readPreviousConfig ) { @@ -2333,7 +2333,7 @@ void MainWindow::readConfig() r.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", r.width() ) ); r.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", r.height() ) ); - TQRect desk = TQApplication::desktop()->geometry(); + TQRect desk = TQApplication::desktop()->tqgeometry(); TQRect inter = desk.intersect( r ); resize( r.size() ); if ( inter.width() * inter.height() > ( r.width() * r.height() / 20 ) ) { @@ -2351,8 +2351,8 @@ void MainWindow::readConfig() w->className = l[ 0 ]; w->includeFile = l[ 1 ]; w->includePolicy = (MetaDataBase::CustomWidget::IncludePolicy)l[ 2 ].toInt(); - w->sizeHint.setWidth( l[ 3 ].toInt() ); - w->sizeHint.setHeight( l[ 4 ].toInt() ); + w->tqsizeHint.setWidth( l[ 3 ].toInt() ); + w->tqsizeHint.setHeight( l[ 4 ].toInt() ); uint c = 5; if ( l.count() > c ) { int numSignals = l[ c ].toInt(); @@ -2401,7 +2401,7 @@ void MainWindow::readConfig() if ( !restoreConfig ) return; -#ifndef Q_WS_MAC +#ifndef TQ_WS_MAC /* I'm sorry to make this not happen on the Mac, but it seems to hang somewhere deep in TQLayout, it gets into a very large loop - and seems it has to do with clever things the designer does ###Sam */ @@ -2418,7 +2418,7 @@ void MainWindow::readConfig() } if ( readPreviousConfig && oWindow ) { oWindow->shuttingDown(); - ( (TQDockWindow*)oWindow->parent() )->hide(); + ( (TQDockWindow*)oWindow->tqparent() )->hide(); } rebuildCustomWidgetGUI(); @@ -2449,9 +2449,9 @@ HierarchyView *MainWindow::objectHierarchy() const return hierarchyView; } -TQPopupMenu *MainWindow::setupNormalHierarchyMenu( TQWidget *parent ) +TQPopupMenu *MainWindow::setupNormalHierarchyMenu( TQWidget *tqparent ) { - TQPopupMenu *menu = new TQPopupMenu( parent ); + TQPopupMenu *menu = new TQPopupMenu( tqparent ); actionEditCut->addTo( menu ); actionEditCopy->addTo( menu ); @@ -2461,12 +2461,12 @@ TQPopupMenu *MainWindow::setupNormalHierarchyMenu( TQWidget *parent ) return menu; } -TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ) +TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( TQWidget *tqparent, const char *addSlot, const char *removeSlot ) { - TQPopupMenu *menu = new TQPopupMenu( parent ); + TQPopupMenu *menu = new TQPopupMenu( tqparent ); - menu->insertItem( i18n( "Add Page" ), parent, addSlot ); - menu->insertItem( i18n( "Delete Page" ), parent, removeSlot ); + menu->insertItem( i18n( "Add Page" ), tqparent, addSlot ); + menu->insertItem( i18n( "Delete Page" ), tqparent, removeSlot ); menu->insertSeparator(); actionEditCut->addTo( menu ); actionEditCopy->addTo( menu ); @@ -2489,7 +2489,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); if ( ( (FormWindow*)w )->formFile()->formWindow() ) @@ -2498,7 +2498,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) e->ignore(); return; } - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqqt_cast<SourceEditor*>(w) ) { if ( !( (SourceEditor*)w )->close() ) { e->ignore(); return; @@ -2513,7 +2513,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) ++it; if ( pro->isModified() ) { switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), - i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), + i18n( "Save changes to '%1'?" ).tqarg( pro->fileName() ), i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { case 0: // save pro->save(); @@ -2562,19 +2562,19 @@ ActionEditor *MainWindow::actioneditor() const bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) { - if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( w ) ) { - TQString defSignal = WidgetFactory::defaultSignal( w ); + if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) { + TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) ); if ( defSignal.isEmpty() ) { editSource(); } else { TQString s = TQString( w->name() ) + "_" + defSignal; LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() ); if ( iface ) { - TQStrList sigs = iface->signalNames( w ); + TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) ); TQString fullSignal; for ( int i = 0; i < (int)sigs.count(); ++i ) { TQString sig = sigs.at( i ); - if ( sig.left( sig.find( '(' ) ) == defSignal ) { + if ( sig.left( sig.tqfind( '(' ) ) == defSignal ) { fullSignal = sig; break; } @@ -2582,18 +2582,18 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) if ( !fullSignal.isEmpty() ) { TQString signl = fullSignal; - fullSignal = fullSignal.mid( fullSignal.find( '(' ) + 1 ); + fullSignal = fullSignal.mid( fullSignal.tqfind( '(' ) + 1 ); fullSignal.remove( (int)fullSignal.length() - 1, 1 ); fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); s += "(" + fullSignal + ")"; - if ( !MetaDataBase::hasFunction( f, s.latin1() ) ) - MetaDataBase::addFunction( f, s.latin1(), "", "public", "slot", + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", f->project()->language(), "void" ); - s = s.left( s.find( '(' ) ).latin1(); - if ( !MetaDataBase::hasConnection( f, w, defSignal.latin1(), f->mainContainer(), s.latin1() ) ) { + s = s.left( s.tqfind( '(' ) ).latin1(); + if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { MetaDataBase::Connection conn; - conn.sender = w; - conn.receiver = f->mainContainer(); + conn.sender = TQT_TQOBJECT(w); + conn.receiver = TQT_TQOBJECT(f->mainContainer()); conn.signal = signl; conn.slot = s; AddConnectionCommand *cmd = @@ -2609,73 +2609,73 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) return TRUE; } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { - statusMessage( i18n( "Edit %1..." ).arg( w->className() ) ); - WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + statusMessage( i18n( "Edit %1..." ).tqarg( w->className() ) ); + WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); statusBar()->clear(); return TRUE; } - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* text = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* title = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( "title", TRUE ), TRUE ); if ( text && text->designable(w) ) { bool ok = FALSE; bool oldDoWrap = FALSE; - if ( ::qt_cast<TQLabel*>(w) ) { - int align = w->property( "alignment" ).toInt(); + if ( ::tqqt_cast<TQLabel*>(w) ) { + int align = w->property( "tqalignment" ).toInt(); if ( align & WordBreak ) oldDoWrap = TRUE; } bool doWrap = oldDoWrap; TQString text; - if ( ::qt_cast<TQTextEdit*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) { + if ( ::tqqt_cast<TQTextEdit*>(w) || ::tqqt_cast<TQLabel*>(w) || ::tqqt_cast<TQButton*>(w) ) { text = MultiLineEditor::getText( this, w->property( "text" ).toString(), - !::qt_cast<TQButton*>(w), &doWrap ); + !::tqqt_cast<TQButton*>(w), &doWrap ); ok = !text.isNull(); } else { - text = QInputDialog::getText( i18n("Text"), i18n( "New text" ), + text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), TQLineEdit::Normal, w->property("text").toString(), &ok, this ); } if ( ok ) { if ( oldDoWrap != doWrap ) { - TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + TQString pn( i18n( "Set 'wordwrap' of '%1'" ).tqarg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "wordwrap", TQVariant( oldDoWrap, 0 ), - TQVariant( doWrap, 0 ), TQString::null, TQString::null ); + TQVariant( doWrap, 0 ), TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); } - TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + TQString pn( i18n( "Set the 'text' of '%1'" ).tqarg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "text", w->property( "text" ), - text, TQString::null, TQString::null ); + text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "text", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); } return TRUE; } if ( title && title->designable(w) ) { bool ok = FALSE; TQString text; - text = QInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); + text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); if ( ok ) { - TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, + TQString pn( i18n( "Set the 'title' of '%2'" ).tqarg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, "title", w->property( "title" ), - text, TQString::null, TQString::null ); + text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "title", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); } return TRUE; } - if ( !WidgetFactory::isPassiveInteractor( w ) ) + if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) editSource(); return TRUE; @@ -2706,12 +2706,12 @@ void MainWindow::rebuildCustomWidgetGUI() a->setToggleAction( TRUE ); a->setText( w->className ); a->setIconSet( *w->pixmap ); - a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).arg( w->className ) ); + a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).tqarg( w->className ) ); a->setWhatsThis( i18n("<b>%1 (custom widget)</b>" "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> menu to " "add and change custom widgets. You can add properties as well as " - "signals and slots to integrate them into Qt Designer, " - "and provide a pixmap which will be used to represent the widget on the form.</p>").arg( w->className ) ); + "signals and slots to integrate them into TQt Designer, " + "and provide a pixmap which will be used to represent the widget on the form.</p>").tqarg( w->className ) ); a->addTo( customWidgetToolBar ); a->addTo( customWidgetToolBar2 ); @@ -2746,7 +2746,7 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) { TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) return TRUE; } @@ -2761,7 +2761,7 @@ void MainWindow::setGrid( const TQPoint &p ) grd = p; TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::qt_cast<FormWindow*>(w) ) + if ( !::tqqt_cast<FormWindow*>(w) ) continue; ( (FormWindow*)w )->mainContainer()->update(); } @@ -2774,7 +2774,7 @@ void MainWindow::setShowGrid( bool b ) sGrid = b; TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::qt_cast<FormWindow*>(w) ) + if ( !::tqqt_cast<FormWindow*>(w) ) continue; ( (FormWindow*)w )->mainContainer()->update(); } @@ -2804,7 +2804,7 @@ void MainWindow::projectSelected( TQAction *a ) a->setOn( TRUE ); if ( currentProject ) currentProject->setActive( FALSE ); - Project *p = *projects.find( a ); + Project *p = *projects.tqfind( a ); p->setActive( TRUE ); if ( currentProject == p ) return; @@ -2842,8 +2842,8 @@ void MainWindow::checkTempFiles() TQStringList lst = d.entryList(); TQApplication::restoreOverrideCursor(); bool load = TQMessageBox::information( this, i18n( "Restoring Last Session" ), - i18n( "Qt Designer found some temporary saved files, which were\n" - "written when Qt Designer crashed last time. Do you want to\n" + i18n( "TQt Designer found some temporary saved files, which were\n" + "written when TQt Designer crashed last time. Do you want to\n" "load these files?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0; TQApplication::setOverrideCursor( waitCursor ); for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { @@ -2856,52 +2856,52 @@ void MainWindow::checkTempFiles() void MainWindow::showDialogHelp() { TQWidget *w = (TQWidget*)sender(); - w = w->topLevelWidget(); + w = w->tqtopLevelWidget(); TQString link = documentationPath() + "/designer-manual-13.html#"; - if ( ::qt_cast<NewFormBase*>(w) || ::qt_cast<StartDialogBase*>(w) ) // own doc for startdialog? + if ( ::tqqt_cast<NewFormBase*>(w) || ::tqqt_cast<StartDialogBase*>(w) ) // own doc for startdialog? link += "dialog-file-new"; - else if ( ::qt_cast<CreateTemplate*>(w) ) + else if ( ::tqqt_cast<CreateTemplate*>(w) ) link += "dialog-file-create-template"; - else if ( ::qt_cast<EditFunctionsBase*>(w) ) + else if ( ::tqqt_cast<EditFunctionsBase*>(w) ) link += "dialog-edit-functions"; -// else if ( ::qt_cast<ConnectionViewerBase*>(w) ) +// else if ( ::tqqt_cast<ConnectionViewerBase*>(w) ) else if ( w->inherits("ConnectionViewerBase") ) link += "dialog-view-connections"; - else if ( ::qt_cast<FormSettingsBase*>(w) ) + else if ( ::tqqt_cast<FormSettingsBase*>(w) ) link += "dialog-edit-form-settings"; - else if ( ::qt_cast<Preferences*>(w) ) + else if ( ::tqqt_cast<Preferences*>(w) ) link += "dialog-edit-preferences"; - else if ( ::qt_cast<PixmapCollectionEditor*>(w) ) + else if ( ::tqqt_cast<PixmapCollectionEditor*>(w) ) link += "dialog-image-collection"; -// else if ( ::qt_cast<DatabaseConnectionBase*>(w) ) +// else if ( ::tqqt_cast<DatabaseConnectionBase*>(w) ) else if ( w->inherits( "DatabaseConnectionBase" ) ) link += "dialog-edit-database-connections"; - else if ( ::qt_cast<ProjectSettingsBase*>(w) ) + else if ( ::tqqt_cast<ProjectSettingsBase*>(w) ) link += "dialog-project-settings"; - else if ( ::qt_cast<FindDialog*>(w) ) - link += "dialog-find-text"; - else if ( ::qt_cast<ReplaceDialog*>(w) ) - link += "dialog-replace-text"; - else if ( ::qt_cast<GotoLineDialog*>(w) ) + else if ( ::tqqt_cast<FindDialog*>(w) ) + link += "dialog-tqfind-text"; + else if ( ::tqqt_cast<ReplaceDialog*>(w) ) + link += "dialog-tqreplace-text"; + else if ( ::tqqt_cast<GotoLineDialog*>(w) ) link += "dialog-go-to-line"; -// else if ( ::qt_cast<ConnectionEditorBase*>(w) ) +// else if ( ::tqqt_cast<ConnectionEditorBase*>(w) ) else if ( w->inherits("ConnectionEditorBase") ) link += "dialog-edit-connections"; - else if ( ::qt_cast<CustomWidgetEditorBase*>(w) ) + else if ( ::tqqt_cast<CustomWidgetEditorBase*>(w) ) link += "dialog-edit-custom-widgets"; - else if ( ::qt_cast<PaletteEditorBase*>(w) ) + else if ( ::tqqt_cast<PaletteEditorBase*>(w) ) link += "dialog-edit-palette"; - else if ( ::qt_cast<ListBoxEditorBase*>(w) ) + else if ( ::tqqt_cast<ListBoxEditorBase*>(w) ) link += "dialog-edit-listbox"; - else if ( ::qt_cast<ListViewEditorBase*>(w) ) + else if ( ::tqqt_cast<ListViewEditorBase*>(w) ) link += "dialog-edit-listview"; - else if ( ::qt_cast<IconViewEditorBase*>(w) ) + else if ( ::tqqt_cast<IconViewEditorBase*>(w) ) link += "dialog-edit-iconview"; - else if ( ::qt_cast<TableEditorBase*>(w) ) + else if ( ::tqqt_cast<TableEditorBase*>(w) ) link += "dialog-edit-table"; - else if ( ::qt_cast<MultiLineEditor*>(w) ) + else if ( ::tqqt_cast<MultiLineEditor*>(w) ) link += "dialog-text"; else { @@ -2915,7 +2915,7 @@ void MainWindow::showDialogHelp() void MainWindow::setupActionManager() { - actionPluginManager = new QPluginManager<ActionInterface>( IID_Action, TQApplication::libraryPaths(), pluginDirectory() ); + actionPluginManager = new TQPluginManager<ActionInterface>( IID_Action, TQApplication::libraryPaths(), pluginDirectory() ); TQStringList lst = actionPluginManager->featureList(); for ( TQStringList::ConstIterator ait = lst.begin(); ait != lst.end(); ++ait ) { @@ -2925,7 +2925,7 @@ void MainWindow::setupActionManager() continue; iface->connectTo( desInterface ); - TQAction *a = iface->create( *ait, this ); + TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) ); if ( !a ) continue; @@ -2967,7 +2967,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource ) if ( !MetaDataBase::hasEditor( lang ) ) { TQMessageBox::information( this, i18n( "Edit Source" ), i18n( "There is no plugin for editing %1 code installed.\n" - "Note: Plugins are not available in static Qt configurations." ).arg( lang ) ); + "Note: Plugins are not available in static TQt configurations." ).tqarg( lang ) ); return; } @@ -2979,7 +2979,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource ) } } - createSourceEditor( formWindow(), formWindow()->project(), lang, func, rereadSource ); + createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource ); } void MainWindow::setupRecentlyFilesMenu() @@ -3099,7 +3099,7 @@ void MainWindow::addRecentlyOpened( const TQString &fn, TQStringList &lst ) TQFileInfo fi( fn ); fi.convertToAbs(); TQString f = fi.filePath(); - if ( lst.find( f ) != lst.end() ) + if ( lst.tqfind( f ) != lst.end() ) lst.remove( f ); if ( lst.count() >= 10 ) lst.pop_back(); @@ -3115,19 +3115,19 @@ TemplateWizardInterface * MainWindow::templateWizardInterface( const TQString& c void MainWindow::setupPluginManagers() { - editorPluginManager = new QPluginManager<EditorInterface>( IID_Editor, TQApplication::libraryPaths(), "/kdevdesigner" ); + editorPluginManager = new TQPluginManager<EditorInterface>( IID_Editor, TQApplication::libraryPaths(), "/kdevdesigner" ); MetaDataBase::setEditor( editorPluginManager->featureList() ); templateWizardPluginManager = - new QPluginManager<TemplateWizardInterface>( IID_TemplateWizard, TQApplication::libraryPaths(), pluginDirectory() ); + new TQPluginManager<TemplateWizardInterface>( IID_TemplateWizard, TQApplication::libraryPaths(), pluginDirectory() ); MetaDataBase::setupInterfaceManagers( "/designer" ); preferencePluginManager = - new QPluginManager<PreferenceInterface>( IID_Preference, TQApplication::libraryPaths(), pluginDirectory() ); + new TQPluginManager<PreferenceInterface>( IID_Preference, TQApplication::libraryPaths(), pluginDirectory() ); projectSettingsPluginManager = - new QPluginManager<ProjectSettingsInterface>( IID_ProjectSettings, TQApplication::libraryPaths(), pluginDirectory() ); + new TQPluginManager<ProjectSettingsInterface>( IID_ProjectSettings, TQApplication::libraryPaths(), pluginDirectory() ); sourceTemplatePluginManager = - new QPluginManager<SourceTemplateInterface>( IID_SourceTemplate, TQApplication::libraryPaths(), pluginDirectory() ); + new TQPluginManager<SourceTemplateInterface>( IID_SourceTemplate, TQApplication::libraryPaths(), pluginDirectory() ); if ( preferencePluginManager ) { TQStringList lst = preferencePluginManager->featureList(); @@ -3189,10 +3189,10 @@ void MainWindow::setModified( bool b, TQWidget *window ) { TQWidget *w = window; while ( w ) { - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqqt_cast<FormWindow*>(w) ) { ( (FormWindow*)w )->modificationChanged( b ); return; - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqqt_cast<SourceEditor*>(w) ) { FormWindow *fw = ( (SourceEditor*)w )->formWindow(); if ( fw && !fw->isFake() ) { //fw->commandHistory()->setModified( b ); @@ -3204,13 +3204,13 @@ void MainWindow::setModified( bool b, TQWidget *window ) } return; } - w = w->parentWidget( TRUE ); + w = w->tqparentWidget( TRUE ); } } void MainWindow::editorClosed( SourceEditor *e ) { - sourceEditors.take( sourceEditors.findRef( e ) ); + sourceEditors.take( sourceEditors.tqfindRef( e ) ); } void MainWindow::functionsChanged() @@ -3227,7 +3227,7 @@ void MainWindow::doFunctionsChanged() void MainWindow::updateFunctionList() { - if ( !qWorkspace()->activeWindow() || !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + if ( !qWorkspace()->activeWindow() || !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); se->save(); @@ -3238,7 +3238,7 @@ void MainWindow::updateFunctionList() return; TQValueList<LanguageInterface::Connection> conns; iface->connections( se->text(), &conns ); - MetaDataBase::setupConnections( se->formWindow(), conns ); + MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns ); propertyEditor->eventList()->setup(); } } @@ -3300,9 +3300,9 @@ void MainWindow::enableAll( bool enable ) menuBar()->setEnabled( enable ); TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o == wspace->parentWidget() || - o == oWindow->parentWidget() || - o == hierarchyView->parentWidget() ) + if ( TQT_BASE_OBJECT(o) == wspace->tqparentWidget() || + TQT_BASE_OBJECT(o) == oWindow->tqparentWidget() || + TQT_BASE_OBJECT(o) == hierarchyView->tqparentWidget() ) continue; ( (TQWidget*)o )->setEnabled( enable ); } @@ -3316,9 +3316,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) FormWindow *fw = 0; SourceEditor *se = 0; SourceFile *sf = 0; - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqqt_cast<FormWindow*>(w) ) { fw = (FormWindow*)w; - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqqt_cast<SourceEditor*>(w) ) { se = (SourceEditor*)w; if ( !se->object() ) continue; @@ -3350,7 +3350,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) fw->showNormal(); fw->setFocus(); lastActiveFormWindow = fw; - qApp->processEvents(); + tqApp->processEvents(); se = editSource(); if ( se ) { switch ( lm ) { @@ -3386,7 +3386,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) } } - if ( ::qt_cast<SourceFile*>(o) ) { + if ( ::tqqt_cast<SourceFile*>(o) ) { for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); @@ -3422,10 +3422,10 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) mblockNewForms = TRUE; if ( !fw ) - openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); + openFormWindow( currentProject->makeAbsolute( *qwf_forms->tqfind( (TQWidget*)o ) ) ); else fw->formFile()->showEditor( FALSE ); - qApp->processEvents(); // give all views the chance to get the formwindow + tqApp->processEvents(); // give all views the chance to get the formwindow SourceEditor *se = editSource(); if ( se ) { switch ( lm ) { @@ -3448,12 +3448,12 @@ TQObject *MainWindow::findRealObject( TQObject *o ) { TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::qt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) - return w; - else if ( ::qt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && + if ( ::tqqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) + return TQT_TQOBJECT(w); + else if ( ::tqqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) - return w; - else if ( ::qt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && + return TQT_TQOBJECT(w); + else if ( ::tqqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && ( (SourceEditor*)w )->sourceFile() == o ) return o; } @@ -3463,7 +3463,7 @@ TQObject *MainWindow::findRealObject( TQObject *o ) void MainWindow::formNameChanged( FormWindow *fw ) { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->object() == fw ) + if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) ) e->refresh( TRUE ); if ( e->project() == fw->project() ) e->resetContext(); @@ -3474,7 +3474,7 @@ void MainWindow::breakPointsChanged() { if ( !inDebugMode ) return; - if ( !qWorkspace()->activeWindow() || !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + if ( !qWorkspace()->activeWindow() || !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); if ( !e->object() || !e->project() ) @@ -3484,7 +3484,7 @@ void MainWindow::breakPointsChanged() if ( !interpreterPluginManager ) { interpreterPluginManager = - new QPluginManager<InterpreterInterface>( IID_Interpreter, + new TQPluginManager<InterpreterInterface>( IID_Interpreter, TQApplication::libraryPaths(), "/qsa" ); } @@ -3520,14 +3520,14 @@ void MainWindow::breakPointsChanged() int MainWindow::currentLayoutDefaultSpacing() const { if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->layoutDefaultSpacing(); + return ( (MainWindow*)this )->formWindow()->tqlayoutDefaultSpacing(); return BOXLAYOUT_DEFAULT_SPACING; } int MainWindow::currentLayoutDefaultMargin() const { if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->layoutDefaultMargin(); + return ( (MainWindow*)this )->formWindow()->tqlayoutDefaultMargin(); return BOXLAYOUT_DEFAULT_MARGIN; } @@ -3568,10 +3568,10 @@ bool MainWindow::openProjectSettings( Project *pro ) dia.tabWidget->addTab( t.w, t.title ); if ( t.receiver ) { connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); - connect( senderObject, TQT_SIGNAL( acceptSignal( QUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, TQT_SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot ); + connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); + connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); senderObject->emitInitSignal(); - disconnect( senderObject, TQT_SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot ); + disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); } } @@ -3620,13 +3620,13 @@ TQString MainWindow::whatsThisFrom( const TQString &key ) } } - int i = menuHelpFile.find( key ); + int i = menuHelpFile.tqfind( key ); if ( i == -1 ) - return TQString::null; + return TQString(); int start = i; int end = i; - start = menuHelpFile.findRev( "<li>", i ) + 4; - end = menuHelpFile.find( '\n', i ) - 1; + start = menuHelpFile.tqfindRev( "<li>", i ) + 4; + end = menuHelpFile.tqfind( '\n', i ) - 1; return menuHelpFile.mid( start, end - start + 1 ); } @@ -3641,13 +3641,13 @@ void MainWindow::setSingleProject( Project *pro ) while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->project() == pro ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); ( (FormWindow*)w )->formFile()->close(); } - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqqt_cast<SourceEditor*>(w) ) { ( (SourceEditor*)w )->close(); } } @@ -3655,7 +3655,7 @@ void MainWindow::setSingleProject( Project *pro ) windows = qWorkspace()->windowList(); qWorkspace()->blockSignals( FALSE ); currentProject = 0; - updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null ); + updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); } singleProject = TRUE; @@ -3682,15 +3682,15 @@ void MainWindow::showGUIStuff( bool b ) return; guiStuffVisible = b; if ( !b ) { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); - toolBox->parentWidget()->hide(); + setAppropriate( (TQDockWindow*)toolBox->tqparentWidget(), FALSE ); + toolBox->tqparentWidget()->hide(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { tb->hide(); setAppropriate( tb, FALSE ); } propertyEditor->setPropertyEditorEnabled( FALSE ); - setAppropriate( layoutToolBar, FALSE ); - layoutToolBar->hide(); + setAppropriate( tqlayoutToolBar, FALSE ); + tqlayoutToolBar->hide(); setAppropriate( toolsToolBar, FALSE ); toolsToolBar->hide(); menubar->removeItem( toolsMenuId ); @@ -3706,7 +3706,7 @@ void MainWindow::showGUIStuff( bool b ) actionEditConnections->setEnabled( FALSE ); actionEditFunctions->setEnabled( FALSE ); actionEditAccels->setEnabled( FALSE ); - ( (TQDockWindow*)propertyEditor->parentWidget() )-> + ( (TQDockWindow*)propertyEditor->tqparentWidget() )-> setCaption( i18n( "Signal Handlers" ) ); actionGroupNew->removeFrom( fileMenu ); actionGroupNew->removeFrom( projectToolBar ); @@ -3719,19 +3719,19 @@ void MainWindow::showGUIStuff( bool b ) actionFileSave->addTo( projectToolBar ); actionFileExit->addTo( fileMenu ); } else { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); - toolBox->parentWidget()->show(); + setAppropriate( (TQDockWindow*)toolBox->tqparentWidget(), TRUE ); + toolBox->tqparentWidget()->show(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { setAppropriate( tb, TRUE ); tb->hide(); } propertyEditor->setPropertyEditorEnabled( TRUE ); - setAppropriate( layoutToolBar, TRUE ); - layoutToolBar->show(); + setAppropriate( tqlayoutToolBar, TRUE ); + tqlayoutToolBar->show(); setAppropriate( toolsToolBar, TRUE ); toolsToolBar->show(); menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); - menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); + menubar->insertItem( i18n( "&Layout" ), tqlayoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); @@ -3743,7 +3743,7 @@ void MainWindow::showGUIStuff( bool b ) actionEditConnections->setEnabled( TRUE ); actionEditFunctions->setEnabled( TRUE ); actionEditAccels->setEnabled( TRUE ); - ( (TQDockWindow*)propertyEditor->parentWidget() )-> + ( (TQDockWindow*)propertyEditor->tqparentWidget() )-> setCaption( i18n( "Property Editor/Signal Handlers" ) ); actionFileSave->removeFrom( fileMenu ); actionFileSave->removeFrom( projectToolBar ); |