diff options
Diffstat (limited to 'kdevdesigner/designer/mainwindowactions.cpp')
-rw-r--r-- | kdevdesigner/designer/mainwindowactions.cpp | 610 |
1 files changed, 305 insertions, 305 deletions
diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index d6ed0982..ebbccdad 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -32,24 +32,24 @@ #include <klineedit.h> #include <stdlib.h> -#include <qaction.h> -#include <qwhatsthis.h> -#include <qpopupmenu.h> -#include <qmenubar.h> -#include <qtooltip.h> -#include <qapplication.h> -#include <qsignalmapper.h> -#include <qstylefactory.h> -#include <qworkspace.h> -#include <qmessagebox.h> -#include <qstatusbar.h> -#include <qlistbox.h> -#include <qclipboard.h> -#include <qcombobox.h> -#include <qspinbox.h> -#include <qinputdialog.h> -#include <qdatetimeedit.h> -#include <qtextedit.h> +#include <tqaction.h> +#include <tqwhatsthis.h> +#include <tqpopupmenu.h> +#include <tqmenubar.h> +#include <tqtooltip.h> +#include <tqapplication.h> +#include <tqsignalmapper.h> +#include <tqstylefactory.h> +#include <tqworkspace.h> +#include <tqmessagebox.h> +#include <tqstatusbar.h> +#include <tqlistbox.h> +#include <tqclipboard.h> +#include <tqcombobox.h> +#include <tqspinbox.h> +#include <tqinputdialog.h> +#include <tqdatetimeedit.h> +#include <tqtextedit.h> #include "defs.h" #include "project.h" @@ -76,7 +76,7 @@ #include "dbconnectionimpl.h" #endif #include "widgetaction.h" -#include <qtoolbox.h> +#include <tqtoolbox.h> #include "startdialogimpl.h" #include "designerappiface.h" #include "connectiondialog.h" @@ -107,18 +107,18 @@ static const char * whatsthis_image[] = { " ooo ", " ooo "}; -const QString toolbarHelp = "<p>Toolbars contain a number of buttons to " +const TQString toolbarHelp = "<p>Toolbars contain a number of buttons to " "provide quick access to often used functions.%1" "<br>Click on the toolbar handle to hide the toolbar, " "or drag and place the toolbar to a different location.</p>"; -static QIconSet createIconSet( const QString &name ) +static TQIconSet createIconSet( const TQString &name ) { - QIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) ); - QString prefix = "designer_"; + TQIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) ); + TQString prefix = "designer_"; int right = name.length() - prefix.length(); ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), KDevDesignerPartFactory::instance() ), - QIconSet::Small, QIconSet::Disabled ); + TQIconSet::Small, TQIconSet::Disabled ); return ic; } @@ -127,105 +127,105 @@ void MainWindow::setupEditActions() actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, this, 0 ); actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); - connect( actionEditUndo, SIGNAL( activated() ), this, SLOT( editUndo() ) ); + connect( actionEditUndo, TQT_SIGNAL( activated() ), this, TQT_SLOT( editUndo() ) ); actionEditUndo->setEnabled( FALSE ); actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 ); actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); - connect( actionEditRedo, SIGNAL( activated() ), this, SLOT( editRedo() ) ); + connect( actionEditRedo, TQT_SIGNAL( activated() ), this, TQT_SLOT( editRedo() ) ); actionEditRedo->setEnabled( FALSE ); actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, this, 0 ); actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); - connect( actionEditCut, SIGNAL( activated() ), this, SLOT( editCut() ) ); + connect( actionEditCut, TQT_SIGNAL( activated() ), this, TQT_SLOT( editCut() ) ); actionEditCut->setEnabled( FALSE ); actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, this, 0 ); actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); - connect( actionEditCopy, SIGNAL( activated() ), this, SLOT( editCopy() ) ); + connect( actionEditCopy, TQT_SIGNAL( activated() ), this, TQT_SLOT( editCopy() ) ); actionEditCopy->setEnabled( FALSE ); actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, this, 0 ); actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); - connect( actionEditPaste, SIGNAL( activated() ), this, SLOT( editPaste() ) ); + connect( actionEditPaste, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPaste() ) ); actionEditPaste->setEnabled( FALSE ); - actionEditDelete = new DesignerAction( i18n( "Delete" ), QPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 ); + actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 ); actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); - connect( actionEditDelete, SIGNAL( activated() ), this, SLOT( editDelete() ) ); + connect( actionEditDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) ); actionEditDelete->setEnabled( FALSE ); #ifdef Q_WS_MAC - QAction *macDelete = new DesignerAction( i18n( "Delete" ), QPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 ); - connect( macDelete, SIGNAL( activated() ), this, SLOT( editDelete() ) ); + TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 ); + connect( macDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) ); #endif - actionEditSelectAll = new DesignerAction( i18n( "Select All" ), QPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 ); + actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 ); actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); - connect( actionEditSelectAll, SIGNAL( activated() ), this, SLOT( editSelectAll() ) ); + connect( actionEditSelectAll, TQT_SIGNAL( activated() ), this, TQT_SLOT( editSelectAll() ) ); actionEditSelectAll->setEnabled( TRUE ); actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, this, 0 ); actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); - connect( actionEditRaise, SIGNAL( activated() ), this, SLOT( editRaise() ) ); + connect( actionEditRaise, TQT_SIGNAL( activated() ), this, TQT_SLOT( editRaise() ) ); actionEditRaise->setEnabled( FALSE ); actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, this, 0 ); actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); - connect( actionEditLower, SIGNAL( activated() ), this, SLOT( editLower() ) ); + connect( actionEditLower, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLower() ) ); actionEditLower->setEnabled( FALSE ); - actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), QPixmap(), + actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 ); actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); - connect( actionEditAccels, SIGNAL( activated() ), this, SLOT( editAccels() ) ); - connect( this, SIGNAL( hasActiveForm(bool) ), actionEditAccels, SLOT( setEnabled(bool) ) ); + connect( actionEditAccels, TQT_SIGNAL( activated() ), this, TQT_SLOT( editAccels() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), i18n( "S&lots..." ), 0, this, 0 ); actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); - connect( actionEditFunctions, SIGNAL( activated() ), this, SLOT( editFunctions() ) ); - connect( this, SIGNAL( hasActiveForm(bool) ), actionEditFunctions, SLOT( setEnabled(bool) ) ); + connect( actionEditFunctions, TQT_SIGNAL( activated() ), this, TQT_SLOT( editFunctions() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), i18n( "Co&nnections..." ), 0, this, 0 ); actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); - connect( actionEditConnections, SIGNAL( activated() ), this, SLOT( editConnections() ) ); - connect( this, SIGNAL( hasActiveForm(bool) ), actionEditConnections, SLOT( setEnabled(bool) ) ); + connect( actionEditConnections, TQT_SIGNAL( activated() ), this, TQT_SLOT( editConnections() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - actionEditSource = new DesignerAction( i18n( "Source" ), QIconSet(), + actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), i18n( "&Source..." ), CTRL + Key_E, this, 0 ); actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); - connect( actionEditSource, SIGNAL( activated() ), this, SLOT( editSource() ) ); - connect( this, SIGNAL( hasActiveForm(bool) ), actionEditSource, SLOT( setEnabled(bool) ) ); + connect( actionEditSource, TQT_SIGNAL( activated() ), this, TQT_SLOT( editSource() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), QPixmap(), + actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), i18n( "&Form Settings..." ), 0, this, 0 ); actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); - connect( actionEditFormSettings, SIGNAL( activated() ), this, SLOT( editFormSettings() ) ); - connect( this, SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, SLOT( setEnabled(bool) ) ); + connect( actionEditFormSettings, TQT_SIGNAL( activated() ), this, TQT_SLOT( editFormSettings() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditPreferences = new DesignerAction( i18n( "Preferences" ), QPixmap(), + actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), i18n( "Preferences..." ), 0, this, 0 ); actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); - connect( actionEditPreferences, SIGNAL( activated() ), this, SLOT( editPreferences() ) ); + connect( actionEditPreferences, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPreferences() ) ); -/* QToolBar *tb = new QToolBar( this, "Edit" ); - tb->setCloseMode( QDockWindow::Undocked ); - QWhatsThis::add( tb, i18n( "<b>The Edit toolbar</b>%1").arg(i18n(toolbarHelp).arg("")) ); +/* TQToolBar *tb = new TQToolBar( this, "Edit" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "<b>The Edit toolbar</b>%1").arg(i18n(toolbarHelp).arg("")) ); addToolBar( tb, i18n( "Edit" ) ); actionEditUndo->addTo( tb ); actionEditRedo->addTo( tb ); @@ -239,8 +239,8 @@ void MainWindow::setupEditActions() actionEditRaise->addTo( tb ); #endif - QPopupMenu *menu = new QPopupMenu( this, "Edit" ); - connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateEditorUndoRedo() ) ); + TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); + connect( menu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( updateEditorUndoRedo() ) ); menubar->insertItem( i18n( "&Edit" ), menu ); actionEditUndo->addTo( menu ); actionEditRedo->addTo( menu ); @@ -270,43 +270,43 @@ void MainWindow::setupSearchActions() { actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), i18n( "&Find..." ), CTRL + Key_F, this, 0 ); - connect( actionSearchFind, SIGNAL( activated() ), this, SLOT( searchFind() ) ); + connect( actionSearchFind, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchFind() ) ); actionSearchFind->setEnabled( FALSE ); actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); - actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), QIconSet(), + actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), i18n( "Find &Incremental" ), ALT + Key_I, this, 0 ); - connect( actionSearchIncremetal, SIGNAL( activated() ), this, SLOT( searchIncremetalFindMenu() ) ); + connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchIncremetalFindMenu() ) ); actionSearchIncremetal->setEnabled( FALSE ); actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); - actionSearchReplace = new DesignerAction( i18n( "Replace" ), QIconSet(), + actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), i18n( "&Replace..." ), CTRL + Key_R, this, 0 ); - connect( actionSearchReplace, SIGNAL( activated() ), this, SLOT( searchReplace() ) ); + connect( actionSearchReplace, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchReplace() ) ); actionSearchReplace->setEnabled( FALSE ); actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); - actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), QIconSet(), + actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), i18n( "&Goto Line..." ), ALT + Key_G, this, 0 ); - connect( actionSearchGotoLine, SIGNAL( activated() ), this, SLOT( searchGotoLine() ) ); + connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchGotoLine() ) ); actionSearchGotoLine->setEnabled( FALSE ); actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); -/* QToolBar *tb = new QToolBar( this, "Search" ); - tb->setCloseMode( QDockWindow::Undocked ); +/* TQToolBar *tb = new TQToolBar( this, "Search" ); + tb->setCloseMode( TQDockWindow::Undocked ); addToolBar( tb, i18n( "Search" ) ); actionSearchFind->addTo( tb );*/ - incrementalSearch = new QLineEdit( 0 ); + incrementalSearch = new TQLineEdit( 0 ); incrementalSearch->hide(); - QToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) ); - connect( incrementalSearch, SIGNAL( textChanged( const QString & ) ), - this, SLOT( searchIncremetalFind() ) ); - connect( incrementalSearch, SIGNAL( returnPressed() ), - this, SLOT( searchIncremetalFindNext() ) ); + TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) ); + connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( searchIncremetalFind() ) ); + connect( incrementalSearch, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( searchIncremetalFindNext() ) ); incrementalSearch->setEnabled( FALSE ); - QPopupMenu *menu = new QPopupMenu( this, "Search" ); + TQPopupMenu *menu = new TQPopupMenu( this, "Search" ); menubar->insertItem( i18n( "&Search" ), menu ); actionSearchFind->addTo( menu ); actionSearchIncremetal->addTo( menu ); @@ -318,62 +318,62 @@ void MainWindow::setupSearchActions() void MainWindow::setupLayoutActions() { if ( !actionGroupTools ) { - actionGroupTools = new QActionGroup( this ); + actionGroupTools = new TQActionGroup( this ); actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, SIGNAL( selected(QAction*) ), this, SLOT( toolSelected(QAction*) ) ); + connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), this, TQT_SLOT( toolSelected(TQAction*) ) ); } actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), i18n( "Adjust &Size" ), CTRL + Key_J, this, 0 ); actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); - connect( actionEditAdjustSize, SIGNAL( activated() ), this, SLOT( editAdjustSize() ) ); + connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), this, TQT_SLOT( editAdjustSize() ) ); actionEditAdjustSize->setEnabled( FALSE ); actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"), i18n( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 ); actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) ); - connect( actionEditHLayout, SIGNAL( activated() ), this, SLOT( editLayoutHorizontal() ) ); + connect( actionEditHLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutHorizontal() ) ); actionEditHLayout->setEnabled( FALSE ); actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"), i18n( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 ); actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) ); - connect( actionEditVLayout, SIGNAL( activated() ), this, SLOT( editLayoutVertical() ) ); + connect( actionEditVLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutVertical() ) ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), i18n( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 ); actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); - connect( actionEditGridLayout, SIGNAL( activated() ), this, SLOT( editLayoutGrid() ) ); + connect( actionEditGridLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutGrid() ) ); actionEditGridLayout->setEnabled( FALSE ); actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), i18n( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 ); actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) ); - connect( actionEditSplitHorizontal, SIGNAL( activated() ), this, SLOT( editLayoutHorizontalSplit() ) ); + connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutHorizontalSplit() ) ); actionEditSplitHorizontal->setEnabled( FALSE ); actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), i18n( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 ); actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) ); - connect( actionEditSplitVertical, SIGNAL( activated() ), this, SLOT( editLayoutVerticalSplit() ) ); + connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutVerticalSplit() ) ); actionEditSplitVertical->setEnabled( FALSE ); actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), i18n( "&Break Layout" ), CTRL + Key_B, this, 0 ); actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); - connect( actionEditBreakLayout, SIGNAL( activated() ), this, SLOT( editBreakLayout() ) ); + connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editBreakLayout() ) ); actionEditBreakLayout->setEnabled( FALSE ); int id = WidgetDatabase::idFromClassName( "Spacer" ); - actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, QString::number( id ).latin1() ); + actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() ); actionInsertSpacer->setToggleAction( TRUE ); actionInsertSpacer->setText( WidgetDatabase::className( id ) ); actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) ); @@ -389,10 +389,10 @@ void MainWindow::setupLayoutActions() actionInsertSpacer->addTo( commonWidgetsToolBar ); commonWidgetsPage.append( actionInsertSpacer ); - QWidget *w; - commonWidgetsToolBar->setStretchableWidget( ( w = new QWidget( commonWidgetsToolBar ) ) ); + TQWidget *w; + commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); - QWhatsThis::add( layoutToolBar, i18n( "<b>The Layout toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) ); + TQWhatsThis::add( layoutToolBar, i18n( "<b>The Layout toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) ); actionEditAdjustSize->addTo( layoutToolBar ); layoutToolBar->addSeparator(); actionEditHLayout->addTo( layoutToolBar ); @@ -404,7 +404,7 @@ void MainWindow::setupLayoutActions() layoutToolBar->addSeparator(); actionInsertSpacer->addTo( layoutToolBar ); - QPopupMenu *menu = new QPopupMenu( this, "Layout" ); + TQPopupMenu *menu = new TQPopupMenu( this, "Layout" ); layoutMenu = menu; menubar->insertItem( i18n( "&Layout" ), menu, toolsMenuId + 1 ); actionEditAdjustSize->addTo( menu ); @@ -422,16 +422,16 @@ void MainWindow::setupLayoutActions() void MainWindow::setupToolActions() { if ( !actionGroupTools ) { - actionGroupTools = new QActionGroup( this ); + actionGroupTools = new TQActionGroup( this ); actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, SIGNAL( selected(QAction*) ), - this, SLOT( toolSelected(QAction*) ) ); + connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), + this, TQT_SLOT( toolSelected(TQAction*) ) ); } actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"), i18n("&Pointer"), Key_F2, actionGroupTools, - QString::number(POINTER_TOOL).latin1(), TRUE ); + TQString::number(POINTER_TOOL).latin1(), TRUE ); actionPointerTool->setStatusTip( i18n("Selects the pointer tool") ); actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) ); @@ -440,37 +440,37 @@ void MainWindow::setupToolActions() i18n("&Connect Signal/Slots"), singleProjectMode() ? 0 : Key_F3, actionGroupTools, - QString::number(CONNECT_TOOL).latin1(), TRUE ); + TQString::number(CONNECT_TOOL).latin1(), TRUE ); actionConnectTool->setStatusTip( i18n("Selects the connection tool") ); actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) ); actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"), i18n("Tab &Order"), Key_F4, actionGroupTools, - QString::number(ORDER_TOOL).latin1(), TRUE ); + TQString::number(ORDER_TOOL).latin1(), TRUE ); actionOrderTool->setStatusTip( i18n("Selects the tab order tool") ); actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) ); actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ), i18n( "Set &Buddy" ), Key_F12, - actionGroupTools, QString::number( BUDDY_TOOL ).latin1(), + actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(), TRUE ); actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) ); actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) ); - QToolBar *tb = new QToolBar( this, "Tools" ); - tb->setCloseMode( QDockWindow::Undocked ); + TQToolBar *tb = new TQToolBar( this, "Tools" ); + tb->setCloseMode( TQDockWindow::Undocked ); toolsToolBar = tb; - QWhatsThis::add( tb, i18n( "<b>The Tools toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) ); + TQWhatsThis::add( tb, i18n( "<b>The Tools toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) ); - addToolBar( tb, i18n( "Tools" ), QMainWindow::DockTop, FALSE ); + addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE ); actionPointerTool->addTo( tb ); if ( !singleProjectMode() ) actionConnectTool->addTo( tb ); actionOrderTool->addTo( tb ); actionBuddyTool->addTo( tb ); - QPopupMenu *mmenu = new QPopupMenu( this, "Tools" ); + TQPopupMenu *mmenu = new TQPopupMenu( this, "Tools" ); toolsMenu = mmenu; toolsMenuId = 100; menubar->insertItem( i18n( "&Tools" ), mmenu, toolsMenuId ); @@ -492,34 +492,34 @@ void MainWindow::setupToolActions() "custom widgets") ); actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" "Widgets" ) ); - connect( actionToolsCustomWidget, SIGNAL( activated() ), - this, SLOT( toolsCustomWidget() ) ); + connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ), + this, TQT_SLOT( toolsCustomWidget() ) ); for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) { - QString grp = WidgetDatabase::widgetGroup( j ); + TQString grp = WidgetDatabase::widgetGroup( j ); if ( !WidgetDatabase::isGroupVisible( grp ) || WidgetDatabase::isGroupEmpty( grp ) ) continue; - QToolBar *tb = new QToolBar( this, grp.latin1() ); - tb->setCloseMode( QDockWindow::Undocked ); + TQToolBar *tb = new TQToolBar( this, grp.latin1() ); + tb->setCloseMode( TQDockWindow::Undocked ); widgetToolBars.append( tb ); bool plural = grp[(int)grp.length()-1] == 's'; if ( plural ) { - QWhatsThis::add( tb, i18n( "<b>The %1</b>%2" ).arg(grp).arg(i18n(toolbarHelp). + TQWhatsThis::add( tb, i18n( "<b>The %1</b>%2" ).arg(grp).arg(i18n(toolbarHelp). arg( i18n(" Click on a button to insert a single widget, " "or double click to insert multiple %1.") ).arg(grp)) ); } else { - QWhatsThis::add( tb, i18n( "<b>The %1 Widgets</b>%2" ).arg(grp).arg(i18n(toolbarHelp). + TQWhatsThis::add( tb, i18n( "<b>The %1 Widgets</b>%2" ).arg(grp).arg(i18n(toolbarHelp). arg( i18n(" Click on a button to insert a single %1 widget, " "or double click to insert multiple widgets.") ).arg(grp)) ); } addToolBar( tb, grp ); tb->hide(); - QPopupMenu *menu = new QPopupMenu( this, grp.latin1() ); + TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() ); mmenu->insertItem( grp, menu ); - QToolBar *tb2 = new QToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); - tb2->setFrameStyle( QFrame::NoFrame ); + TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); + tb2->setFrameStyle( TQFrame::NoFrame ); tb2->setOrientation( Qt::Vertical ); tb2->setBackgroundMode( PaletteBase ); toolBox->addItem( tb2, grp ); @@ -537,9 +537,9 @@ void MainWindow::setupToolActions() if ( WidgetDatabase::group( i ) != grp ) continue; // only widgets, i.e. not forms and temp stuff WidgetAction* a = - new WidgetAction( grp, actionGroupTools, QString::number( i ).latin1() ); + new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() ); a->setToggleAction( TRUE ); - QString atext = WidgetDatabase::className( i ); + TQString atext = WidgetDatabase::className( i ); if ( atext[0] == 'Q' ) atext = atext.mid(1); while ( atext.length() && atext[0] >= 'a' && atext[0] <= 'z' ) @@ -547,16 +547,16 @@ void MainWindow::setupToolActions() if ( atext.isEmpty() ) atext = WidgetDatabase::className( i ); a->setText( atext ); - QString ttip = WidgetDatabase::toolTip( i ); + TQString ttip = WidgetDatabase::toolTip( i ); a->setIconSet( WidgetDatabase::iconSet( i ) ); a->setToolTip( ttip ); if ( !WidgetDatabase::isWhatsThisLoaded() ) WidgetDatabase::loadWhatsThis( documentationPath() ); a->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::className( i )) ); - QString whats = i18n("<b>A %1</b>").arg( WidgetDatabase::className( i ) ); + TQString whats = i18n("<b>A %1</b>").arg( WidgetDatabase::className( i ) ); if ( !WidgetDatabase::whatsThis( i ).isEmpty() ) - whats += QString("<p>%1</p>").arg(WidgetDatabase::whatsThis( i )); + whats += TQString("<p>%1</p>").arg(WidgetDatabase::whatsThis( i )); a->setWhatsThis( whats+ i18n("<p>Double click on this tool to keep it selected.</p>") ); if ( grp != "KDE" ) @@ -568,15 +568,15 @@ void MainWindow::setupToolActions() commonWidgetsPage.append( a ); } } - QWidget *w; - tb2->setStretchableWidget( ( w = new QWidget( tb2 ) ) ); + TQWidget *w; + tb2->setStretchableWidget( ( w = new TQWidget( tb2 ) ) ); w->setBackgroundMode( tb2->backgroundMode() ); } if ( !customWidgetToolBar ) { - QToolBar *tb = new QToolBar( this, "Custom Widgets" ); - tb->setCloseMode( QDockWindow::Undocked ); - QWhatsThis::add( tb, i18n( "<b>The Custom Widgets toolbar</b>%1" + TQToolBar *tb = new TQToolBar( this, "Custom Widgets" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "<b>The Custom Widgets toolbar</b>%1" "<p>Click <b>Edit Custom Widgets...</b>" "in the <b>Tools|Custom</b> menu to " "add and change custom widgets</p>" ). @@ -587,25 +587,25 @@ void MainWindow::setupToolActions() tb->hide(); widgetToolBars.append( tb ); customWidgetToolBar = tb; - QPopupMenu *menu = new QPopupMenu( this, "Custom Widgets" ); + TQPopupMenu *menu = new TQPopupMenu( this, "Custom Widgets" ); mmenu->insertItem( "Custom", menu ); customWidgetMenu = menu; customWidgetToolBar->hide(); actionToolsCustomWidget->addTo( customWidgetMenu ); customWidgetMenu->insertSeparator(); - QToolBar *tb2 = new QToolBar( "Custom Widgets", 0, + TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0, toolBox, FALSE, "Custom Widgets" ); tb2->setBackgroundMode(PaletteBase); tb2->setOrientation( Qt::Vertical ); - tb2->setFrameStyle( QFrame::NoFrame ); + tb2->setFrameStyle( TQFrame::NoFrame ); toolBox->addItem( tb2, "Custom Widgets" ); customWidgetToolBar2 = tb2; } - QAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this ); + TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this ); a->setStatusTip( i18n( "Opens a dialog to configure the common " "widgets page of the toolbox") ); - connect( a, SIGNAL( activated() ), this, SLOT( toolsConfigure() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( toolsConfigure() ) ); mmenu->insertSeparator(); a->addTo( mmenu ); resetTool(); @@ -613,13 +613,13 @@ void MainWindow::setupToolActions() void MainWindow::setupFileActions() { - QToolBar* tb = new QToolBar( this, "File" ); - tb->setCloseMode( QDockWindow::Undocked ); + TQToolBar* tb = new TQToolBar( this, "File" ); + tb->setCloseMode( TQDockWindow::Undocked ); projectToolBar = tb; - QWhatsThis::add( tb, i18n( "<b>The File toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) ); + TQWhatsThis::add( tb, i18n( "<b>The File toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) ); addToolBar( tb, i18n( "File" ) ); - fileMenu = new QPopupMenu( this, "File" ); + fileMenu = new TQPopupMenu( this, "File" ); menubar->insertItem( i18n( "&File" ), fileMenu ); DesignerAction *a = 0; @@ -633,27 +633,27 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_N ); a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); a->setWhatsThis( whatsThisFrom( "File|New" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNew() ) ); a->addTo( tb ); a->addTo( fileMenu ); actionNewFile = a; } else { - actionGroupNew = new QActionGroup( this, 0, FALSE ); - QActionGroup* a = actionGroupNew; - ( (QActionGroup*)a )->setUsesDropDown( TRUE ); + actionGroupNew = new TQActionGroup( this, 0, FALSE ); + TQActionGroup* a = actionGroupNew; + ( (TQActionGroup*)a )->setUsesDropDown( TRUE ); a->setText( i18n( "New" ) ); a->setMenuText( i18n( "&New..." ) ); a->setIconSet( createIconSet("designer_form.png") ); a->setStatusTip( i18n( "Creates a new dialog or file" ) ); a->setWhatsThis( whatsThisFrom( "File|New" ) ); - QAction *newForm = new DesignerAction( a, 0 ); + TQAction *newForm = new DesignerAction( a, 0 ); newForm->setText( i18n( "New Dialog" ) ); newForm->setMenuText( i18n( "&Dialog..." ) ); newForm->setIconSet( createIconSet("designer_form.png") ); newForm->setAccel( CTRL + Key_N ); newForm->setStatusTip( i18n( "Creates a new dialog." ) ); - connect( newForm, SIGNAL( activated() ), this, SLOT( fileNewDialog() ) ); + connect( newForm, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNewDialog() ) ); DesignerAction *newFile = new DesignerAction( a, 0 ); newFile->setText( i18n( "New File" ) ); @@ -661,7 +661,7 @@ void MainWindow::setupFileActions() newFile->setIconSet( createIconSet("designer_filenew.png") ); newFile->setAccel( ALT + Key_N ); newFile->setStatusTip( i18n( "Creates a new file." ) ); - connect( newFile, SIGNAL( activated() ), this, SLOT( fileNewFile() ) ); + connect( newFile, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNewFile() ) ); actionNewFile = newFile; a->addTo( tb ); @@ -677,7 +677,7 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_O ); a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); a->setWhatsThis( whatsThisFrom( "File|Open" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileOpen() ) ); if ( !singleProject ) { a->addTo( tb ); a->addTo( fileMenu ); @@ -691,8 +691,8 @@ void MainWindow::setupFileActions() a->setMenuText( i18n( "&Close" ) ); a->setStatusTip( i18n( "Closes the current project or document" ) ); a->setWhatsThis(whatsThisFrom( "File|Close" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( fileClose() ) ); - connect( this, SIGNAL( hasActiveWindowOrProject(bool) ), a, SLOT( setEnabled(bool) ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileClose() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) { a->addTo( fileMenu ); fileMenu->insertSeparator(); @@ -706,8 +706,8 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_S ); a->setStatusTip( i18n( "Saves the current project or document" ) ); a->setWhatsThis(whatsThisFrom( "File|Save" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( fileSave() ) ); - connect( this, SIGNAL( hasActiveWindowOrProject(bool) ), a, SLOT( setEnabled(bool) ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSave() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); a->addTo( tb ); a->addTo( fileMenu ); @@ -717,8 +717,8 @@ void MainWindow::setupFileActions() a->setMenuText( i18n( "Save &As..." ) ); a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( fileSaveAs() ) ); - connect( this, SIGNAL( hasActiveWindow(bool) ), a, SLOT( setEnabled(bool) ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSaveAs() ) ); + connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( fileMenu ); @@ -728,8 +728,8 @@ void MainWindow::setupFileActions() a->setMenuText( i18n( "Sa&ve All" ) ); a->setStatusTip( i18n( "Saves all open documents" ) ); a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( fileSaveAll() ) ); - connect( this, SIGNAL( hasActiveWindowOrProject(bool) ), a, SLOT( setEnabled(bool) ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSaveAll() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) { a->addTo( fileMenu ); fileMenu->insertSeparator(); @@ -740,29 +740,29 @@ void MainWindow::setupFileActions() a->setMenuText( i18n( "Create &Template..." ) ); a->setStatusTip( i18n( "Creates a new template" ) ); a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( fileCreateTemplate() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileCreateTemplate() ) ); if ( !singleProject ) a->addTo( fileMenu ); if ( !singleProject ) fileMenu->insertSeparator(); - recentlyFilesMenu = new QPopupMenu( this ); - recentlyProjectsMenu = new QPopupMenu( this ); + recentlyFilesMenu = new TQPopupMenu( this ); + recentlyProjectsMenu = new TQPopupMenu( this ); if ( !singleProject ) { fileMenu->insertItem( i18n( "Recently Opened Files " ), recentlyFilesMenu ); fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu ); } - connect( recentlyFilesMenu, SIGNAL( aboutToShow() ), - this, SLOT( setupRecentlyFilesMenu() ) ); - connect( recentlyProjectsMenu, SIGNAL( aboutToShow() ), - this, SLOT( setupRecentlyProjectsMenu() ) ); - connect( recentlyFilesMenu, SIGNAL( activated( int ) ), - this, SLOT( recentlyFilesMenuActivated( int ) ) ); - connect( recentlyProjectsMenu, SIGNAL( activated( int ) ), - this, SLOT( recentlyProjectsMenuActivated( int ) ) ); + connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupRecentlyFilesMenu() ) ); + connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupRecentlyProjectsMenu() ) ); + connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) ); + connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) ); if ( !singleProject ) fileMenu->insertSeparator(); @@ -778,22 +778,22 @@ void MainWindow::setupFileActions() a->setText( i18n( "Close" ) ); a->setMenuText( i18n( "&Close" ) ); } - connect( a, SIGNAL( activated() ), this, SLOT( fileQuit() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileQuit() ) ); a->addTo( fileMenu ); } void MainWindow::setupProjectActions() { - projectMenu = new QPopupMenu( this, "Project" ); + projectMenu = new TQPopupMenu( this, "Project" ); menubar->insertItem( i18n( "Pr&oject" ), projectMenu ); - QActionGroup *ag = new QActionGroup( this, 0 ); + TQActionGroup *ag = new TQActionGroup( this, 0 ); ag->setText( i18n( "Active Project" ) ); ag->setMenuText( i18n( "Active Project" ) ); ag->setExclusive( TRUE ); ag->setUsesDropDown( TRUE ); - connect( ag, SIGNAL( selected( QAction * ) ), this, SLOT( projectSelected( QAction * ) ) ); - connect( ag, SIGNAL( selected( QAction * ) ), this, SIGNAL( projectChanged() ) ); + connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SLOT( projectSelected( TQAction * ) ) ); + connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SIGNAL( projectChanged() ) ); DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE ); eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE ); projects.insert( a, eProject ); @@ -805,44 +805,44 @@ void MainWindow::setupProjectActions() if ( !singleProject ) projectMenu->insertSeparator(); - a = new DesignerAction( i18n( "Add File" ), QPixmap(), i18n( "&Add File..." ), 0, this, 0 ); + a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, this, 0 ); actionProjectAddFile = a; a->setStatusTip( i18n("Adds a file to the current project") ); a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( projectInsertFile() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( projectInsertFile() ) ); a->setEnabled( FALSE ); - connect( this, SIGNAL( hasNonDummyProject(bool) ), a, SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( projectMenu ); - actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), QPixmap(), + actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), i18n( "&Image Collection..." ), 0, this, 0 ); actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); - connect( actionEditPixmapCollection, SIGNAL( activated() ), this, SLOT( editPixmapCollection() ) ); + connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPixmapCollection() ) ); actionEditPixmapCollection->setEnabled( FALSE ); - connect( this, SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); actionEditPixmapCollection->addTo( projectMenu ); #ifndef QT_NO_SQL - actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), QPixmap(), + actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), i18n( "&Database Connections..." ), 0, this, 0 ); actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); - connect( actionEditDatabaseConnections, SIGNAL( activated() ), this, SLOT( editDatabaseConnections() ) ); + connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDatabaseConnections() ) ); //actionEditDatabaseConnections->setEnabled( FALSE ); - //connect( this, SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, SLOT( setEnabled(bool) ) ); + //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) actionEditDatabaseConnections->addTo( projectMenu ); #endif - actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), QPixmap(), + actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), i18n( "&Project Settings..." ), 0, this, 0 ); actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); - connect( actionEditProjectSettings, SIGNAL( activated() ), this, SLOT( editProjectSettings() ) ); + connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), this, TQT_SLOT( editProjectSettings() ) ); actionEditProjectSettings->setEnabled( FALSE ); - connect( this, SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); actionEditProjectSettings->addTo( projectMenu ); } @@ -850,26 +850,26 @@ void MainWindow::setupProjectActions() void MainWindow::setupPreviewActions() { DesignerAction* a = 0; - QPopupMenu *menu = new QPopupMenu( this, "Preview" ); + TQPopupMenu *menu = new TQPopupMenu( this, "Preview" ); layoutMenu = menu; menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); - a = new DesignerAction( i18n( "Preview Form" ), QPixmap(), i18n( "Preview &Form" ), 0, this, 0 ); + a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, this, 0 ); actionPreview = a; a->setAccel( CTRL + Key_T ); a->setStatusTip( i18n("Opens a preview") ); a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( previewForm() ) ); - connect( this, SIGNAL( hasActiveForm(bool) ), a, SLOT( setEnabled(bool) ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( previewForm() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); a->addTo( menu ); menu->insertSeparator(); - QSignalMapper *mapper = new QSignalMapper( this ); - connect( mapper, SIGNAL(mapped(const QString&)), this, SLOT(previewForm(const QString&)) ); - QStringList styles = QStyleFactory::keys(); - for ( QStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { - QString info; + TQSignalMapper *mapper = new TQSignalMapper( this ); + connect( mapper, TQT_SIGNAL(mapped(const TQString&)), this, TQT_SLOT(previewForm(const TQString&)) ); + TQStringList styles = TQStyleFactory::keys(); + for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { + TQString info; if ( *it == "Motif" ) info = i18n( "The preview will use the Motif look and feel which is used as the default style on most UNIX systems." ); else if ( *it == "Windows" ) @@ -883,15 +883,15 @@ void MainWindow::setupPreviewActions() else if ( *it == "MotifPlus" ) info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); - a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), QPixmap(), + a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), i18n( "... in %1 Style" ).arg( *it ), 0, this, 0 ); a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); a->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>" "<p>Use the preview to test the design and " "signal-slot connections of the current form. %2</p>").arg( *it ).arg( info ) ); mapper->setMapping( a, *it ); - connect( a, SIGNAL(activated()), mapper, SLOT(map()) ); - connect( this, SIGNAL( hasActiveForm(bool) ), a, SLOT( setEnabled(bool) ) ); + connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); a->addTo( menu ); } } @@ -905,38 +905,38 @@ void MainWindow::setupWindowActions() actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, this ); actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); - connect( actionWindowTile, SIGNAL( activated() ), qworkspace, SLOT( tile() ) ); + connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, this ); actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); - connect( actionWindowCascade, SIGNAL( activated() ), qworkspace, SLOT( cascade() ) ); + connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, this ); actionWindowClose->setStatusTip( i18n( "Closes the active window") ); actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); - connect( actionWindowClose, SIGNAL( activated() ), qworkspace, SLOT( closeActiveWindow() ) ); + connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, this ); actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); - connect( actionWindowCloseAll, SIGNAL( activated() ), qworkspace, SLOT( closeAllWindows() ) ); + connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, this ); actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); - connect( actionWindowNext, SIGNAL( activated() ), qworkspace, SLOT( activateNextWindow() ) ); + connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, this ); actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); - connect( actionWindowPrevious, SIGNAL( activated() ), qworkspace, SLOT( activatePreviousWindow() ) ); + connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); // } if ( !windowMenu ) { - windowMenu = new QPopupMenu( this, "Window" ); + windowMenu = new TQPopupMenu( this, "Window" ); menubar->insertItem( i18n( "&Window" ), windowMenu ); - connect( windowMenu, SIGNAL( aboutToShow() ), - this, SLOT( setupWindowActions() ) ); + connect( windowMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupWindowActions() ) ); } else { windowMenu->clear(); } @@ -952,26 +952,26 @@ void MainWindow::setupWindowActions() windowMenu->insertSeparator(); windowMenu->insertItem( i18n( "Vie&ws" ), createDockWindowMenu( NoToolBars ) ); windowMenu->insertItem( i18n( "Tool&bars" ), createDockWindowMenu( OnlyToolBars ) ); - QWidgetList windows = qworkspace->windowList(); + TQWidgetList windows = qworkspace->windowList(); if ( windows.count() && formWindow() ) windowMenu->insertSeparator(); int j = 0; for ( int i = 0; i < int( windows.count() ); ++i ) { - QWidget *w = windows.at( i ); + TQWidget *w = windows.at( i ); if ( !::qt_cast<FormWindow*>(w) && !::qt_cast<SourceEditor*>(w) ) continue; if ( ::qt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) ) continue; j++; - QString itemText; + TQString itemText; if ( j < 10 ) - itemText = QString("&%1 ").arg( j ); + itemText = TQString("&%1 ").arg( j ); if ( ::qt_cast<FormWindow*>(w) ) itemText += w->name(); else itemText += w->caption(); - int id = windowMenu->insertItem( itemText, this, SLOT( windowsMenuActivated( int ) ) ); + int id = windowMenu->insertItem( itemText, this, TQT_SLOT( windowsMenuActivated( int ) ) ); windowMenu->setItemParameter( id, i ); windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); } @@ -982,44 +982,44 @@ void MainWindow::setupHelpActions() actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, this, 0 ); actionHelpContents->setStatusTip( i18n("Opens the online help") ); actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); - connect( actionHelpContents, SIGNAL( activated() ), this, SLOT( helpContents() ) ); + connect( actionHelpContents, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpContents() ) ); actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, this, 0 ); actionHelpManual->setStatusTip( i18n("Opens the Qt Designer manual") ); actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); - connect( actionHelpManual, SIGNAL( activated() ), this, SLOT( helpManual() ) ); + connect( actionHelpManual, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpManual() ) ); - actionHelpAbout = new DesignerAction( i18n("About"), QPixmap(), i18n("&About"), 0, this, 0 ); + actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, this, 0 ); actionHelpAbout->setStatusTip( i18n("Displays information about Qt Designer") ); actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); - connect( actionHelpAbout, SIGNAL( activated() ), this, SLOT( helpAbout() ) ); + connect( actionHelpAbout, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpAbout() ) ); - actionHelpAboutQt = new DesignerAction( i18n("About Qt"), QPixmap(), i18n("About &Qt"), 0, this, 0 ); + actionHelpAboutQt = new DesignerAction( i18n("About Qt"), TQPixmap(), i18n("About &Qt"), 0, this, 0 ); actionHelpAboutQt->setStatusTip( i18n("Displays information about the Qt Toolkit") ); actionHelpAboutQt->setWhatsThis( whatsThisFrom( "Help|About Qt" ) ); - connect( actionHelpAboutQt, SIGNAL( activated() ), this, SLOT( helpAboutQt() ) ); + connect( actionHelpAboutQt, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpAboutQt() ) ); #if 0 //defined(QT_NON_COMMERCIAL) // ### not used anymore -- should be deleted? - actionHelpRegister = new DesignerAction( i18n("Register Qt"), QPixmap(), i18n("&Register Qt..."), 0, this, 0 ); + actionHelpRegister = new DesignerAction( i18n("Register Qt"), TQPixmap(), i18n("&Register Qt..."), 0, this, 0 ); actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") ); actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") ); - connect( actionHelpRegister, SIGNAL( activated() ), this, SLOT( helpRegister() ) ); + connect( actionHelpRegister, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpRegister() ) ); #endif - actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), QIconSet( whatsthis_image, whatsthis_image ), + actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), i18n("What's This?"), SHIFT + Key_F1, this, 0 ); actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); - connect( actionHelpWhatsThis, SIGNAL( activated() ), this, SLOT( whatsThis() ) ); + connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), this, TQT_SLOT( whatsThis() ) ); -/* QToolBar *tb = new QToolBar( this, "Help" ); - tb->setCloseMode( QDockWindow::Undocked ); - QWhatsThis::add( tb, i18n( "<b>The Help toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("") )); +/* TQToolBar *tb = new TQToolBar( this, "Help" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "<b>The Help toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("") )); addToolBar( tb, i18n( "Help" ) ); actionHelpWhatsThis->addTo( tb );*/ - QPopupMenu *menu = new QPopupMenu( this, "Help" ); + TQPopupMenu *menu = new TQPopupMenu( this, "Help" ); menubar->insertSeparator(); menubar->insertItem( i18n( "&Help" ), menu ); actionHelpContents->addTo( menu ); @@ -1047,9 +1047,9 @@ void MainWindow::fileNew() void MainWindow::fileNewDialog() { static int forms = 0; - QString n = "Dialog" + QString::number( ++forms ); + TQString n = "Dialog" + TQString::number( ++forms ); while ( currentProject->findFormFile( n + ".ui" ) ) - n = "Dialog" + QString::number( ++forms ); + n = "Dialog" + TQString::number( ++forms ); FormWindow *fw = 0; FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject ); fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); @@ -1058,7 +1058,7 @@ void MainWindow::fileNewDialog() workspace()->update(); fw->setProject( currentProject ); MetaDataBase::addEntry( fw ); - QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QDialog" ), fw, n.latin1() ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() ); fw->setMainContainer( w ); fw->setCaption( n ); fw->resize( 600, 480 ); @@ -1072,7 +1072,7 @@ void MainWindow::fileNewDialog() void MainWindow::fileNewFile() { - QString name = QInputDialog::getText( i18n( "Name of File" ), i18n( "Enter the name of the new source file:" ) ); + TQString name = QInputDialog::getText( i18n( "Name of File" ), i18n( "Enter the name of the new source file:" ) ); if ( name.isEmpty() ) return; if ( name.right( 3 ) != ".qs" ) @@ -1096,7 +1096,7 @@ void MainWindow::fileClose() if ( !currentProject->isDummy() ) { fileCloseProject(); } else { - QWidget *w = qworkspace->activeWindow(); + TQWidget *w = qworkspace->activeWindow(); if ( w ) { if ( ::qt_cast<FormWindow*>(w) ) ( (FormWindow*)w )->formFile()->close(); @@ -1112,9 +1112,9 @@ void MainWindow::fileCloseProject() if ( currentProject->isDummy() ) return; Project *pro = currentProject; - QAction* a = 0; - QAction* lastValid = 0; - for ( QMap<QAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it ) { + TQAction* a = 0; + TQAction* lastValid = 0; + for ( TQMap<TQAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it ) { if ( it.data() == pro ) { a = it.key(); if ( lastValid ) @@ -1124,7 +1124,7 @@ void MainWindow::fileCloseProject() } if ( a ) { if ( pro->isModified() ) { - switch ( QMessageBox::warning( this, i18n( "Save Project Settings" ), + switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { case 0: // save @@ -1139,11 +1139,11 @@ void MainWindow::fileCloseProject() } } - QWidgetList windows = qWorkspace()->windowList(); + TQWidgetList windows = qWorkspace()->windowList(); qWorkspace()->blockSignals( TRUE ); - QWidgetListIt wit( windows ); + TQWidgetListIt wit( windows ); while ( wit.current() ) { - QWidget *w = wit.current(); + TQWidget *w = wit.current(); ++wit; if ( ::qt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->project() == pro ) { @@ -1169,7 +1169,7 @@ void MainWindow::fileCloseProject() statusMessage( i18n( "Selected project '%1'" ).arg( currentProject->projectName() ) ); } if ( !windows.isEmpty() ) { - for ( QWidget *w = windows.first(); w; w = windows.next() ) { + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { if ( !::qt_cast<FormWindow*>(w) ) continue; w->setFocus(); @@ -1179,7 +1179,7 @@ void MainWindow::fileCloseProject() } else { emit hasActiveWindow( FALSE ); emit hasActiveForm( FALSE ); - updateUndoRedo( FALSE, FALSE, QString::null, QString::null ); + updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null ); } } } @@ -1194,26 +1194,26 @@ void MainWindow::projectInsertFile() fileOpen( "", "" ); } -void MainWindow::fileOpen( const QString &filter, const QString &extension, const QString &fn, bool inProject ) +void MainWindow::fileOpen( const TQString &filter, const TQString &extension, const TQString &fn, bool inProject ) { statusMessage( i18n( "Open a file...") ); - QPluginManager<ImportFilterInterface> manager( IID_ImportFilter, QApplication::libraryPaths(), pluginDirectory() ); + QPluginManager<ImportFilterInterface> manager( IID_ImportFilter, TQApplication::libraryPaths(), pluginDirectory() ); Project* project = inProject ? currentProject : eProject; - QStringList additionalSources; + TQStringList additionalSources; { - QStringList filterlist; + TQStringList filterlist; if ( filter.isEmpty() ) { if ( !inProject ) filterlist << i18n( "*.ui *.pro|Designer Files" ); filterlist << i18n( "*.ui|Qt User-Interface Files" ); if ( !inProject ) filterlist << i18n( "*.pro|QMAKE Project Files" ); - QStringList list = manager.featureList(); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + TQStringList list = manager.featureList(); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) filterlist << *it; LanguageInterface *iface = MetaDataBase::languageInterface( project->language() ); if ( iface ) { @@ -1225,26 +1225,26 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons filterlist << filter; } - QString filters = filterlist.join( "\n" ); + TQString filters = filterlist.join( "\n" ); - QStringList filenames; + TQStringList filenames; if ( fn.isEmpty() ) { if ( !inProject ) { - QString f = KFileDialog::getOpenFileName( QString::null, filters, this, /*0,*/ + TQString f = KFileDialog::getOpenFileName( TQString::null, filters, this, /*0,*/ i18n("Open" )/*, &lastOpenFilter */); filenames << f; } else { - filenames = KFileDialog::getOpenFileNames( QString::null, filters, this, /*0,*/ + filenames = KFileDialog::getOpenFileNames( TQString::null, filters, this, /*0,*/ i18n("Add")/*, &lastOpenFilter */); } } else { filenames << fn; } - for ( QStringList::Iterator fit = filenames.begin(); fit != filenames.end(); ++fit ) { - QString filename = *fit; + for ( TQStringList::Iterator fit = filenames.begin(); fit != filenames.end(); ++fit ) { + TQString filename = *fit; if ( !filename.isEmpty() ) { - QFileInfo fi( filename ); + TQFileInfo fi( filename ); if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { addRecentlyOpened( filename, recentlyProjects ); @@ -1261,8 +1261,8 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons sf = new SourceFile( project->makeRelative( filename ), FALSE, project ); editSource( sf ); } else if ( extension.isEmpty() ) { - QString filter; - for ( QStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { + TQString filter; + for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) { filter = *it2; break; @@ -1277,7 +1277,7 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons return; } statusMessage( i18n( "Importing '%1' using import filter ...").arg( filename ) ); - QStringList list = iface->import( filter, filename ); + TQStringList list = iface->import( filter, filename ); iface->release(); if ( list.isEmpty() ) { statusMessage( i18n( "Nothing to load in '%1'").arg( filename )/*, 3000*/ ); @@ -1286,9 +1286,9 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons if ( !inProject ) setCurrentProject( eProject ); addRecentlyOpened( filename, recentlyFiles ); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { openFormWindow( *it, FALSE ); - QFile::remove( *it ); + TQFile::remove( *it ); } statusBar()->clear(); } @@ -1297,19 +1297,19 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons } } -FormWindow *MainWindow::openFormWindow( const QString &filename, bool validFileName, FormFile *ff ) +FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFileName, FormFile *ff ) { if ( filename.isEmpty() ) return 0; bool makeNew = FALSE; - if ( !QFile::exists( filename ) ) { + if ( !TQFile::exists( filename ) ) { makeNew = TRUE; } else { - QFile f( filename ); + TQFile f( filename ); f.open( IO_ReadOnly ); - QTextStream ts( &f ); + TQTextStream ts( &f ); makeNew = ts.read().length() < 2; } if ( makeNew ) { @@ -1328,20 +1328,20 @@ FormWindow *MainWindow::openFormWindow( const QString &filename, bool validFileN if ( ff2 ) ff = ff2; - QApplication::setOverrideCursor( WaitCursor ); + TQApplication::setOverrideCursor( WaitCursor ); Resource resource( this ); if ( !ff ) ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject ); bool b = resource.load( ff ) && (FormWindow*)resource.widget(); if ( !validFileName && resource.widget() ) - ( (FormWindow*)resource.widget() )->setFileName( QString::null ); - QApplication::restoreOverrideCursor(); + ( (FormWindow*)resource.widget() )->setFileName( TQString::null ); + TQApplication::restoreOverrideCursor(); if ( b ) { rebuildCustomWidgetGUI(); statusMessage( i18n( "Loaded file '%1'").arg( filename )/*, 3000 */); } else { statusMessage( i18n( "Failed to load file '%1'").arg( filename )/*, 5000 */); - QMessageBox::information( this, i18n("Load File"), i18n("Could not load file '%1'.").arg( filename ) ); + TQMessageBox::information( this, i18n("Load File"), i18n("Could not load file '%1'.").arg( filename ) ); delete ff; } return (FormWindow*)resource.widget(); @@ -1365,7 +1365,7 @@ bool MainWindow::fileSaveForm() FormWindow *fw = 0; - QWidget *w = qWorkspace()->activeWindow(); + TQWidget *w = qWorkspace()->activeWindow(); if ( w ) { if ( ::qt_cast<SourceEditor*>(w) ) { SourceEditor *se = (SourceEditor*)w; @@ -1382,7 +1382,7 @@ bool MainWindow::fileSaveForm() fw = formWindow(); if ( !fw || !fw->formFile()->save() ) return FALSE; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return TRUE; } @@ -1397,7 +1397,7 @@ bool MainWindow::fileSaveAs() { statusMessage( i18n( "Enter a filename..." ) ); - QWidget *w = qworkspace->activeWindow(); + TQWidget *w = qworkspace->activeWindow(); if ( !w ) return TRUE; if ( ::qt_cast<FormWindow*>(w) ) @@ -1409,7 +1409,7 @@ bool MainWindow::fileSaveAs() void MainWindow::fileSaveAll() { - for ( QMap<QAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it ) + for ( TQMap<TQAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it ) (*it)->save(); } @@ -1425,54 +1425,54 @@ void MainWindow::fileCreateTemplate() } for ( i = 0; i < WidgetDatabase::count(); ++i ) { if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) && - WidgetDatabase::className( i ) != "QTabWidget" && WidgetDatabase::group( i ) != "Temp" ) { + WidgetDatabase::className( i ) != "TQTabWidget" && WidgetDatabase::group( i ) != "Temp" ) { dia.listClass->insertItem( WidgetDatabase::className( i ) ); } } - QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets(); + TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets(); for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { if ( w->isContainer ) dia.listClass->insertItem( w->className ); } dia.editName->setText( i18n( "NewTemplate" ) ); - connect( dia.buttonCreate, SIGNAL( clicked() ), - this, SLOT( createNewTemplate() ) ); + connect( dia.buttonCreate, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( createNewTemplate() ) ); dia.exec(); } void MainWindow::createNewTemplate() { CreateTemplate *dia = (CreateTemplate*)sender()->parent(); - QString fn = dia->editName->text(); - QString cn = dia->listClass->currentText(); + TQString fn = dia->editName->text(); + TQString cn = dia->listClass->currentText(); if ( fn.isEmpty() || cn.isEmpty() ) { - QMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); + TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); return; } - QStringList templRoots; + TQStringList templRoots; const char *qtdir = getenv( "QTDIR" ); if(qtdir) templRoots << qtdir; templRoots << qInstallPathData(); if(qtdir) //try the tools/designer directory last! - templRoots << (QString(qtdir) + "/tools/designer"); - QFile f; - for ( QStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { - if ( QFile::exists( (*it) + "/templates/" )) { - QString tmpfn = (*it) + "/templates/" + fn + ".ui"; + templRoots << (TQString(qtdir) + "/tools/designer"); + TQFile f; + for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { + if ( TQFile::exists( (*it) + "/templates/" )) { + TQString tmpfn = (*it) + "/templates/" + fn + ".ui"; f.setName(tmpfn); if(f.open(IO_WriteOnly)) break; } } if ( !f.isOpen() ) { - QMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); + TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); return; } - QTextStream ts( &f ); + TQTextStream ts( &f ); ts << "<!DOCTYPE UI><UI>" << endl; ts << "<widget>" << endl; @@ -1550,8 +1550,8 @@ void MainWindow::editPaste() if ( !formWindow() ) return; - QWidget *w = formWindow()->mainContainer(); - QWidgetList l( formWindow()->selectedWidgets() ); + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); if ( l.count() == 1 ) { w = l.first(); if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || @@ -1565,7 +1565,7 @@ void MainWindow::editPaste() hierarchyView->widgetInserted( 0 ); formWindow()->commandHistory()->setModified( TRUE ); } else { - QMessageBox::information( this, i18n( "Paste Error" ), + TQMessageBox::information( this, i18n( "Paste Error" ), i18n( "Cannot paste widgets. Designer could not find a container\n" "to paste into which does not contain a layout. Break the layout\n" "of the container you want to paste into and select this container\n" @@ -1653,8 +1653,8 @@ void MainWindow::editLayoutContainerVertical() { if ( !formWindow() ) return; - QWidget *w = formWindow()->mainContainer(); - QWidgetList l( formWindow()->selectedWidgets() ); + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); if ( l.count() == 1 ) w = l.first(); if ( w ) @@ -1665,8 +1665,8 @@ void MainWindow::editLayoutContainerHorizontal() { if ( !formWindow() ) return; - QWidget *w = formWindow()->mainContainer(); - QWidgetList l( formWindow()->selectedWidgets() ); + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); if ( l.count() == 1 ) w = l.first(); if ( w ) @@ -1677,8 +1677,8 @@ void MainWindow::editLayoutContainerGrid() { if ( !formWindow() ) return; - QWidget *w = formWindow()->mainContainer(); - QWidgetList l( formWindow()->selectedWidgets() ); + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); if ( l.count() == 1 ) w = l.first(); if ( w ) @@ -1689,7 +1689,7 @@ void MainWindow::editBreakLayout() { if ( !formWindow() || !breakLayout ) return; - QWidget *w = formWindow()->mainContainer(); + TQWidget *w = formWindow()->mainContainer(); if ( formWindow()->currentWidget() ) w = formWindow()->currentWidget(); if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || @@ -1697,7 +1697,7 @@ void MainWindow::editBreakLayout() formWindow()->breakLayout( w ); return; } else { - QWidgetList widgets = formWindow()->selectedWidgets(); + TQWidgetList widgets = formWindow()->selectedWidgets(); for ( w = widgets.first(); w; w = widgets.next() ) { if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) @@ -1757,9 +1757,9 @@ SourceEditor *MainWindow::openSourceEditor() if ( !formWindow() ) return 0; - QString lang = currentProject->language(); + TQString lang = currentProject->language(); if ( !MetaDataBase::hasEditor( lang ) ) { - QMessageBox::information( this, i18n( "Edit Source" ), + 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 ) ); return 0; @@ -1780,9 +1780,9 @@ SourceEditor *MainWindow::openSourceEditor() SourceEditor *MainWindow::editSource( SourceFile *f ) { - QString lang = currentProject->language(); + TQString lang = currentProject->language(); if ( !MetaDataBase::hasEditor( lang ) ) { - QMessageBox::information( this, i18n( "Edit Source" ), + 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 ) ); return 0; @@ -1798,8 +1798,8 @@ SourceEditor *MainWindow::editSource( SourceFile *f ) return editor; } -SourceEditor *MainWindow::createSourceEditor( QObject *object, Project *project, - const QString &lang, const QString &func, +SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project, + const TQString &lang, const TQString &func, bool rereadSource ) { SourceEditor *editor = 0; @@ -1810,14 +1810,14 @@ SourceEditor *MainWindow::createSourceEditor( QObject *object, Project *project, LanguageInterface *lIface = MetaDataBase::languageInterface( lang ); if ( !lIface ) return 0; - QApplication::setOverrideCursor( WaitCursor ); + TQApplication::setOverrideCursor( WaitCursor ); editor = new SourceEditor( qWorkspace(), eIface, lIface ); eIface->release(); lIface->release(); editor->setLanguage( lang ); sourceEditors.append( editor ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); if ( editor->object() != object ) editor->setObject( object, project ); @@ -1870,7 +1870,7 @@ void MainWindow::editPreferences() statusMessage( i18n( "Edit preferences..." ) ); Preferences *dia = new Preferences( this, 0, TRUE ); prefDia = dia; - connect( dia->helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); + connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); dia->buttonColor->setEditor( StyledButton::ColorEditor ); dia->buttonPixmap->setEditor( StyledButton::PixmapEditor ); dia->groupBoxGrid->setChecked( sGrid ); @@ -1880,7 +1880,7 @@ void MainWindow::editPreferences() dia->checkBoxWorkspace->setChecked( restoreConfig ); dia->checkBoxTextLabels->setChecked( usesTextLabel() ); dia->buttonColor->setColor( qworkspace->backgroundColor() ); - QString pluginPaths = QApplication::libraryPaths().join("\n"); + TQString pluginPaths = TQApplication::libraryPaths().join("\n"); dia->textEditPluginPaths->setText(pluginPaths); if ( qworkspace->backgroundPixmap() ) dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() ); @@ -1895,33 +1895,33 @@ void MainWindow::editPreferences() int h = autoSaveInterval / 3600; int m = ( autoSaveInterval - h * 3600 ) / 60; int s = autoSaveInterval - ( h * 3600 + m * 60 ); - QTime t( h, m, s ); + TQTime t( h, m, s ); dia->timeEditAutoSave->setTime( t ); SenderObject *senderObject = new SenderObject( designerInterface() ); - QValueList<Tab>::Iterator it; + TQValueList<Tab>::Iterator it; for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { Tab t = *it; dia->tabWidget->addTab( t.w, t.title ); if ( t.receiver ) { - connect( dia->buttonOk, SIGNAL( clicked() ), senderObject, SLOT( emitAcceptSignal() ) ); - connect( senderObject, SIGNAL( acceptSignal( QUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot ); + 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 ); senderObject->emitInitSignal(); - disconnect( senderObject, SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot ); + disconnect( senderObject, TQT_SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot ); } } - if ( dia->exec() == QDialog::Accepted ) { + if ( dia->exec() == TQDialog::Accepted ) { setSnapGrid( dia->checkBoxSnapGrid->isChecked() ); setShowGrid( dia->groupBoxGrid->isChecked() ); - setGrid( QPoint( dia->spinGridX->value(), + setGrid( TQPoint( dia->spinGridX->value(), dia->spinGridY->value() ) ); restoreConfig = dia->checkBoxWorkspace->isChecked(); setUsesTextLabel( dia->checkBoxTextLabels->isChecked() ); if (dia->textEditPluginPaths->isModified()) { pluginPaths = dia->textEditPluginPaths->text(); - QApplication::setLibraryPaths(QStringList::split("\n", pluginPaths)); + TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths)); savePluginPaths = TRUE; } @@ -1936,7 +1936,7 @@ void MainWindow::editPreferences() databaseAutoEdit = !dia->checkAutoEdit->isChecked(); shStartDialog = dia->checkBoxStartDialog->isChecked(); autoSaveEnabled = dia->checkBoxAutoSave->isChecked(); - QTime time = dia->timeEditAutoSave->time(); + TQTime time = dia->timeEditAutoSave->time(); autoSaveInterval = time.hour() * 3600 + time.minute() * 60 + time.second(); if ( autoSaveEnabled ) autoSaveTimer->start( autoSaveInterval * 1000 ); @@ -1947,7 +1947,7 @@ void MainWindow::editPreferences() for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { Tab t = *it; dia->tabWidget->removePage( t.w ); - t.w->reparent( 0, QPoint(0,0), FALSE ); + t.w->reparent( 0, TQPoint(0,0), FALSE ); } for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) @@ -2045,7 +2045,7 @@ void MainWindow::toolsCustomWidget() void MainWindow::toolsConfigure() { ConfigToolboxDialog dlg( this ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return; rebuildCommonWidgetsToolBoxPage(); } @@ -2055,7 +2055,7 @@ void MainWindow::showStartDialog() if ( singleProjectMode() ) return; for ( int i = 1; i < qApp->argc(); ++i ) { - QString arg = qApp->argv()[i]; + TQString arg = qApp->argv()[i]; if ( arg[0] != '-' ) return; } |