summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/mainwindow.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /kdevdesigner/designer/mainwindow.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/mainwindow.cpp')
-rw-r--r--kdevdesigner/designer/mainwindow.cpp1286
1 files changed, 643 insertions, 643 deletions
diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp
index 530d9b07..874a410d 100644
--- a/kdevdesigner/designer/mainwindow.cpp
+++ b/kdevdesigner/designer/mainwindow.cpp
@@ -47,12 +47,12 @@
#include "actiondnd.h"
#include "project.h"
#include "projectsettingsimpl.h"
-#include "qwidgetfactory.h"
+#include "tqwidgetfactory.h"
#include "pixmapcollection.h"
#include "qcompletionedit.h"
#include "sourcefile.h"
#include "orderindicator.h"
-#include <qtoolbox.h>
+#include <tqtoolbox.h>
#include "widgetaction.h"
#include "propertyobject.h"
#include "popupmenueditor.h"
@@ -84,63 +84,63 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qinputdialog.h>
-#include <qtoolbar.h>
-#include <qfeatures.h>
-#include <qmetaobject.h>
-#include <qaction.h>
-#include <qpixmap.h>
-#include <qworkspace.h>
-#include <qfiledialog.h>
-#include <qclipboard.h>
-#include <qmessagebox.h>
-#include <qbuffer.h>
-#include <qdir.h>
-#include <qstyle.h>
-#include <qlabel.h>
-#include <qstatusbar.h>
-#include <qfile.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qwizard.h>
-#include <qtimer.h>
-#include <qlistbox.h>
-#include <qdockwindow.h>
-#include <qstylefactory.h>
-#include <qvbox.h>
-#include <qprocess.h>
-#include <qsettings.h>
-#include <qaccel.h>
-#include <qtooltip.h>
-#include <qsizegrip.h>
-#include <qtextview.h>
+#include <tqinputdialog.h>
+#include <tqtoolbar.h>
+#include <tqfeatures.h>
+#include <tqmetaobject.h>
+#include <tqaction.h>
+#include <tqpixmap.h>
+#include <tqworkspace.h>
+#include <tqfiledialog.h>
+#include <tqclipboard.h>
+#include <tqmessagebox.h>
+#include <tqbuffer.h>
+#include <tqdir.h>
+#include <tqstyle.h>
+#include <tqlabel.h>
+#include <tqstatusbar.h>
+#include <tqfile.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqwizard.h>
+#include <tqtimer.h>
+#include <tqlistbox.h>
+#include <tqdockwindow.h>
+#include <tqstylefactory.h>
+#include <tqvbox.h>
+#include <tqprocess.h>
+#include <tqsettings.h>
+#include <tqaccel.h>
+#include <tqtooltip.h>
+#include <tqsizegrip.h>
+#include <tqtextview.h>
#include <qassistantclient.h>
#include <stdlib.h>
#include "kdevdesigner_part.h"
static bool mblockNewForms = FALSE;
-extern QMap<QWidget*, QString> *qwf_forms;
-extern QString *qwf_language;
+extern TQMap<TQWidget*, TQString> *qwf_forms;
+extern TQString *qwf_language;
extern bool qwf_execute_code;
extern bool qwf_stays_on_top;
-extern void set_splash_status( const QString &txt );
-extern QObject* qwf_form_object;
-extern QString *qwf_plugin_dir;
+extern void set_splash_status( const TQString &txt );
+extern TQObject* qwf_form_object;
+extern TQString *qwf_plugin_dir;
MainWindow *MainWindow::self = 0;
-QString assistantPath()
+TQString assistantPath()
{
- QString path = QDir::cleanDirPath( QString( qInstallPathBins() ) +
- QDir::separator() );
+ TQString path = TQDir::cleanDirPath( TQString( qInstallPathBins() ) +
+ TQDir::separator() );
return path;
}
-static QString textNoAccel( const QString& text)
+static TQString textNoAccel( const TQString& text)
{
- QString t = text;
+ TQString t = text;
int i;
while ( (i = t.find('&') )>= 0 ) {
t.remove(i,1);
@@ -149,8 +149,8 @@ static QString textNoAccel( const QString& text)
}
-MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, const QString &plgDir )
- : QMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ),
+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 ),
previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part)
@@ -172,20 +172,20 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
inDebugMode = FALSE;
savePluginPaths = FALSE;
- updateFunctionsTimer = new QTimer( this );
- connect( updateFunctionsTimer, SIGNAL( timeout() ),
- this, SLOT( doFunctionsChanged() ) );
+ updateFunctionsTimer = new TQTimer( this );
+ connect( updateFunctionsTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( doFunctionsChanged() ) );
- autoSaveTimer = new QTimer( this );
- connect( autoSaveTimer, SIGNAL( timeout() ),
- this, SLOT( fileSaveAll() ) );
+ autoSaveTimer = new TQTimer( this );
+ connect( autoSaveTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( fileSaveAll() ) );
set_splash_status( "Loading Plugins..." );
setupPluginManagers();
/* if ( !single )
qApp->setMainWidget( this );*/
- QWidgetFactory::addWidgetFactory( new CustomWidgetFactory );
+ TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory );
#ifndef Q_WS_MACX
setIcon( BarIcon( "designer_appicon.png", KDevDesignerPartFactory::instance() ) );
#endif
@@ -202,10 +202,10 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
statusBar()->clear();
#if defined(QT_NON_COMMERCIAL)
- statusBar()->addWidget( new QLabel(i18n("Ready - This is the non-commercial version of Qt - "
+ statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of Qt - "
"For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 );
#else
- statusBar()->addWidget( new QLabel("Ready", statusBar()), 1 );
+ statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 );
#endif
@@ -219,8 +219,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
setupEditActions();
setupProjectActions();
setupSearchActions();
- layoutToolBar = new QToolBar( this, "Layout" );
- layoutToolBar->setCloseMode( QDockWindow::Undocked );
+ layoutToolBar = new TQToolBar( this, "Layout" );
+ layoutToolBar->setCloseMode( TQDockWindow::Undocked );
addToolBar( layoutToolBar, i18n( "Layout" ) );
interpreterPluginManager = 0;
setupToolActions();
@@ -239,8 +239,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
setupRMBMenus();
- connect( this, SIGNAL( projectChanged() ), this, SLOT( emitProjectSignals() ) );
- connect( this, SIGNAL( hasActiveWindow(bool) ), this, SLOT( emitProjectSignals() ) );
+ connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) );
+ connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) );
emit hasActiveForm( FALSE );
emit hasActiveWindow( FALSE );
@@ -248,12 +248,12 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
lastPressWidget = 0;
qApp->installEventFilter( this );
- QSize as( qApp->desktop()->size() );
- as -= QSize( 30, 30 );
- resize( QSize( 1200, 1000 ).boundedTo( as ) );
+ TQSize as( qApp->desktop()->size() );
+ as -= TQSize( 30, 30 );
+ resize( TQSize( 1200, 1000 ).boundedTo( as ) );
- connect( qApp->clipboard(), SIGNAL( dataChanged() ),
- this, SLOT( clipboardChanged() ) );
+ connect( qApp->clipboard(), TQT_SIGNAL( dataChanged() ),
+ this, TQT_SLOT( clipboardChanged() ) );
clipboardChanged();
layoutChilds = FALSE;
layoutSelected = FALSE;
@@ -262,18 +262,18 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
set_splash_status( "Loading User Settings..." );
readConfig();
- // hack to make WidgetFactory happy (so it knows QWidget and QDialog for resetting properties)
- QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QWidget" ), this, 0, FALSE );
+ // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties)
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, FALSE );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QDialog" ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, FALSE );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QLabel" ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, FALSE );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QTabWidget" ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, FALSE );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QFrame" ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, FALSE );
delete w;
- setAppropriate( (QDockWindow*)actionEditor->parentWidget(), FALSE );
+ setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE );
actionEditor->parentWidget()->hide();
assistant = new QAssistantClient( assistantPath(), this );
@@ -281,7 +281,7 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
statusBar()->setSizeGripEnabled( TRUE );
set_splash_status( "Initialization Done." );
/* if ( shStartDialog )
- QTimer::singleShot( 0, this, SLOT( showStartDialog() ));*/
+ TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/
if ( autoSaveEnabled )
autoSaveTimer->start( autoSaveInterval * 1000 );
@@ -291,7 +291,7 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
MainWindow::~MainWindow()
{
- QValueList<Tab>::Iterator tit;
+ TQValueList<Tab>::Iterator tit;
for ( tit = preferenceTabs.begin(); tit != preferenceTabs.end(); ++tit ) {
Tab t = *tit;
delete t.w;
@@ -301,7 +301,7 @@ MainWindow::~MainWindow()
delete t.w;
}
- QMap< QAction*, Project* >::Iterator it = projects.begin();
+ TQMap< TQAction*, Project* >::Iterator it = projects.begin();
while ( it != projects.end() ) {
Project *p = *it;
++it;
@@ -330,16 +330,16 @@ MainWindow::~MainWindow()
void MainWindow::setupMDI()
{
- QVBox *vbox = new QVBox( this );
+ TQVBox *vbox = new TQVBox( this );
setCentralWidget( vbox );
- vbox->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ vbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
vbox->setMargin( 1 );
vbox->setLineWidth( 1 );
- qworkspace = new QWorkspace( vbox );
+ qworkspace = new TQWorkspace( vbox );
qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", KDevDesignerPartFactory::instance() ) );
qworkspace->setScrollBarsEnabled( TRUE );
- connect( qworkspace, SIGNAL( windowActivated( QWidget * ) ),
- this, SLOT( activeWindowChanged( QWidget * ) ) );
+ connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ),
+ this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) );
lastActiveFormWindow = 0;
qworkspace->setAcceptDrops( TRUE );
}
@@ -351,15 +351,15 @@ void MainWindow::setupMenuBar()
void MainWindow::setupPropertyEditor()
{
- QDockWindow *dw = new QDockWindow( QDockWindow::InDock, this );
+ TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
dw->setResizeEnabled( TRUE );
- dw->setCloseMode( QDockWindow::Always );
+ dw->setCloseMode( TQDockWindow::Always );
propertyEditor = new PropertyEditor( dw );
addToolBar( dw, Qt::DockRight );
dw->setWidget( propertyEditor );
dw->setFixedExtentWidth( 250 );
dw->setCaption( i18n( "Property Editor/Signal Handlers" ) );
- QWhatsThis::add( propertyEditor,
+ TQWhatsThis::add( propertyEditor,
i18n("<b>The Property Editor</b>"
"<p>You can change the appearance and behavior of the selected widget in the "
"property editor.</p>"
@@ -380,9 +380,9 @@ void MainWindow::setupPropertyEditor()
void MainWindow::setupOutputWindow()
{
- QDockWindow *dw = new QDockWindow( QDockWindow::InDock, this );
+ TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
dw->setResizeEnabled( TRUE );
- dw->setCloseMode( QDockWindow::Always );
+ dw->setCloseMode( TQDockWindow::Always );
addToolBar( dw, Qt::DockBottom );
oWindow = new OutputWindow( dw );
dw->setWidget( oWindow );
@@ -394,16 +394,16 @@ void MainWindow::setupHierarchyView()
{
if ( hierarchyView )
return;
- QDockWindow *dw = new QDockWindow( QDockWindow::InDock, this );
+ TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
dw->setResizeEnabled( TRUE );
- dw->setCloseMode( QDockWindow::Always );
+ dw->setCloseMode( TQDockWindow::Always );
hierarchyView = new HierarchyView( dw );
addToolBar( dw, Qt::DockRight );
dw->setWidget( hierarchyView );
dw->setCaption( i18n( "Object Explorer" ) );
dw->setFixedExtentWidth( 250 );
- QWhatsThis::add( hierarchyView,
+ TQWhatsThis::add( hierarchyView,
i18n("<b>The Object Explorer</b>"
"<p>The Object Explorer provides an overview of the relationships "
"between the widgets in a form. You can use the clipboard functions using "
@@ -416,14 +416,14 @@ void MainWindow::setupHierarchyView()
void MainWindow::setupWorkspace()
{
- QDockWindow *dw = new QDockWindow( QDockWindow::InDock, this );
+ TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
dw->setResizeEnabled( TRUE );
- dw->setCloseMode( QDockWindow::Always );
- QVBox *vbox = new QVBox( dw );
+ dw->setCloseMode( TQDockWindow::Always );
+ TQVBox *vbox = new TQVBox( dw );
QCompletionEdit *edit = new QCompletionEdit( vbox );
- QToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) );
- QAccel *a = new QAccel( this );
- a->connectItem( a->insertItem( ALT + Key_B ), edit, SLOT( setFocus() ) );
+ 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 );
@@ -431,7 +431,7 @@ void MainWindow::setupWorkspace()
dw->setWidget( vbox );
dw->setCaption( i18n( "Project Overview" ) );
- QWhatsThis::add( wspace, i18n("<b>The Project Overview Window</b>"
+ TQWhatsThis::add( wspace, i18n("<b>The Project Overview Window</b>"
"<p>The Project Overview Window displays all the current "
"project, including forms and source files.</p>"
"<p>Use the search field to rapidly switch between files.</p>"));
@@ -441,15 +441,15 @@ void MainWindow::setupWorkspace()
void MainWindow::setupActionEditor()
{
- QDockWindow *dw = new QDockWindow( QDockWindow::OutsideDock, this, 0 );
+ TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 );
addDockWindow( dw, Qt::DockTornOff );
dw->setResizeEnabled( TRUE );
- dw->setCloseMode( QDockWindow::Always );
+ dw->setCloseMode( TQDockWindow::Always );
actionEditor = new ActionEditor( dw );
dw->setWidget( actionEditor );
actionEditor->show();
dw->setCaption( i18n( "Action Editor" ) );
- QWhatsThis::add( actionEditor, i18n("<b>The Action Editor</b>"
+ TQWhatsThis::add( actionEditor, i18n("<b>The Action Editor</b>"
"<p>The Action Editor is used to add actions and action groups to "
"a form, and to connect actions to slots. Actions and action "
"groups can be dragged into menus and into toolbars, and may "
@@ -462,19 +462,19 @@ void MainWindow::setupActionEditor()
void MainWindow::setupToolbox()
{
- QDockWindow *dw = new QDockWindow( QDockWindow::InDock, this );
+ TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
dw->setResizeEnabled( TRUE );
- dw->setCloseMode( QDockWindow::Always );
+ dw->setCloseMode( TQDockWindow::Always );
addToolBar( dw, Qt::DockLeft );
- toolBox = new QToolBox( dw );
+ 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 );
- commonWidgetsToolBar = new QToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" );
- commonWidgetsToolBar->setFrameStyle( QFrame::NoFrame );
+ commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" );
+ commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame );
commonWidgetsToolBar->setOrientation( Qt::Vertical );
commonWidgetsToolBar->setBackgroundMode(PaletteBase);
toolBox->addItem( commonWidgetsToolBar, "Common Widgets" );
@@ -482,7 +482,7 @@ void MainWindow::setupToolbox()
void MainWindow::setupRMBMenus()
{
- rmbWidgets = new QPopupMenu( this );
+ rmbWidgets = new TQPopupMenu( this );
actionEditCut->addTo( rmbWidgets );
actionEditCopy->addTo( rmbWidgets );
actionEditPaste->addTo( rmbWidgets );
@@ -505,7 +505,7 @@ void MainWindow::setupRMBMenus()
actionEditConnections->addTo( rmbWidgets );
actionEditSource->addTo( rmbWidgets );
- rmbFormWindow = new QPopupMenu( this );
+ rmbFormWindow = new TQPopupMenu( this );
actionEditPaste->addTo( rmbFormWindow );
actionEditSelectAll->addTo( rmbFormWindow );
actionEditAccels->addTo( rmbFormWindow );
@@ -525,7 +525,7 @@ void MainWindow::setupRMBMenus()
actionEditFormSettings->addTo( rmbFormWindow );
}
-void MainWindow::toolSelected( QAction* action )
+void MainWindow::toolSelected( TQAction* action )
{
actionCurrentTool = action;
emit currentToolChanged();
@@ -537,7 +537,7 @@ int MainWindow::currentTool() const
{
if ( !actionCurrentTool )
return POINTER_TOOL;
- return QString::fromLatin1(actionCurrentTool->name()).toInt();
+ return TQString::fromLatin1(actionCurrentTool->name()).toInt();
}
void MainWindow::runProjectPrecondition()
@@ -556,7 +556,7 @@ void MainWindow::runProjectPrecondition()
previewing = TRUE;
}
-void MainWindow::runProjectPostcondition( QObjectList *l )
+void MainWindow::runProjectPostcondition( TQObjectList *l )
{
inDebugMode = TRUE;
debuggingForms = *l;
@@ -567,7 +567,7 @@ void MainWindow::runProjectPostcondition( QObjectList *l )
}
}
-QWidget* MainWindow::previewFormInternal( QStyle* style, QPalette* palet )
+TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
{
qwf_execute_code = FALSE;
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
@@ -579,34 +579,34 @@ QWidget* MainWindow::previewFormInternal( QStyle* style, QPalette* palet )
if ( !fw )
return 0;
- QStringList databases;
- QPtrDictIterator<QWidget> wit( *fw->widgets() );
+ TQStringList databases;
+ TQPtrDictIterator<TQWidget> wit( *fw->widgets() );
while ( wit.current() ) {
- QStringList lst = MetaDataBase::fakeProperty( wit.current(), "database" ).toStringList();
+ TQStringList lst = MetaDataBase::fakeProperty( wit.current(), "database" ).toStringList();
if ( !lst.isEmpty() )
databases << lst [ 0 ];
++wit;
}
if ( fw->project() ) {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = databases.begin(); it != databases.end(); ++it )
fw->project()->openDatabase( *it, FALSE );
}
- QApplication::setOverrideCursor( WaitCursor );
+ TQApplication::setOverrideCursor( WaitCursor );
- QCString s;
- QBuffer buffer( s );
+ TQCString s;
+ TQBuffer buffer( s );
buffer.open( IO_WriteOnly );
Resource resource( this );
resource.setWidget( fw );
- QValueList<Resource::Image> images;
+ TQValueList<Resource::Image> images;
resource.save( &buffer );
buffer.close();
buffer.open( IO_ReadOnly );
- QWidget *w = QWidgetFactory::create( &buffer );
+ TQWidget *w = TQWidgetFactory::create( &buffer );
if ( w ) {
previewedForm = w;
if ( palet ) {
@@ -618,78 +618,78 @@ QWidget* MainWindow::previewFormInternal( QStyle* style, QPalette* palet )
if ( style )
w->setStyle( style );
- QObjectList *l = w->queryList( "QWidget" );
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ TQObjectList *l = w->queryList( "TQWidget" );
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( style )
- ( (QWidget*)o )->setStyle( style );
+ ( (TQWidget*)o )->setStyle( style );
}
delete l;
- w->move( fw->mapToGlobal( QPoint(0,0) ) );
+ w->move( fw->mapToGlobal( TQPoint(0,0) ) );
((MainWindow*)w )->setWFlags( WDestructiveClose );
previewing = TRUE;
w->show();
previewing = FALSE;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return w;
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return 0;
}
void MainWindow::previewForm()
{
- QWidget* w = previewFormInternal();
+ TQWidget* w = previewFormInternal();
if ( w )
w->show();
}
-void MainWindow::previewForm( const QString & style )
+void MainWindow::previewForm( const TQString & style )
{
- QStyle* st = QStyleFactory::create( style );
- QWidget* w = 0;
+ TQStyle* st = TQStyleFactory::create( style );
+ TQWidget* w = 0;
if ( style == "Motif" ) {
- QPalette p( QColor( 192, 192, 192 ) );
+ TQPalette p( TQColor( 192, 192, 192 ) );
w = previewFormInternal( st, &p );
} else if ( style == "Windows" ) {
- QPalette p( QColor( 212, 208, 200 ) );
+ TQPalette p( TQColor( 212, 208, 200 ) );
w = previewFormInternal( st, &p );
} else if ( style == "Platinum" ) {
- QPalette p( QColor( 220, 220, 220 ) );
+ TQPalette p( TQColor( 220, 220, 220 ) );
w = previewFormInternal( st, &p );
} else if ( style == "CDE" ) {
- QPalette p( QColor( 75, 123, 130 ) );
- p.setColor( QPalette::Active, QColorGroup::Base, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Inactive, QColorGroup::Base, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Disabled, QColorGroup::Base, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Active, QColorGroup::Highlight, Qt::white );
- p.setColor( QPalette::Active, QColorGroup::HighlightedText, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Inactive, QColorGroup::Highlight, Qt::white );
- p.setColor( QPalette::Inactive, QColorGroup::HighlightedText, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Disabled, QColorGroup::Highlight, Qt::white );
- p.setColor( QPalette::Disabled, QColorGroup::HighlightedText, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Active, QColorGroup::Foreground, Qt::white );
- p.setColor( QPalette::Active, QColorGroup::Text, Qt::white );
- p.setColor( QPalette::Active, QColorGroup::ButtonText, Qt::white );
- p.setColor( QPalette::Inactive, QColorGroup::Foreground, Qt::white );
- p.setColor( QPalette::Inactive, QColorGroup::Text, Qt::white );
- p.setColor( QPalette::Inactive, QColorGroup::ButtonText, Qt::white );
- p.setColor( QPalette::Disabled, QColorGroup::Foreground, Qt::lightGray );
- p.setColor( QPalette::Disabled, QColorGroup::Text, Qt::lightGray );
- p.setColor( QPalette::Disabled, QColorGroup::ButtonText, Qt::lightGray );
+ TQPalette p( TQColor( 75, 123, 130 ) );
+ 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::HighlightedText, TQColor( 55, 77, 78 ) );
+ p.setColor( TQPalette::Inactive, TQColorGroup::Highlight, Qt::white );
+ p.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) );
+ p.setColor( TQPalette::Disabled, TQColorGroup::Highlight, Qt::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 );
w = previewFormInternal( st, &p );
} else if ( style == "SGI" ) {
- QPalette p( QColor( 220, 220, 220 ) );
+ TQPalette p( TQColor( 220, 220, 220 ) );
w = previewFormInternal( st, &p );
} else if ( style == "MotifPlus" ) {
- QColor gtkfg(0x00, 0x00, 0x00);
- QColor gtkdf(0x75, 0x75, 0x75);
- QColor gtksf(0xff, 0xff, 0xff);
- QColor gtkbs(0xff, 0xff, 0xff);
- QColor gtkbg(0xd6, 0xd6, 0xd6);
- QColor gtksl(0x00, 0x00, 0x9c);
- QColorGroup active(gtkfg, // foreground
+ TQColor gtkfg(0x00, 0x00, 0x00);
+ TQColor gtkdf(0x75, 0x75, 0x75);
+ TQColor gtksf(0xff, 0xff, 0xff);
+ TQColor gtkbs(0xff, 0xff, 0xff);
+ TQColor gtkbg(0xd6, 0xd6, 0xd6);
+ TQColor gtksl(0x00, 0x00, 0x9c);
+ TQColorGroup active(gtkfg, // foreground
gtkbg, // button
gtkbg.light(), // light
gtkbg.dark(142), // dark
@@ -708,19 +708,19 @@ void MainWindow::previewForm( const QString & style )
gtkbs, // base
gtkbg); // background
- QPalette pal(active, disabled, active);
+ TQPalette pal(active, disabled, active);
- pal.setColor(QPalette::Active, QColorGroup::Highlight,
+ pal.setColor(TQPalette::Active, TQColorGroup::Highlight,
gtksl);
- pal.setColor(QPalette::Active, QColorGroup::HighlightedText,
+ pal.setColor(TQPalette::Active, TQColorGroup::HighlightedText,
gtksf);
- pal.setColor(QPalette::Inactive, QColorGroup::Highlight,
+ pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight,
gtksl);
- pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText,
+ pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText,
gtksf);
- pal.setColor(QPalette::Disabled, QColorGroup::Highlight,
+ pal.setColor(TQPalette::Disabled, TQColorGroup::Highlight,
gtksl);
- pal.setColor(QPalette::Disabled, QColorGroup::HighlightedText,
+ pal.setColor(TQPalette::Disabled, TQColorGroup::HighlightedText,
gtkdf);
w = previewFormInternal( st, &pal );
} else {
@@ -735,7 +735,7 @@ void MainWindow::previewForm( const QString & style )
void MainWindow::helpContents()
{
- QWidget *focusWidget = qApp->focusWidget();
+ TQWidget *focusWidget = qApp->focusWidget();
bool showClassDocu = TRUE;
while ( focusWidget ) {
if ( focusWidget->isA( "PropertyList" ) ) {
@@ -745,14 +745,14 @@ void MainWindow::helpContents()
focusWidget = focusWidget->parentWidget();
}
- QString source = "designer-manual.html";
+ TQString source = "designer-manual.html";
if ( propertyDocumentation.isEmpty() ) {
- QString indexFile = documentationPath() + "/propertyindex";
- QFile f( indexFile );
+ TQString indexFile = documentationPath() + "/propertyindex";
+ TQFile f( indexFile );
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
while ( !ts.eof() ) {
- QString s = ts.readLine();
+ TQString s = ts.readLine();
int from = s.find( "\"" );
if ( from == -1 )
continue;
@@ -767,39 +767,39 @@ void MainWindow::helpContents()
if ( propertyEditor->widget() && !showClassDocu ) {
if ( !propertyEditor->currentProperty().isEmpty() ) {
- QMetaObject* mo = propertyEditor->metaObjectOfCurrentProperty();
- QString s;
- QString cp = propertyEditor->currentProperty();
+ TQMetaObject* mo = propertyEditor->metaObjectOfCurrentProperty();
+ TQString s;
+ TQString cp = propertyEditor->currentProperty();
if ( cp == "layoutMargin" ) {
source = propertyDocumentation[ "QLayout/margin" ];
} else if ( cp == "layoutSpacing" ) {
source = propertyDocumentation[ "QLayout/spacing" ];
} else if ( cp == "toolTip" ) {
- source = "qtooltip.html#details";
+ source = "tqtooltip.html#details";
} else if ( mo && qstrcmp( mo->className(), "Spacer" ) == 0 ) {
if ( cp != "name" )
- source = "qsizepolicy.html#SizeType";
+ source = "tqsizepolicy.html#SizeType";
else
source = propertyDocumentation[ "QObject/name" ];
} else {
- while ( mo && !propertyDocumentation.contains( ( s = QString( mo->className() ) + "/" + cp ) ) )
+ while ( mo && !propertyDocumentation.contains( ( s = TQString( mo->className() ) + "/" + cp ) ) )
mo = mo->superClass();
if ( mo )
source = "p:" + propertyDocumentation[s];
}
}
- QString classname = WidgetFactory::classNameOf( propertyEditor->widget() );
+ TQString classname = WidgetFactory::classNameOf( propertyEditor->widget() );
if ( source.isEmpty() || source == "designer-manual.html" ) {
if ( classname.lower() == "spacer" )
source = "qspaceritem.html#details";
else if ( classname == "QLayoutWidget" )
source = "layout.html";
else
- source = QString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details";
+ source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details";
}
} else if ( propertyEditor->widget() ) {
- source = QString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details";
+ source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details";
}
if ( !source.isEmpty() )
@@ -821,19 +821,19 @@ void MainWindow::helpAbout()
LanguageInterface *iface = MetaDataBase::languageInterface( eProject->language() );
dlg.aboutLicense->setText( iface->aboutText() );
}
- dlg.aboutVersion->setText(QString("Version ") + QString(QT_VERSION_STR));
+ dlg.aboutVersion->setText(TQString("Version ") + TQString(QT_VERSION_STR));
dlg.resize( dlg.width(), dlg.layout()->heightForWidth(dlg.width()) );
dlg.exec();
}
void MainWindow::helpAboutQt()
{
- QMessageBox::aboutQt( this, "Qt Designer" );
+ TQMessageBox::aboutQt( this, "Qt Designer" );
}
#if defined(_WS_WIN_)
#include <qt_windows.h>
-#include <qprocess.h>
+#include <tqprocess.h>
#endif
void MainWindow::helpRegister()
@@ -844,10 +844,10 @@ void MainWindow::helpRegister()
long res;
DWORD type;
DWORD size = 255;
- QString command;
- QString sub( "htmlfile\\shell" );
+ TQString command;
+ TQString sub( "htmlfile\\shell" );
#if defined(UNICODE)
- if ( QApplication::winVersion() & Qt::WV_NT_based ) {
+ if ( TQApplication::winVersion() & Qt::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 );
@@ -864,24 +864,24 @@ void MainWindow::helpRegister()
res = RegOpenKeyExA( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key );
res = RegOpenKeyExA( key, sub.local8Bit(), 0, KEY_READ, &subkey );
res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size );
- command = QString::fromLocal8Bit( (const char*) data ) + "\\command";
+ command = TQString::fromLocal8Bit( (const char*) data ) + "\\command";
size = 255;
res = RegOpenKeyExA( subkey, command.local8Bit(), 0, KEY_READ, &subkey );
res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size );
- command = QString::fromLocal8Bit( (const char*) data );
+ command = TQString::fromLocal8Bit( (const char*) data );
}
res = RegCloseKey( subkey );
res = RegCloseKey( key );
- QProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" );
+ TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" );
if ( !process.start() )
- QMessageBox::information( this, "Register Qt", "Launching your web browser failed.\n"
+ 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" );
#endif
}
-void MainWindow::showProperties( QObject *o )
+void MainWindow::showProperties( TQObject *o )
{
if ( !o->isWidgetType() ) {
propertyEditor->setWidget( o, lastActiveFormWindow );
@@ -891,12 +891,12 @@ void MainWindow::showProperties( QObject *o )
hierarchyView->setFormWindow( 0, 0 );
return;
}
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
setupHierarchyView();
FormWindow *fw = (FormWindow*)isAFormWindowChild( w );
if ( fw ) {
if ( fw->numSelectedWidgets() > 1 ) {
- QWidgetList wl = fw->selectedWidgets();
+ TQWidgetList wl = fw->selectedWidgets();
if ( wl.first() != w ) {
wl.removeRef( w );
wl.insert( 0, w );
@@ -921,46 +921,46 @@ void MainWindow::resetTool()
actionPointerTool->setOn( TRUE );
}
-void MainWindow::updateProperties( QObject * )
+void MainWindow::updateProperties( TQObject * )
{
if ( propertyEditor )
propertyEditor->refetchData();
}
-bool MainWindow::eventFilter( QObject *o, QEvent *e )
+bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
{
if ( ::qt_cast<MenuBarEditor*>(o) || ::qt_cast<PopupMenuEditor*>(o) ||
( o &&
( ::qt_cast<MenuBarEditor*>(o->parent()) ||
::qt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
- if ( e->type() == QEvent::Accel && ::qt_cast<PopupMenuEditor*>(o) ) {
+ if ( e->type() == TQEvent::Accel && ::qt_cast<PopupMenuEditor*>(o) ) {
return TRUE; // consume accel events
- } else if ( e->type() == QEvent::MouseButtonPress && ::qt_cast<MenuBarEditor*>(o) ) {
- QPoint pos = ((QMouseEvent*)e)->pos();
+ } else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<MenuBarEditor*>(o) ) {
+ TQPoint pos = ((TQMouseEvent*)e)->pos();
MenuBarEditor *m = ::qt_cast<MenuBarEditor*>(o);
showProperties( o );
if ( m->findItem( pos ) >= m->count() )
m->setFocus();
- } else if ( e->type() == QEvent::MouseButtonPress && ::qt_cast<PopupMenuEditor*>(o) ) {
+ } else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<PopupMenuEditor*>(o) ) {
PopupMenuEditor *m = ::qt_cast<PopupMenuEditor*>(o);
- PopupMenuEditorItem *i = m->at( ((QMouseEvent*)e)->pos() );
+ PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() );
if ( m->find( i->action() ) != -1 && !i->isSeparator() )
showProperties( i->action() );
}
- return QMainWindow::eventFilter( o, e );
+ return TQMainWindow::eventFilter( o, e );
}
if ( !o || !e || !o->isWidgetType() )
- return QMainWindow::eventFilter( o, e );
+ return TQMainWindow::eventFilter( o, e );
- QWidget *w = 0;
+ TQWidget *w = 0;
bool passiveInteractor;
switch ( e->type() ) {
- case QEvent::AccelOverride:
- if ( ( (QKeyEvent*)e )->key() == Key_F1 &&
- ( ( (QKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) {
- w = (QWidget*)o;
+ case TQEvent::AccelOverride:
+ if ( ( (TQKeyEvent*)e )->key() == Key_F1 &&
+ ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) {
+ w = (TQWidget*)o;
while ( w ) {
if ( ::qt_cast<PropertyList*>(w) )
break;
@@ -968,59 +968,59 @@ bool MainWindow::eventFilter( QObject *o, QEvent *e )
}
if ( w ) {
propertyEditor->propertyList()->showCurrentWhatsThis();
- ( (QKeyEvent*)e )->accept();
+ ( (TQKeyEvent*)e )->accept();
return TRUE;
}
}
break;
- case QEvent::Accel:
- if ( ( ( (QKeyEvent*)e )->key() == Key_A ||
- ( (QKeyEvent*)e )->key() == Key_E ) &&
- ( (QKeyEvent*)e )->state() & ControlButton ) {
+ case TQEvent::Accel:
+ if ( ( ( (TQKeyEvent*)e )->key() == Key_A ||
+ ( (TQKeyEvent*)e )->key() == Key_E ) &&
+ ( (TQKeyEvent*)e )->state() & ControlButton ) {
if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
- ( (QKeyEvent*)e )->ignore();
+ ( (TQKeyEvent*)e )->ignore();
return TRUE;
}
}
break;
- case QEvent::ContextMenu:
- case QEvent::MouseButtonPress:
+ 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<QComboBox*>(o) ||
- ::qt_cast<QToolButton*>(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())) ) ) {
- QWidget *w = (QWidget*)o;
- if ( ::qt_cast<QToolButton*>(w) ||
- ::qt_cast<QComboBox*>(w) ||
+ TQWidget *w = (TQWidget*)o;
+ if ( ::qt_cast<TQToolButton*>(w) ||
+ ::qt_cast<TQComboBox*>(w) ||
::qt_cast<PopupMenuEditor*>(w) ||
::qt_cast<QDesignerToolBarSeparator*>(w) )
w = w->parentWidget();
- QWidget *pw = w->parentWidget();
+ TQWidget *pw = w->parentWidget();
while ( pw ) {
if ( ::qt_cast<FormWindow*>(pw) ) {
( (FormWindow*)pw )->emitShowProperties( w );
if ( !::qt_cast<QDesignerToolBar*>(o) )
- return ( !::qt_cast<QToolButton*>(o) &&
+ return ( !::qt_cast<TQToolButton*>(o) &&
!::qt_cast<MenuBarEditor*>(o) &&
- !::qt_cast<QComboBox*>(o) &&
+ !::qt_cast<TQComboBox*>(o) &&
!::qt_cast<QDesignerToolBarSeparator*>(o) );
}
pw = pw->parentWidget();
}
}
if ( o && ( ::qt_cast<QDesignerToolBar*>(o) || o->inherits("QDockWindowHandle") )
- && e->type() == QEvent::ContextMenu )
+ && e->type() == TQEvent::ContextMenu )
break;
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break;
- if ( ::qt_cast<QSizeGrip*>(o) )
+ if ( ::qt_cast<TQSizeGrip*>(o) )
break;
if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) ||
@@ -1030,26 +1030,26 @@ bool MainWindow::eventFilter( QObject *o, QEvent *e )
w->setFocus();
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor || currentTool() != ORDER_TOOL ) {
- if( e->type() == QEvent::ContextMenu ) {
- ( (FormWindow*)w )->handleContextMenu( (QContextMenuEvent*)e,
+ if( e->type() == TQEvent::ContextMenu ) {
+ ( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
return TRUE;
} else {
- ( (FormWindow*)w )->handleMousePress( (QMouseEvent*)e,
+ ( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
}
}
- lastPressWidget = (QWidget*)o;
+ lastPressWidget = (TQWidget*)o;
if ( passiveInteractor )
- QTimer::singleShot( 0, formWindow(), SLOT( visibilityChanged() ) );
+ TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) );
if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL )
return TRUE;
return !passiveInteractor;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
lastPressWidget = 0;
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break;
- if ( ::qt_cast<QSizeGrip*>(o) )
+ if ( ::qt_cast<TQSizeGrip*>(o) )
break;
if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) ||
@@ -1057,39 +1057,39 @@ bool MainWindow::eventFilter( QObject *o, QEvent *e )
break;
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor )
- ( (FormWindow*)w )->handleMouseRelease( (QMouseEvent*)e,
+ ( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
if ( passiveInteractor ) {
- QTimer::singleShot( 0, this, SLOT( selectionChanged() ) );
- QTimer::singleShot( 0, formWindow(), SLOT( visibilityChanged() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) );
+ TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) );
}
return !passiveInteractor;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break;
w = isAFormWindowChild( o );
- if ( lastPressWidget != (QWidget*)o && w &&
+ if ( lastPressWidget != (TQWidget*)o && w &&
!::qt_cast<SizeHandle*>(o) && !::qt_cast<OrderIndicator*>(o) &&
- !::qt_cast<PopupMenuEditor*>(o) && !::qt_cast<QMenuBar*>(o) &&
- !::qt_cast<QSizeGrip*>(o) )
+ !::qt_cast<PopupMenuEditor*>(o) && !::qt_cast<TQMenuBar*>(o) &&
+ !::qt_cast<TQSizeGrip*>(o) )
return TRUE;
- if ( o && ::qt_cast<QSizeGrip*>(o) )
+ if ( o && ::qt_cast<TQSizeGrip*>(o) )
break;
- if ( lastPressWidget != (QWidget*)o ||
+ if ( lastPressWidget != (TQWidget*)o ||
( !w || ::qt_cast<SizeHandle*>(o) ) ||
::qt_cast<OrderIndicator*>(o) )
break;
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor )
- ( (FormWindow*)w )->handleMouseMove( (QMouseEvent*)e,
+ ( (FormWindow*)w )->handleMouseMove( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
return !passiveInteractor;
- case QEvent::KeyPress:
- if ( ( (QKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) {
+ case TQEvent::KeyPress:
+ if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) {
resetTool();
return FALSE;
}
- if ( ( (QKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) {
+ if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) {
if ( ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
qWorkspace()->activeWindow()->setFocus();
return TRUE;
@@ -1099,114 +1099,114 @@ bool MainWindow::eventFilter( QObject *o, QEvent *e )
::qt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) )
break;
- ( (FormWindow*)w )->handleKeyPress( (QKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
- if ( ((QKeyEvent*)e)->isAccepted() )
+ ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
+ if ( ((TQKeyEvent*)e)->isAccepted() )
return TRUE;
break;
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) {
- if ( ::qt_cast<QToolButton*>(o) && ((QToolButton*)o)->isOn() &&
- o->parent() && ::qt_cast<QToolBar*>(o->parent()) && formWindow() )
+ if ( ::qt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() &&
+ o->parent() && ::qt_cast<TQToolBar*>(o->parent()) && formWindow() )
formWindow()->setToolFixed();
break;
}
if ( currentTool() == ORDER_TOOL ) {
- ( (FormWindow*)w )->handleMouseDblClick( (QMouseEvent*)e,
+ ( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
return TRUE;
}
if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() )
return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w );
return TRUE;
- case QEvent::KeyRelease:
+ case TQEvent::KeyRelease:
if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) )
break;
- ( (FormWindow*)w )->handleKeyRelease( (QKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
- if ( ((QKeyEvent*)e)->isAccepted() )
+ ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
+ if ( ((TQKeyEvent*)e)->isAccepted() )
return TRUE;
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) )
break;
- if ( ( (FormWindow*)w )->isWidgetSelected( (QWidget*)o ) )
- ( (FormWindow*)w )->selectWidget( (QWidget*)o, FALSE );
+ if ( ( (FormWindow*)w )->isWidgetSelected( (TQWidget*)o ) )
+ ( (FormWindow*)w )->selectWidget( (TQWidget*)o, FALSE );
break;
- case QEvent::Enter:
- case QEvent::Leave:
+ case TQEvent::Enter:
+ case TQEvent::Leave:
if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ||
::qt_cast<MenuBarEditor*>(o) )
break;
return TRUE;
- case QEvent::Resize:
- case QEvent::Move:
+ case TQEvent::Resize:
+ case TQEvent::Move:
if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) )
break;
- if ( WidgetFactory::layoutType( (QWidget*)o->parent() ) != WidgetFactory::NoLayout ) {
- ( (FormWindow*)w )->updateSelection( (QWidget*)o );
- if ( e->type() != QEvent::Resize )
- ( (FormWindow*)w )->updateChildSelections( (QWidget*)o );
+ if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) {
+ ( (FormWindow*)w )->updateSelection( (TQWidget*)o );
+ if ( e->type() != TQEvent::Resize )
+ ( (FormWindow*)w )->updateChildSelections( (TQWidget*)o );
}
break;
- case QEvent::Close:
- if ( o->isWidgetType() && (QWidget*)o == (QWidget*)previewedForm ) {
+ case TQEvent::Close:
+ if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) {
if ( lastActiveFormWindow && lastActiveFormWindow->project() ) {
- QStringList lst =
+ TQStringList lst =
MetaDataBase::fakeProperty( lastActiveFormWindow, "database" ).toStringList();
lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] );
}
}
break;
- case QEvent::DragEnter:
+ case TQEvent::DragEnter:
if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
- workspace()->contentsDragEnterEvent( (QDragEnterEvent*)e );
+ workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e );
return TRUE;
}
break;
- case QEvent::DragMove:
+ case TQEvent::DragMove:
if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
- workspace()->contentsDragMoveEvent( (QDragMoveEvent*)e );
+ workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e );
return TRUE;
}
break;
- case QEvent::Drop:
+ case TQEvent::Drop:
if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
- workspace()->contentsDropEvent( (QDropEvent*)e );
+ workspace()->contentsDropEvent( (TQDropEvent*)e );
return TRUE;
}
break;
- case QEvent::Show:
+ case TQEvent::Show:
if ( o != this )
break;
- if ( ((QShowEvent*)e)->spontaneous() )
+ if ( ((TQShowEvent*)e)->spontaneous() )
break;
- QApplication::sendPostedEvents( qworkspace, QEvent::ChildInserted );
- showEvent( (QShowEvent*)e );
+ TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted );
+ showEvent( (TQShowEvent*)e );
checkTempFiles();
return TRUE;
- case QEvent::Wheel:
+ case TQEvent::Wheel:
if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) )
break;
return TRUE;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
return TRUE; //FIXME
if ( hierarchyView->formDefinitionView()->isRenaming()
&& ( o->inherits( "Editor" ) || ::qt_cast<FormWindow*>(o) ) )
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
if ( o->inherits( "Editor" ) ) {
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
while ( w ) {
if ( ::qt_cast<SourceEditor*>(w) )
break;
@@ -1220,34 +1220,34 @@ bool MainWindow::eventFilter( QObject *o, QEvent *e )
fw->formFile()->editor()->checkTimeStamp();
}
break;
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
return TRUE;
break;
default:
- return QMainWindow::eventFilter( o, e );
+ return TQMainWindow::eventFilter( o, e );
}
- return QMainWindow::eventFilter( o, e );
+ return TQMainWindow::eventFilter( o, e );
}
-QWidget *MainWindow::isAFormWindowChild( QObject *o ) const
+TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
{
- if ( ::qt_cast<QWizard*>(o->parent()) && !::qt_cast<QPushButton*>(o) )
+ if ( ::qt_cast<TQWizard*>(o->parent()) && !::qt_cast<TQPushButton*>(o) )
return 0;
while ( o ) {
if ( ::qt_cast<FormWindow*>(o) )
- return (QWidget*)o;
+ return (TQWidget*)o;
o = o->parent();
}
return 0;
}
-QWidget *MainWindow::isAToolBarChild( QObject *o ) const
+TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const
{
while ( o ) {
if ( ::qt_cast<QDesignerToolBar*>(o) )
- return (QWidget*)o;
+ return (TQWidget*)o;
if ( ::qt_cast<FormWindow*>(o) )
return 0;
o = o->parent();
@@ -1278,7 +1278,7 @@ void MainWindow::emitProjectSignals()
void MainWindow::insertFormWindow( FormWindow *fw )
{
if ( fw )
- QWhatsThis::add( fw, i18n( "<b>The Form Window</b>"
+ TQWhatsThis::add( fw, i18n( "<b>The Form Window</b>"
"<p>Use the various tools to add widgets or to change the layout "
"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 "
@@ -1290,16 +1290,16 @@ void MainWindow::insertFormWindow( FormWindow *fw )
"<p>You can have several forms open, and all open forms are listed "
"in the <b>Form List</b>.") );
- connect( fw, SIGNAL( showProperties( QObject * ) ),
- this, SLOT( showProperties( QObject * ) ) );
- connect( fw, SIGNAL( updateProperties( QObject * ) ),
- this, SLOT( updateProperties( QObject * ) ) );
- connect( this, SIGNAL( currentToolChanged() ),
- fw, SLOT( currentToolChanged() ) );
- connect( fw, SIGNAL( selectionChanged() ),
- this, SLOT( selectionChanged() ) );
- connect( fw, SIGNAL( undoRedoChanged( bool, bool, const QString &, const QString & ) ),
- this, SLOT( updateUndoRedo( bool, bool, const QString &, const QString & ) ) );
+ connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ),
+ this, TQT_SLOT( showProperties( TQObject * ) ) );
+ connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ),
+ this, TQT_SLOT( updateProperties( TQObject * ) ) );
+ connect( this, TQT_SIGNAL( currentToolChanged() ),
+ fw, TQT_SLOT( currentToolChanged() ) );
+ connect( fw, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( selectionChanged() ) );
+ connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
+ this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) );
if ( !mblockNewForms ) {
} else {
@@ -1321,7 +1321,7 @@ void MainWindow::insertFormWindow( FormWindow *fw )
}
}
-void MainWindow::createNewProject( const QString &lang )
+void MainWindow::createNewProject( const TQString &lang )
{
Project *pro = new Project( "", "", projectSettingsPluginManager );
pro->setLanguage( lang );
@@ -1333,12 +1333,12 @@ void MainWindow::createNewProject( const QString &lang )
}
if ( !pro->isValid() ) {
- QMessageBox::information( this, i18n("New Project"), i18n( "Cannot create an invalid project." ) );
+ TQMessageBox::information( this, i18n("New Project"), i18n( "Cannot create an invalid project." ) );
delete pro;
return;
}
- QAction *a = new QAction( pro->makeRelative( pro->fileName() ),
+ TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ),
pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE );
projects.insert( a, pro );
addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects );
@@ -1353,7 +1353,7 @@ bool MainWindow::unregisterClient( FormWindow *w )
if ( w == lastActiveFormWindow )
lastActiveFormWindow = 0;
- QPtrList<SourceEditor> waitingForDelete;
+ TQPtrList<SourceEditor> waitingForDelete;
waitingForDelete.setAutoDelete( TRUE );
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
if ( e->object() == w )
@@ -1368,9 +1368,9 @@ bool MainWindow::unregisterClient( FormWindow *w )
return TRUE;
}
-void MainWindow::activeWindowChanged( QWidget *w )
+void MainWindow::activeWindowChanged( TQWidget *w )
{
- QWidget *old = formWindow();
+ TQWidget *old = formWindow();
if ( ::qt_cast<FormWindow*>(w) ) {
FormWindow *fw = (FormWindow*)w;
FormWindow *ofw = lastActiveFormWindow;
@@ -1384,21 +1384,21 @@ void MainWindow::activeWindowChanged( QWidget *w )
formWindow()->clearSelection();
}
workspace()->activeFormChanged( fw );
- setAppropriate( (QDockWindow*)actionEditor->parentWidget(),
- ::qt_cast<QMainWindow*>(lastActiveFormWindow->mainContainer()) );
- if ( appropriate( (QDockWindow*)actionEditor->parentWidget() ) ) {
+ setAppropriate( (TQDockWindow*)actionEditor->parentWidget(),
+ ::qt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) );
+ if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) {
if ( actionEditor->wantToBeShown() )
actionEditor->parentWidget()->show();
} else {
- QWidget *mc = 0;
- if ( ofw && (mc = ofw->mainContainer()) && ::qt_cast<QMainWindow*>(mc) )
+ TQWidget *mc = 0;
+ if ( ofw && (mc = ofw->mainContainer()) && ::qt_cast<TQMainWindow*>(mc) )
actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() );
actionEditor->parentWidget()->hide();
}
actionEditor->setFormWindow( lastActiveFormWindow );
if ( wspace && fw->project() && fw->project() != currentProject ) {
- for ( QMap<QAction*, Project *>::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
+ for ( TQMap<TQAction*, Project *>::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
if ( *it == fw->project() ) {
projectSelected( it.key() );
break;
@@ -1421,14 +1421,14 @@ void MainWindow::activeWindowChanged( QWidget *w )
emit hasActiveForm( FALSE );
propertyEditor->clear();
hierarchyView->clear();
- updateUndoRedo( FALSE, FALSE, QString::null, QString::null );
+ updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null );
}
selectionChanged();
if ( ::qt_cast<SourceEditor*>(w) ) {
SourceEditor *se = (SourceEditor*)w;
- QGuardedPtr<FormWindow> fw = se->formWindow();
+ TQGuardedPtr<FormWindow> fw = se->formWindow();
if ( se->formWindow() &&
lastActiveFormWindow != fw ) {
activeWindowChanged( se->formWindow() );
@@ -1453,7 +1453,7 @@ void MainWindow::activeWindowChanged( QWidget *w )
hierarchyView->showClasses( se );
actionEditor->setFormWindow( 0 );
if ( wspace && se->project() && se->project() != currentProject ) {
- for ( QMap<QAction*, Project *>::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
+ for ( TQMap<TQAction*, Project *>::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
if ( *it == se->project() ) {
projectSelected( it.key() );
break;
@@ -1476,7 +1476,7 @@ void MainWindow::activeWindowChanged( QWidget *w )
}
void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
- const QString &undoCmd, const QString &redoCmd )
+ const TQString &undoCmd, const TQString &redoCmd )
{
if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
@@ -1511,15 +1511,15 @@ void MainWindow::updateEditorUndoRedo()
actionEditRedo->setEnabled( editor->editIsRedoAvailable() );
}
-QWorkspace *MainWindow::qWorkspace() const
+TQWorkspace *MainWindow::qWorkspace() const
{
return qworkspace;
}
-void MainWindow::popupFormWindowMenu( const QPoint & gp, FormWindow *fw )
+void MainWindow::popupFormWindowMenu( const TQPoint & gp, FormWindow *fw )
{
- QValueList<uint> ids;
- QMap<QString, int> commands;
+ TQValueList<uint> ids;
+ TQMap<TQString, int> commands;
setupRMBSpecialCommands( ids, commands, fw );
setupRMBProperties( ids, commands, fw );
@@ -1530,14 +1530,14 @@ void MainWindow::popupFormWindowMenu( const QPoint & gp, FormWindow *fw )
handleRMBProperties( r, commands, fw );
handleRMBSpecialCommands( r, commands, fw );
- for ( QValueList<uint>::ConstIterator i = ids.begin(); i != ids.end(); ++i )
+ for ( TQValueList<uint>::ConstIterator i = ids.begin(); i != ids.end(); ++i )
rmbFormWindow->removeItem( *i );
}
-void MainWindow::popupWidgetMenu( const QPoint &gp, FormWindow * /*fw*/, QWidget * w)
+void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidget * w)
{
- QValueList<uint> ids;
- QMap<QString, int> commands;
+ TQValueList<uint> ids;
+ TQMap<TQString, int> commands;
setupRMBSpecialCommands( ids, commands, w );
setupRMBProperties( ids, commands, w );
@@ -1548,25 +1548,25 @@ void MainWindow::popupWidgetMenu( const QPoint &gp, FormWindow * /*fw*/, QWidget
handleRMBProperties( r, commands, w );
handleRMBSpecialCommands( r, commands, w );
- for ( QValueList<uint>::ConstIterator i = ids.begin(); i != ids.end(); ++i )
+ for ( TQValueList<uint>::ConstIterator i = ids.begin(); i != ids.end(); ++i )
rmbWidgets->removeItem( *i );
}
-void MainWindow::setupRMBProperties( QValueList<uint> &ids, QMap<QString, int> &props, QWidget *w )
+void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w )
{
- const QMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
- if ( text && qstrcmp( text->type(), "QString") != 0 )
+ const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
+ if ( text && qstrcmp( text->type(), "TQString") != 0 )
text = 0;
- const QMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
- if ( title && qstrcmp( title->type(), "QString") != 0 )
+ const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
+ if ( title && qstrcmp( title->type(), "TQString") != 0 )
title = 0;
- const QMetaProperty* pagetitle =
+ const TQMetaProperty* pagetitle =
w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE );
- if ( pagetitle && qstrcmp( pagetitle->type(), "QString") != 0 )
+ if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 )
pagetitle = 0;
- const QMetaProperty* pixmap =
+ const TQMetaProperty* pixmap =
w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE );
- if ( pixmap && qstrcmp( pixmap->type(), "QPixmap") != 0 )
+ if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 )
pixmap = 0;
if ( text && text->designable(w) ||
@@ -1580,7 +1580,7 @@ void MainWindow::setupRMBProperties( QValueList<uint> &ids, QMap<QString, int> &
ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) );
props.insert( "pixmap", id );
}
- if ( text && text->designable(w) && !::qt_cast<QTextEdit*>(w) ) {
+ if ( text && text->designable(w) && !::qt_cast<TQTextEdit*>(w) ) {
ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) );
props.insert( "text", id );
}
@@ -1596,7 +1596,7 @@ void MainWindow::setupRMBProperties( QValueList<uint> &ids, QMap<QString, int> &
}
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
-static QWidgetContainerInterfacePrivate *containerWidgetInterface( QWidget *w )
+static QWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w )
{
WidgetInterface *iface = 0;
widgetManager()->queryInterface( WidgetFactory::classNameOf( w ), &iface );
@@ -1611,12 +1611,12 @@ static QWidgetContainerInterfacePrivate *containerWidgetInterface( QWidget *w )
}
#endif
-void MainWindow::setupRMBSpecialCommands( QValueList<uint> &ids,
- QMap<QString, int> &commands, QWidget *w )
+void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
+ TQMap<TQString, int> &commands, TQWidget *w )
{
int id;
- if ( ::qt_cast<QTabWidget*>(w) ) {
+ if ( ::qt_cast<TQTabWidget*>(w) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
if ( ( (QDesignerTabWidget*)w )->count() > 1) {
@@ -1639,10 +1639,10 @@ void MainWindow::setupRMBSpecialCommands( QValueList<uint> &ids,
}
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id );
- } else if ( ::qt_cast<QToolBox*>(w) ) {
+ } else if ( ::qt_cast<TQToolBox*>(w) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
- if ( ( (QToolBox*)w )->count() > 1 ) {
+ if ( ( (TQToolBox*)w )->count() > 1 ) {
ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) );
commands.insert( "remove", id );
}
@@ -1682,16 +1682,16 @@ void MainWindow::setupRMBSpecialCommands( QValueList<uint> &ids,
}
}
-void MainWindow::setupRMBSpecialCommands( QValueList<uint> &ids,
- QMap<QString, int> &commands, FormWindow *fw )
+void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
+ TQMap<TQString, int> &commands, FormWindow *fw )
{
int id;
- if ( ::qt_cast<QWizard*>(fw->mainContainer()) ) {
+ if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) {
if ( ids.isEmpty() )
ids << rmbFormWindow->insertSeparator( 0 );
- if ( ( (QWizard*)fw->mainContainer() )->pageCount() > 1) {
+ if ( ( (TQWizard*)fw->mainContainer() )->pageCount() > 1) {
ids << ( id = rmbFormWindow->insertItem( i18n("Delete Page"), -1, 0 ) );
commands.insert( "remove", id );
}
@@ -1705,7 +1705,7 @@ void MainWindow::setupRMBSpecialCommands( QValueList<uint> &ids,
ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) );
commands.insert( "edit", id );
- } else if ( ::qt_cast<QMainWindow*>(fw->mainContainer()) ) {
+ } else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) {
if ( ids.isEmpty() )
ids << rmbFormWindow->insertSeparator( 0 );
ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) );
@@ -1715,80 +1715,80 @@ void MainWindow::setupRMBSpecialCommands( QValueList<uint> &ids,
}
}
-void MainWindow::handleRMBProperties( int id, QMap<QString, int> &props, QWidget *w )
+void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWidget *w )
{
if ( id == props[ "text" ] ) {
bool ok = FALSE;
bool oldDoWrap = FALSE;
- if ( ::qt_cast<QLabel*>(w) ) {
+ if ( ::qt_cast<TQLabel*>(w) ) {
int align = w->property( "alignment" ).toInt();
if ( align & WordBreak )
oldDoWrap = TRUE;
}
bool doWrap = oldDoWrap;
- QString text;
- if ( ::qt_cast<QTextView*>(w) || ::qt_cast<QLabel*>(w) || ::qt_cast<QButton*>(w) ) {
- text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::qt_cast<QButton*>(w), &doWrap );
+ 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 );
ok = !text.isNull();
} else {
text = QInputDialog::getText( i18n("Text"), i18n( "New text" ),
- QLineEdit::Normal, w->property("text").toString(), &ok, this );
+ TQLineEdit::Normal, w->property("text").toString(), &ok, this );
}
if ( ok ) {
if ( oldDoWrap != doWrap ) {
- QString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
+ TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
- "wordwrap", QVariant( oldDoWrap, 0 ),
- QVariant( doWrap, 0 ), QString::null, QString::null );
+ "wordwrap", TQVariant( oldDoWrap, 0 ),
+ TQVariant( doWrap, 0 ), TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE );
}
- QString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
+ TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"text", w->property( "text" ),
- text, QString::null, QString::null );
+ text, TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "text", TRUE );
}
} else if ( id == props[ "title" ] ) {
bool ok = FALSE;
- QString title = QInputDialog::getText( i18n("Title"), i18n( "New title" ),
- QLineEdit::Normal, w->property("title").toString(), &ok, this );
+ TQString title = QInputDialog::getText( i18n("Title"), i18n( "New title" ),
+ TQLineEdit::Normal, w->property("title").toString(), &ok, this );
if ( ok ) {
- QString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) );
+ TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"title", w->property( "title" ),
- title, QString::null, QString::null );
+ title, TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "title", TRUE );
}
} else if ( id == props[ "pagetitle" ] ) {
bool ok = FALSE;
- QString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
- QLineEdit::Normal, w->property("pageTitle").toString(), &ok, this );
+ TQString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
+ TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this );
if ( ok ) {
- QString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) );
+ TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"pageTitle",
w->property( "pageTitle" ),
- text, QString::null, QString::null );
+ text, TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "pageTitle", TRUE );
}
} else if ( id == props[ "pixmap" ] ) {
- QPixmap oldPix = w->property( "pixmap" ).toPixmap();
- QPixmap pix = qChoosePixmap( this, formWindow(), oldPix );
+ TQPixmap oldPix = w->property( "pixmap" ).toPixmap();
+ TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix );
if ( !pix.isNull() ) {
- QString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) );
+ TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"pixmap", w->property( "pixmap" ),
- pix, QString::null, QString::null );
+ pix, TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "pixmap", TRUE );
@@ -1796,10 +1796,10 @@ void MainWindow::handleRMBProperties( int id, QMap<QString, int> &props, QWidget
}
}
-void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands, QWidget *w )
+void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w )
{
- if ( ::qt_cast<QTabWidget*>(w) ) {
- QTabWidget *tw = (QTabWidget*)w;
+ if ( ::qt_cast<TQTabWidget*>(w) ) {
+ TQTabWidget *tw = (TQTabWidget*)w;
if ( id == commands[ "add" ] ) {
AddTabPageCommand *cmd =
new AddTabPageCommand( i18n( "Add Page to %1" ).arg( tw->name() ), formWindow(),
@@ -1817,8 +1817,8 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
cmd->execute();
}
}
- } else if ( ::qt_cast<QToolBox*>(w) ) {
- QToolBox *tb = (QToolBox*)w;
+ } else if ( ::qt_cast<TQToolBox*>(w) ) {
+ TQToolBox *tb = (TQToolBox*)w;
if ( id == commands[ "add" ] ) {
AddToolBoxPageCommand *cmd =
new AddToolBoxPageCommand( i18n( "Add Page to %1" ).arg( tb->name() ),
@@ -1837,7 +1837,7 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
cmd->execute();
}
}
- } else if ( ::qt_cast<QWidgetStack*>(w) ) {
+ } else if ( ::qt_cast<TQWidgetStack*>(w) ) {
QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w;
if ( id == commands[ "add" ] ) {
AddWidgetStackPageCommand *cmd =
@@ -1856,21 +1856,21 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
}
} else if ( id == commands[ "nextpage" ] ) {
int currentPage = w->property( "currentPage" ).toInt();
- QString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) );
+ TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd =
new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"currentPage", currentPage,
- currentPage + 1, QString::null, QString::null );
+ currentPage + 1, TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "currentPage", TRUE );
} else if ( id == commands[ "prevpage" ] ) {
int currentPage = w->property( "currentPage" ).toInt();
- QString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) );
+ TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd =
new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"currentPage", currentPage,
- currentPage -1, QString::null, QString::null );
+ currentPage -1, TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "currentPage", TRUE );
@@ -1888,7 +1888,7 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
} else if ( id == commands[ "remove" ] ) {
QWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) {
- QString wClassName = WidgetFactory::classNameOf( w );
+ TQString wClassName = WidgetFactory::classNameOf( w );
int index = iface->currentIndex( wClassName, w );
DeleteContainerPageCommand *cmd =
new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ).
@@ -1904,10 +1904,10 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
QWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) {
bool ok = FALSE;
- QString wClassName = WidgetFactory::classNameOf( w );
+ TQString wClassName = WidgetFactory::classNameOf( w );
int index = iface->currentIndex( wClassName, w );
- QString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
- QLineEdit::Normal,
+ TQString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
+ TQLineEdit::Normal,
iface->pageLabel( wClassName, w,
index ),
&ok, this );
@@ -1936,10 +1936,10 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
}
}
-void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands, FormWindow *fw )
+void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw )
{
- if ( ::qt_cast<QWizard*>(fw->mainContainer()) ) {
- QWizard *wiz = (QWizard*)fw->mainContainer();
+ if ( ::qt_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() ),
@@ -1965,10 +1965,10 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
bool ok = FALSE;
QDesignerWizard *dw = (QDesignerWizard*)wiz;
- QString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
- QLineEdit::Normal, dw->pageTitle(), &ok, this );
+ TQString text = QInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
+ TQLineEdit::Normal, dw->pageTitle(), &ok, this );
if ( ok ) {
- QString pn( i18n( "Rename page %1 of %2" ).arg( dw->pageTitle() ).arg( wiz->name() ) );
+ TQString pn( i18n( "Rename page %1 of %2" ).arg( dw->pageTitle() ).arg( wiz->name() ) );
RenameWizardPageCommand *cmd =
new RenameWizardPageCommand( pn, formWindow()
, wiz, wiz->indexOf( wiz->currentPage() ), text );
@@ -1976,8 +1976,8 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
cmd->execute();
}
}
- } else if ( ::qt_cast<QMainWindow*>(fw->mainContainer()) ) {
- QMainWindow *mw = (QMainWindow*)fw->mainContainer();
+ } else if ( ::qt_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() ),
@@ -1996,8 +1996,8 @@ void MainWindow::handleRMBSpecialCommands( int id, QMap<QString, int> &commands,
void MainWindow::clipboardChanged()
{
- QString text( qApp->clipboard()->text() );
- QString start( "<!DOCTYPE UI-SELECTION>" );
+ TQString text( qApp->clipboard()->text() );
+ TQString start( "<!DOCTYPE UI-SELECTION>" );
actionEditPaste->setEnabled( text.left( start.length() ) == start );
}
@@ -2036,11 +2036,11 @@ void MainWindow::selectionChanged()
actionEditSplitVertical->setEnabled( FALSE );
enable = FALSE;
- QWidgetList widgets = formWindow()->selectedWidgets();
+ TQWidgetList widgets = formWindow()->selectedWidgets();
if ( selectedWidgets > 1 ) {
int unlaidout = 0;
int laidout = 0;
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
unlaidout++;
else
@@ -2056,7 +2056,7 @@ void MainWindow::selectionChanged()
layoutSelected = unlaidout > 1;
breakLayout = laidout > 0;
} else if ( selectedWidgets == 1 ) {
- QWidget *w = widgets.first();
+ TQWidget *w = widgets.first();
bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
w == formWindow()->mainContainer();
actionEditAdjustSize->setEnabled( !w->parentWidget() ||
@@ -2100,7 +2100,7 @@ void MainWindow::selectionChanged()
}
} else if ( selectedWidgets == 0 ) {
actionEditAdjustSize->setEnabled( TRUE );
- QWidget *w = formWindow()->mainContainer();
+ TQWidget *w = formWindow()->mainContainer();
if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
if ( !formWindow()->hasInsertedChildren( w ) ) {
actionEditHLayout->setEnabled( FALSE );
@@ -2129,23 +2129,23 @@ void MainWindow::selectionChanged()
}
}
-static QString fixArgs( const QString &s2 )
+static TQString fixArgs( const TQString &s2 )
{
- QString s = s2;
+ TQString s = s2;
return s.replace( ',', ';' );
}
void MainWindow::writeConfig()
{
- QSettings config;
+ TQSettings config;
// No search path for unix, only needs application name
- config.insertSearchPath( QSettings::Windows, "/Trolltech" );
+ config.insertSearchPath( TQSettings::Windows, "/Trolltech" );
- QString keybase = DesignerApplication::settingsKey();
+ TQString keybase = DesignerApplication::settingsKey();
if (savePluginPaths) {
- QStringList pluginPaths = QApplication::libraryPaths();
+ TQStringList pluginPaths = TQApplication::libraryPaths();
config.writeEntry( keybase + "PluginPaths", pluginPaths );
}
config.writeEntry( keybase + "RestoreWorkspace", restoreConfig );
@@ -2170,7 +2170,7 @@ void MainWindow::writeConfig()
config.writeEntry( keybase + "Background/UsePixmap", backPix );
config.writeEntry( keybase + "Background/Color", (int)qworkspace->backgroundColor().rgb() );
if ( qworkspace->backgroundPixmap() )
- qworkspace->backgroundPixmap()->save( QDir::home().absPath() + "/.designer/" + "background.xpm", "PNG" );
+ qworkspace->backgroundPixmap()->save( TQDir::home().absPath() + "/.designer/" + "background.xpm", "PNG" );
config.writeEntry( keybase + "Geometries/MainwindowX", x() );
config.writeEntry( keybase + "Geometries/MainwindowY", y() );
@@ -2193,67 +2193,67 @@ void MainWindow::writeConfig()
config.writeEntry( keybase + "View/TextLabels", usesTextLabel() );
config.writeEntry( keybase + "View/BigIcons", usesBigPixmaps() );
- QString mwlKey = "MainwindowLayout";
+ TQString mwlKey = "MainwindowLayout";
if ( singleProjectMode() )
mwlKey += "S";
- QString mainWindowLayout;
- QTextStream ts( &mainWindowLayout, IO_WriteOnly );
+ TQString mainWindowLayout;
+ TQTextStream ts( &mainWindowLayout, IO_WriteOnly );
ts << *this;
config.writeEntry( keybase + mwlKey, mainWindowLayout );
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
config.writeEntry( keybase + "CustomWidgets/num", (int)lst->count() );
int j = 0;
- QDir::home().mkdir( ".designer" );
+ TQDir::home().mkdir( ".designer" );
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
- QStringList l;
+ TQStringList l;
l << w->className;
l << w->includeFile;
- l << QString::number( (int)w->includePolicy );
- l << QString::number( w->sizeHint.width() );
- l << QString::number( w->sizeHint.height() );
- l << QString::number( w->lstSignals.count() );
- for ( QValueList<QCString>::ConstIterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
- l << QString( fixArgs( *it ) );
- l << QString::number( w->lstSlots.count() );
- for ( QValueList<MetaDataBase::Function>::ConstIterator it2 = w->lstSlots.begin(); it2 != w->lstSlots.end(); ++it2 ) {
+ l << TQString::number( (int)w->includePolicy );
+ l << TQString::number( w->sizeHint.width() );
+ l << TQString::number( w->sizeHint.height() );
+ l << TQString::number( w->lstSignals.count() );
+ for ( TQValueList<TQCString>::ConstIterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ l << TQString( fixArgs( *it ) );
+ l << TQString::number( w->lstSlots.count() );
+ for ( TQValueList<MetaDataBase::Function>::ConstIterator it2 = w->lstSlots.begin(); it2 != w->lstSlots.end(); ++it2 ) {
l << fixArgs( (*it2).function );
l << (*it2).access;
}
- l << QString::number( w->lstProperties.count() );
- for ( QValueList<MetaDataBase::Property>::ConstIterator it3 = w->lstProperties.begin(); it3 != w->lstProperties.end(); ++it3 ) {
+ l << TQString::number( w->lstProperties.count() );
+ for ( TQValueList<MetaDataBase::Property>::ConstIterator it3 = w->lstProperties.begin(); it3 != w->lstProperties.end(); ++it3 ) {
l << (*it3).property;
l << (*it3).type;
}
- l << QString::number( size_type_to_int( w->sizePolicy.horData() ) );
- l << QString::number( size_type_to_int( w->sizePolicy.verData() ) );
- l << QString::number( (int)w->isContainer );
- config.writeEntry( keybase + "CustomWidgets/Widget" + QString::number( j++ ), l, ',' );
- w->pixmap->save( QDir::home().absPath() + "/.designer/" + w->className, "XPM" );
+ l << TQString::number( size_type_to_int( w->sizePolicy.horData() ) );
+ l << TQString::number( size_type_to_int( w->sizePolicy.verData() ) );
+ l << TQString::number( (int)w->isContainer );
+ config.writeEntry( keybase + "CustomWidgets/Widget" + TQString::number( j++ ), l, ',' );
+ w->pixmap->save( TQDir::home().absPath() + "/.designer/" + w->className, "XPM" );
}
- QStringList l;
- for ( QAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() )
+ TQStringList l;
+ for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() )
l << a->text();
config.writeEntry( keybase + "ToolBox/CommonWidgets", l );
}
-static QString fixArgs2( const QString &s2 )
+static TQString fixArgs2( const TQString &s2 )
{
- QString s = s2;
+ TQString s = s2;
return s.replace( ';', ',' );
}
void MainWindow::readConfig()
{
- QString keybase = DesignerApplication::settingsKey();
- QSettings config;
- config.insertSearchPath( QSettings::Windows, "/Trolltech" );
+ TQString keybase = DesignerApplication::settingsKey();
+ TQSettings config;
+ config.insertSearchPath( TQSettings::Windows, "/Trolltech" );
bool ok;
bool readPreviousConfig = FALSE;
- QString backPixName( QDir::home().absPath() + "/.designer/" + "background.xpm" );
+ TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" );
restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok );
if ( !ok ) {
keybase = DesignerApplication::oldSettingsKey();
@@ -2261,9 +2261,9 @@ void MainWindow::readConfig()
if ( !ok ) {
if ( oWindow ) {
oWindow->shuttingDown();
- ( (QDockWindow*)oWindow->parent() )->hide();
+ ( (TQDockWindow*)oWindow->parent() )->hide();
}
- QPixmap pix;
+ TQPixmap pix;
pix.load( backPixName );
if ( !pix.isNull() )
qworkspace->setBackgroundPixmap( pix );
@@ -2273,7 +2273,7 @@ void MainWindow::readConfig()
}
if ( !readPreviousConfig ) {
fileFilter = config.readEntry( keybase + "FileFilter", fileFilter );
- templPath = config.readEntry( keybase + "TemplatePath", QString::null );
+ templPath = config.readEntry( keybase + "TemplatePath", TQString::null );
databaseAutoEdit = config.readBoolEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit );
shStartDialog = config.readBoolEntry( keybase + "ShowStartDialog", shStartDialog );
autoSaveEnabled = config.readBoolEntry( keybase + "AutoSave/Enabled", autoSaveEnabled );
@@ -2281,7 +2281,7 @@ void MainWindow::readConfig()
}
if ( restoreConfig || readPreviousConfig ) {
- QString s = config.readEntry( keybase + "LastToolPage" );
+ TQString s = config.readEntry( keybase + "LastToolPage" );
for ( int i = 0; i < toolBox->count(); ++i ) {
if ( toolBox->itemLabel(i) == s ) {
toolBox->setCurrentIndex( i );
@@ -2310,12 +2310,12 @@ void MainWindow::readConfig()
backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig;
if ( backPix ) {
- QPixmap pix;
+ TQPixmap pix;
pix.load( backPixName );
if ( !pix.isNull() )
qworkspace->setBackgroundPixmap( pix );
} else {
- qworkspace->setBackgroundColor( QColor( (QRgb)config.readNumEntry( keybase + "Background/Color" ) ) );
+ qworkspace->setBackgroundColor( TQColor( (QRgb)config.readNumEntry( keybase + "Background/Color" ) ) );
}
if ( !readPreviousConfig ) {
@@ -2327,14 +2327,14 @@ void MainWindow::readConfig()
grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) );
if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) {
- QRect r( pos(), size() );
+ TQRect r( pos(), size() );
r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) );
r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) );
r.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", r.width() ) );
r.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", r.height() ) );
- QRect desk = QApplication::desktop()->geometry();
- QRect inter = desk.intersect( r );
+ TQRect desk = TQApplication::desktop()->geometry();
+ TQRect inter = desk.intersect( r );
resize( r.size() );
if ( inter.width() * inter.height() > ( r.width() * r.height() / 20 ) ) {
move( r.topLeft() );
@@ -2347,7 +2347,7 @@ void MainWindow::readConfig()
int num = config.readNumEntry( keybase + "CustomWidgets/num" );
for ( int j = 0; j < num; ++j ) {
MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget;
- QStringList l = config.readListEntry( keybase + "CustomWidgets/Widget" + QString::number( j ), ',' );
+ TQStringList l = config.readListEntry( keybase + "CustomWidgets/Widget" + TQString::number( j ), ',' );
w->className = l[ 0 ];
w->includeFile = l[ 1 ];
w->includePolicy = (MetaDataBase::CustomWidget::IncludePolicy)l[ 2 ].toInt();
@@ -2384,15 +2384,15 @@ void MainWindow::readConfig()
w->lstProperties.append( prop );
}
} if ( l.count() > c ) {
- QSizePolicy::SizeType h, v;
+ TQSizePolicy::SizeType h, v;
h = int_to_size_type( l[ c++ ].toInt() );
v = int_to_size_type( l[ c++ ].toInt() );
- w->sizePolicy = QSizePolicy( h, v );
+ w->sizePolicy = TQSizePolicy( h, v );
}
if ( l.count() > c ) {
w->isContainer = (bool)l[ c++ ].toInt();
}
- w->pixmap = new QPixmap( BarIcon( QDir::home().absPath() + "/.designer/" + w->className , KDevDesignerPartFactory::instance()) );
+ w->pixmap = new TQPixmap( BarIcon( TQDir::home().absPath() + "/.designer/" + w->className , KDevDesignerPartFactory::instance()) );
MetaDataBase::addCustomWidget( w );
}
if ( num > 0 )
@@ -2403,32 +2403,32 @@ void MainWindow::readConfig()
#ifndef Q_WS_MAC
/* I'm sorry to make this not happen on the Mac, but it seems to hang somewhere deep
- in QLayout, it gets into a very large loop - and seems it has to do with clever
+ in TQLayout, it gets into a very large loop - and seems it has to do with clever
things the designer does ###Sam */
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
#endif
if ( !readPreviousConfig ) {
- QString mwlKey = "MainwindowLayout";
+ TQString mwlKey = "MainwindowLayout";
if ( singleProjectMode() )
mwlKey += "S";
- QString mainWindowLayout = config.readEntry( keybase + mwlKey );
- QTextStream ts( &mainWindowLayout, IO_ReadOnly );
+ TQString mainWindowLayout = config.readEntry( keybase + mwlKey );
+ TQTextStream ts( &mainWindowLayout, IO_ReadOnly );
ts >> *this;
}
if ( readPreviousConfig && oWindow ) {
oWindow->shuttingDown();
- ( (QDockWindow*)oWindow->parent() )->hide();
+ ( (TQDockWindow*)oWindow->parent() )->hide();
}
rebuildCustomWidgetGUI();
- QStringList l = config.readListEntry( keybase + "ToolBox/CommonWidgets" );
+ TQStringList l = config.readListEntry( keybase + "ToolBox/CommonWidgets" );
if ( !l.isEmpty() ) {
- QPtrList<QAction> lst;
+ TQPtrList<TQAction> lst;
commonWidgetsPage.clear();
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
- for ( QAction *a = toolActions.first(); a; a = toolActions.next() ) {
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ for ( TQAction *a = toolActions.first(); a; a = toolActions.next() ) {
if ( *it == a->text() ) {
lst.append( a );
break;
@@ -2449,9 +2449,9 @@ HierarchyView *MainWindow::objectHierarchy() const
return hierarchyView;
}
-QPopupMenu *MainWindow::setupNormalHierarchyMenu( QWidget *parent )
+TQPopupMenu *MainWindow::setupNormalHierarchyMenu( TQWidget *parent )
{
- QPopupMenu *menu = new QPopupMenu( parent );
+ TQPopupMenu *menu = new TQPopupMenu( parent );
actionEditCut->addTo( menu );
actionEditCopy->addTo( menu );
@@ -2461,9 +2461,9 @@ QPopupMenu *MainWindow::setupNormalHierarchyMenu( QWidget *parent )
return menu;
}
-QPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( QWidget *parent, const char *addSlot, const char *removeSlot )
+TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot )
{
- QPopupMenu *menu = new QPopupMenu( parent );
+ TQPopupMenu *menu = new TQPopupMenu( parent );
menu->insertItem( i18n( "Add Page" ), parent, addSlot );
menu->insertItem( i18n( "Delete Page" ), parent, removeSlot );
@@ -2476,7 +2476,7 @@ QPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( QWidget *parent, const char
return menu;
}
-void MainWindow::closeEvent( QCloseEvent *e )
+void MainWindow::closeEvent( TQCloseEvent *e )
{
if ( singleProject ) {
hide();
@@ -2484,10 +2484,10 @@ void MainWindow::closeEvent( QCloseEvent *e )
return;
}
- QWidgetList windows = qWorkspace()->windowList();
- QWidgetListIt wit( windows );
+ TQWidgetList windows = qWorkspace()->windowList();
+ TQWidgetListIt wit( windows );
while ( wit.current() ) {
- QWidget *w = wit.current();
+ TQWidget *w = wit.current();
++wit;
if ( ::qt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->formFile()->editor() )
@@ -2507,12 +2507,12 @@ void MainWindow::closeEvent( QCloseEvent *e )
w->close();
}
- QMapConstIterator<QAction*, Project*> it = projects.begin();
+ TQMapConstIterator<TQAction*, Project*> it = projects.begin();
while( it != projects.end() ) {
Project *pro = it.data();
++it;
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
@@ -2534,7 +2534,7 @@ void MainWindow::closeEvent( QCloseEvent *e )
e->accept();
if ( client ) {
- QDir home( QDir::homeDirPath() );
+ TQDir home( TQDir::homeDirPath() );
home.remove( ".designerpid" );
}
}
@@ -2560,20 +2560,20 @@ ActionEditor *MainWindow::actioneditor() const
return actionEditor;
}
-bool MainWindow::openEditor( QWidget *w, FormWindow *f )
+bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
{
if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( w ) ) {
- QString defSignal = WidgetFactory::defaultSignal( w );
+ TQString defSignal = WidgetFactory::defaultSignal( w );
if ( defSignal.isEmpty() ) {
editSource();
} else {
- QString s = QString( w->name() ) + "_" + defSignal;
+ TQString s = TQString( w->name() ) + "_" + defSignal;
LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() );
if ( iface ) {
- QStrList sigs = iface->signalNames( w );
- QString fullSignal;
+ TQStrList sigs = iface->signalNames( w );
+ TQString fullSignal;
for ( int i = 0; i < (int)sigs.count(); ++i ) {
- QString sig = sigs.at( i );
+ TQString sig = sigs.at( i );
if ( sig.left( sig.find( '(' ) ) == defSignal ) {
fullSignal = sig;
break;
@@ -2581,7 +2581,7 @@ bool MainWindow::openEditor( QWidget *w, FormWindow *f )
}
if ( !fullSignal.isEmpty() ) {
- QString signl = fullSignal;
+ TQString signl = fullSignal;
fullSignal = fullSignal.mid( fullSignal.find( '(' ) + 1 );
fullSignal.remove( (int)fullSignal.length() - 1, 1 );
fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() );
@@ -2617,42 +2617,42 @@ bool MainWindow::openEditor( QWidget *w, FormWindow *f )
return TRUE;
}
- const QMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
- const QMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), 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 );
if ( text && text->designable(w) ) {
bool ok = FALSE;
bool oldDoWrap = FALSE;
- if ( ::qt_cast<QLabel*>(w) ) {
+ if ( ::qt_cast<TQLabel*>(w) ) {
int align = w->property( "alignment" ).toInt();
if ( align & WordBreak )
oldDoWrap = TRUE;
}
bool doWrap = oldDoWrap;
- QString text;
- if ( ::qt_cast<QTextEdit*>(w) || ::qt_cast<QLabel*>(w) || ::qt_cast<QButton*>(w) ) {
+ TQString text;
+ if ( ::qt_cast<TQTextEdit*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) {
text = MultiLineEditor::getText( this, w->property( "text" ).toString(),
- !::qt_cast<QButton*>(w), &doWrap );
+ !::qt_cast<TQButton*>(w), &doWrap );
ok = !text.isNull();
} else {
text = QInputDialog::getText( i18n("Text"), i18n( "New text" ),
- QLineEdit::Normal, w->property("text").toString(), &ok, this );
+ TQLineEdit::Normal, w->property("text").toString(), &ok, this );
}
if ( ok ) {
if ( oldDoWrap != doWrap ) {
- QString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
+ TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
- "wordwrap", QVariant( oldDoWrap, 0 ),
- QVariant( doWrap, 0 ), QString::null, QString::null );
+ "wordwrap", TQVariant( oldDoWrap, 0 ),
+ TQVariant( doWrap, 0 ), TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE );
}
- QString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
+ TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"text", w->property( "text" ),
- text, QString::null, QString::null );
+ text, TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "text", TRUE );
@@ -2661,13 +2661,13 @@ bool MainWindow::openEditor( QWidget *w, FormWindow *f )
}
if ( title && title->designable(w) ) {
bool ok = FALSE;
- QString text;
- text = QInputDialog::getText( i18n("Title"), i18n( "New title" ), QLineEdit::Normal, w->property("title").toString(), &ok, this );
+ TQString text;
+ text = QInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this );
if ( ok ) {
- QString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) );
+ TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"title", w->property( "title" ),
- text, QString::null, QString::null );
+ text, TQString::null, TQString::null );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "title", TRUE );
@@ -2688,21 +2688,21 @@ void MainWindow::rebuildCustomWidgetGUI()
customWidgetToolBar2->clear();
int count = 0;
- QPtrListIterator<QAction> it( toolActions );
- QAction *action;
+ TQPtrListIterator<TQAction> it( toolActions );
+ TQAction *action;
while ( ( action = it.current() ) ) {
++it;
if ( ( (WidgetAction*)action )->group() == "Custom Widgets" )
delete action;
}
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
actionToolsCustomWidget->addTo( customWidgetMenu );
customWidgetMenu->insertSeparator();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
- WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, QString::number( w->id ).latin1() );
+ WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() );
a->setToggleAction( TRUE );
a->setText( w->className );
a->setIconSet( *w->pixmap );
@@ -2718,8 +2718,8 @@ void MainWindow::rebuildCustomWidgetGUI()
a->addTo( customWidgetMenu );
count++;
}
- QWidget *wid;
- customWidgetToolBar2->setStretchableWidget( ( wid = new QWidget( customWidgetToolBar2 ) ) );
+ TQWidget *wid;
+ customWidgetToolBar2->setStretchableWidget( ( wid = new TQWidget( customWidgetToolBar2 ) ) );
wid->setBackgroundMode( customWidgetToolBar2->backgroundMode() );
if ( count == 0 )
@@ -2733,10 +2733,10 @@ void MainWindow::rebuildCommonWidgetsToolBoxPage()
toolBox->setUpdatesEnabled( FALSE );
commonWidgetsToolBar->setUpdatesEnabled( FALSE );
commonWidgetsToolBar->clear();
- for ( QAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() )
+ for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() )
a->addTo( commonWidgetsToolBar );
- QWidget *w;
- commonWidgetsToolBar->setStretchableWidget( ( w = new QWidget( commonWidgetsToolBar ) ) );
+ TQWidget *w;
+ commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) );
w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() );
toolBox->setUpdatesEnabled( TRUE );
commonWidgetsToolBar->setUpdatesEnabled( TRUE );
@@ -2744,8 +2744,8 @@ void MainWindow::rebuildCommonWidgetsToolBoxPage()
bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid )
{
- QWidgetList windows = qWorkspace()->windowList();
- for ( QWidget *w = windows.first(); w; w = windows.next() ) {
+ TQWidgetList windows = qWorkspace()->windowList();
+ for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( ::qt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) )
return TRUE;
@@ -2754,13 +2754,13 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid )
return FALSE;
}
-void MainWindow::setGrid( const QPoint &p )
+void MainWindow::setGrid( const TQPoint &p )
{
if ( p == grd )
return;
grd = p;
- QWidgetList windows = qWorkspace()->windowList();
- for ( QWidget *w = windows.first(); w; w = windows.next() ) {
+ TQWidgetList windows = qWorkspace()->windowList();
+ for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( !::qt_cast<FormWindow*>(w) )
continue;
( (FormWindow*)w )->mainContainer()->update();
@@ -2772,8 +2772,8 @@ void MainWindow::setShowGrid( bool b )
if ( b == sGrid )
return;
sGrid = b;
- QWidgetList windows = qWorkspace()->windowList();
- for ( QWidget *w = windows.first(); w; w = windows.next() ) {
+ TQWidgetList windows = qWorkspace()->windowList();
+ for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( !::qt_cast<FormWindow*>(w) )
continue;
( (FormWindow*)w )->mainContainer()->update();
@@ -2787,19 +2787,19 @@ void MainWindow::setSnapGrid( bool b )
snGrid = b;
}
-QString MainWindow::documentationPath() const
+TQString MainWindow::documentationPath() const
{
- return QString( qInstallPathDocs() ) + "/html/";
+ return TQString( qInstallPathDocs() ) + "/html/";
}
void MainWindow::windowsMenuActivated( int id )
{
- QWidget* w = qworkspace->windowList().at( id );
+ TQWidget* w = qworkspace->windowList().at( id );
if ( w )
w->setFocus();
}
-void MainWindow::projectSelected( QAction *a )
+void MainWindow::projectSelected( TQAction *a )
{
a->setOn( TRUE );
if ( currentProject )
@@ -2813,40 +2813,40 @@ void MainWindow::projectSelected( QAction *a )
wspace->setCurrentProject( currentProject );
}
-void MainWindow::openProject( const QString &fn )
+void MainWindow::openProject( const TQString &fn )
{
- for ( QMap<QAction*, Project*>::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
+ for ( TQMap<TQAction*, Project*>::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
if ( (*it)->fileName() == fn ) {
projectSelected( it.key() );
return;
}
}
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
Project *pro = new Project( fn, "", projectSettingsPluginManager );
pro->setModified( FALSE );
- QAction *a = new QAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE );
+ TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE );
projects.insert( a, pro );
projectSelected( a );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void MainWindow::checkTempFiles()
{
- QString s = QDir::homeDirPath() + "/.designer";
- QString baseName = s+ "/saved-form-";
- if ( !QFile::exists( baseName + "1.ui" ) )
+ TQString s = TQDir::homeDirPath() + "/.designer";
+ TQString baseName = s+ "/saved-form-";
+ if ( !TQFile::exists( baseName + "1.ui" ) )
return;
DesignerApplication::closeSplash();
- QDir d( s );
+ TQDir d( s );
d.setNameFilter( "*.ui" );
- QStringList lst = d.entryList();
- QApplication::restoreOverrideCursor();
- bool load = QMessageBox::information( this, i18n( "Restoring Last Session" ),
+ 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"
"load these files?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0;
- QApplication::setOverrideCursor( waitCursor );
- for ( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQApplication::setOverrideCursor( waitCursor );
+ for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( load )
openFormWindow( s + "/" + *it, FALSE );
d.remove( *it );
@@ -2855,10 +2855,10 @@ void MainWindow::checkTempFiles()
void MainWindow::showDialogHelp()
{
- QWidget *w = (QWidget*)sender();
+ TQWidget *w = (TQWidget*)sender();
w = w->topLevelWidget();
- QString link = documentationPath() + "/designer-manual-13.html#";
+ TQString link = documentationPath() + "/designer-manual-13.html#";
if ( ::qt_cast<NewFormBase*>(w) || ::qt_cast<StartDialogBase*>(w) ) // own doc for startdialog?
link += "dialog-file-new";
@@ -2905,7 +2905,7 @@ void MainWindow::showDialogHelp()
link += "dialog-text";
else {
- QMessageBox::information( this, i18n( "Help" ),
+ TQMessageBox::information( this, i18n( "Help" ),
i18n( "There is no help available for this dialog at the moment." ) );
return;
}
@@ -2915,33 +2915,33 @@ void MainWindow::showDialogHelp()
void MainWindow::setupActionManager()
{
- actionPluginManager = new QPluginManager<ActionInterface>( IID_Action, QApplication::libraryPaths(), pluginDirectory() );
+ actionPluginManager = new QPluginManager<ActionInterface>( IID_Action, TQApplication::libraryPaths(), pluginDirectory() );
- QStringList lst = actionPluginManager->featureList();
- for ( QStringList::ConstIterator ait = lst.begin(); ait != lst.end(); ++ait ) {
+ TQStringList lst = actionPluginManager->featureList();
+ for ( TQStringList::ConstIterator ait = lst.begin(); ait != lst.end(); ++ait ) {
ActionInterface *iface = 0;
actionPluginManager->queryInterface( *ait, &iface );
if ( !iface )
continue;
iface->connectTo( desInterface );
- QAction *a = iface->create( *ait, this );
+ TQAction *a = iface->create( *ait, this );
if ( !a )
continue;
- QString grp = iface->group( *ait );
+ TQString grp = iface->group( *ait );
if ( grp.isEmpty() )
grp = "3rd party actions";
- QPopupMenu *menu = 0;
- QToolBar *tb = 0;
+ TQPopupMenu *menu = 0;
+ TQToolBar *tb = 0;
- if ( !( menu = (QPopupMenu*)child( grp.latin1(), "QPopupMenu" ) ) ) {
- menu = new QPopupMenu( this, grp.latin1() );
+ if ( !( menu = (TQPopupMenu*)child( grp.latin1(), "TQPopupMenu" ) ) ) {
+ menu = new TQPopupMenu( this, grp.latin1() );
menuBar()->insertItem( i18n( grp ), menu );
}
- if ( !( tb = (QToolBar*)child( grp.latin1(), "QToolBar" ) ) ) {
- tb = new QToolBar( this, grp.latin1() );
- tb->setCloseMode( QDockWindow::Undocked );
+ if ( !( tb = (TQToolBar*)child( grp.latin1(), "TQToolBar" ) ) ) {
+ tb = new TQToolBar( this, grp.latin1() );
+ tb->setCloseMode( TQDockWindow::Undocked );
addToolBar( tb, grp );
}
@@ -2954,7 +2954,7 @@ void MainWindow::setupActionManager()
}
}
-void MainWindow::editFunction( const QString &func, bool rereadSource )
+void MainWindow::editFunction( const TQString &func, bool rereadSource )
{
if ( !formWindow() )
return;
@@ -2963,9 +2963,9 @@ void MainWindow::editFunction( const QString &func, bool rereadSource )
if ( !formWindow()->formFile()->setupUihFile(FALSE) )
return;
- 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;
@@ -2986,7 +2986,7 @@ void MainWindow::setupRecentlyFilesMenu()
{
recentlyFilesMenu->clear();
int id = 0;
- for ( QStringList::ConstIterator it = recentlyFiles.begin(); it != recentlyFiles.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = recentlyFiles.begin(); it != recentlyFiles.end(); ++it ) {
recentlyFilesMenu->insertItem( *it, id );
id++;
}
@@ -2996,16 +2996,16 @@ void MainWindow::setupRecentlyProjectsMenu()
{
recentlyProjectsMenu->clear();
int id = 0;
- for ( QStringList::ConstIterator it = recentlyProjects.begin(); it != recentlyProjects.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = recentlyProjects.begin(); it != recentlyProjects.end(); ++it ) {
recentlyProjectsMenu->insertItem( *it, id );
id++;
}
}
-QPtrList<DesignerProject> MainWindow::projectList() const
+TQPtrList<DesignerProject> MainWindow::projectList() const
{
- QPtrList<DesignerProject> list;
- QMapConstIterator<QAction*, Project*> it = projects.begin();
+ TQPtrList<DesignerProject> list;
+ TQMapConstIterator<TQAction*, Project*> it = projects.begin();
while( it != projects.end() ) {
Project *p = it.data();
@@ -3016,25 +3016,25 @@ QPtrList<DesignerProject> MainWindow::projectList() const
return list;
}
-QStringList MainWindow::projectNames() const
+TQStringList MainWindow::projectNames() const
{
- QStringList res;
- for ( QMap<QAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it )
+ TQStringList res;
+ for ( TQMap<TQAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it )
res << (*it)->projectName();
return res;
}
-QStringList MainWindow::projectFileNames() const
+TQStringList MainWindow::projectFileNames() const
{
- QStringList res;
- for ( QMap<QAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it )
+ TQStringList res;
+ for ( TQMap<TQAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it )
res << (*it)->makeRelative( (*it)->fileName() );
return res;
}
-Project *MainWindow::findProject( const QString &projectName ) const
+Project *MainWindow::findProject( const TQString &projectName ) const
{
- for ( QMap<QAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
+ for ( TQMap<TQAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
if ( (*it)->projectName() == projectName )
return *it;
}
@@ -3043,7 +3043,7 @@ Project *MainWindow::findProject( const QString &projectName ) const
void MainWindow::setCurrentProject( Project *pro )
{
- for ( QMap<QAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
+ for ( TQMap<TQAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
if ( *it == pro ) {
projectSelected( it.key() );
return;
@@ -3051,9 +3051,9 @@ void MainWindow::setCurrentProject( Project *pro )
}
}
-void MainWindow::setCurrentProjectByFilename( const QString& proFilename )
+void MainWindow::setCurrentProjectByFilename( const TQString& proFilename )
{
- for ( QMap<QAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
+ for ( TQMap<TQAction*, Project* >::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
if ( (*it)->makeRelative( (*it)->fileName() ) == proFilename ) {
projectSelected( it.key() );
return;
@@ -3065,15 +3065,15 @@ void MainWindow::setCurrentProjectByFilename( const QString& proFilename )
void MainWindow::recentlyFilesMenuActivated( int id )
{
if ( id != -1 ) {
- if ( !QFile::exists( *recentlyFiles.at( id ) ) ) {
- QMessageBox::warning( this, i18n( "Open File" ),
+ if ( !TQFile::exists( *recentlyFiles.at( id ) ) ) {
+ TQMessageBox::warning( this, i18n( "Open File" ),
i18n( "Could not open '%1'. File does not exist." ).
arg( *recentlyFiles.at( id ) ) );
recentlyFiles.remove( recentlyFiles.at( id ) );
return;
}
fileOpen( "", "", *recentlyFiles.at( id ) );
- QString fn( *recentlyFiles.at( id ) );
+ TQString fn( *recentlyFiles.at( id ) );
addRecentlyOpened( fn, recentlyFiles );
}
}
@@ -3081,24 +3081,24 @@ void MainWindow::recentlyFilesMenuActivated( int id )
void MainWindow::recentlyProjectsMenuActivated( int id )
{
if ( id != -1 ) {
- if ( !QFile::exists( *recentlyProjects.at( id ) ) ) {
- QMessageBox::warning( this, i18n( "Open Project" ),
+ if ( !TQFile::exists( *recentlyProjects.at( id ) ) ) {
+ TQMessageBox::warning( this, i18n( "Open Project" ),
i18n( "Could not open '%1'. File does not exist." ).
arg( *recentlyProjects.at( id ) ) );
recentlyProjects.remove( recentlyProjects.at( id ) );
return;
}
openProject( *recentlyProjects.at( id ) );
- QString fn( *recentlyProjects.at( id ) );
+ TQString fn( *recentlyProjects.at( id ) );
addRecentlyOpened( fn, recentlyProjects );
}
}
-void MainWindow::addRecentlyOpened( const QString &fn, QStringList &lst )
+void MainWindow::addRecentlyOpened( const TQString &fn, TQStringList &lst )
{
- QFileInfo fi( fn );
+ TQFileInfo fi( fn );
fi.convertToAbs();
- QString f = fi.filePath();
+ TQString f = fi.filePath();
if ( lst.find( f ) != lst.end() )
lst.remove( f );
if ( lst.count() >= 10 )
@@ -3106,7 +3106,7 @@ void MainWindow::addRecentlyOpened( const QString &fn, QStringList &lst )
lst.prepend( f );
}
-TemplateWizardInterface * MainWindow::templateWizardInterface( const QString& className )
+TemplateWizardInterface * MainWindow::templateWizardInterface( const TQString& className )
{
TemplateWizardInterface* iface = 0;
templateWizardPluginManager->queryInterface( className, & iface );
@@ -3115,23 +3115,23 @@ TemplateWizardInterface * MainWindow::templateWizardInterface( const QString& cl
void MainWindow::setupPluginManagers()
{
- editorPluginManager = new QPluginManager<EditorInterface>( IID_Editor, QApplication::libraryPaths(), "/kdevdesigner" );
+ editorPluginManager = new QPluginManager<EditorInterface>( IID_Editor, TQApplication::libraryPaths(), "/kdevdesigner" );
MetaDataBase::setEditor( editorPluginManager->featureList() );
templateWizardPluginManager =
- new QPluginManager<TemplateWizardInterface>( IID_TemplateWizard, QApplication::libraryPaths(), pluginDirectory() );
+ new QPluginManager<TemplateWizardInterface>( IID_TemplateWizard, TQApplication::libraryPaths(), pluginDirectory() );
MetaDataBase::setupInterfaceManagers( "/designer" );
preferencePluginManager =
- new QPluginManager<PreferenceInterface>( IID_Preference, QApplication::libraryPaths(), pluginDirectory() );
+ new QPluginManager<PreferenceInterface>( IID_Preference, TQApplication::libraryPaths(), pluginDirectory() );
projectSettingsPluginManager =
- new QPluginManager<ProjectSettingsInterface>( IID_ProjectSettings, QApplication::libraryPaths(), pluginDirectory() );
+ new QPluginManager<ProjectSettingsInterface>( IID_ProjectSettings, TQApplication::libraryPaths(), pluginDirectory() );
sourceTemplatePluginManager =
- new QPluginManager<SourceTemplateInterface>( IID_SourceTemplate, QApplication::libraryPaths(), pluginDirectory() );
+ new QPluginManager<SourceTemplateInterface>( IID_SourceTemplate, TQApplication::libraryPaths(), pluginDirectory() );
if ( preferencePluginManager ) {
- QStringList lst = preferencePluginManager->featureList();
- for ( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQStringList lst = preferencePluginManager->featureList();
+ for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
PreferenceInterface *i = 0;
preferencePluginManager->queryInterface( *it, &i );
if ( !i )
@@ -3146,8 +3146,8 @@ void MainWindow::setupPluginManagers()
}
}
if ( projectSettingsPluginManager ) {
- QStringList lst = projectSettingsPluginManager->featureList();
- for ( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQStringList lst = projectSettingsPluginManager->featureList();
+ for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
ProjectSettingsInterface *i = 0;
projectSettingsPluginManager->queryInterface( *it, &i );
if ( !i )
@@ -3163,7 +3163,7 @@ void MainWindow::setupPluginManagers()
}
}
-void MainWindow::addPreferencesTab( QWidget *tab, const QString &title, QObject *receiver, const char *init_slot, const char *accept_slot )
+void MainWindow::addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot )
{
Tab t;
t.w = tab;
@@ -3174,7 +3174,7 @@ void MainWindow::addPreferencesTab( QWidget *tab, const QString &title, QObject
preferenceTabs << t;
}
-void MainWindow::addProjectTab( QWidget *tab, const QString &title, QObject *receiver, const char *init_slot, const char *accept_slot )
+void MainWindow::addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot )
{
Tab t;
t.w = tab;
@@ -3185,9 +3185,9 @@ void MainWindow::addProjectTab( QWidget *tab, const QString &title, QObject *rec
projectTabs << t;
}
-void MainWindow::setModified( bool b, QWidget *window )
+void MainWindow::setModified( bool b, TQWidget *window )
{
- QWidget *w = window;
+ TQWidget *w = window;
while ( w ) {
if ( ::qt_cast<FormWindow*>(w) ) {
( (FormWindow*)w )->modificationChanged( b );
@@ -3236,7 +3236,7 @@ void MainWindow::updateFunctionList()
LanguageInterface *iface = MetaDataBase::languageInterface( currentProject->language() );
if ( !iface )
return;
- QValueList<LanguageInterface::Connection> conns;
+ TQValueList<LanguageInterface::Connection> conns;
iface->connections( se->text(), &conns );
MetaDataBase::setupConnections( se->formWindow(), conns );
propertyEditor->eventList()->setup();
@@ -3248,7 +3248,7 @@ void MainWindow::updateWorkspace()
wspace->setCurrentProject( currentProject );
}
-void MainWindow::showDebugStep( QObject *o, int line )
+void MainWindow::showDebugStep( TQObject *o, int line )
{
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
e->clearStep();
@@ -3257,24 +3257,24 @@ void MainWindow::showDebugStep( QObject *o, int line )
showSourceLine( o, line, Step );
}
-void MainWindow::showStackFrame( QObject *o, int line )
+void MainWindow::showStackFrame( TQObject *o, int line )
{
if ( !o || line == -1 )
return;
showSourceLine( o, line, StackFrame );
}
-void MainWindow::showErrorMessage( QObject *o, int errorLine, const QString &errorMessage )
+void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &errorMessage )
{
if ( o ) {
errorLine--; // ######
- QValueList<uint> l;
+ TQValueList<uint> l;
l << ( errorLine + 1 );
- QStringList l2;
+ TQStringList l2;
l2 << errorMessage;
- QObjectList ol;
+ TQObjectList ol;
ol.append( o );
- QStringList ll;
+ TQStringList ll;
ll << currentProject->locationOfObject( o );
oWindow->setErrorMessages( l2, l, TRUE, ll, ol );
showSourceLine( o, errorLine, Error );
@@ -3298,21 +3298,21 @@ void MainWindow::finishedRun()
void MainWindow::enableAll( bool enable )
{
menuBar()->setEnabled( enable );
- QObjectList *l = queryList( "QDockWindow" );
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ TQObjectList *l = queryList( "TQDockWindow" );
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o == wspace->parentWidget() ||
o == oWindow->parentWidget() ||
o == hierarchyView->parentWidget() )
continue;
- ( (QWidget*)o )->setEnabled( enable );
+ ( (TQWidget*)o )->setEnabled( enable );
}
delete l;
}
-void MainWindow::showSourceLine( QObject *o, int line, LineMode lm )
+void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
{
- QWidgetList windows = qworkspace->windowList();
- for ( QWidget *w = windows.first(); w; w = windows.next() ) {
+ TQWidgetList windows = qworkspace->windowList();
+ for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
FormWindow *fw = 0;
SourceEditor *se = 0;
SourceFile *sf = 0;
@@ -3387,7 +3387,7 @@ void MainWindow::showSourceLine( QObject *o, int line, LineMode lm )
}
if ( ::qt_cast<SourceFile*>(o) ) {
- for ( QPtrListIterator<SourceFile> sources = currentProject->sourceFiles();
+ for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
if ( f == o ) {
@@ -3422,7 +3422,7 @@ void MainWindow::showSourceLine( QObject *o, int line, LineMode lm )
mblockNewForms = TRUE;
if ( !fw )
- openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (QWidget*)o ) ) );
+ openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) );
else
fw->formFile()->showEditor( FALSE );
qApp->processEvents(); // give all views the chance to get the formwindow
@@ -3444,14 +3444,14 @@ void MainWindow::showSourceLine( QObject *o, int line, LineMode lm )
}
-QObject *MainWindow::findRealObject( QObject *o )
+TQObject *MainWindow::findRealObject( TQObject *o )
{
- QWidgetList windows = qWorkspace()->windowList();
- for ( QWidget *w = windows.first(); w; w = windows.next() ) {
- if ( ::qt_cast<FormWindow*>(w) && QString( w->name() ) == QString( o->name() ) )
+ 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() &&
- QString( ( (SourceEditor*)w )->formWindow()->name() ) == QString( o->name() ) )
+ TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) )
return w;
else if ( ::qt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
( (SourceEditor*)w )->sourceFile() == o )
@@ -3485,13 +3485,13 @@ void MainWindow::breakPointsChanged()
if ( !interpreterPluginManager ) {
interpreterPluginManager =
new QPluginManager<InterpreterInterface>( IID_Interpreter,
- QApplication::libraryPaths(),
+ TQApplication::libraryPaths(),
"/qsa" );
}
InterpreterInterface *iiface = 0;
if ( interpreterPluginManager ) {
- QString lang = currentProject->language();
+ TQString lang = currentProject->language();
iiface = 0;
interpreterPluginManager->queryInterface( lang, &iiface );
if ( !iiface )
@@ -3500,7 +3500,7 @@ void MainWindow::breakPointsChanged()
e->saveBreakPoints();
- for ( QObject *o = debuggingForms.first(); o; o = debuggingForms.next() ) {
+ for ( TQObject *o = debuggingForms.first(); o; o = debuggingForms.next() ) {
if ( qstrcmp( o->name(), e->object()->name() ) == 0 ) {
iiface->setBreakPoints( o, MetaDataBase::breakPoints( e->object() ) );
break;
@@ -3509,7 +3509,7 @@ void MainWindow::breakPointsChanged()
for ( e = sourceEditors.first(); e; e = sourceEditors.next() ) {
if ( e->project() == currentProject && e->sourceFile() ) {
- QValueList<uint> bps = MetaDataBase::breakPoints( e->sourceFile() );
+ TQValueList<uint> bps = MetaDataBase::breakPoints( e->sourceFile() );
iiface->setBreakPoints( e->object(), bps );
}
}
@@ -3560,18 +3560,18 @@ bool MainWindow::openProjectSettings( Project *pro )
{
ProjectSettings dia( pro, this, 0, TRUE );
SenderObject *senderObject = new SenderObject( designerInterface() );
- QValueList<Tab>::ConstIterator it;
+ TQValueList<Tab>::ConstIterator it;
for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) {
Tab t = *it;
if ( t.title != pro->language() )
continue;
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 );
}
}
@@ -3585,44 +3585,44 @@ bool MainWindow::openProjectSettings( Project *pro )
for ( it = projectTabs.begin(); it != projectTabs.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 );
}
- return res == QDialog::Accepted;
+ return res == TQDialog::Accepted;
}
-void MainWindow::popupProjectMenu( const QPoint &pos )
+void MainWindow::popupProjectMenu( const TQPoint &pos )
{
projectMenu->exec( pos );
}
-QStringList MainWindow::sourceTemplates() const
+TQStringList MainWindow::sourceTemplates() const
{
return sourceTemplatePluginManager->featureList();
}
-SourceTemplateInterface* MainWindow::sourceTemplateInterface( const QString& templ )
+SourceTemplateInterface* MainWindow::sourceTemplateInterface( const TQString& templ )
{
SourceTemplateInterface *iface = 0;
sourceTemplatePluginManager->queryInterface( templ, &iface);
return iface;
}
-QString MainWindow::whatsThisFrom( const QString &key )
+TQString MainWindow::whatsThisFrom( const TQString &key )
{
if ( menuHelpFile.isEmpty() ) {
- QString fn( documentationPath() );
+ TQString fn( documentationPath() );
fn += "/designer-manual-11.html";
- QFile f( fn );
+ TQFile f( fn );
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
menuHelpFile = ts.read();
}
}
int i = menuHelpFile.find( key );
if ( i == -1 )
- return QString::null;
+ return TQString::null;
int start = i;
int end = i;
start = menuHelpFile.findRev( "<li>", i ) + 4;
@@ -3635,11 +3635,11 @@ void MainWindow::setSingleProject( Project *pro )
if ( eProject ) {
Project *pro = eProject;
pro->save();
- 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 ) {
@@ -3655,12 +3655,12 @@ void MainWindow::setSingleProject( Project *pro )
windows = qWorkspace()->windowList();
qWorkspace()->blockSignals( FALSE );
currentProject = 0;
- updateUndoRedo( FALSE, FALSE, QString::null, QString::null );
+ updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null );
}
singleProject = TRUE;
projects.clear();
- QAction *a = new QAction( i18n( pro->name() ), i18n( pro->name() ), 0,
+ TQAction *a = new TQAction( i18n( pro->name() ), i18n( pro->name() ), 0,
actionGroupProjects, 0, TRUE );
eProject = pro;
projects.insert( a, eProject );
@@ -3682,9 +3682,9 @@ void MainWindow::showGUIStuff( bool b )
return;
guiStuffVisible = b;
if ( !b ) {
- setAppropriate( (QDockWindow*)toolBox->parentWidget(), FALSE );
+ setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE );
toolBox->parentWidget()->hide();
- for ( QToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) {
+ for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) {
tb->hide();
setAppropriate( tb, FALSE );
}
@@ -3696,17 +3696,17 @@ void MainWindow::showGUIStuff( bool b )
menubar->removeItem( toolsMenuId );
menubar->removeItem( toolsMenuId + 1 );
menubar->removeItem( toolsMenuId + 2 );
- disconnect( this, SIGNAL( hasActiveForm(bool) ), actionEditAccels, SLOT( setEnabled(bool) ) );
- disconnect( this, SIGNAL( hasActiveForm(bool) ), actionEditFunctions, SLOT( setEnabled(bool) ) );
- disconnect( this, SIGNAL( hasActiveForm(bool) ), actionEditConnections, SLOT( setEnabled(bool) ) );
- disconnect( this, SIGNAL( hasActiveForm(bool) ), actionEditSource, SLOT( setEnabled(bool) ) );
- disconnect( this, SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, SLOT( setEnabled(bool) ) );
+ disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
actionEditFormSettings->setEnabled( FALSE );
actionEditSource->setEnabled( FALSE );
actionEditConnections->setEnabled( FALSE );
actionEditFunctions->setEnabled( FALSE );
actionEditAccels->setEnabled( FALSE );
- ( (QDockWindow*)propertyEditor->parentWidget() )->
+ ( (TQDockWindow*)propertyEditor->parentWidget() )->
setCaption( i18n( "Signal Handlers" ) );
actionGroupNew->removeFrom( fileMenu );
actionGroupNew->removeFrom( projectToolBar );
@@ -3719,9 +3719,9 @@ void MainWindow::showGUIStuff( bool b )
actionFileSave->addTo( projectToolBar );
actionFileExit->addTo( fileMenu );
} else {
- setAppropriate( (QDockWindow*)toolBox->parentWidget(), TRUE );
+ setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE );
toolBox->parentWidget()->show();
- for ( QToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) {
+ for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) {
setAppropriate( tb, TRUE );
tb->hide();
}
@@ -3733,17 +3733,17 @@ void MainWindow::showGUIStuff( bool b )
menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex );
menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 );
menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditAccels, SLOT( setEnabled(bool) ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditFunctions, SLOT( setEnabled(bool) ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditConnections, SLOT( setEnabled(bool) ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditSource, SLOT( setEnabled(bool) ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, SLOT( setEnabled(bool) ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
actionEditFormSettings->setEnabled( TRUE );
actionEditSource->setEnabled( TRUE );
actionEditConnections->setEnabled( TRUE );
actionEditFunctions->setEnabled( TRUE );
actionEditAccels->setEnabled( TRUE );
- ( (QDockWindow*)propertyEditor->parentWidget() )->
+ ( (TQDockWindow*)propertyEditor->parentWidget() )->
setCaption( i18n( "Property Editor/Signal Handlers" ) );
actionFileSave->removeFrom( fileMenu );
actionFileSave->removeFrom( projectToolBar );
@@ -3761,11 +3761,11 @@ void MainWindow::setEditorsReadOnly( bool b )
editorsReadOnly = b;
}
-void MainWindow::setPluginDirectory( const QString &pd )
+void MainWindow::setPluginDirectory( const TQString &pd )
{
pluginDir = pd;
if ( !qwf_plugin_dir )
- qwf_plugin_dir = new QString( pd );
+ qwf_plugin_dir = new TQString( pd );
else
*qwf_plugin_dir = pd;
}
@@ -3778,7 +3778,7 @@ void MainWindow::toggleSignalHandlers( bool show )
propertyEditor->setSignalHandlersEnabled( show );
}
-void MainWindow::statusMessage( const QString &msg )
+void MainWindow::statusMessage( const TQString &msg )
{
m_part->statusMessage(msg);
}