summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer')
-rw-r--r--kdevdesigner/designer/actiondnd.cpp294
-rw-r--r--kdevdesigner/designer/actiondnd.h156
-rw-r--r--kdevdesigner/designer/actioneditorimpl.cpp128
-rw-r--r--kdevdesigner/designer/actioneditorimpl.h20
-rw-r--r--kdevdesigner/designer/actionlistview.cpp28
-rw-r--r--kdevdesigner/designer/actionlistview.h18
-rw-r--r--kdevdesigner/designer/asciivalidator.cpp26
-rw-r--r--kdevdesigner/designer/asciivalidator.h12
-rw-r--r--kdevdesigner/designer/command.cpp574
-rw-r--r--kdevdesigner/designer/command.h504
-rw-r--r--kdevdesigner/designer/configtoolboxdialog.ui.h60
-rw-r--r--kdevdesigner/designer/connectiondialog.ui.h62
-rw-r--r--kdevdesigner/designer/connectionitems.cpp220
-rw-r--r--kdevdesigner/designer/connectionitems.h72
-rw-r--r--kdevdesigner/designer/connectiontable.cpp6
-rw-r--r--kdevdesigner/designer/connectiontable.h4
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.cpp208
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.h40
-rw-r--r--kdevdesigner/designer/database.cpp46
-rw-r--r--kdevdesigner/designer/database.h36
-rw-r--r--kdevdesigner/designer/dbconnectionimpl.cpp12
-rw-r--r--kdevdesigner/designer/dbconnectionimpl.h4
-rw-r--r--kdevdesigner/designer/dbconnectionsimpl.cpp40
-rw-r--r--kdevdesigner/designer/dbconnectionsimpl.h6
-rw-r--r--kdevdesigner/designer/defs.cpp52
-rw-r--r--kdevdesigner/designer/defs.h10
-rw-r--r--kdevdesigner/designer/designer_pch.h48
-rw-r--r--kdevdesigner/designer/designeraction.cpp4
-rw-r--r--kdevdesigner/designer/designeraction.h26
-rw-r--r--kdevdesigner/designer/designerapp.cpp76
-rw-r--r--kdevdesigner/designer/designerapp.h12
-rw-r--r--kdevdesigner/designer/designerappiface.cpp368
-rw-r--r--kdevdesigner/designer/designerappiface.h214
-rw-r--r--kdevdesigner/designer/editfunctionsimpl.cpp124
-rw-r--r--kdevdesigner/designer/editfunctionsimpl.h58
-rw-r--r--kdevdesigner/designer/filechooser.cpp34
-rw-r--r--kdevdesigner/designer/filechooser.h16
-rw-r--r--kdevdesigner/designer/finddialog.ui.h2
-rw-r--r--kdevdesigner/designer/formfile.cpp180
-rw-r--r--kdevdesigner/designer/formfile.h44
-rw-r--r--kdevdesigner/designer/formsettingsimpl.cpp26
-rw-r--r--kdevdesigner/designer/formsettingsimpl.h2
-rw-r--r--kdevdesigner/designer/formwindow.cpp942
-rw-r--r--kdevdesigner/designer/formwindow.h218
-rw-r--r--kdevdesigner/designer/hierarchyview.cpp516
-rw-r--r--kdevdesigner/designer/hierarchyview.h130
-rw-r--r--kdevdesigner/designer/iconvieweditorimpl.cpp36
-rw-r--r--kdevdesigner/designer/iconvieweditorimpl.h8
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.cpp142
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.h36
-rw-r--r--kdevdesigner/designer/layout.cpp234
-rw-r--r--kdevdesigner/designer/layout.h68
-rw-r--r--kdevdesigner/designer/listboxdnd.cpp100
-rw-r--r--kdevdesigner/designer/listboxdnd.h24
-rw-r--r--kdevdesigner/designer/listboxeditorimpl.cpp70
-rw-r--r--kdevdesigner/designer/listboxeditorimpl.h8
-rw-r--r--kdevdesigner/designer/listboxrename.cpp42
-rw-r--r--kdevdesigner/designer/listboxrename.h16
-rw-r--r--kdevdesigner/designer/listdnd.cpp52
-rw-r--r--kdevdesigner/designer/listdnd.h32
-rw-r--r--kdevdesigner/designer/listeditor.ui.h32
-rw-r--r--kdevdesigner/designer/listviewdnd.cpp104
-rw-r--r--kdevdesigner/designer/listviewdnd.h24
-rw-r--r--kdevdesigner/designer/listvieweditorimpl.cpp200
-rw-r--r--kdevdesigner/designer/listvieweditorimpl.h38
-rw-r--r--kdevdesigner/designer/mainwindow.cpp1286
-rw-r--r--kdevdesigner/designer/mainwindow.h224
-rw-r--r--kdevdesigner/designer/mainwindowactions.cpp610
-rw-r--r--kdevdesigner/designer/menubareditor.cpp192
-rw-r--r--kdevdesigner/designer/menubareditor.h84
-rw-r--r--kdevdesigner/designer/metadatabase.cpp486
-rw-r--r--kdevdesigner/designer/metadatabase.h264
-rw-r--r--kdevdesigner/designer/multilineeditorimpl.cpp164
-rw-r--r--kdevdesigner/designer/multilineeditorimpl.h46
-rw-r--r--kdevdesigner/designer/myiconloader.cpp4
-rw-r--r--kdevdesigner/designer/myiconloader.h8
-rw-r--r--kdevdesigner/designer/newformimpl.cpp118
-rw-r--r--kdevdesigner/designer/newformimpl.h64
-rw-r--r--kdevdesigner/designer/orderindicator.cpp36
-rw-r--r--kdevdesigner/designer/orderindicator.h12
-rw-r--r--kdevdesigner/designer/outputwindow.cpp74
-rw-r--r--kdevdesigner/designer/outputwindow.h34
-rw-r--r--kdevdesigner/designer/paletteeditoradvancedimpl.cpp208
-rw-r--r--kdevdesigner/designer/paletteeditoradvancedimpl.h38
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.cpp134
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.h20
-rw-r--r--kdevdesigner/designer/pixmapchooser.cpp116
-rw-r--r--kdevdesigner/designer/pixmapchooser.h32
-rw-r--r--kdevdesigner/designer/pixmapcollection.cpp60
-rw-r--r--kdevdesigner/designer/pixmapcollection.h28
-rw-r--r--kdevdesigner/designer/pixmapcollectioneditor.ui.h36
-rw-r--r--kdevdesigner/designer/popupmenueditor.cpp316
-rw-r--r--kdevdesigner/designer/popupmenueditor.h106
-rw-r--r--kdevdesigner/designer/previewframe.cpp18
-rw-r--r--kdevdesigner/designer/previewframe.h14
-rw-r--r--kdevdesigner/designer/previewwidgetimpl.cpp32
-rw-r--r--kdevdesigner/designer/previewwidgetimpl.h6
-rw-r--r--kdevdesigner/designer/project.cpp524
-rw-r--r--kdevdesigner/designer/project.h212
-rw-r--r--kdevdesigner/designer/projectsettingsimpl.cpp26
-rw-r--r--kdevdesigner/designer/projectsettingsimpl.h4
-rw-r--r--kdevdesigner/designer/propertyeditor.cpp1430
-rw-r--r--kdevdesigner/designer/propertyeditor.h388
-rw-r--r--kdevdesigner/designer/propertyobject.cpp68
-rw-r--r--kdevdesigner/designer/propertyobject.h52
-rw-r--r--kdevdesigner/designer/qcompletionedit.cpp68
-rw-r--r--kdevdesigner/designer/qcompletionedit.h26
-rw-r--r--kdevdesigner/designer/replacedialog.ui.h2
-rw-r--r--kdevdesigner/designer/resource.cpp1364
-rw-r--r--kdevdesigner/designer/resource.h158
-rw-r--r--kdevdesigner/designer/richtextfontdialog.ui.h12
-rw-r--r--kdevdesigner/designer/sizehandle.cpp50
-rw-r--r--kdevdesigner/designer/sizehandle.h38
-rw-r--r--kdevdesigner/designer/sourceeditor.cpp42
-rw-r--r--kdevdesigner/designer/sourceeditor.h30
-rw-r--r--kdevdesigner/designer/sourcefile.cpp66
-rw-r--r--kdevdesigner/designer/sourcefile.h16
-rw-r--r--kdevdesigner/designer/startdialogimpl.cpp114
-rw-r--r--kdevdesigner/designer/startdialogimpl.h26
-rw-r--r--kdevdesigner/designer/styledbutton.cpp136
-rw-r--r--kdevdesigner/designer/styledbutton.h50
-rw-r--r--kdevdesigner/designer/syntaxhighlighter_html.cpp20
-rw-r--r--kdevdesigner/designer/syntaxhighlighter_html.h2
-rw-r--r--kdevdesigner/designer/tableeditorimpl.cpp108
-rw-r--r--kdevdesigner/designer/tableeditorimpl.h20
-rw-r--r--kdevdesigner/designer/timestamp.cpp24
-rw-r--r--kdevdesigner/designer/timestamp.h18
-rw-r--r--kdevdesigner/designer/variabledialogimpl.cpp38
-rw-r--r--kdevdesigner/designer/variabledialogimpl.h6
-rw-r--r--kdevdesigner/designer/widgetaction.cpp22
-rw-r--r--kdevdesigner/designer/widgetaction.h30
-rw-r--r--kdevdesigner/designer/widgetfactory.cpp960
-rw-r--r--kdevdesigner/designer/widgetfactory.h322
-rw-r--r--kdevdesigner/designer/wizardeditorimpl.cpp36
-rw-r--r--kdevdesigner/designer/wizardeditorimpl.h12
-rw-r--r--kdevdesigner/designer/workspace.cpp218
-rw-r--r--kdevdesigner/designer/workspace.h52
137 files changed, 9302 insertions, 9302 deletions
diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp
index 071f0d4b..4c287582 100644
--- a/kdevdesigner/designer/actiondnd.cpp
+++ b/kdevdesigner/designer/actiondnd.cpp
@@ -33,46 +33,46 @@
#include "widgetfactory.h"
#include "hierarchyview.h"
-#include <qaction.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qdragobject.h>
-#include <qinputdialog.h>
-#include <qlayout.h>
-#include <qmainwindow.h>
-#include <qmenudata.h>
-#include <qmessagebox.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqaction.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqdragobject.h>
+#include <tqinputdialog.h>
+#include <tqlayout.h>
+#include <tqmainwindow.h>
+#include <tqmenudata.h>
+#include <tqmessagebox.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <klocale.h>
-QAction *ActionDrag::the_action = 0;
+TQAction *ActionDrag::the_action = 0;
-ActionDrag::ActionDrag(QAction *action, QWidget *source)
-: QStoredDrag("application/x-designer-actions", source)
+ActionDrag::ActionDrag(TQAction *action, TQWidget *source)
+: TQStoredDrag("application/x-designer-actions", source)
{
Q_ASSERT(the_action == 0);
the_action = action;
}
-ActionDrag::ActionDrag(QActionGroup *group, QWidget *source)
-: QStoredDrag("application/x-designer-actiongroup", source)
+ActionDrag::ActionDrag(TQActionGroup *group, TQWidget *source)
+: TQStoredDrag("application/x-designer-actiongroup", source)
{
Q_ASSERT(the_action == 0);
the_action = group;
}
-ActionDrag::ActionDrag(const QString &type, QAction *action, QWidget *source)
-: QStoredDrag(type, source)
+ActionDrag::ActionDrag(const TQString &type, TQAction *action, TQWidget *source)
+: TQStoredDrag(type, source)
{
Q_ASSERT(the_action == 0);
the_action = action;
}
-bool ActionDrag::canDecode(QDropEvent *e)
+bool ActionDrag::canDecode(TQDropEvent *e)
{
return e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
@@ -100,24 +100,24 @@ void QDesignerActionGroup::init()
WidgetFactory::saveChangedProperties( this, id );
}
-bool QDesignerAction::addTo( QWidget *w )
+bool QDesignerAction::addTo( TQWidget *w )
{
if ( !widgetToInsert )
- return QAction::addTo( w );
+ return TQAction::addTo( w );
- if ( ::qt_cast<QPopupMenu*>(w) )
+ if ( ::qt_cast<TQPopupMenu*>(w) )
return FALSE;
- widgetToInsert->reparent( w, QPoint( 0, 0 ), FALSE );
+ widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE );
widgetToInsert->show();
addedTo( widgetToInsert, w );
return TRUE;
}
-bool QDesignerAction::removeFrom( QWidget *w )
+bool QDesignerAction::removeFrom( TQWidget *w )
{
if ( !widgetToInsert )
- return QAction::removeFrom( w );
+ return TQAction::removeFrom( w );
remove();
return TRUE;
@@ -128,19 +128,19 @@ void QDesignerAction::remove()
if ( !widgetToInsert )
return;
MainWindow::self->formWindow()->selectWidget( widgetToInsert, FALSE );
- widgetToInsert->reparent( 0, QPoint( 0, 0 ), FALSE );
+ widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE );
}
-QDesignerToolBarSeparator::QDesignerToolBarSeparator(Orientation o , QToolBar *parent,
+QDesignerToolBarSeparator::QDesignerToolBarSeparator(Orientation o , TQToolBar *parent,
const char* name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
- connect( parent, SIGNAL(orientationChanged(Orientation)),
- this, SLOT(setOrientation(Orientation)) );
+ connect( parent, TQT_SIGNAL(orientationChanged(Orientation)),
+ this, TQT_SLOT(setOrientation(Orientation)) );
setOrientation( o );
setBackgroundMode( parent->backgroundMode() );
setBackgroundOrigin( ParentOrigin );
- setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
}
void QDesignerToolBarSeparator::setOrientation( Orientation o )
@@ -148,81 +148,81 @@ void QDesignerToolBarSeparator::setOrientation( Orientation o )
orient = o;
}
-void QDesignerToolBarSeparator::styleChange( QStyle& )
+void QDesignerToolBarSeparator::styleChange( TQStyle& )
{
setOrientation( orient );
}
-QSize QDesignerToolBarSeparator::sizeHint() const
+TQSize QDesignerToolBarSeparator::sizeHint() const
{
- int extent = style().pixelMetric( QStyle::PM_DockWindowSeparatorExtent,
+ int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent,
this );
if ( orient == Horizontal )
- return QSize( extent, 0 );
+ return TQSize( extent, 0 );
else
- return QSize( 0, extent );
+ return TQSize( 0, extent );
}
-void QDesignerToolBarSeparator::paintEvent( QPaintEvent * )
+void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQPainter p( this );
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( orientation() == Horizontal )
- flags |= QStyle::Style_Horizontal;
+ flags |= TQStyle::Style_Horizontal;
- style().drawPrimitive( QStyle::PE_DockWindowSeparator, &p, rect(),
+ style().drawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(),
colorGroup(), flags );
}
-QSeparatorAction::QSeparatorAction( QObject *parent )
- : QAction( parent, "qt_designer_separator" ), wid( 0 )
+QSeparatorAction::QSeparatorAction( TQObject *parent )
+ : TQAction( parent, "qt_designer_separator" ), wid( 0 )
{
}
-bool QSeparatorAction::addTo( QWidget *w )
+bool QSeparatorAction::addTo( TQWidget *w )
{
- if ( ::qt_cast<QToolBar*>(w) ) {
- QToolBar *tb = (QToolBar*)w;
+ if ( ::qt_cast<TQToolBar*>(w) ) {
+ TQToolBar *tb = (TQToolBar*)w;
wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
return TRUE;
- } else if ( ::qt_cast<QPopupMenu*>(w) ) {
- idx = ( (QPopupMenu*)w )->count();
- ( (QPopupMenu*)w )->insertSeparator( idx );
+ } else if ( ::qt_cast<TQPopupMenu*>(w) ) {
+ idx = ( (TQPopupMenu*)w )->count();
+ ( (TQPopupMenu*)w )->insertSeparator( idx );
return TRUE;
}
return FALSE;
}
-bool QSeparatorAction::removeFrom( QWidget *w )
+bool QSeparatorAction::removeFrom( TQWidget *w )
{
- if ( ::qt_cast<QToolBar*>(w) ) {
+ if ( ::qt_cast<TQToolBar*>(w) ) {
delete wid;
return TRUE;
- } else if ( ::qt_cast<QPopupMenu*>(w) ) {
- ( (QPopupMenu*)w )->removeItemAt( idx );
+ } else if ( ::qt_cast<TQPopupMenu*>(w) ) {
+ ( (TQPopupMenu*)w )->removeItemAt( idx );
return TRUE;
}
return FALSE;
}
-QWidget *QSeparatorAction::widget() const
+TQWidget *QSeparatorAction::widget() const
{
return wid;
}
-QDesignerToolBar::QDesignerToolBar( QMainWindow *mw )
- : QToolBar( mw ), lastIndicatorPos( -1, -1 )
+QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw )
+ : TQToolBar( mw ), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
afterAnchor = TRUE;
setAcceptDrops( TRUE );
MetaDataBase::addEntry( this );
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
indicator = new QDesignerIndicatorWidget( this );
indicator->hide();
installEventFilter( this );
@@ -231,8 +231,8 @@ QDesignerToolBar::QDesignerToolBar( QMainWindow *mw )
mw->setDockEnabled( DockTornOff, FALSE );
}
-QDesignerToolBar::QDesignerToolBar( QMainWindow *mw, Dock dock )
- : QToolBar( QString::null, mw, dock), lastIndicatorPos( -1, -1 )
+QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock )
+ : TQToolBar( TQString::null, mw, dock), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
afterAnchor = TRUE;
@@ -248,7 +248,7 @@ QDesignerToolBar::QDesignerToolBar( QMainWindow *mw, Dock dock )
void QDesignerToolBar::findFormWindow()
{
- QWidget *w = this;
+ TQWidget *w = this;
while ( w ) {
formWindow = ::qt_cast<FormWindow*>(w);
if ( formWindow )
@@ -257,11 +257,11 @@ void QDesignerToolBar::findFormWindow()
}
}
-void QDesignerToolBar::addAction( QAction *a )
+void QDesignerToolBar::addAction( TQAction *a )
{
actionList.append( a );
- connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) );
- if ( ::qt_cast<QActionGroup*>(a) ) {
+ connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) );
+ if ( ::qt_cast<TQActionGroup*>(a) ) {
( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
} else if ( ::qt_cast<QSeparatorAction*>(a) ) {
@@ -273,79 +273,79 @@ void QDesignerToolBar::addAction( QAction *a )
}
}
-static void fixObject( QObject *&o )
+static void fixObject( TQObject *&o )
{
while ( o && o->parent() && !::qt_cast<QDesignerToolBar*>(o->parent()) )
o = o->parent();
}
-bool QDesignerToolBar::eventFilter( QObject *o, QEvent *e )
+bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
{
if ( !o || !e || o->inherits( "QDockWindowHandle" ) || o->inherits( "QDockWindowTitleBar" ) )
- return QToolBar::eventFilter( o, e );
+ return TQToolBar::eventFilter( o, e );
- if ( o == this && e->type() == QEvent::MouseButtonPress &&
- ( ( QMouseEvent*)e )->button() == LeftButton ) {
- mousePressEvent( (QMouseEvent*)e );
+ if ( o == this && e->type() == TQEvent::MouseButtonPress &&
+ ( ( TQMouseEvent*)e )->button() == LeftButton ) {
+ mousePressEvent( (TQMouseEvent*)e );
return TRUE;
}
if ( o == this )
- return QToolBar::eventFilter( o, e );
+ return TQToolBar::eventFilter( o, e );
- if ( e->type() == QEvent::MouseButtonPress ) {
- QMouseEvent *ke = (QMouseEvent*)e;
+ if ( e->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
return FALSE;
buttonMousePressEvent( ke, o );
return TRUE;
- } else if(e->type() == QEvent::ContextMenu ) {
- QContextMenuEvent *ce = (QContextMenuEvent*)e;
+ } else if(e->type() == TQEvent::ContextMenu ) {
+ TQContextMenuEvent *ce = (TQContextMenuEvent*)e;
fixObject( o );
if( !o )
return FALSE;
buttonContextMenuEvent( ce, o );
return TRUE;
- } else if ( e->type() == QEvent::MouseMove ) {
- QMouseEvent *ke = (QMouseEvent*)e;
+ } else if ( e->type() == TQEvent::MouseMove ) {
+ TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
return FALSE;
buttonMouseMoveEvent( ke, o );
return TRUE;
- } else if ( e->type() == QEvent::MouseButtonRelease ) {
- QMouseEvent *ke = (QMouseEvent*)e;
+ } else if ( e->type() == TQEvent::MouseButtonRelease ) {
+ TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
return FALSE;
buttonMouseReleaseEvent( ke, o );
return TRUE;
- } else if ( e->type() == QEvent::DragEnter ) {
- QDragEnterEvent *de = (QDragEnterEvent*)e;
+ } else if ( e->type() == TQEvent::DragEnter ) {
+ TQDragEnterEvent *de = (TQDragEnterEvent*)e;
if (ActionDrag::canDecode(de))
de->accept();
- } else if ( e->type() == QEvent::DragMove ) {
- QDragMoveEvent *de = (QDragMoveEvent*)e;
+ } else if ( e->type() == TQEvent::DragMove ) {
+ TQDragMoveEvent *de = (TQDragMoveEvent*)e;
if (ActionDrag::canDecode(de))
de->accept();
}
- return QToolBar::eventFilter( o, e );
+ return TQToolBar::eventFilter( o, e );
}
-void QDesignerToolBar::paintEvent( QPaintEvent *e )
+void QDesignerToolBar::paintEvent( TQPaintEvent *e )
{
- QToolBar::paintEvent( e );
+ TQToolBar::paintEvent( e );
if ( e->rect() != rect() )
return;
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
}
-void QDesignerToolBar::contextMenuEvent( QContextMenuEvent *e )
+void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e )
{
e->accept();
- QPopupMenu menu( 0 );
+ TQPopupMenu menu( 0 );
menu.insertItem( i18n( "Delete Toolbar" ), 1 );
int res = menu.exec( e->globalPos() );
if ( res != -1 ) {
@@ -356,7 +356,7 @@ void QDesignerToolBar::contextMenuEvent( QContextMenuEvent *e )
}
}
-void QDesignerToolBar::mousePressEvent( QMouseEvent *e )
+void QDesignerToolBar::mousePressEvent( TQMouseEvent *e )
{
widgetInserting = FALSE;
if ( e->button() == LeftButton &&
@@ -367,14 +367,14 @@ void QDesignerToolBar::mousePressEvent( QMouseEvent *e )
widgetInserting = TRUE;
}
-void QDesignerToolBar::mouseReleaseEvent( QMouseEvent *e )
+void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e )
{
if ( widgetInserting )
doInsertWidget( mapFromGlobal( e->globalPos() ) );
widgetInserting = FALSE;
}
-void QDesignerToolBar::buttonMouseReleaseEvent( QMouseEvent *e, QObject *w )
+void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w )
{
if ( widgetInserting )
doInsertWidget( mapFromGlobal( e->globalPos() ) );
@@ -385,14 +385,14 @@ void QDesignerToolBar::buttonMouseReleaseEvent( QMouseEvent *e, QObject *w )
widgetInserting = FALSE;
}
-void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o )
+void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o )
{
e->accept();
- QPopupMenu menu( 0 );
+ TQPopupMenu menu( 0 );
const int ID_DELETE = 1;
const int ID_SEP = 2;
const int ID_DELTOOLBAR = 3;
- QMap<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
if ( it != actionMap.end() && ::qt_cast<QSeparatorAction*>(*it) )
menu.insertItem( i18n( "Delete Separator" ), ID_DELETE );
else
@@ -402,10 +402,10 @@ void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o
menu.insertItem( i18n( "Delete Toolbar" ), ID_DELTOOLBAR );
int res = menu.exec( e->globalPos() );
if ( res == ID_DELETE ) {
- QMap<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
if ( it == actionMap.end() )
return;
- QAction *a = *it;
+ TQAction *a = *it;
int index = actionList.find( a );
RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand(
i18n( "Delete Action '%1' From Toolbar '%2'" ).
@@ -415,7 +415,7 @@ void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o
cmd->execute();
} else if ( res == ID_SEP ) {
calcIndicatorPos( mapFromGlobal( e->globalPos() ) );
- QAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
int index = actionList.findRef( *actionMap.find( insertAnchor ) );
if ( index != -1 && afterAnchor )
++index;
@@ -436,7 +436,7 @@ void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o
}
}
-void QDesignerToolBar::buttonMousePressEvent( QMouseEvent *e, QObject * )
+void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
{
widgetInserting = FALSE;
@@ -455,12 +455,12 @@ void QDesignerToolBar::buttonMousePressEvent( QMouseEvent *e, QObject * )
dragStartPos = e->pos();
}
-void QDesignerToolBar::removeWidget( QWidget *w )
+void QDesignerToolBar::removeWidget( TQWidget *w )
{
- QMap<QWidget*, QAction*>::Iterator it = actionMap.find( w );
+ TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( w );
if ( it == actionMap.end() )
return;
- QAction *a = *it;
+ TQAction *a = *it;
int index = actionList.find( a );
RemoveActionFromToolBarCommand *cmd =
new RemoveActionFromToolBarCommand( i18n( "Delete Action '%1' From Toolbar '%2'" ).
@@ -468,20 +468,20 @@ void QDesignerToolBar::removeWidget( QWidget *w )
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
adjustSize();
}
-void QDesignerToolBar::buttonMouseMoveEvent( QMouseEvent *e, QObject *o )
+void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
{
if ( widgetInserting || ( e->state() & LeftButton ) == 0 )
return;
- if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() )
+ if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
return;
- QMap<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
if ( it == actionMap.end() )
return;
- QAction *a = *it;
+ TQAction *a = *it;
if ( !a )
return;
int index = actionList.find( a );
@@ -491,12 +491,12 @@ void QDesignerToolBar::buttonMouseMoveEvent( QMouseEvent *e, QObject *o )
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
adjustSize();
- QString type = ::qt_cast<QActionGroup*>(a) ? QString( "application/x-designer-actiongroup" ) :
- ::qt_cast<QSeparatorAction*>(a) ? QString( "application/x-designer-separator" ) : QString( "application/x-designer-actions" );
- QStoredDrag *drag = new ActionDrag( type, a, this );
+ TQString type = ::qt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) :
+ ::qt_cast<QSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
+ TQStoredDrag *drag = new ActionDrag( type, a, this );
drag->setPixmap( a->iconSet().pixmap() );
if ( ::qt_cast<QDesignerAction*>(a) ) {
if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) )
@@ -509,21 +509,21 @@ void QDesignerToolBar::buttonMouseMoveEvent( QMouseEvent *e, QObject *o )
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
indicator->hide();
}
#ifndef QT_NO_DRAGANDDROP
-void QDesignerToolBar::dragEnterEvent( QDragEnterEvent *e )
+void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e )
{
widgetInserting = FALSE;
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
if (ActionDrag::canDecode(e))
e->accept();
}
-void QDesignerToolBar::dragMoveEvent( QDragMoveEvent *e )
+void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e )
{
if (ActionDrag::canDecode(e)) {
e->accept();
@@ -531,14 +531,14 @@ void QDesignerToolBar::dragMoveEvent( QDragMoveEvent *e )
}
}
-void QDesignerToolBar::dragLeaveEvent( QDragLeaveEvent * )
+void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * )
{
indicator->hide();
insertAnchor = 0;
afterAnchor = TRUE;
}
-void QDesignerToolBar::dropEvent( QDropEvent *e )
+void QDesignerToolBar::dropEvent( TQDropEvent *e )
{
if (!ActionDrag::canDecode(e))
return;
@@ -546,7 +546,7 @@ void QDesignerToolBar::dropEvent( QDropEvent *e )
e->accept();
indicator->hide();
- QAction *a = 0;
+ TQAction *a = 0;
int index = actionList.findRef( *actionMap.find( insertAnchor ) );
if ( index != -1 && afterAnchor )
++index;
@@ -563,7 +563,7 @@ void QDesignerToolBar::dropEvent( QDropEvent *e )
}
if ( actionList.findRef( a ) != -1 ) {
- QMessageBox::warning( MainWindow::self, i18n( "Insert/Move Action" ),
+ TQMessageBox::warning( MainWindow::self, i18n( "Insert/Move Action" ),
i18n( "Action '%1' has already been added to this toolbar.\n"
"An Action may only occur once in a given toolbar." ).
arg( a->name() ) );
@@ -576,19 +576,19 @@ void QDesignerToolBar::dropEvent( QDropEvent *e )
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
}
#endif
void QDesignerToolBar::reInsert()
{
- QAction *a = 0;
+ TQAction *a = 0;
actionMap.clear();
clear();
for ( a = actionList.first(); a; a = actionList.next() ) {
a->addTo( this );
- if ( ::qt_cast<QActionGroup*>(a) ) {
+ if ( ::qt_cast<TQActionGroup*>(a) ) {
actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
if ( ( (QDesignerActionGroup*)a )->widget() )
( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
@@ -600,31 +600,31 @@ void QDesignerToolBar::reInsert()
( (QSeparatorAction*)a )->widget()->installEventFilter( this );
}
}
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
adjustSize();
}
void QDesignerToolBar::actionRemoved()
{
- actionList.removeRef( (QAction*)sender() );
+ actionList.removeRef( (TQAction*)sender() );
}
-QPoint QDesignerToolBar::calcIndicatorPos( const QPoint &pos )
+TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
{
if ( orientation() == Horizontal ) {
- QPoint pnt( width() - 2, 0 );
+ TQPoint pnt( width() - 2, 0 );
insertAnchor = 0;
afterAnchor = TRUE;
if ( !children() )
return pnt;
- pnt = QPoint( 13, 0 );
- QObjectListIt it( *children() );
- QObject * obj;
+ pnt = TQPoint( 13, 0 );
+ TQObjectListIt it( *children() );
+ TQObject * obj;
while( (obj=it.current()) != 0 ) {
++it;
if ( obj->isWidgetType() &&
qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) {
- QWidget *w = (QWidget*)obj;
+ TQWidget *w = (TQWidget*)obj;
if ( w->x() < pos.x() ) {
pnt.setX( w->x() + w->width() + 1 );
insertAnchor = w;
@@ -634,19 +634,19 @@ QPoint QDesignerToolBar::calcIndicatorPos( const QPoint &pos )
}
return pnt;
} else {
- QPoint pnt( 0, height() - 2 );
+ TQPoint pnt( 0, height() - 2 );
insertAnchor = 0;
afterAnchor = TRUE;
if ( !children() )
return pnt;
- pnt = QPoint( 0, 13 );
- QObjectListIt it( *children() );
- QObject * obj;
+ pnt = TQPoint( 0, 13 );
+ TQObjectListIt it( *children() );
+ TQObject * obj;
while( (obj=it.current()) != 0 ) {
++it;
if ( obj->isWidgetType() &&
qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) {
- QWidget *w = (QWidget*)obj;
+ TQWidget *w = (TQWidget*)obj;
if ( w->y() < pos.y() ) {
pnt.setY( w->y() + w->height() + 1 );
insertAnchor = w;
@@ -658,36 +658,36 @@ QPoint QDesignerToolBar::calcIndicatorPos( const QPoint &pos )
}
}
-void QDesignerToolBar::drawIndicator( const QPoint &pos )
+void QDesignerToolBar::drawIndicator( const TQPoint &pos )
{
if ( lastIndicatorPos == pos )
return;
bool wasVsisible = indicator->isVisible();
if ( orientation() == Horizontal ) {
indicator->resize( 3, height() );
- if ( pos != QPoint( -1, -1 ) )
+ if ( pos != TQPoint( -1, -1 ) )
indicator->move( pos.x() - 1, 0 );
indicator->show();
indicator->raise();
lastIndicatorPos = pos;
} else {
indicator->resize( width(), 3 );
- if ( pos != QPoint( -1, -1 ) )
+ if ( pos != TQPoint( -1, -1 ) )
indicator->move( 0, pos.y() - 1 );
indicator->show();
indicator->raise();
lastIndicatorPos = pos;
}
if ( !wasVsisible )
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
}
-void QDesignerToolBar::doInsertWidget( const QPoint &p )
+void QDesignerToolBar::doInsertWidget( const TQPoint &p )
{
if ( formWindow != MainWindow::self->formWindow() )
return;
calcIndicatorPos( p );
- QWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE );
+ TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE );
installEventFilters( w );
MainWindow::self->formWindow()->insertWidget( w, TRUE );
QDesignerAction *a = new QDesignerAction( w, parent() );
@@ -706,19 +706,19 @@ void QDesignerToolBar::doInsertWidget( const QPoint &p )
void QDesignerToolBar::clear()
{
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( ::qt_cast<QDesignerAction*>(a) )
( (QDesignerAction*)a )->remove();
}
- QToolBar::clear();
+ TQToolBar::clear();
}
-void QDesignerToolBar::installEventFilters( QWidget *w )
+void QDesignerToolBar::installEventFilters( TQWidget *w )
{
if ( !w )
return;
- 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() )
o->installEventFilter( this );
delete l;
}
diff --git a/kdevdesigner/designer/actiondnd.h b/kdevdesigner/designer/actiondnd.h
index fcf37fe9..5d189f7c 100644
--- a/kdevdesigner/designer/actiondnd.h
+++ b/kdevdesigner/designer/actiondnd.h
@@ -27,15 +27,15 @@
#ifndef ACTIONDND_H
#define ACTIONDND_H
-#include <qaction.h>
-#include <qdragobject.h>
-#include <qmap.h>
-#include <qmenubar.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qtoolbar.h>
-#include <qguardedptr.h>
+#include <tqaction.h>
+#include <tqdragobject.h>
+#include <tqmap.h>
+#include <tqmenubar.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqtoolbar.h>
+#include <tqguardedptr.h>
#include "../shared/widgetdatabase.h"
//class QDesignerPopupMenu;
@@ -48,8 +48,8 @@ class QDesignerIndicatorWidget : public QWidget
Q_OBJECT
public:
- QDesignerIndicatorWidget( QWidget *p )
- : QWidget( p, "qt_dockwidget_internal" ) {
+ QDesignerIndicatorWidget( TQWidget *p )
+ : TQWidget( p, "qt_dockwidget_internal" ) {
setBackgroundColor( red );
}
@@ -60,21 +60,21 @@ class ActionDrag : public QStoredDrag
Q_OBJECT
public:
- ActionDrag(const QString &type, QAction *action, QWidget *source);
- ActionDrag(QAction *action, QWidget *source);
- ActionDrag(QActionGroup *group, QWidget *source);
+ ActionDrag(const TQString &type, TQAction *action, TQWidget *source);
+ ActionDrag(TQAction *action, TQWidget *source);
+ ActionDrag(TQActionGroup *group, TQWidget *source);
~ActionDrag();
- static bool canDecode(QDropEvent *e);
+ static bool canDecode(TQDropEvent *e);
- static QAction *action()
+ static TQAction *action()
{
return the_action;
}
private:
- static QAction *the_action;
+ static TQAction *the_action;
};
class QDesignerActionGroup : public QActionGroup
@@ -82,32 +82,32 @@ class QDesignerActionGroup : public QActionGroup
Q_OBJECT
public:
- QDesignerActionGroup( QObject *parent )
- : QActionGroup( ::qt_cast<QActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); }
+ QDesignerActionGroup( TQObject *parent )
+ : TQActionGroup( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); }
void init();
- QWidget *widget() const { return wid; }
- QWidget *widget( QAction *a ) const { return *widgets.find( a ); }
+ TQWidget *widget() const { return wid; }
+ TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); }
int index() const { return idx; }
protected:
#if !defined(Q_NO_USING_KEYWORD)
- using QActionGroup::addedTo;
+ using TQActionGroup::addedTo;
#endif
- void addedTo( QWidget *w, QWidget * ) {
+ void addedTo( TQWidget *w, TQWidget * ) {
wid = w;
}
- void addedTo( QWidget *w, QWidget *, QAction *a ) {
+ void addedTo( TQWidget *w, TQWidget *, TQAction *a ) {
widgets.insert( a, w );
}
- void addedTo( int index, QPopupMenu * ) {
+ void addedTo( int index, TQPopupMenu * ) {
idx = index;
}
private:
- QWidget *wid;
- QMap<QAction *, QWidget *> widgets;
+ TQWidget *wid;
+ TQMap<TQAction *, TQWidget *> widgets;
int idx;
};
@@ -117,34 +117,34 @@ class QDesignerAction : public QAction
Q_OBJECT
public:
- QDesignerAction( QObject *parent )
- : QAction( ::qt_cast<QActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
- QDesignerAction( QWidget *w, QObject *parent )
- : QAction( ::qt_cast<QActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); }
+ QDesignerAction( TQObject *parent )
+ : TQAction( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
+ QDesignerAction( TQWidget *w, TQObject *parent )
+ : TQAction( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); }
void init();
- QWidget *widget() const { return wid; }
+ TQWidget *widget() const { return wid; }
int index() const { return idx; }
- bool addTo( QWidget *w );
- bool removeFrom( QWidget *w );
+ bool addTo( TQWidget *w );
+ bool removeFrom( TQWidget *w );
void remove();
bool supportsMenu() const { return !widgetToInsert; }
protected:
- void addedTo( QWidget *w, QWidget * ) {
+ void addedTo( TQWidget *w, TQWidget * ) {
wid = w;
}
- void addedTo( int index, QPopupMenu * ) {
+ void addedTo( int index, TQPopupMenu * ) {
idx = index;
}
private:
- QWidget *wid;
+ TQWidget *wid;
int idx;
- QWidget *widgetToInsert;
+ TQWidget *widgetToInsert;
};
@@ -153,15 +153,15 @@ class QDesignerToolBarSeparator : public QWidget
Q_OBJECT
public:
- QDesignerToolBarSeparator( Orientation, QToolBar *parent, const char* name=0 );
+ QDesignerToolBarSeparator( Orientation, TQToolBar *parent, const char* name=0 );
- QSize sizeHint() const;
+ TQSize sizeHint() const;
Orientation orientation() const { return orient; }
public slots:
void setOrientation( Orientation );
protected:
- void styleChange( QStyle& );
- void paintEvent( QPaintEvent * );
+ void styleChange( TQStyle& );
+ void paintEvent( TQPaintEvent * );
private:
Orientation orient;
};
@@ -172,15 +172,15 @@ class QSeparatorAction : public QAction
Q_OBJECT
public:
- QSeparatorAction( QObject *parent );
+ QSeparatorAction( TQObject *parent );
- bool addTo( QWidget *w );
- bool removeFrom( QWidget *w );
- QWidget *widget() const;
+ bool addTo( TQWidget *w );
+ bool removeFrom( TQWidget *w );
+ TQWidget *widget() const;
int index() const;
private:
- QWidget *wid;
+ TQWidget *wid;
int idx;
};
@@ -191,53 +191,53 @@ class QDesignerToolBar : public QToolBar
Q_OBJECT
public:
- QDesignerToolBar( QMainWindow *mw );
- QDesignerToolBar( QMainWindow *mw, Dock dock );
- QPtrList<QAction> insertedActions() const { return actionList; }
- void addAction( QAction *a );
+ QDesignerToolBar( TQMainWindow *mw );
+ QDesignerToolBar( TQMainWindow *mw, Dock dock );
+ TQPtrList<TQAction> insertedActions() const { return actionList; }
+ void addAction( TQAction *a );
void clear();
- void installEventFilters( QWidget *w );
- void insertAction( QWidget *w, QAction *a ) { actionMap.insert( w, a ); }
- void insertAction( int index, QAction *a ) { actionList.insert( index, a ); }
- void appendAction( QAction *a ) { actionList.append( a ); }
- void removeAction( QAction *a ) { actionList.remove( a ); }
+ void installEventFilters( TQWidget *w );
+ void insertAction( TQWidget *w, TQAction *a ) { actionMap.insert( w, a ); }
+ void insertAction( int index, TQAction *a ) { actionList.insert( index, a ); }
+ void appendAction( TQAction *a ) { actionList.append( a ); }
+ void removeAction( TQAction *a ) { actionList.remove( a ); }
void reInsert();
- void removeWidget( QWidget *w );
+ void removeWidget( TQWidget *w );
protected:
- bool eventFilter( QObject *, QEvent * );
- void paintEvent( QPaintEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
+ void paintEvent( TQPaintEvent * );
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent( QDragEnterEvent * );
- void dragMoveEvent( QDragMoveEvent * );
- void dragLeaveEvent( QDragLeaveEvent * );
- void dropEvent( QDropEvent * );
+ void dragEnterEvent( TQDragEnterEvent * );
+ void dragMoveEvent( TQDragMoveEvent * );
+ void dragLeaveEvent( TQDragLeaveEvent * );
+ void dropEvent( TQDropEvent * );
#endif
- void contextMenuEvent( QContextMenuEvent *e );
- void mousePressEvent( QMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
+ void contextMenuEvent( TQContextMenuEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
private slots:
void actionRemoved();
private:
- void drawIndicator( const QPoint &pos );
- QPoint calcIndicatorPos( const QPoint &pos );
- void buttonContextMenuEvent( QContextMenuEvent *e, QObject *o );
- void buttonMousePressEvent( QMouseEvent *e, QObject *o );
- void buttonMouseMoveEvent( QMouseEvent *e, QObject *o );
- void buttonMouseReleaseEvent( QMouseEvent *e, QObject *o );
- void doInsertWidget( const QPoint &p );
+ void drawIndicator( const TQPoint &pos );
+ TQPoint calcIndicatorPos( const TQPoint &pos );
+ void buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o );
+ void buttonMousePressEvent( TQMouseEvent *e, TQObject *o );
+ void buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o );
+ void buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *o );
+ void doInsertWidget( const TQPoint &p );
void findFormWindow();
private:
- QPoint lastIndicatorPos;
- QWidget *insertAnchor;
+ TQPoint lastIndicatorPos;
+ TQWidget *insertAnchor;
bool afterAnchor;
- QPtrList<QAction> actionList;
- QMap<QWidget*, QAction*> actionMap;
- QPoint dragStartPos;
+ TQPtrList<TQAction> actionList;
+ TQMap<TQWidget*, TQAction*> actionMap;
+ TQPoint dragStartPos;
QDesignerIndicatorWidget *indicator;
bool widgetInserting;
FormWindow *formWindow;
diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp
index 589525e4..ad014c9f 100644
--- a/kdevdesigner/designer/actioneditorimpl.cpp
+++ b/kdevdesigner/designer/actioneditorimpl.cpp
@@ -33,19 +33,19 @@
#include "hierarchyview.h"
#include "formfile.h"
-#include <qaction.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
-#include <qlistview.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qobjectlist.h>
+#include <tqaction.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqlistview.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqobjectlist.h>
#include <klocale.h>
-ActionEditor::ActionEditor( QWidget* parent, const char* name, WFlags fl )
+ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl )
: ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 ),
explicitlyClosed(false)
{
@@ -53,27 +53,27 @@ ActionEditor::ActionEditor( QWidget* parent, const char* name, WFlags fl )
setEnabled( FALSE );
buttonConnect->setEnabled( FALSE );
- QPopupMenu *popup = new QPopupMenu( this );
- popup->insertItem( i18n( "New &Action" ), this, SLOT( newAction() ) );
- popup->insertItem( i18n( "New Action &Group" ), this, SLOT( newActionGroup() ) );
- popup->insertItem( i18n( "New &Dropdown Action Group" ), this, SLOT( newDropDownActionGroup() ) );
+ TQPopupMenu *popup = new TQPopupMenu( this );
+ popup->insertItem( i18n( "New &Action" ), this, TQT_SLOT( newAction() ) );
+ popup->insertItem( i18n( "New Action &Group" ), this, TQT_SLOT( newActionGroup() ) );
+ popup->insertItem( i18n( "New &Dropdown Action Group" ), this, TQT_SLOT( newDropDownActionGroup() ) );
buttonNewAction->setPopup( popup );
buttonNewAction->setPopupDelay( 0 );
- connect( listActions, SIGNAL( insertAction() ), this, SLOT( newAction() ) );
- connect( listActions, SIGNAL( insertActionGroup() ), this, SLOT( newActionGroup() ) );
- connect( listActions, SIGNAL( insertDropDownActionGroup() ), this, SLOT( newDropDownActionGroup() ) );
- connect( listActions, SIGNAL( deleteAction() ), this, SLOT( deleteAction() ) );
- connect( listActions, SIGNAL( connectAction() ), this, SLOT( connectionsClicked() ) );
+ connect( listActions, TQT_SIGNAL( insertAction() ), this, TQT_SLOT( newAction() ) );
+ connect( listActions, TQT_SIGNAL( insertActionGroup() ), this, TQT_SLOT( newActionGroup() ) );
+ connect( listActions, TQT_SIGNAL( insertDropDownActionGroup() ), this, TQT_SLOT( newDropDownActionGroup() ) );
+ connect( listActions, TQT_SIGNAL( deleteAction() ), this, TQT_SLOT( deleteAction() ) );
+ connect( listActions, TQT_SIGNAL( connectAction() ), this, TQT_SLOT( connectionsClicked() ) );
}
-void ActionEditor::closeEvent( QCloseEvent *e )
+void ActionEditor::closeEvent( TQCloseEvent *e )
{
emit hidden();
e->accept();
}
-void ActionEditor::currentActionChanged( QListViewItem *i )
+void ActionEditor::currentActionChanged( TQListViewItem *i )
{
buttonConnect->setEnabled( i != 0 );
if ( !i )
@@ -86,9 +86,9 @@ void ActionEditor::currentActionChanged( QListViewItem *i )
MainWindow::self->objectHierarchy()->hierarchyList()->setCurrent( currentAction );
}
-void ActionEditor::setCurrentAction( QAction *a )
+void ActionEditor::setCurrentAction( TQAction *a )
{
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
while ( it.current() ) {
if ( ( (ActionItem*)it.current() )->action() == a || ( (ActionItem*)it.current() )->actionGroup() == a ) {
listActions->setCurrentItem( it.current() );
@@ -99,14 +99,14 @@ void ActionEditor::setCurrentAction( QAction *a )
}
}
-QAction *ActionEditor::newActionEx()
+TQAction *ActionEditor::newActionEx()
{
ActionItem *i = new ActionItem( listActions, (bool)FALSE );
- QAction *a = i->action();
- QObject::connect( a, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject* ) ) );
+ TQAction *a = i->action();
+ TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->action() );
- QString n = "Action";
+ TQString n = "Action";
formWindow->unify( i->action(), n, TRUE );
i->setText( 0, n );
i->action()->setName( n );
@@ -124,7 +124,7 @@ void ActionEditor::deleteAction()
if ( !currentAction )
return;
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
ActionItem *ai = 0;
while ( it.current() ) {
ai = (ActionItem*)it.current();
@@ -149,7 +149,7 @@ void ActionEditor::newAction()
{
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
- if ( !::qt_cast<QActionGroup*>(actionParent->actionGroup()) )
+ if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) )
actionParent = (ActionItem*)actionParent->parent();
}
@@ -158,11 +158,11 @@ void ActionEditor::newAction()
i = new ActionItem( actionParent );
else
i = new ActionItem( listActions, (bool)FALSE );
- QAction *a = i->action();
- QObject::connect( a, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject* ) ) );
+ TQAction *a = i->action();
+ TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->action() );
- QString n = "Action";
+ TQString n = "Action";
formWindow->unify( i->action(), n, TRUE );
i->setText( 0, n );
i->action()->setName( n );
@@ -185,7 +185,7 @@ void ActionEditor::newActionGroup()
{
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
- if ( !::qt_cast<QActionGroup*>(actionParent->actionGroup()) )
+ if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) )
actionParent = (ActionItem*)actionParent->parent();
}
@@ -194,12 +194,12 @@ void ActionEditor::newActionGroup()
i = new ActionItem( actionParent, TRUE );
else
i = new ActionItem( listActions, TRUE );
- QAction *ag = i->actionGroup();
- QObject::connect( ag, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject* ) ) );
+ TQAction *ag = i->actionGroup();
+ TQObject::connect( ag, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->actionGroup() );
MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", TRUE );
- QString n = "ActionGroup";
+ TQString n = "ActionGroup";
formWindow->unify( i->action(), n, TRUE );
i->setText( 0, n );
i->actionGroup()->setName( n );
@@ -225,23 +225,23 @@ void ActionEditor::setFormWindow( FormWindow *fw )
listActions->clear();
formWindow = fw;
if ( !formWindow ||
- !::qt_cast<QMainWindow*>(formWindow->mainContainer()) ) {
+ !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
setEnabled( FALSE );
} else {
setEnabled( TRUE );
- for ( QAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
+ for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0;
- if ( ::qt_cast<QAction*>(a->parent()) )
+ if ( ::qt_cast<TQAction*>(a->parent()) )
continue;
i = new ActionItem( listActions, a );
i->setText( 0, a->name() );
i->setPixmap( 0, a->iconSet().pixmap() );
// make sure we don't duplicate the connection
- QObject::disconnect( a, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject * ) ) );
- QObject::connect( a, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject* ) ) );
- if ( ::qt_cast<QActionGroup*>(a) ) {
+ TQObject::disconnect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject * ) ) );
+ TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject* ) ) );
+ if ( ::qt_cast<TQActionGroup*>(a) ) {
insertChildActions( i );
}
}
@@ -256,30 +256,30 @@ void ActionEditor::insertChildActions( ActionItem *i )
{
if ( !i->actionGroup() || !i->actionGroup()->children() )
return;
- QObjectListIt it( *i->actionGroup()->children() );
+ TQObjectListIt it( *i->actionGroup()->children() );
while ( it.current() ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
- if ( !::qt_cast<QAction*>(o) )
+ if ( !::qt_cast<TQAction*>(o) )
continue;
- QAction *a = (QAction*)o;
- ActionItem *i2 = new ActionItem( (QListViewItem*)i, a );
+ TQAction *a = (TQAction*)o;
+ ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a );
i->setOpen( TRUE );
i2->setText( 0, a->name() );
i2->setPixmap( 0, a->iconSet().pixmap() );
// make sure we don't duplicate the connection
- QObject::disconnect( o, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject * ) ) );
- QObject::connect( o, SIGNAL( destroyed( QObject * ) ),
- this, SLOT( removeConnections( QObject * ) ) );
- if ( ::qt_cast<QActionGroup*>(a) )
+ TQObject::disconnect( o, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject * ) ) );
+ TQObject::connect( o, TQT_SIGNAL( destroyed( TQObject * ) ),
+ this, TQT_SLOT( removeConnections( TQObject * ) ) );
+ if ( ::qt_cast<TQActionGroup*>(a) )
insertChildActions( i2 );
}
}
-void ActionEditor::updateActionName( QAction *a )
+void ActionEditor::updateActionName( TQAction *a )
{
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
while ( it.current() ) {
if ( ( (ActionItem*)it.current() )->action() == a )
( (ActionItem*)it.current() )->setText( 0, a->name() );
@@ -289,9 +289,9 @@ void ActionEditor::updateActionName( QAction *a )
}
}
-void ActionEditor::updateActionIcon( QAction *a )
+void ActionEditor::updateActionIcon( TQAction *a )
{
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
while ( it.current() ) {
if ( ( (ActionItem*)it.current() )->action() == a )
( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() );
@@ -309,11 +309,11 @@ void ActionEditor::connectionsClicked()
dlg.exec();
}
-void ActionEditor::removeConnections( QObject *o )
+void ActionEditor::removeConnections( TQObject *o )
{
- QValueList<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, o );
- for ( QValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
+ for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
it2 != conns.end(); ++it2 )
MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
(*it2).receiver, (*it2).slot );
diff --git a/kdevdesigner/designer/actioneditorimpl.h b/kdevdesigner/designer/actioneditorimpl.h
index 439a8fb8..e510f38c 100644
--- a/kdevdesigner/designer/actioneditorimpl.h
+++ b/kdevdesigner/designer/actioneditorimpl.h
@@ -38,39 +38,39 @@ class ActionEditor : public ActionEditorBase
Q_OBJECT
public:
- ActionEditor( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ActionEditor( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
void setFormWindow( FormWindow *fw );
- void updateActionName( QAction *a );
- void updateActionIcon( QAction *a );
+ void updateActionName( TQAction *a );
+ void updateActionIcon( TQAction *a );
FormWindow *form() const { return formWindow; }
bool wantToBeShown() const { return !explicitlyClosed; }
void setWantToBeShown( bool b ) { explicitlyClosed = !b; }
- void setCurrentAction( QAction *a );
- QAction *newActionEx();
+ void setCurrentAction( TQAction *a );
+ TQAction *newActionEx();
protected:
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
protected slots:
- void currentActionChanged( QListViewItem * );
+ void currentActionChanged( TQListViewItem * );
void deleteAction();
void newAction();
void newActionGroup();
void newDropDownActionGroup();
void connectionsClicked();
- void removeConnections( QObject *o );
+ void removeConnections( TQObject *o );
signals:
void hidden();
- void removing( QAction * );
+ void removing( TQAction * );
private:
void insertChildActions( ActionItem *i );
private:
- QAction *currentAction;
+ TQAction *currentAction;
FormWindow *formWindow;
bool explicitlyClosed;
diff --git a/kdevdesigner/designer/actionlistview.cpp b/kdevdesigner/designer/actionlistview.cpp
index 53c7e292..7b687fe4 100644
--- a/kdevdesigner/designer/actionlistview.cpp
+++ b/kdevdesigner/designer/actionlistview.cpp
@@ -26,22 +26,22 @@
#include "actiondnd.h"
#include "actionlistview.h"
-#include <qheader.h>
+#include <tqheader.h>
#include <klocale.h>
-ActionListView::ActionListView( QWidget *parent, const char *name )
- : QListView( parent, name )
+ActionListView::ActionListView( TQWidget *parent, const char *name )
+ : TQListView( parent, name )
{
setShowSortIndicator( TRUE );
setResizeMode( LastColumn );
setRootIsDecorated( TRUE );
- connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( rmbMenu( QListViewItem *, const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) );
}
-ActionItem::ActionItem( QListView *lv, QAction *ac )
- : QListViewItem( lv ), a( 0 ), g( 0 )
+ActionItem::ActionItem( TQListView *lv, TQAction *ac )
+ : TQListViewItem( lv ), a( 0 ), g( 0 )
{
g = ::qt_cast<QDesignerActionGroup*>(ac);
if ( !g )
@@ -49,8 +49,8 @@ ActionItem::ActionItem( QListView *lv, QAction *ac )
setDragEnabled( TRUE );
}
-ActionItem::ActionItem( QListViewItem *i, QAction *ac )
- : QListViewItem( i ), a( 0 ), g( 0 )
+ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
+ : TQListViewItem( i ), a( 0 ), g( 0 )
{
g = ::qt_cast<QDesignerActionGroup*>(ac);
if ( !g )
@@ -61,19 +61,19 @@ ActionItem::ActionItem( QListViewItem *i, QAction *ac )
void ActionItem::moveToEnd()
{
- QListViewItem *i = this;
+ TQListViewItem *i = this;
while ( i->nextSibling() )
i = i->nextSibling();
if ( i != this )
moveItem( i );
}
-QDragObject *ActionListView::dragObject()
+TQDragObject *ActionListView::dragObject()
{
ActionItem *i = (ActionItem*)currentItem();
if ( !i )
return 0;
- QStoredDrag *drag = 0;
+ TQStoredDrag *drag = 0;
if ( i->action() ) {
drag = new ActionDrag( i->action(), viewport() );
drag->setPixmap( i->action()->iconSet().pixmap() );
@@ -84,9 +84,9 @@ QDragObject *ActionListView::dragObject()
return drag;
}
-void ActionListView::rmbMenu( QListViewItem *i, const QPoint &p )
+void ActionListView::rmbMenu( TQListViewItem *i, const TQPoint &p )
{
- QPopupMenu *popup = new QPopupMenu( this );
+ TQPopupMenu *popup = new TQPopupMenu( this );
popup->insertItem( i18n( "New &Action" ), 0 );
popup->insertItem( i18n( "New Action &Group" ), 1 );
popup->insertItem( i18n( "New &Dropdown Action Group" ), 2 );
diff --git a/kdevdesigner/designer/actionlistview.h b/kdevdesigner/designer/actionlistview.h
index 59c48b20..66d6419e 100644
--- a/kdevdesigner/designer/actionlistview.h
+++ b/kdevdesigner/designer/actionlistview.h
@@ -27,20 +27,20 @@
#ifndef ACTIONLISTVIEW_H
#define ACTIONLISTVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "actiondnd.h"
class ActionItem : public QListViewItem
{
public:
- ActionItem( QListView *lv, bool group )
- : QListViewItem( lv ),
+ ActionItem( TQListView *lv, bool group )
+ : TQListViewItem( lv ),
a( group ? 0 : new QDesignerAction( 0 ) ),
g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); }
- ActionItem( QListView *lv, QAction *ac );
- ActionItem( QListViewItem *i, QAction *ac );
+ ActionItem( TQListView *lv, TQAction *ac );
+ ActionItem( TQListViewItem *i, TQAction *ac );
ActionItem( ActionItem *parent, bool group = FALSE )
- : QListViewItem( parent ),
+ : TQListViewItem( parent ),
a( group ? 0 : new QDesignerAction( parent->actionGroup() ) ),
g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); }
@@ -61,13 +61,13 @@ class ActionListView : public QListView
Q_OBJECT
public:
- ActionListView( QWidget *parent = 0, const char *name = 0 );
+ ActionListView( TQWidget *parent = 0, const char *name = 0 );
protected:
- QDragObject *dragObject();
+ TQDragObject *dragObject();
private slots:
- void rmbMenu( QListViewItem *i, const QPoint &p );
+ void rmbMenu( TQListViewItem *i, const TQPoint &p );
signals:
void insertAction();
diff --git a/kdevdesigner/designer/asciivalidator.cpp b/kdevdesigner/designer/asciivalidator.cpp
index 7642d47f..695b2292 100644
--- a/kdevdesigner/designer/asciivalidator.cpp
+++ b/kdevdesigner/designer/asciivalidator.cpp
@@ -26,20 +26,20 @@
#include "asciivalidator.h"
-#include <qstring.h>
+#include <tqstring.h>
-AsciiValidator::AsciiValidator( QObject * parent, const char *name )
- : QValidator( parent, name ), functionName( FALSE )
+AsciiValidator::AsciiValidator( TQObject * parent, const char *name )
+ : TQValidator( parent, name ), functionName( FALSE )
{
}
-AsciiValidator::AsciiValidator( bool funcName, QObject * parent, const char *name )
- : QValidator( parent, name ), functionName( funcName )
+AsciiValidator::AsciiValidator( bool funcName, TQObject * parent, const char *name )
+ : TQValidator( parent, name ), functionName( funcName )
{
}
-AsciiValidator::AsciiValidator( const QString &allow, QObject * parent, const char *name )
- : QValidator( parent, name ), functionName( FALSE ), allowedChars( allow )
+AsciiValidator::AsciiValidator( const TQString &allow, TQObject * parent, const char *name )
+ : TQValidator( parent, name ), functionName( FALSE ), allowedChars( allow )
{
}
@@ -47,7 +47,7 @@ AsciiValidator::~AsciiValidator()
{
}
-QValidator::State AsciiValidator::validate( QString &s, int & ) const
+TQValidator::State AsciiValidator::validate( TQString &s, int & ) const
{
bool inParen = FALSE;
bool outParen = FALSE;
@@ -58,11 +58,11 @@ QValidator::State AsciiValidator::validate( QString &s, int & ) const
uchar c = s[i].cell();
if ( outParen ) { // check if we have 'const' or 'volatile'
- static const QString con = " const";
- static const QString vol = " volatile";
- QString mid = s.mid( j );
+ static const TQString con = " const";
+ static const TQString vol = " volatile";
+ TQString mid = s.mid( j );
if ( !( con.startsWith( mid ) || vol.startsWith( mid ) ) )
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
if ( inParen && c != ')' )
@@ -90,5 +90,5 @@ QValidator::State AsciiValidator::validate( QString &s, int & ) const
s[i] = '_';
}
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
}
diff --git a/kdevdesigner/designer/asciivalidator.h b/kdevdesigner/designer/asciivalidator.h
index 2cdfe0cb..8e79d21f 100644
--- a/kdevdesigner/designer/asciivalidator.h
+++ b/kdevdesigner/designer/asciivalidator.h
@@ -28,23 +28,23 @@
#define ASCIIVALIDATOR_H
-#include <qvalidator.h>
+#include <tqvalidator.h>
class AsciiValidator: public QValidator
{
Q_OBJECT
public:
- AsciiValidator( QObject * parent, const char *name = 0 );
- AsciiValidator( bool funcName, QObject * parent, const char *name = 0 );
- AsciiValidator( const QString &allow, QObject * parent, const char *name = 0 );
+ AsciiValidator( TQObject * parent, const char *name = 0 );
+ AsciiValidator( bool funcName, TQObject * parent, const char *name = 0 );
+ AsciiValidator( const TQString &allow, TQObject * parent, const char *name = 0 );
~AsciiValidator();
- QValidator::State validate( QString &, int & ) const;
+ TQValidator::State validate( TQString &, int & ) const;
private:
bool functionName;
- QString allowedChars;
+ TQString allowedChars;
};
diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp
index 83ec9a77..8e46c2e1 100644
--- a/kdevdesigner/designer/command.cpp
+++ b/kdevdesigner/designer/command.cpp
@@ -39,22 +39,22 @@
#include "menubareditor.h"
#include "popupmenueditor.h"
-#include <qfeatures.h>
-#include <qwidget.h>
-#include <qmetaobject.h>
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qlistbox.h>
-#include <qiconview.h>
-#include <qtextedit.h>
-#include <qptrstack.h>
-#include <qheader.h>
-#include <qsplitter.h>
+#include <tqfeatures.h>
+#include <tqwidget.h>
+#include <tqmetaobject.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqlistbox.h>
+#include <tqiconview.h>
+#include <tqtextedit.h>
+#include <tqptrstack.h>
+#include <tqheader.h>
+#include <tqsplitter.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
-#include <qaction.h>
+#include <tqaction.h>
#include "kdevdesigner_part.h"
@@ -93,7 +93,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
if ( current < savedAt )
savedAt = -2;
- QPtrList<Command> commands;
+ TQPtrList<Command> commands;
commands.setAutoDelete( FALSE );
for( int i = 0; i <= current; ++i ) {
@@ -165,11 +165,11 @@ void CommandHistory::emitUndoRedo()
redoCmd = history.at( current + 1 );
bool ua = (undoCmd != 0);
- QString uc;
+ TQString uc;
if ( ua )
uc = undoCmd->name();
bool ra = (redoCmd != 0);
- QString rc;
+ TQString rc;
if ( ra )
rc = redoCmd->name();
emit undoRedoChanged( ua, ra, uc, rc );
@@ -203,7 +203,7 @@ void CommandHistory::checkCompressedCommand()
// ------------------------------------------------------------
-Command::Command( const QString &n, FormWindow *fw )
+Command::Command( const TQString &n, FormWindow *fw )
: cmdName( n ), formWin( fw )
{
}
@@ -212,7 +212,7 @@ Command::~Command()
{
}
-QString Command::name() const
+TQString Command::name() const
{
return cmdName;
}
@@ -233,8 +233,8 @@ bool Command::canMerge( Command * )
// ------------------------------------------------------------
-ResizeCommand::ResizeCommand( const QString &n, FormWindow *fw,
- QWidget *w, const QRect &oldr, const QRect &nr )
+ResizeCommand::ResizeCommand( const TQString &n, FormWindow *fw,
+ TQWidget *w, const TQRect &oldr, const TQRect &nr )
: Command( n, fw ), widget( w ), oldRect( oldr ), newRect( nr )
{
}
@@ -259,21 +259,21 @@ void ResizeCommand::unexecute()
// ------------------------------------------------------------
-InsertCommand::InsertCommand( const QString &n, FormWindow *fw,
- QWidget *w, const QRect &g )
+InsertCommand::InsertCommand( const TQString &n, FormWindow *fw,
+ TQWidget *w, const TQRect &g )
: Command( n, fw ), widget( w ), geometry( g )
{
}
void InsertCommand::execute()
{
- if ( geometry.size() == QSize( 0, 0 ) ) {
+ if ( geometry.size() == TQSize( 0, 0 ) ) {
widget->move( geometry.topLeft() );
widget->adjustSize();
} else {
- QSize s = geometry.size().expandedTo( widget->minimumSize() );
+ TQSize s = geometry.size().expandedTo( widget->minimumSize() );
s = s.expandedTo( widget->minimumSizeHint() );
- QRect r( geometry.topLeft(), s );
+ TQRect r( geometry.topLeft(), s );
widget->setGeometry( r );
}
widget->show();
@@ -293,11 +293,11 @@ void InsertCommand::unexecute()
// ------------------------------------------------------------
-MoveCommand::MoveCommand( const QString &n, FormWindow *fw,
- const QWidgetList &w,
- const QValueList<QPoint> op,
- const QValueList<QPoint> np,
- QWidget *opr, QWidget *npr )
+MoveCommand::MoveCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &w,
+ const TQValueList<TQPoint> op,
+ const TQValueList<TQPoint> np,
+ TQWidget *opr, TQWidget *npr )
: Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ),
oldParent( opr ), newParent( npr )
{
@@ -319,10 +319,10 @@ bool MoveCommand::canMerge( Command *c )
void MoveCommand::execute()
{
- 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 ) {
if ( newParent && oldParent && newParent != oldParent ) {
- QPoint pos = newParent->mapFromGlobal( w->mapToGlobal( QPoint( 0,0 ) ) );
+ TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) );
w->reparent( newParent, pos, TRUE );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
@@ -340,10 +340,10 @@ void MoveCommand::execute()
void MoveCommand::unexecute()
{
- 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 ) {
if ( newParent && oldParent && newParent != oldParent ) {
- QPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( QPoint( 0,0 ) ) );
+ TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) );
w->reparent( oldParent, pos, TRUE );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
@@ -361,18 +361,18 @@ void MoveCommand::unexecute()
// ------------------------------------------------------------
-DeleteCommand::DeleteCommand( const QString &n, FormWindow *fw,
- const QWidgetList &wl )
+DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &wl )
: Command( n, fw ), widgets( wl )
{
widgets.setAutoDelete( FALSE );
- QWidgetList copyOfWidgets = widgets;
+ TQWidgetList copyOfWidgets = widgets;
copyOfWidgets.setAutoDelete(FALSE);
// Include the children of the selected items when deleting
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
- QObjectList *children = w->queryList( "QWidget" );
- for ( QWidget *c = (QWidget *)children->first(); c; c = (QWidget *)children->next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
+ TQObjectList *children = w->queryList( "TQWidget" );
+ for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) {
if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) {
widgets.insert(widgets.at() + 1, c);
widgets.prev();
@@ -387,16 +387,16 @@ void DeleteCommand::execute()
{
formWindow()->setPropertyShowingBlocked( TRUE );
connections.clear();
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
- QString s = w->name();
+ TQString s = w->name();
s.prepend( "qt_dead_widget_" );
w->setName( s );
formWindow()->selectWidget( w, FALSE );
formWindow()->widgets()->remove( w );
- QValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
+ TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
connections.insert( w, conns );
- QValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
+ TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) {
MetaDataBase::removeConnection( formWindow(), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot );
@@ -412,15 +412,15 @@ void DeleteCommand::unexecute()
{
formWindow()->setPropertyShowingBlocked( TRUE );
formWindow()->clearSelection( FALSE );
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show();
- QString s = w->name();
- s.remove( 0, QString( "qt_dead_widget_" ).length() );
+ TQString s = w->name();
+ s.remove( 0, TQString( "qt_dead_widget_" ).length() );
w->setName( s );
formWindow()->widgets()->insert( w, w );
formWindow()->selectWidget( w );
- QValueList<MetaDataBase::Connection> conns = *connections.find( w );
- QValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
+ TQValueList<MetaDataBase::Connection> conns = *connections.find( w );
+ TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) {
MetaDataBase::addConnection( formWindow(), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot );
@@ -433,11 +433,11 @@ void DeleteCommand::unexecute()
// ------------------------------------------------------------
-SetPropertyCommand::SetPropertyCommand( const QString &n, FormWindow *fw,
- QObject *w, PropertyEditor *e,
- const QString &pn, const QVariant &ov,
- const QVariant &nv, const QString &ncut,
- const QString &ocut, bool reset )
+SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw,
+ TQObject *w, PropertyEditor *e,
+ const TQString &pn, const TQVariant &ov,
+ const TQVariant &nv, const TQString &ncut,
+ const TQString &ocut, bool reset )
: Command( n, fw ), widget( w ), editor( e ), propName( pn ),
oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ),
wasChanged( TRUE ), isResetCommand( reset )
@@ -457,8 +457,8 @@ void SetPropertyCommand::execute()
if ( isResetCommand ) {
MetaDataBase::setPropertyChanged( widget, propName, FALSE );
if ( WidgetFactory::resetProperty( widget, propName ) ) {
- if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != (QObject *)widget )
- formWindow()->selectWidget( (QObject *)widget );
+ if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != (TQObject *)widget )
+ formWindow()->selectWidget( (TQObject *)widget );
if ( editor->widget() != widget )
editor->setWidget( widget, formWindow() );
editor->propertyList()->setCurrentProperty( propName );
@@ -489,17 +489,17 @@ bool SetPropertyCommand::canMerge( Command *c )
SetPropertyCommand *cmd = (SetPropertyCommand*)c;
if ( !widget )
return FALSE;
- const QMetaProperty *p =
+ const TQMetaProperty *p =
widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
if ( !p ) {
if ( propName == "toolTip" || propName == "whatsThis" )
return TRUE;
- if ( ::qt_cast<CustomWidget*>((QObject *)widget) ) {
- MetaDataBase::CustomWidget *cw = ((CustomWidget*)(QObject*)widget)->customWidget();
+ if ( ::qt_cast<CustomWidget*>((TQObject *)widget) ) {
+ MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget();
if ( !cw )
return FALSE;
- for ( QValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
- if ( QString( (*it ).property ) == propName ) {
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
+ if ( TQString( (*it ).property ) == propName ) {
if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" )
return TRUE;
}
@@ -507,9 +507,9 @@ bool SetPropertyCommand::canMerge( Command *c )
}
return FALSE;
}
- QVariant::Type t = QVariant::nameToType( p->type() );
+ TQVariant::Type t = TQVariant::nameToType( p->type() );
return ( cmd->propName == propName &&
- t == QVariant::String || t == QVariant::CString || t == QVariant::Int || t == QVariant::UInt );
+ t == TQVariant::String || t == TQVariant::CString || t == TQVariant::Int || t == TQVariant::UInt );
}
void SetPropertyCommand::merge( Command *c )
@@ -522,9 +522,9 @@ void SetPropertyCommand::merge( Command *c )
bool SetPropertyCommand::checkProperty()
{
if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that
- QString s = newValue.toString();
+ TQString s = newValue.toString();
if ( !formWindow()->unify( widget, s, FALSE ) ) {
- QMessageBox::information( formWindow()->mainWindow(),
+ TQMessageBox::information( formWindow()->mainWindow(),
i18n( "Set 'name' Property" ),
i18n( "The name of a widget must be unique.\n"
"'%1' is already used in form '%2',\n"
@@ -536,7 +536,7 @@ bool SetPropertyCommand::checkProperty()
return FALSE;
}
if ( s.isEmpty() ) {
- QMessageBox::information( formWindow()->mainWindow(),
+ TQMessageBox::information( formWindow()->mainWindow(),
i18n( "Set 'name' Property" ),
i18n( "The name of a widget must not be null.\n"
"The name has been reverted to '%1'." ).
@@ -546,12 +546,12 @@ bool SetPropertyCommand::checkProperty()
}
if ( ::qt_cast<FormWindow*>(widget->parent()) )
- formWindow()->mainWindow()->formNameChanged( (FormWindow*)((QWidget*)(QObject*)widget)->parentWidget() );
+ formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() );
}
return TRUE;
}
-void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentItemText, bool select )
+void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &currentItemText, bool select )
{
if ( !widget )
return;
@@ -562,7 +562,7 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
editor->setWidget( widget, formWindow() );
if ( select )
editor->propertyList()->setCurrentProperty( propName );
- const QMetaProperty *p =
+ const TQMetaProperty *p =
widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
if ( !p ) {
if ( propName == "hAlign" ) {
@@ -570,35 +570,35 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
int align = widget->property( "alignment" ).toInt();
align &= ~( AlignHorizontal_Mask );
align |= p->keyToValue( currentItemText );
- widget->setProperty( "alignment", QVariant( align ) );
+ widget->setProperty( "alignment", TQVariant( align ) );
} else if ( propName == "vAlign" ) {
p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
int align = widget->property( "alignment" ).toInt();
align &= ~( AlignVertical_Mask );
align |= p->keyToValue( currentItemText );
- widget->setProperty( "alignment", QVariant( align ) );
+ widget->setProperty( "alignment", TQVariant( align ) );
} else if ( propName == "wordwrap" ) {
int align = widget->property( "alignment" ).toInt();
align &= ~WordBreak;
if ( v.toBool() )
align |= WordBreak;
- widget->setProperty( "alignment", QVariant( align ) );
+ widget->setProperty( "alignment", TQVariant( align ) );
} else if ( propName == "layoutSpacing" ) {
- QVariant val = v;
+ TQVariant val = v;
if ( val.toString() == "default" )
val = -1;
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), val.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), val.toInt() );
} else if ( propName == "layoutMargin" ) {
- QVariant val = v;
+ TQVariant val = v;
if ( val.toString() == "default" )
val = -1;
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), val.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), val.toInt() );
} else if ( propName == "resizeMode" ) {
- MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), currentItemText );
+ MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), currentItemText );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
} else if ( ::qt_cast<CustomWidget*>(editor->widget()) ) {
- MetaDataBase::CustomWidget *cw = ((CustomWidget *)(QObject *)widget)->customWidget();
+ MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget();
if ( cw ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
}
@@ -608,16 +608,16 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) );
#ifndef QT_NO_SQL
if ( propName == "database" ) {
- formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (QWidget*)((QObject *)widget), MetaDataBase::fakeProperty( widget, "database" ).toStringList() );
+ formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (TQWidget*)((TQObject *)widget), MetaDataBase::fakeProperty( widget, "database" ).toStringList() );
}
#endif
return;
}
if ( p->isSetType() ) {
- QStrList strlst;
- QStringList lst = QStringList::split( "|", currentItemText );
- QValueListConstIterator<QString> it = lst.begin();
+ TQStrList strlst;
+ TQStringList lst = TQStringList::split( "|", currentItemText );
+ TQValueListConstIterator<TQString> it = lst.begin();
for ( ; it != lst.end(); ++it )
strlst.append( (*it).latin1() );
widget->setProperty( propName, p->keysToValue( strlst ) );
@@ -626,11 +626,11 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
} else if ( qstrcmp( p->name(), "buddy" ) == 0 ) {
widget->setProperty( propName, currentItemText );
} else {
- QVariant ov;
+ TQVariant ov;
if ( propName == "name" || propName == "itemName" )
ov = widget->property( propName );
int oldSerNum = -1;
- if ( v.type() == QVariant::Pixmap )
+ if ( v.type() == TQVariant::Pixmap )
oldSerNum = v.toPixmap().serialNumber();
widget->setProperty( propName, v );
if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() )
@@ -638,18 +638,18 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
widget->property( propName ).toPixmap().serialNumber(),
MetaDataBase::pixmapKey( formWindow(), oldSerNum ) );
if ( propName == "cursor" ) {
- MetaDataBase::setCursor( (QWidget*)((QObject *)widget), v.toCursor() );
+ MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() );
}
if ( propName == "name" && widget->isWidgetType() ) {
- formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( ((QWidget*)(QObject *)widget), ov );
+ formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( ((TQWidget*)(TQObject *)widget), ov );
if ( formWindow()->isMainContainer( widget ) )
formWindow()->setName( v.toCString() );
}
- if ( propName == "name" && ::qt_cast<QAction*>((QObject *)widget) && ::qt_cast<QMainWindow*>(formWindow()->mainContainer()) ) {
- formWindow()->mainWindow()->actioneditor()->updateActionName( (QAction*)(QObject *)widget );
+ if ( propName == "name" && ::qt_cast<TQAction*>((TQObject *)widget) && ::qt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
+ formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget );
}
- if ( propName == "iconSet" && ::qt_cast<QAction*>((QObject *)widget) && ::qt_cast<QMainWindow*>(formWindow()->mainContainer()) ) {
- formWindow()->mainWindow()->actioneditor()->updateActionIcon( (QAction*)(QObject *)widget );
+ if ( propName == "iconSet" && ::qt_cast<TQAction*>((TQObject *)widget) && ::qt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
+ formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget );
}
if ( propName == "caption" ) {
if ( formWindow()->isMainContainer( widget ) )
@@ -671,9 +671,9 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
// ------------------------------------------------------------
-LayoutHorizontalCommand::LayoutHorizontalCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl )
+LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl )
: Command( n, fw ), layout( wl, parent, fw, layoutBase )
{
}
@@ -694,9 +694,9 @@ void LayoutHorizontalCommand::unexecute()
// ------------------------------------------------------------
-LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl )
+LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl )
: Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
{
}
@@ -717,9 +717,9 @@ void LayoutHorizontalSplitCommand::unexecute()
// ------------------------------------------------------------
-LayoutVerticalCommand::LayoutVerticalCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl )
+LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl )
: Command( n, fw ), layout( wl, parent, fw, layoutBase )
{
}
@@ -740,9 +740,9 @@ void LayoutVerticalCommand::unexecute()
// ------------------------------------------------------------
-LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl )
+LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl )
: Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
{
}
@@ -763,10 +763,10 @@ void LayoutVerticalSplitCommand::unexecute()
// ------------------------------------------------------------
-LayoutGridCommand::LayoutGridCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl, int xres, int yres )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, QSize( QMAX(5,xres), QMAX(5,yres) ) )
+LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl, int xres, int yres )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( QMAX(5,xres), QMAX(5,yres) ) )
{
}
@@ -786,8 +786,8 @@ void LayoutGridCommand::unexecute()
// ------------------------------------------------------------
-BreakLayoutCommand::BreakLayoutCommand( const QString &n, FormWindow *fw,
- QWidget *layoutBase, const QWidgetList &wl )
+BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
+ TQWidget *layoutBase, const TQWidgetList &wl )
: Command( n, fw ), lb( layoutBase ), widgets( wl )
{
WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase );
@@ -795,11 +795,11 @@ BreakLayoutCommand::BreakLayoutCommand( const QString &n, FormWindow *fw,
margin = MetaDataBase::margin( layoutBase );
layout = 0;
if ( lay == WidgetFactory::HBox )
- layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<QSplitter*>(layoutBase) != 0 );
+ layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::VBox )
- layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<QSplitter*>(layoutBase) != 0 );
+ layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::Grid )
- layout = new GridLayout( wl, layoutBase, fw, layoutBase, QSize( QMAX( 5, fw->grid().x()), QMAX( 5, fw->grid().y()) ), FALSE );
+ layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( QMAX( 5, fw->grid().x()), QMAX( 5, fw->grid().y()) ), FALSE );
}
void BreakLayoutCommand::execute()
@@ -809,7 +809,7 @@ void BreakLayoutCommand::execute()
formWindow()->clearSelection( FALSE );
layout->breakLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
- for ( QWidget *w = widgets.first(); w; w = widgets.next() )
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->resize( QMAX( 16, w->width() ), QMAX( 16, w->height() ) );
}
@@ -826,8 +826,8 @@ void BreakLayoutCommand::unexecute()
// ------------------------------------------------------------
-MacroCommand::MacroCommand( const QString &n, FormWindow *fw,
- const QPtrList<Command> &cmds )
+MacroCommand::MacroCommand( const TQString &n, FormWindow *fw,
+ const TQPtrList<Command> &cmds )
: Command( n, fw ), commands( cmds )
{
}
@@ -846,8 +846,8 @@ void MacroCommand::unexecute()
// ------------------------------------------------------------
-AddTabPageCommand::AddTabPageCommand( const QString &n, FormWindow *fw,
- QTabWidget *tw, const QString &label )
+AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
+ TQTabWidget *tw, const TQString &label )
: Command( n, fw ), tabWidget( tw ), tabLabel( label )
{
tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" );
@@ -876,8 +876,8 @@ void AddTabPageCommand::unexecute()
// ------------------------------------------------------------
-MoveTabPageCommand::MoveTabPageCommand( const QString &n, FormWindow *fw,
- QTabWidget *tw, QWidget* page, const QString& label, int nIndex, int oIndex )
+MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw,
+ TQTabWidget *tw, TQWidget* page, const TQString& label, int nIndex, int oIndex )
: Command( n, fw ), tabWidget( tw ), tabPage( page ), tabLabel( label )
{
newIndex = nIndex;
@@ -904,8 +904,8 @@ void MoveTabPageCommand::unexecute()
// ------------------------------------------------------------
-DeleteTabPageCommand::DeleteTabPageCommand( const QString &n, FormWindow *fw,
- QTabWidget *tw, QWidget *page )
+DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw,
+ TQTabWidget *tw, TQWidget *page )
: Command( n, fw ), tabWidget( tw ), tabPage( page )
{
tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle();
@@ -930,7 +930,7 @@ void DeleteTabPageCommand::unexecute()
// ------------------------------------------------------------
-AddWidgetStackPageCommand::AddWidgetStackPageCommand( const QString &n, FormWindow *fw,
+AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw,
QDesignerWidgetStack *ws )
: Command( n, fw ), widgetStack( ws )
{
@@ -955,8 +955,8 @@ void AddWidgetStackPageCommand::unexecute()
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
}
-DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const QString &n, FormWindow *fw,
- QDesignerWidgetStack *ws, QWidget *page )
+DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw,
+ QDesignerWidgetStack *ws, TQWidget *page )
: Command( n, fw), widgetStack( ws ), stackPage( page )
{
index = -1;
@@ -980,8 +980,8 @@ void DeleteWidgetStackPageCommand::unexecute()
// ------------------------------------------------------------
-AddWizardPageCommand::AddWizardPageCommand( const QString &n, FormWindow *fw,
- QWizard *w, const QString &label, int i, bool s )
+AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw,
+ TQWizard *w, const TQString &label, int i, bool s )
: Command( n, fw ), wizard( w ), pageLabel( label )
{
page = new QDesignerWidget( formWindow(), wizard, "WizardPage" );
@@ -1012,8 +1012,8 @@ void AddWizardPageCommand::unexecute()
// ------------------------------------------------------------
-DeleteWizardPageCommand::DeleteWizardPageCommand( const QString &n, FormWindow *fw,
- QWizard *w, int i, bool s )
+DeleteWizardPageCommand::DeleteWizardPageCommand( const TQString &n, FormWindow *fw,
+ TQWizard *w, int i, bool s )
: Command( n, fw ), wizard( w ), index( i )
{
show = s;
@@ -1040,8 +1040,8 @@ void DeleteWizardPageCommand::unexecute()
// ------------------------------------------------------------
-RenameWizardPageCommand::RenameWizardPageCommand( const QString &n, FormWindow *fw,
- QWizard *w, int i, const QString& name )
+RenameWizardPageCommand::RenameWizardPageCommand( const TQString &n, FormWindow *fw,
+ TQWizard *w, int i, const TQString& name )
: Command( n, fw ), wizard( w ), index( i ), label( name )
{
@@ -1050,7 +1050,7 @@ RenameWizardPageCommand::RenameWizardPageCommand( const QString &n, FormWindow *
void RenameWizardPageCommand::execute()
{
page = wizard->page( index );
- QString oldLabel = wizard->title( page );
+ TQString oldLabel = wizard->title( page );
wizard->setTitle( page, label );
label = oldLabel;
@@ -1064,17 +1064,17 @@ void RenameWizardPageCommand::unexecute()
// ------------------------------------------------------------
-SwapWizardPagesCommand::SwapWizardPagesCommand( const QString &n, FormWindow *fw, QWizard *w, int i1, int i2 )
+SwapWizardPagesCommand::SwapWizardPagesCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 )
: Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 )
{
}
void SwapWizardPagesCommand::execute()
{
- QWidget *page1 = wizard->page( index1 );
- QWidget *page2 = wizard->page( index2 );
- QString page1Label = wizard->title( page1 );
- QString page2Label = wizard->title( page2 );
+ TQWidget *page1 = wizard->page( index1 );
+ TQWidget *page2 = wizard->page( index2 );
+ TQString page1Label = wizard->title( page1 );
+ TQString page2Label = wizard->title( page2 );
wizard->removePage( page1 );
wizard->removePage( page2 );
wizard->insertPage( page1, page1Label, index2 );
@@ -1090,15 +1090,15 @@ void SwapWizardPagesCommand::unexecute()
// ------------------------------------------------------------
-MoveWizardPageCommand::MoveWizardPageCommand( const QString &n, FormWindow *fw, QWizard *w, int i1, int i2 )
+MoveWizardPageCommand::MoveWizardPageCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 )
: Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 )
{
}
void MoveWizardPageCommand::execute()
{
- QWidget *page = wizard->page( index1 );
- QString pageLabel = wizard->title( page );
+ TQWidget *page = wizard->page( index1 );
+ TQString pageLabel = wizard->title( page );
wizard->removePage( page );
wizard->insertPage( page, pageLabel, index2 );
formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
@@ -1108,8 +1108,8 @@ void MoveWizardPageCommand::execute()
void MoveWizardPageCommand::unexecute()
{
// ###FIX: index1 may be the wrong place
- QWidget *page = wizard->page( index2 );
- QString pageLabel = wizard->title( page );
+ TQWidget *page = wizard->page( index2 );
+ TQString pageLabel = wizard->title( page );
wizard->removePage( page );
wizard->insertPage( page, pageLabel, index1 );
formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
@@ -1118,7 +1118,7 @@ void MoveWizardPageCommand::unexecute()
// ------------------------------------------------------------
-AddConnectionCommand::AddConnectionCommand( const QString &name, FormWindow *fw,
+AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw,
MetaDataBase::Connection c )
: Command( name, fw ), connection( c )
{
@@ -1142,7 +1142,7 @@ void AddConnectionCommand::unexecute()
// ------------------------------------------------------------
-RemoveConnectionCommand::RemoveConnectionCommand( const QString &name, FormWindow *fw,
+RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWindow *fw,
MetaDataBase::Connection c )
: Command( name, fw ), connection( c )
{
@@ -1166,9 +1166,9 @@ void RemoveConnectionCommand::unexecute()
// ------------------------------------------------------------
-AddFunctionCommand::AddFunctionCommand( const QString &name, FormWindow *fw, const QCString &f,
- const QString& spec, const QString &a, const QString &t,
- const QString &l, const QString &rt )
+AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f,
+ const TQString& spec, const TQString &a, const TQString &t,
+ const TQString &l, const TQString &rt )
: Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ),
returnType( rt )
{
@@ -1213,10 +1213,10 @@ void AddFunctionCommand::unexecute()
// ------------------------------------------------------------
-ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const QString &name, FormWindow *fw, MetaDataBase::Function f,
- const QString &on, const QString &os,
- const QString &oa, const QString &ot, const QString &ol,
- const QString &ort )
+ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name, FormWindow *fw, MetaDataBase::Function f,
+ const TQString &on, const TQString &os,
+ const TQString &oa, const TQString &ot, const TQString &ol,
+ const TQString &ort )
: Command( name, fw ), oldName( on ), oldSpec( os ), oldAccess( oa ),
oldType( ot ), oldLang( ol ), oldReturnType( ort )
{
@@ -1284,15 +1284,15 @@ void ChangeFunctionAttribCommand::unexecute()
// ------------------------------------------------------------
-RemoveFunctionCommand::RemoveFunctionCommand( const QString &name, FormWindow *fw, const QCString &f,
- const QString& spec, const QString &a, const QString &t,
- const QString &l, const QString &rt )
+RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f,
+ const TQString& spec, const TQString &a, const TQString &t,
+ const TQString &l, const TQString &rt )
: Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ),
returnType( rt )
{
if ( spec.isNull() ) {
- QValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( fw );
- for ( QValueList<MetaDataBase::Function>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( fw );
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).function ) ==
MetaDataBase::normalizeFunction( function ) ) {
specifier = (*it).specifier;
@@ -1347,7 +1347,7 @@ void RemoveFunctionCommand::unexecute()
// ------------------------------------------------------------
-AddVariableCommand::AddVariableCommand( const QString &name, FormWindow *fw, const QString &vn, const QString &a )
+AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn, const TQString &a )
: Command( name, fw ), varName( vn ), access( a )
{
}
@@ -1370,8 +1370,8 @@ void AddVariableCommand::unexecute()
// ------------------------------------------------------------
-SetVariablesCommand::SetVariablesCommand( const QString &name, FormWindow *fw,
- QValueList<MetaDataBase::Variable> lst )
+SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw,
+ TQValueList<MetaDataBase::Variable> lst )
: Command( name, fw ), newList( lst )
{
oldList = MetaDataBase::variables( formWindow() );
@@ -1395,11 +1395,11 @@ void SetVariablesCommand::unexecute()
// ------------------------------------------------------------
-RemoveVariableCommand::RemoveVariableCommand( const QString &name, FormWindow *fw, const QString &vn )
+RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn )
: Command( name, fw ), varName( vn )
{
- QValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( fw );
- for ( QValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( fw );
+ for ( TQValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it).varName == varName ) {
access = (*it).varAccess;
break;
@@ -1425,8 +1425,8 @@ void RemoveVariableCommand::unexecute()
// ------------------------------------------------------------
-EditDefinitionsCommand::EditDefinitionsCommand( const QString &name, FormWindow *fw, LanguageInterface *lf,
- const QString &n, const QStringList &nl )
+EditDefinitionsCommand::EditDefinitionsCommand( const TQString &name, FormWindow *fw, LanguageInterface *lf,
+ const TQString &n, const TQStringList &nl )
: Command( name, fw ), lIface( lf ), defName( n ), newList( nl )
{
oldList = lIface->definitionEntries( defName, formWindow()->mainWindow()->designerInterface() );
@@ -1452,14 +1452,14 @@ void EditDefinitionsCommand::unexecute()
// ------------------------------------------------------------
-LowerCommand::LowerCommand( const QString &name, FormWindow *fw, const QWidgetList &w )
+LowerCommand::LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w )
: Command( name, fw ), widgets( w )
{
}
void LowerCommand::execute()
{
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->lower();
formWindow()->raiseSelection( w );
}
@@ -1468,7 +1468,7 @@ void LowerCommand::execute()
void LowerCommand::unexecute()
{
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->raise();
formWindow()->raiseSelection( w );
}
@@ -1476,14 +1476,14 @@ void LowerCommand::unexecute()
// ------------------------------------------------------------
-RaiseCommand::RaiseCommand( const QString &name, FormWindow *fw, const QWidgetList &w )
+RaiseCommand::RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w )
: Command( name, fw ), widgets( w )
{
}
void RaiseCommand::execute()
{
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->raise();
formWindow()->raiseSelection( w );
}
@@ -1492,7 +1492,7 @@ void RaiseCommand::execute()
void RaiseCommand::unexecute()
{
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->lower();
formWindow()->raiseSelection( w );
}
@@ -1500,15 +1500,15 @@ void RaiseCommand::unexecute()
// ------------------------------------------------------------
-PasteCommand::PasteCommand( const QString &n, FormWindow *fw,
- const QWidgetList &w )
+PasteCommand::PasteCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &w )
: Command( n, fw ), widgets( w )
{
}
void PasteCommand::execute()
{
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show();
formWindow()->selectWidget( w );
formWindow()->widgets()->insert( w, w );
@@ -1518,7 +1518,7 @@ void PasteCommand::execute()
void PasteCommand::unexecute()
{
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
formWindow()->selectWidget( w, FALSE );
formWindow()->widgets()->remove( w );
@@ -1528,8 +1528,8 @@ void PasteCommand::unexecute()
// ------------------------------------------------------------
-TabOrderCommand::TabOrderCommand( const QString &n, FormWindow *fw,
- const QWidgetList &ol, const QWidgetList &nl )
+TabOrderCommand::TabOrderCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &ol, const TQWidgetList &nl )
: Command( n, fw ), oldOrder( ol ), newOrder( nl )
{
}
@@ -1557,11 +1557,11 @@ void TabOrderCommand::unexecute()
// ------------------------------------------------------------
-PopulateListBoxCommand::PopulateListBoxCommand( const QString &n, FormWindow *fw,
- QListBox *lb, const QValueList<Item> &items )
+PopulateListBoxCommand::PopulateListBoxCommand( const TQString &n, FormWindow *fw,
+ TQListBox *lb, const TQValueList<Item> &items )
: Command( n, fw ), newItems( items ), listbox( lb )
{
- QListBoxItem *i = 0;
+ TQListBoxItem *i = 0;
for ( i = listbox->firstItem(); i; i = i->next() ) {
Item item;
if ( i->pixmap() )
@@ -1574,12 +1574,12 @@ PopulateListBoxCommand::PopulateListBoxCommand( const QString &n, FormWindow *fw
void PopulateListBoxCommand::execute()
{
listbox->clear();
- for ( QValueList<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
+ for ( TQValueList<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
Item i = *it;
if ( !i.pix.isNull() )
- (void)new QListBoxPixmap( listbox, i.pix, i.text );
+ (void)new TQListBoxPixmap( listbox, i.pix, i.text );
else
- (void)new QListBoxText( listbox, i.text );
+ (void)new TQListBoxText( listbox, i.text );
}
formWindow()->mainWindow()->propertyeditor()->refetchData();
}
@@ -1587,24 +1587,24 @@ void PopulateListBoxCommand::execute()
void PopulateListBoxCommand::unexecute()
{
listbox->clear();
- for ( QValueList<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
+ for ( TQValueList<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
Item i = *it;
if ( !i.pix.isNull() )
- (void)new QListBoxPixmap( listbox, i.pix, i.text );
+ (void)new TQListBoxPixmap( listbox, i.pix, i.text );
else
- (void)new QListBoxText( listbox, i.text );
+ (void)new TQListBoxText( listbox, i.text );
}
formWindow()->mainWindow()->propertyeditor()->refetchData();
}
// ------------------------------------------------------------
-PopulateIconViewCommand::PopulateIconViewCommand( const QString &n, FormWindow *fw,
- QIconView *iv, const QValueList<Item> &items )
+PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow *fw,
+ TQIconView *iv, const TQValueList<Item> &items )
: Command( n, fw ), newItems( items ), iconview( iv )
{
#ifndef QT_NO_ICONVIEW
- QIconViewItem *i = 0;
+ TQIconViewItem *i = 0;
for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
Item item;
if ( i->pixmap() )
@@ -1619,9 +1619,9 @@ void PopulateIconViewCommand::execute()
{
#ifndef QT_NO_ICONVIEW
iconview->clear();
- for ( QValueList<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
+ for ( TQValueList<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
Item i = *it;
- (void)new QIconViewItem( iconview, i.text, i.pix );
+ (void)new TQIconViewItem( iconview, i.text, i.pix );
}
#endif
}
@@ -1630,23 +1630,23 @@ void PopulateIconViewCommand::unexecute()
{
#ifndef QT_NO_ICONVIEW
iconview->clear();
- for ( QValueList<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
+ for ( TQValueList<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
Item i = *it;
- (void)new QIconViewItem( iconview, i.text, i.pix );
+ (void)new TQIconViewItem( iconview, i.text, i.pix );
}
#endif
}
// ------------------------------------------------------------
-PopulateListViewCommand::PopulateListViewCommand( const QString &n, FormWindow *fw,
- QListView *lv, QListView *from )
+PopulateListViewCommand::PopulateListViewCommand( const TQString &n, FormWindow *fw,
+ TQListView *lv, TQListView *from )
: Command( n, fw ), listview( lv )
{
- newItems = new QListView();
+ newItems = new TQListView();
newItems->hide();
transferItems( from, newItems );
- oldItems = new QListView();
+ oldItems = new TQListView();
oldItems->hide();
transferItems( listview, oldItems );
}
@@ -1663,12 +1663,12 @@ void PopulateListViewCommand::unexecute()
transferItems( oldItems, listview );
}
-void PopulateListViewCommand::transferItems( QListView *from, QListView *to )
+void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
{
- QHeader *header = to->header();
+ TQHeader *header = to->header();
while ( header->count() )
to->removeColumn( 0 );
- QHeader *h2 = from->header();
+ TQHeader *h2 = from->header();
for ( int i = 0; i < h2->count(); ++i ) {
to->addColumn( h2->label( i ) );
if ( h2->iconSet( i ) && !h2->iconSet( i )->pixmap().isNull() )
@@ -1677,25 +1677,25 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to )
header->setClickEnabled( h2->isClickEnabled( i ), i );
}
- QListViewItemIterator it( from );
- QPtrStack<QListViewItem> fromParents, toParents;
+ TQListViewItemIterator it( from );
+ TQPtrStack<TQListViewItem> fromParents, toParents;
fromParents.push( 0 );
toParents.push( 0 );
- QPtrStack<QListViewItem> toLasts;
- QListViewItem *fromLast = 0;
+ TQPtrStack<TQListViewItem> toLasts;
+ TQListViewItem *fromLast = 0;
toLasts.push( 0 );
int cols = from->columns();
to->setSorting( -1 );
from->setSorting( -1 );
for ( ; it.current(); ++it ) {
- QListViewItem *i = it.current();
+ TQListViewItem *i = it.current();
if ( i->parent() == fromParents.top() ) {
- QListViewItem *pi = toParents.top();
- QListViewItem *ni = 0;
+ TQListViewItem *pi = toParents.top();
+ TQListViewItem *ni = 0;
if ( pi )
- ni = new QListViewItem( pi, toLasts.top() );
+ ni = new TQListViewItem( pi, toLasts.top() );
else
- ni = new QListViewItem( to, toLasts.top() );
+ ni = new TQListViewItem( to, toLasts.top() );
for ( int c = 0; c < cols; ++c ) {
ni->setText( c, i->text( c ) );
if ( i->pixmap( c ) )
@@ -1710,12 +1710,12 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to )
fromParents.push( fromLast );
toParents.push( toLasts.top() );
toLasts.push( 0 );
- QListViewItem *pi = toParents.top();
- QListViewItem *ni = 0;
+ TQListViewItem *pi = toParents.top();
+ TQListViewItem *ni = 0;
if ( pi )
- ni = new QListViewItem( pi );
+ ni = new TQListViewItem( pi );
else
- ni = new QListViewItem( to );
+ ni = new TQListViewItem( to );
for ( int c = 0; c < cols; ++c ) {
ni->setText( c, i->text( c ) );
if ( i->pixmap( c ) )
@@ -1732,12 +1732,12 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to )
toLasts.pop();
}
- QListViewItem *pi = toParents.top();
- QListViewItem *ni = 0;
+ TQListViewItem *pi = toParents.top();
+ TQListViewItem *ni = 0;
if ( pi )
- ni = new QListViewItem( pi, toLasts.top() );
+ ni = new TQListViewItem( pi, toLasts.top() );
else
- ni = new QListViewItem( to, toLasts.top() );
+ ni = new TQListViewItem( to, toLasts.top() );
for ( int c = 0; c < cols; ++c ) {
ni->setText( c, i->text( c ) );
if ( i->pixmap( c ) )
@@ -1757,8 +1757,8 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to )
// ------------------------------------------------------------
-PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const QString &n, FormWindow *fw,
- QTextEdit *mle, const QString &txt )
+PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw,
+ TQTextEdit *mle, const TQString &txt )
: Command( n, fw ), newText( txt ), mlined( mle )
{
oldText = mlined->text();
@@ -1781,14 +1781,14 @@ void PopulateMultiLineEditCommand::unexecute()
// ------------------------------------------------------------
-PopulateTableCommand::PopulateTableCommand( const QString &n, FormWindow *fw, QTable *t,
- const QValueList<Row> &rows,
- const QValueList<Column> &columns )
+PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t,
+ const TQValueList<Row> &rows,
+ const TQValueList<Column> &columns )
: Command( n, fw ), newRows( rows ), newColumns( columns ), table( t )
{
#ifndef QT_NO_TABLE
int i = 0;
- QMap<QString, QString> columnFields = MetaDataBase::columnFields( table );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
PopulateTableCommand::Column col;
col.text = table->horizontalHeader()->label( i );
@@ -1810,10 +1810,10 @@ PopulateTableCommand::PopulateTableCommand( const QString &n, FormWindow *fw, QT
void PopulateTableCommand::execute()
{
#ifndef QT_NO_TABLE
- QMap<QString, QString> columnFields;
+ TQMap<TQString, TQString> columnFields;
table->setNumCols( newColumns.count() );
int i = 0;
- for ( QValueList<Column>::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) {
+ for ( TQValueList<Column>::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) {
table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text );
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
@@ -1821,7 +1821,7 @@ void PopulateTableCommand::execute()
MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( newRows.count() );
i = 0;
- for ( QValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i )
+ for ( TQValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i )
table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text );
#endif
}
@@ -1829,10 +1829,10 @@ void PopulateTableCommand::execute()
void PopulateTableCommand::unexecute()
{
#ifndef QT_NO_TABLE
- QMap<QString, QString> columnFields;
+ TQMap<TQString, TQString> columnFields;
table->setNumCols( oldColumns.count() );
int i = 0;
- for ( QValueList<Column>::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) {
+ for ( TQValueList<Column>::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) {
table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text );
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
@@ -1840,15 +1840,15 @@ void PopulateTableCommand::unexecute()
MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( oldRows.count() );
i = 0;
- for ( QValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
+ for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text );
#endif
}
// ------------------------------------------------------------
-AddActionToToolBarCommand::AddActionToToolBarCommand( const QString &n, FormWindow *fw,
- QAction *a, QDesignerToolBar *tb, int idx )
+AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw,
+ TQAction *a, QDesignerToolBar *tb, int idx )
: Command( n, fw ), action( a ), toolBar( tb ), index( idx )
{
}
@@ -1858,9 +1858,9 @@ void AddActionToToolBarCommand::execute()
action->addTo( toolBar );
if ( ::qt_cast<QDesignerAction*>(action) ) {
- QString s = ( (QDesignerAction*)action )->widget()->name();
+ TQString s = ( (QDesignerAction*)action )->widget()->name();
if ( s.startsWith( "qt_dead_widget_" ) ) {
- s.remove( 0, QString( "qt_dead_widget_" ).length() );
+ s.remove( 0, TQString( "qt_dead_widget_" ).length() );
( (QDesignerAction*)action )->widget()->setName( s );
}
toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
@@ -1874,21 +1874,21 @@ void AddActionToToolBarCommand::execute()
toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
}
- if ( !::qt_cast<QActionGroup*>(action) || ( (QActionGroup*)action )->usesDropDown()) {
+ if ( !::qt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( index == -1 )
toolBar->appendAction( action );
else
toolBar->insertAction( index, action );
toolBar->reInsert();
- QObject::connect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
} else {
if ( action->children() ) {
- QObjectListIt it( *action->children() );
+ TQObjectListIt it( *action->children() );
int i = 0;
while ( it.current() ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
- if ( !::qt_cast<QAction*>(o) )
+ if ( !::qt_cast<TQAction*>(o) )
continue;
// ### fix it for nested actiongroups
if ( ::qt_cast<QDesignerAction*>(o) ) {
@@ -1900,11 +1900,11 @@ void AddActionToToolBarCommand::execute()
else
toolBar->insertAction( index + (i++), ac );
}
- QObject::connect( o, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
+ TQObject::connect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
}
}
toolBar->reInsert();
- QObject::connect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
}
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -1912,29 +1912,29 @@ void AddActionToToolBarCommand::execute()
void AddActionToToolBarCommand::unexecute()
{
if ( ::qt_cast<QDesignerAction*>(action) ) {
- QString s = ( (QDesignerAction*)action )->widget()->name();
+ TQString s = ( (QDesignerAction*)action )->widget()->name();
s.prepend( "qt_dead_widget_" );
( (QDesignerAction*)action )->widget()->setName( s );
}
toolBar->removeAction( action );
action->removeFrom( toolBar );
- QObject::disconnect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
- if ( !::qt_cast<QActionGroup*>(action) || ( (QActionGroup*)action )->usesDropDown()) {
+ TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ if ( !::qt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( toolBar );
} else {
if ( action->children() ) {
- QObjectListIt it( *action->children() );
+ TQObjectListIt it( *action->children() );
while ( it.current() ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
- if ( !::qt_cast<QAction*>(o) )
+ if ( !::qt_cast<TQAction*>(o) )
continue;
if ( ::qt_cast<QDesignerAction*>(o) ) {
o->removeEventFilter( toolBar );
- toolBar->removeAction( (QAction*)o );
+ toolBar->removeAction( (TQAction*)o );
}
- QObject::disconnect( o, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
+ TQObject::disconnect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
}
}
}
@@ -1943,7 +1943,7 @@ void AddActionToToolBarCommand::unexecute()
// ------------------------------------------------------------
-AddToolBarCommand::AddToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw )
+AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw )
: Command( n, fw ), toolBar( 0 ), mainWindow( mw )
{
}
@@ -1952,14 +1952,14 @@ void AddToolBarCommand::execute()
{
if ( !toolBar ) {
toolBar = new QDesignerToolBar( mainWindow );
- QString n = "Toolbar";
+ TQString n = "Toolbar";
formWindow()->unify( toolBar, n, TRUE );
toolBar->setName( n );
mainWindow->addToolBar( toolBar, n );
} else {
toolBar->show();
- QString s = toolBar->name();
- s.remove( 0, QString( "qt_dead_widget_" ).length() );
+ TQString s = toolBar->name();
+ s.remove( 0, TQString( "qt_dead_widget_" ).length() );
toolBar->setName( s );
}
formWindow()->mainWindow()->objectHierarchy()->rebuild();
@@ -1968,7 +1968,7 @@ void AddToolBarCommand::execute()
void AddToolBarCommand::unexecute()
{
toolBar->hide();
- QString s = toolBar->name();
+ TQString s = toolBar->name();
s.prepend( "qt_dead_widget_" );
toolBar->setName( s );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
@@ -1977,8 +1977,8 @@ void AddToolBarCommand::unexecute()
// ------------------------------------------------------------
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
-AddContainerPageCommand::AddContainerPageCommand( const QString &n, FormWindow *fw,
- QWidget *c, const QString &label )
+AddContainerPageCommand::AddContainerPageCommand( const TQString &n, FormWindow *fw,
+ TQWidget *c, const TQString &label )
: Command( n, fw ), container( c ), index( -1 ), pageLabel( label ), page( 0 )
{
WidgetInterface *iface = 0;
@@ -2024,8 +2024,8 @@ void AddContainerPageCommand::unexecute()
// ------------------------------------------------------------
-DeleteContainerPageCommand::DeleteContainerPageCommand( const QString &n, FormWindow *fw,
- QWidget *c, int idx )
+DeleteContainerPageCommand::DeleteContainerPageCommand( const TQString &n, FormWindow *fw,
+ TQWidget *c, int idx )
: Command( n, fw ), container( c ), index( idx )
{
WidgetInterface *iface = 0;
@@ -2070,9 +2070,9 @@ void DeleteContainerPageCommand::unexecute()
// ------------------------------------------------------------
-RenameContainerPageCommand::RenameContainerPageCommand( const QString &n, FormWindow *fw,
- QWidget *c, int idx,
- const QString &label )
+RenameContainerPageCommand::RenameContainerPageCommand( const TQString &n, FormWindow *fw,
+ TQWidget *c, int idx,
+ const TQString &label )
: Command( n, fw ), container( c ), index( idx ), newLabel( label )
{
WidgetInterface *iface = 0;
@@ -2112,7 +2112,7 @@ void RenameContainerPageCommand::unexecute()
#endif // QT_CONTAINER_CUSTOM_WIDGETS
// ------------------------------------------------------------
-AddActionToPopupCommand::AddActionToPopupCommand( const QString &n,
+AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n,
FormWindow *fw,
PopupMenuEditor *m,
PopupMenuEditorItem *i,
@@ -2136,7 +2136,7 @@ void AddActionToPopupCommand::unexecute()
// ------------------------------------------------------------
-RemoveActionFromPopupCommand::RemoveActionFromPopupCommand( const QString &n,
+RemoveActionFromPopupCommand::RemoveActionFromPopupCommand( const TQString &n,
FormWindow *fw,
PopupMenuEditor *m,
int idx )
@@ -2157,7 +2157,7 @@ void RemoveActionFromPopupCommand::unexecute()
// ------------------------------------------------------------
-ExchangeActionInPopupCommand::ExchangeActionInPopupCommand( const QString &n,
+ExchangeActionInPopupCommand::ExchangeActionInPopupCommand( const TQString &n,
FormWindow *fw,
PopupMenuEditor *m,
int a,
@@ -2185,11 +2185,11 @@ ActionEditor *ActionCommand::actionEditor()
// ------------------------------------------------------------
-RenameActionCommand::RenameActionCommand( const QString &n,
+RenameActionCommand::RenameActionCommand( const TQString &n,
FormWindow *fw,
- QAction *a,
+ TQAction *a,
PopupMenuEditor *m,
- QString nm )
+ TQString nm )
: ActionCommand( n, fw, a ), menu( m ), newName( nm )
{
oldName = action->menuText();
@@ -2197,9 +2197,9 @@ RenameActionCommand::RenameActionCommand( const QString &n,
void RenameActionCommand::execute()
{
- QString actionText = newName;
+ TQString actionText = newName;
actionText.replace("&&", "&");
- QString menuText = newName;
+ TQString menuText = newName;
action->setText( actionText );
action->setMenuText( menuText );
@@ -2215,11 +2215,11 @@ void RenameActionCommand::unexecute()
// ------------------------------------------------------------
-SetActionIconsCommand::SetActionIconsCommand( const QString &n,
+SetActionIconsCommand::SetActionIconsCommand( const TQString &n,
FormWindow *fw,
- QAction *a,
+ TQAction *a,
PopupMenuEditor *m,
- QIconSet &icons )
+ TQIconSet &icons )
: ActionCommand( n, fw, a ), menu( m ), newIcons( icons )
{
oldIcons = a->iconSet();
@@ -2245,7 +2245,7 @@ void SetActionIconsCommand::unexecute()
// ------------------------------------------------------------
-AddMenuCommand::AddMenuCommand( const QString &n,
+AddMenuCommand::AddMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
MenuBarEditorItem *i,
@@ -2253,10 +2253,10 @@ AddMenuCommand::AddMenuCommand( const QString &n,
: Command( n, fw ), mb( b ), item( i ), name( 0 ), index( idx )
{ }
-AddMenuCommand::AddMenuCommand( const QString &n,
+AddMenuCommand::AddMenuCommand( const TQString &n,
FormWindow *fw,
- QMainWindow *mw,
- const QString &nm )
+ TQMainWindow *mw,
+ const TQString &nm )
: Command( n, fw ), mb( 0 ), item( 0 ), name( nm ), index( -1 )
{
if ( mw )
@@ -2265,8 +2265,8 @@ AddMenuCommand::AddMenuCommand( const QString &n,
void AddMenuCommand::execute()
{
- QString n;
- QMainWindow *mw = (QMainWindow*)formWindow()->mainContainer();
+ TQString n;
+ TQMainWindow *mw = (TQMainWindow*)formWindow()->mainContainer();
if ( !mb ) {
mb = new MenuBarEditor( formWindow(), mw );
mb->setName( "MenuBarEditor" );
@@ -2303,7 +2303,7 @@ void AddMenuCommand::unexecute()
// ------------------------------------------------------------
-RemoveMenuCommand::RemoveMenuCommand( const QString &n,
+RemoveMenuCommand::RemoveMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
int idx )
@@ -2325,7 +2325,7 @@ void RemoveMenuCommand::unexecute()
// ------------------------------------------------------------
-ExchangeMenuCommand::ExchangeMenuCommand( const QString &n,
+ExchangeMenuCommand::ExchangeMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
int i,
@@ -2345,7 +2345,7 @@ void ExchangeMenuCommand::unexecute()
// ------------------------------------------------------------
-MoveMenuCommand::MoveMenuCommand( const QString &n,
+MoveMenuCommand::MoveMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
int i,
@@ -2373,20 +2373,20 @@ void MoveMenuCommand::unexecute()
// ------------------------------------------------------------
-RenameMenuCommand::RenameMenuCommand( const QString &n,
+RenameMenuCommand::RenameMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
- QString nm,
+ TQString nm,
MenuBarEditorItem *i )
: Command( n, fw ), bar( b ), item( i ), newName( nm )
{
oldName = item->menu()->name();
}
-QString RenameMenuCommand::makeLegal( const QString &str )
+TQString RenameMenuCommand::makeLegal( const TQString &str )
{
// remove illegal characters
- QString d;
+ TQString d;
char c = 0, i = 0;
while ( !str.at(i).isNull() ) {
c = str.at(i).latin1();
@@ -2404,7 +2404,7 @@ void RenameMenuCommand::execute()
{
PopupMenuEditor *popup = item->menu();
item->setMenuText( newName );
- QString legal = makeLegal( newName );
+ TQString legal = makeLegal( newName );
formWindow()->unify( popup, legal, TRUE );
popup->setName( legal );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
@@ -2420,8 +2420,8 @@ void RenameMenuCommand::unexecute()
// ------------------------------------------------------------
-AddToolBoxPageCommand::AddToolBoxPageCommand( const QString &n, FormWindow *fw,
- QToolBox *tw, const QString &label )
+AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
+ TQToolBox *tw, const TQString &label )
: Command( n, fw ), toolBox( tw ), toolBoxLabel( label )
{
toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" );
@@ -2448,8 +2448,8 @@ void AddToolBoxPageCommand::unexecute()
// ------------------------------------------------------------
-DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const QString &n, FormWindow *fw,
- QToolBox *tw, QWidget *page )
+DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw,
+ TQToolBox *tw, TQWidget *page )
: Command( n, fw ), toolBox( tw ), toolBoxPage( page )
{
toolBoxLabel = toolBox->itemLabel( toolBox->currentIndex() );
diff --git a/kdevdesigner/designer/command.h b/kdevdesigner/designer/command.h
index ac5e9d5a..5aa1764f 100644
--- a/kdevdesigner/designer/command.h
+++ b/kdevdesigner/designer/command.h
@@ -30,15 +30,15 @@
#include "metadatabase.h"
#include "layout.h"
-#include <qstring.h>
-#include <qrect.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
-#include <qobject.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qiconset.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
+#include <tqobject.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqiconset.h>
class QWizard;
class QTabWidget;
@@ -65,7 +65,7 @@ class ActionEditor;
class Command : public Qt
{
public:
- Command( const QString &n, FormWindow *fw );
+ Command( const TQString &n, FormWindow *fw );
virtual ~Command();
enum Type {
@@ -131,7 +131,7 @@ public:
DeleteToolBoxPage
};
- QString name() const;
+ TQString name() const;
virtual void execute() = 0;
virtual void unexecute() = 0;
@@ -142,7 +142,7 @@ public:
FormWindow *formWindow() const;
private:
- QString cmdName;
+ TQString cmdName;
FormWindow *formWin;
};
@@ -168,11 +168,11 @@ public slots:
signals:
void undoRedoChanged( bool undoAvailable, bool redoAvailable,
- const QString &undoCmd, const QString &redoCmd );
+ const TQString &undoCmd, const TQString &redoCmd );
void modificationChanged( bool m );
private:
- QPtrList<Command> history;
+ TQPtrList<Command> history;
int current, steps;
bool modified;
int savedAt;
@@ -183,42 +183,42 @@ private:
class ResizeCommand : public Command
{
public:
- ResizeCommand( const QString &n, FormWindow *fw,
- QWidget *w, const QRect &oldr, const QRect &nr );
+ ResizeCommand( const TQString &n, FormWindow *fw,
+ TQWidget *w, const TQRect &oldr, const TQRect &nr );
void execute();
void unexecute();
Type type() const { return Resize; }
private:
- QWidget *widget;
- QRect oldRect, newRect;
+ TQWidget *widget;
+ TQRect oldRect, newRect;
};
class InsertCommand : public Command
{
public:
- InsertCommand( const QString &n, FormWindow *fw, QWidget *w, const QRect &g );
+ InsertCommand( const TQString &n, FormWindow *fw, TQWidget *w, const TQRect &g );
void execute();
void unexecute();
Type type() const { return Insert; }
private:
- QWidget *widget;
- QRect geometry;
+ TQWidget *widget;
+ TQRect geometry;
};
class MoveCommand : public Command
{
public:
- MoveCommand( const QString &n, FormWindow *fw,
- const QWidgetList &w,
- const QValueList<QPoint> op,
- const QValueList<QPoint> np,
- QWidget *opr, QWidget *npr );
+ MoveCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &w,
+ const TQValueList<TQPoint> op,
+ const TQValueList<TQPoint> np,
+ TQWidget *opr, TQWidget *npr );
void execute();
void unexecute();
Type type() const { return Move; }
@@ -226,35 +226,35 @@ public:
bool canMerge( Command *c );
private:
- QWidgetList widgets;
- QValueList<QPoint> oldPos, newPos;
- QWidget *oldParent, *newParent;
+ TQWidgetList widgets;
+ TQValueList<TQPoint> oldPos, newPos;
+ TQWidget *oldParent, *newParent;
};
class DeleteCommand : public Command
{
public:
- DeleteCommand( const QString &n, FormWindow *fw,
- const QWidgetList &w );
+ DeleteCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &w );
void execute();
void unexecute();
Type type() const { return Delete; }
private:
- QWidgetList widgets;
- QMap< QWidget*, QValueList<MetaDataBase::Connection> > connections;
+ TQWidgetList widgets;
+ TQMap< TQWidget*, TQValueList<MetaDataBase::Connection> > connections;
};
class SetPropertyCommand : public Command
{
public:
- SetPropertyCommand( const QString &n, FormWindow *fw,
- QObject *w, PropertyEditor *e,
- const QString &pn, const QVariant &ov,
- const QVariant &nv, const QString &ncut,
- const QString &ocut,
+ SetPropertyCommand( const TQString &n, FormWindow *fw,
+ TQObject *w, PropertyEditor *e,
+ const TQString &pn, const TQVariant &ov,
+ const TQVariant &nv, const TQString &ncut,
+ const TQString &ocut,
bool reset = FALSE );
void execute();
@@ -265,13 +265,13 @@ public:
bool checkProperty();
private:
- void setProperty( const QVariant &v, const QString &currentItemText, bool select = TRUE );
+ void setProperty( const TQVariant &v, const TQString &currentItemText, bool select = TRUE );
- QGuardedPtr<QObject> widget;
+ TQGuardedPtr<TQObject> widget;
PropertyEditor *editor;
- QString propName;
- QVariant oldValue, newValue;
- QString oldCurrentItemText, newCurrentItemText;
+ TQString propName;
+ TQVariant oldValue, newValue;
+ TQString oldCurrentItemText, newCurrentItemText;
bool wasChanged;
bool isResetCommand;
@@ -280,9 +280,9 @@ private:
class LayoutHorizontalCommand : public Command
{
public:
- LayoutHorizontalCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl );
+ LayoutHorizontalCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl );
void execute();
void unexecute();
@@ -296,9 +296,9 @@ private:
class LayoutHorizontalSplitCommand : public Command
{
public:
- LayoutHorizontalSplitCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl );
+ LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl );
void execute();
void unexecute();
@@ -312,9 +312,9 @@ private:
class LayoutVerticalCommand : public Command
{
public:
- LayoutVerticalCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl );
+ LayoutVerticalCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl );
void execute();
void unexecute();
@@ -328,9 +328,9 @@ private:
class LayoutVerticalSplitCommand : public Command
{
public:
- LayoutVerticalSplitCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl );
+ LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl );
void execute();
void unexecute();
@@ -344,9 +344,9 @@ private:
class LayoutGridCommand : public Command
{
public:
- LayoutGridCommand( const QString &n, FormWindow *fw,
- QWidget *parent, QWidget *layoutBase,
- const QWidgetList &wl, int xres, int yres );
+ LayoutGridCommand( const TQString &n, FormWindow *fw,
+ TQWidget *parent, TQWidget *layoutBase,
+ const TQWidgetList &wl, int xres, int yres );
void execute();
void unexecute();
@@ -360,8 +360,8 @@ private:
class BreakLayoutCommand : public Command
{
public:
- BreakLayoutCommand( const QString &n, FormWindow *fw,
- QWidget *layoutBase, const QWidgetList &wl );
+ BreakLayoutCommand( const TQString &n, FormWindow *fw,
+ TQWidget *layoutBase, const TQWidgetList &wl );
void execute();
void unexecute();
@@ -371,84 +371,84 @@ private:
Layout *layout;
int spacing;
int margin;
- QWidget *lb;
- QWidgetList widgets;
+ TQWidget *lb;
+ TQWidgetList widgets;
};
class MacroCommand : public Command
{
public:
- MacroCommand( const QString &n, FormWindow *fw,
- const QPtrList<Command> &cmds );
+ MacroCommand( const TQString &n, FormWindow *fw,
+ const TQPtrList<Command> &cmds );
void execute();
void unexecute();
Type type() const { return Macro; }
private:
- QPtrList<Command> commands;
+ TQPtrList<Command> commands;
};
class AddTabPageCommand : public Command
{
public:
- AddTabPageCommand( const QString &n, FormWindow *fw,
- QTabWidget *tw, const QString &label );
+ AddTabPageCommand( const TQString &n, FormWindow *fw,
+ TQTabWidget *tw, const TQString &label );
void execute();
void unexecute();
Type type() const { return AddTabPage; }
private:
- QTabWidget *tabWidget;
+ TQTabWidget *tabWidget;
int index;
- QWidget *tabPage;
- QString tabLabel;
+ TQWidget *tabPage;
+ TQString tabLabel;
};
class DeleteTabPageCommand : public Command
{
public:
- DeleteTabPageCommand( const QString &n, FormWindow *fw,
- QTabWidget *tw, QWidget *page );
+ DeleteTabPageCommand( const TQString &n, FormWindow *fw,
+ TQTabWidget *tw, TQWidget *page );
void execute();
void unexecute();
Type type() const { return DeleteTabPage; }
private:
- QTabWidget *tabWidget;
+ TQTabWidget *tabWidget;
int index;
- QWidget *tabPage;
- QString tabLabel;
+ TQWidget *tabPage;
+ TQString tabLabel;
};
class MoveTabPageCommand : public Command
{
public:
- MoveTabPageCommand(const QString &n, FormWindow *fw,
- QTabWidget *tw, QWidget *page, const QString& label, int nIndex, int oIndex );
+ MoveTabPageCommand(const TQString &n, FormWindow *fw,
+ TQTabWidget *tw, TQWidget *page, const TQString& label, int nIndex, int oIndex );
void execute();
void unexecute();
Type type() const { return MoveTabPage; }
private:
- QTabWidget *tabWidget;
+ TQTabWidget *tabWidget;
int newIndex, oldIndex;
- QWidget *tabPage;
- QString tabLabel;
+ TQWidget *tabPage;
+ TQString tabLabel;
};
class QDesignerWidgetStack;
class AddWidgetStackPageCommand : public Command
{
public:
- AddWidgetStackPageCommand( const QString &n, FormWindow *fw,
+ AddWidgetStackPageCommand( const TQString &n, FormWindow *fw,
QDesignerWidgetStack *ws );
void execute();
@@ -458,14 +458,14 @@ public:
private:
QDesignerWidgetStack *widgetStack;
int index;
- QWidget *stackPage;
+ TQWidget *stackPage;
};
class DeleteWidgetStackPageCommand : public Command
{
public:
- DeleteWidgetStackPageCommand( const QString &n, FormWindow *fw,
- QDesignerWidgetStack *ws, QWidget *page );
+ DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw,
+ QDesignerWidgetStack *ws, TQWidget *page );
void execute();
void unexecute();
@@ -474,7 +474,7 @@ public:
private:
QDesignerWidgetStack *widgetStack;
int index;
- QWidget *stackPage;
+ TQWidget *stackPage;
};
@@ -482,71 +482,71 @@ private:
class AddWizardPageCommand : public Command
{
public:
- AddWizardPageCommand( const QString &n, FormWindow *fw,
- QWizard *w, const QString &label, int index = -1, bool show = TRUE );
+ AddWizardPageCommand( const TQString &n, FormWindow *fw,
+ TQWizard *w, const TQString &label, int index = -1, bool show = TRUE );
void execute();
void unexecute();
Type type() const { return AddWizardPage; }
private:
- QWizard *wizard;
+ TQWizard *wizard;
int index;
bool show;
- QWidget *page;
- QString pageLabel;
+ TQWidget *page;
+ TQString pageLabel;
};
class DeleteWizardPageCommand : public Command
{
public:
- DeleteWizardPageCommand( const QString &n, FormWindow *fw,
- QWizard *w, int index, bool show = TRUE );
+ DeleteWizardPageCommand( const TQString &n, FormWindow *fw,
+ TQWizard *w, int index, bool show = TRUE );
void execute();
void unexecute();
Type type() const { return DeleteWizardPage; }
private:
- QWizard *wizard;
+ TQWizard *wizard;
int index;
bool show;
- QWidget *page;
- QString pageLabel;
+ TQWidget *page;
+ TQString pageLabel;
};
class RenameWizardPageCommand : public Command
{
public:
- RenameWizardPageCommand( const QString &n, FormWindow *fw,
- QWizard *w, int index, const QString& name );
+ RenameWizardPageCommand( const TQString &n, FormWindow *fw,
+ TQWizard *w, int index, const TQString& name );
void execute();
void unexecute();
Type type() const { return RenameWizardPage; }
private:
- QWizard *wizard;
+ TQWizard *wizard;
int index;
- QWidget *page;
- QString label;
+ TQWidget *page;
+ TQString label;
};
class SwapWizardPagesCommand : public Command
{
public:
- SwapWizardPagesCommand( const QString &n, FormWindow *fw,
- QWizard *w, int index1, int index2 );
+ SwapWizardPagesCommand( const TQString &n, FormWindow *fw,
+ TQWizard *w, int index1, int index2 );
void execute();
void unexecute();
Type type() const { return SwapWizardPages; }
private:
- QWizard *wizard;
+ TQWizard *wizard;
int index1, index2;
};
@@ -554,15 +554,15 @@ private:
class MoveWizardPageCommand : public Command
{
public:
- MoveWizardPageCommand( const QString &n, FormWindow *fw,
- QWizard *w, int index1, int index2 );
+ MoveWizardPageCommand( const TQString &n, FormWindow *fw,
+ TQWizard *w, int index1, int index2 );
void execute();
void unexecute();
Type type() const { return MoveWizardPage; }
private:
- QWizard *wizard;
+ TQWizard *wizard;
int index1, index2;
};
@@ -570,7 +570,7 @@ private:
class AddConnectionCommand : public Command
{
public:
- AddConnectionCommand( const QString &name, FormWindow *fw,
+ AddConnectionCommand( const TQString &name, FormWindow *fw,
MetaDataBase::Connection c );
void execute();
@@ -585,7 +585,7 @@ private:
class RemoveConnectionCommand : public Command
{
public:
- RemoveConnectionCommand( const QString &name, FormWindow *fw,
+ RemoveConnectionCommand( const TQString &name, FormWindow *fw,
MetaDataBase::Connection c );
void execute();
@@ -601,160 +601,160 @@ private:
class AddFunctionCommand : public Command
{
public:
- AddFunctionCommand( const QString &name, FormWindow *fw, const QCString &f, const QString& spec,
- const QString &a, const QString &t, const QString &l, const QString &rt );
+ AddFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, const TQString& spec,
+ const TQString &a, const TQString &t, const TQString &l, const TQString &rt );
void execute();
void unexecute();
Type type() const { return AddFunction; }
private:
- QCString function;
- QString specifier;
- QString access;
- QString functionType;
- QString language;
- QString returnType;
+ TQCString function;
+ TQString specifier;
+ TQString access;
+ TQString functionType;
+ TQString language;
+ TQString returnType;
};
class ChangeFunctionAttribCommand : public Command
{
public:
- ChangeFunctionAttribCommand( const QString &name, FormWindow *fw, MetaDataBase::Function f,
- const QString &on, const QString &os, const QString &oa,
- const QString &ot, const QString &ol, const QString &ort );
+ ChangeFunctionAttribCommand( const TQString &name, FormWindow *fw, MetaDataBase::Function f,
+ const TQString &on, const TQString &os, const TQString &oa,
+ const TQString &ot, const TQString &ol, const TQString &ort );
void execute();
void unexecute();
Type type() const { return ChangeFunctionAttrib; }
private:
- QString oldName, newName;
- QString oldSpec, newSpec;
- QString oldAccess, newAccess;
- QString oldType, newType;
- QString oldLang, newLang;
- QString oldReturnType, newReturnType;
+ TQString oldName, newName;
+ TQString oldSpec, newSpec;
+ TQString oldAccess, newAccess;
+ TQString oldType, newType;
+ TQString oldLang, newLang;
+ TQString oldReturnType, newReturnType;
};
class RemoveFunctionCommand : public Command
{
public:
- RemoveFunctionCommand( const QString &name, FormWindow *fw, const QCString &f, const QString& spec,
- const QString &a, const QString &t, const QString &l, const QString &rt );
+ RemoveFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, const TQString& spec,
+ const TQString &a, const TQString &t, const TQString &l, const TQString &rt );
void execute();
void unexecute();
Type type() const { return RemoveFunction; }
private:
- QCString function;
- QString specifier;
- QString access;
- QString functionType;
- QString language;
- QString returnType;
+ TQCString function;
+ TQString specifier;
+ TQString access;
+ TQString functionType;
+ TQString language;
+ TQString returnType;
};
class AddVariableCommand : public Command
{
public:
- AddVariableCommand( const QString &name, FormWindow *fw, const QString &vn, const QString &a );
+ AddVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn, const TQString &a );
void execute();
void unexecute();
Type type() const { return AddVariable; }
private:
- QString varName;
- QString access;
+ TQString varName;
+ TQString access;
};
class SetVariablesCommand : public Command
{
public:
- SetVariablesCommand( const QString &name, FormWindow *fw, QValueList<MetaDataBase::Variable> lst );
+ SetVariablesCommand( const TQString &name, FormWindow *fw, TQValueList<MetaDataBase::Variable> lst );
void execute();
void unexecute();
Type type() const { return SetVariables; }
private:
- QValueList<MetaDataBase::Variable> oldList, newList;
+ TQValueList<MetaDataBase::Variable> oldList, newList;
};
class RemoveVariableCommand : public Command
{
public:
- RemoveVariableCommand( const QString &name, FormWindow *fw, const QString &vn );
+ RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn );
void execute();
void unexecute();
Type type() const { return RemoveVariable; }
private:
- QString varName;
- QString access;
+ TQString varName;
+ TQString access;
};
class EditDefinitionsCommand : public Command
{
public:
- EditDefinitionsCommand( const QString &name, FormWindow *fw, LanguageInterface *lf,
- const QString &n, const QStringList &l );
+ EditDefinitionsCommand( const TQString &name, FormWindow *fw, LanguageInterface *lf,
+ const TQString &n, const TQStringList &l );
void execute();
void unexecute();
Type type() const { return EditDefinitions; }
private:
LanguageInterface *lIface;
- QString defName;
- QStringList newList, oldList;
+ TQString defName;
+ TQStringList newList, oldList;
};
class LowerCommand : public Command
{
public:
- LowerCommand( const QString &name, FormWindow *fw, const QWidgetList &w );
+ LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w );
void execute();
void unexecute();
Type type() const { return Lower; }
private:
- QWidgetList widgets;
+ TQWidgetList widgets;
};
class RaiseCommand : public Command
{
public:
- RaiseCommand( const QString &name, FormWindow *fw, const QWidgetList &w );
+ RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w );
void execute();
void unexecute();
Type type() const { return Raise; }
private:
- QWidgetList widgets;
+ TQWidgetList widgets;
};
class PasteCommand : public Command
{
public:
- PasteCommand( const QString &n, FormWindow *fw, const QWidgetList &w );
+ PasteCommand( const TQString &n, FormWindow *fw, const TQWidgetList &w );
void execute();
void unexecute();
Type type() const { return Paste; }
private:
- QWidgetList widgets;
+ TQWidgetList widgets;
};
class TabOrderCommand : public Command
{
public:
- TabOrderCommand( const QString &n, FormWindow *fw, const QWidgetList &ol, const QWidgetList &nl );
+ TabOrderCommand( const TQString &n, FormWindow *fw, const TQWidgetList &ol, const TQWidgetList &nl );
void execute();
void unexecute();
@@ -763,7 +763,7 @@ public:
bool canMerge( Command *c );
private:
- QWidgetList oldOrder, newOrder;
+ TQWidgetList oldOrder, newOrder;
};
@@ -772,13 +772,13 @@ class PopulateListBoxCommand : public Command
public:
struct Item
{
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
Q_DUMMY_COMPARISON_OPERATOR( Item )
};
- PopulateListBoxCommand( const QString &n, FormWindow *fw,
- QListBox *lb, const QValueList<Item> &items );
+ PopulateListBoxCommand( const TQString &n, FormWindow *fw,
+ TQListBox *lb, const TQValueList<Item> &items );
void execute();
void unexecute();
Type type() const { return PopulateListBox; }
@@ -786,8 +786,8 @@ public:
bool operator==( const PopulateListBoxCommand & ) const;
private:
- QValueList<Item> oldItems, newItems;
- QListBox *listbox;
+ TQValueList<Item> oldItems, newItems;
+ TQListBox *listbox;
};
@@ -796,13 +796,13 @@ class PopulateIconViewCommand : public Command
public:
struct Item
{
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
Q_DUMMY_COMPARISON_OPERATOR( Item )
};
- PopulateIconViewCommand( const QString &n, FormWindow *fw,
- QIconView *iv, const QValueList<Item> &items );
+ PopulateIconViewCommand( const TQString &n, FormWindow *fw,
+ TQIconView *iv, const TQValueList<Item> &items );
void execute();
void unexecute();
Type type() const { return PopulateIconView; }
@@ -810,41 +810,41 @@ public:
bool operator==( const PopulateIconViewCommand & ) const;
private:
- QValueList<Item> oldItems, newItems;
- QIconView *iconview;
+ TQValueList<Item> oldItems, newItems;
+ TQIconView *iconview;
};
class PopulateListViewCommand : public Command
{
public:
- PopulateListViewCommand( const QString &n, FormWindow *fw,
- QListView *lv, QListView *from );
+ PopulateListViewCommand( const TQString &n, FormWindow *fw,
+ TQListView *lv, TQListView *from );
void execute();
void unexecute();
Type type() const { return PopulateListView; }
- static void transferItems( QListView *from, QListView *to );
+ static void transferItems( TQListView *from, TQListView *to );
bool operator==( const PopulateListViewCommand & ) const;
private:
- QListView *oldItems, *newItems;
- QListView *listview;
+ TQListView *oldItems, *newItems;
+ TQListView *listview;
};
class PopulateMultiLineEditCommand : public Command
{
public:
- PopulateMultiLineEditCommand( const QString &n, FormWindow *fw,
- QTextEdit *mle, const QString &txt );
+ PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw,
+ TQTextEdit *mle, const TQString &txt );
void execute();
void unexecute();
Type type() const { return PopulateMultiLineEdit; }
private:
- QString newText, oldText;
- QTextEdit *mlined;
+ TQString newText, oldText;
+ TQTextEdit *mlined;
bool wasChanged;
};
@@ -854,46 +854,46 @@ class PopulateTableCommand : public Command
public:
struct Row
{
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
Q_DUMMY_COMPARISON_OPERATOR( Row )
};
struct Column
{
- QString text;
- QPixmap pix;
- QString field;
+ TQString text;
+ TQPixmap pix;
+ TQString field;
Q_DUMMY_COMPARISON_OPERATOR( Column )
};
- PopulateTableCommand( const QString &n, FormWindow *fw, QTable *t,
- const QValueList<Row> &rows,
- const QValueList<Column> &columns );
+ PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t,
+ const TQValueList<Row> &rows,
+ const TQValueList<Column> &columns );
void execute();
void unexecute();
Type type() const { return PopulateTable; }
private:
- QValueList<Row> oldRows, newRows;
- QValueList<Column> oldColumns, newColumns;
- QTable *table;
+ TQValueList<Row> oldRows, newRows;
+ TQValueList<Column> oldColumns, newColumns;
+ TQTable *table;
};
class AddActionToToolBarCommand : public Command
{
public:
- AddActionToToolBarCommand( const QString &n, FormWindow *fw,
- QAction *a, QDesignerToolBar *tb, int idx );
+ AddActionToToolBarCommand( const TQString &n, FormWindow *fw,
+ TQAction *a, QDesignerToolBar *tb, int idx );
void execute();
void unexecute();
Type type() const { return AddActionToToolBar; }
private:
- QAction *action;
+ TQAction *action;
QDesignerToolBar *toolBar;
int index;
@@ -902,8 +902,8 @@ private:
class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand
{
public:
- RemoveActionFromToolBarCommand( const QString &n, FormWindow *fw,
- QAction *a, QDesignerToolBar *tb, int idx )
+ RemoveActionFromToolBarCommand( const TQString &n, FormWindow *fw,
+ TQAction *a, QDesignerToolBar *tb, int idx )
: AddActionToToolBarCommand( n, fw, a, tb, idx ) {}
void execute() { AddActionToToolBarCommand::unexecute(); }
@@ -917,7 +917,7 @@ public:
class AddToolBarCommand : public Command
{
public:
- AddToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw );
+ AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw );
void execute();
void unexecute();
@@ -925,14 +925,14 @@ public:
protected:
QDesignerToolBar *toolBar;
- QMainWindow *mainWindow;
+ TQMainWindow *mainWindow;
};
class RemoveToolBarCommand : public AddToolBarCommand
{
public:
- RemoveToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw, QDesignerToolBar *tb )
+ RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, QDesignerToolBar *tb )
: AddToolBarCommand( n, fw, mw ) { toolBar = tb; }
void execute() { AddToolBarCommand::unexecute(); }
@@ -946,8 +946,8 @@ struct QWidgetContainerInterfacePrivate;
class AddContainerPageCommand : public Command
{
public:
- AddContainerPageCommand( const QString &n, FormWindow *fw,
- QWidget *c, const QString &label );
+ AddContainerPageCommand( const TQString &n, FormWindow *fw,
+ TQWidget *c, const TQString &label );
~AddContainerPageCommand();
@@ -956,11 +956,11 @@ public:
Type type() const { return AddContainerPage; }
private:
- QString wClassName;
- QWidget *container;
+ TQString wClassName;
+ TQWidget *container;
int index;
- QString pageLabel;
- QWidget *page;
+ TQString pageLabel;
+ TQWidget *page;
QWidgetContainerInterfacePrivate *wiface;
};
@@ -968,8 +968,8 @@ private:
class DeleteContainerPageCommand : public Command
{
public:
- DeleteContainerPageCommand( const QString &n, FormWindow *fw,
- QWidget *container, int index );
+ DeleteContainerPageCommand( const TQString &n, FormWindow *fw,
+ TQWidget *container, int index );
~DeleteContainerPageCommand();
void execute();
@@ -977,11 +977,11 @@ public:
Type type() const { return DeleteContainerPage; }
private:
- QString wClassName;
- QWidget *container;
+ TQString wClassName;
+ TQWidget *container;
int index;
- QString pageLabel;
- QWidget *page;
+ TQString pageLabel;
+ TQWidget *page;
QWidgetContainerInterfacePrivate *wiface;
};
@@ -989,9 +989,9 @@ private:
class RenameContainerPageCommand : public Command
{
public:
- RenameContainerPageCommand( const QString &n, FormWindow *fw,
- QWidget *container, int index,
- const QString &label );
+ RenameContainerPageCommand( const TQString &n, FormWindow *fw,
+ TQWidget *container, int index,
+ const TQString &label );
~RenameContainerPageCommand();
void execute();
@@ -999,10 +999,10 @@ public:
Type type() const { return RenameContainerPage; }
private:
- QString wClassName;
- QWidget *container;
+ TQString wClassName;
+ TQWidget *container;
int index;
- QString oldLabel, newLabel;
+ TQString oldLabel, newLabel;
QWidgetContainerInterfacePrivate *wiface;
};
@@ -1010,7 +1010,7 @@ private:
class AddActionToPopupCommand : public Command
{
public:
- AddActionToPopupCommand( const QString &n,
+ AddActionToPopupCommand( const TQString &n,
FormWindow *fw,
PopupMenuEditor *m,
PopupMenuEditorItem *i,
@@ -1019,7 +1019,7 @@ public:
void unexecute();
Type type() const { return AddActionToPopup; }
protected:
- QString constructName() const;
+ TQString constructName() const;
PopupMenuEditor *menu;
PopupMenuEditorItem *item;
int index;
@@ -1029,7 +1029,7 @@ private:
class RemoveActionFromPopupCommand : public AddActionToPopupCommand
{
public:
- RemoveActionFromPopupCommand( const QString &n,
+ RemoveActionFromPopupCommand( const TQString &n,
FormWindow *fw,
PopupMenuEditor *m,
int idx );
@@ -1043,7 +1043,7 @@ private:
class ExchangeActionInPopupCommand : public Command
{
public:
- ExchangeActionInPopupCommand( const QString &n,
+ ExchangeActionInPopupCommand( const TQString &n,
FormWindow *fw,
PopupMenuEditor *m,
int a,
@@ -1061,7 +1061,7 @@ private:
class MoveActionInPopupCommand : public Command
{
public:
- MoveActionInPopupCommand( const QString &n,
+ MoveActionInPopupCommand( const TQString &n,
FormWindow *fw,
PopupMenuEditor *m,
int a,
@@ -1079,41 +1079,41 @@ private:
class ActionCommand : public Command
{
public:
- ActionCommand( const QString &n,
+ ActionCommand( const TQString &n,
FormWindow *fw,
- QAction *a )
+ TQAction *a )
: Command( n, fw ), action( a ) { }
virtual Type type() const = 0;
protected:
ActionEditor *actionEditor();
- QAction *action;
+ TQAction *action;
};
class RenameActionCommand : public ActionCommand
{
public:
- RenameActionCommand( const QString &n,
+ RenameActionCommand( const TQString &n,
FormWindow *fw,
- QAction *a,
+ TQAction *a,
PopupMenuEditor *m,
- QString nm );
+ TQString nm );
void execute();
void unexecute();
Type type() const { return RenameAction; }
private:
PopupMenuEditor *menu;
- QString newName;
- QString oldName;
+ TQString newName;
+ TQString oldName;
};
class SetActionIconsCommand : public ActionCommand
{
public:
- SetActionIconsCommand( const QString &n,
+ SetActionIconsCommand( const TQString &n,
FormWindow *fw,
- QAction *a,
+ TQAction *a,
PopupMenuEditor *m,
- QIconSet &icons );
+ TQIconSet &icons );
void execute();
void unexecute();
Type type() const { return SetActionIcons; }
@@ -1121,23 +1121,23 @@ protected:
void updateActionEditorItem();
private:
PopupMenuEditor *menu;
- QIconSet newIcons;
- QIconSet oldIcons;
+ TQIconSet newIcons;
+ TQIconSet oldIcons;
};
class AddMenuCommand : public Command
{
public:
- AddMenuCommand( const QString &n,
+ AddMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
MenuBarEditorItem *i,
int idx = -1 );
- AddMenuCommand( const QString &n,
+ AddMenuCommand( const TQString &n,
FormWindow *fw,
- QMainWindow *mw,
- const QString &nm = "Menu" );
+ TQMainWindow *mw,
+ const TQString &nm = "Menu" );
void execute();
void unexecute();
@@ -1145,7 +1145,7 @@ public:
protected:
MenuBarEditor *mb;
MenuBarEditorItem *item;
- QString name;
+ TQString name;
int index;
private:
};
@@ -1153,7 +1153,7 @@ private:
class RemoveMenuCommand : public AddMenuCommand
{
public:
- RemoveMenuCommand( const QString &n,
+ RemoveMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
int idx );
@@ -1167,7 +1167,7 @@ private:
class ExchangeMenuCommand : public Command
{
public:
- ExchangeMenuCommand( const QString &n,
+ ExchangeMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
int i,
@@ -1186,7 +1186,7 @@ private:
class MoveMenuCommand : public Command
{
public:
- MoveMenuCommand( const QString &n,
+ MoveMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *b,
int i,
@@ -1204,55 +1204,55 @@ private:
class RenameMenuCommand : public Command
{
public:
- RenameMenuCommand( const QString &n,
+ RenameMenuCommand( const TQString &n,
FormWindow *fw,
MenuBarEditor *m,
- QString nm,
+ TQString nm,
MenuBarEditorItem *i );
void execute();
void unexecute();
Type type() const { return RenameMenu; }
- static QString makeLegal( const QString &str );
+ static TQString makeLegal( const TQString &str );
private:
MenuBarEditor *bar;
MenuBarEditorItem *item;
- QString newName;
- QString oldName;
+ TQString newName;
+ TQString oldName;
};
class AddToolBoxPageCommand : public Command
{
public:
- AddToolBoxPageCommand( const QString &n, FormWindow *fw,
- QToolBox *tw, const QString &label );
+ AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
+ TQToolBox *tw, const TQString &label );
void execute();
void unexecute();
Type type() const { return AddToolBoxPage; }
private:
- QToolBox *toolBox;
+ TQToolBox *toolBox;
int index;
- QWidget *toolBoxPage;
- QString toolBoxLabel;
+ TQWidget *toolBoxPage;
+ TQString toolBoxLabel;
};
class DeleteToolBoxPageCommand : public Command
{
public:
- DeleteToolBoxPageCommand( const QString &n, FormWindow *fw,
- QToolBox *tw, QWidget *page );
+ DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw,
+ TQToolBox *tw, TQWidget *page );
void execute();
void unexecute();
Type type() const { return DeleteToolBoxPage; }
private:
- QToolBox *toolBox;
+ TQToolBox *toolBox;
int index;
- QWidget *toolBoxPage;
- QString toolBoxLabel;
+ TQWidget *toolBoxPage;
+ TQString toolBoxLabel;
};
diff --git a/kdevdesigner/designer/configtoolboxdialog.ui.h b/kdevdesigner/designer/configtoolboxdialog.ui.h
index 6b5d55b6..0b176afc 100644
--- a/kdevdesigner/designer/configtoolboxdialog.ui.h
+++ b/kdevdesigner/designer/configtoolboxdialog.ui.h
@@ -27,7 +27,7 @@
#include "mainwindow.h"
#include "widgetaction.h"
#include "listviewdnd.h"
-#include <qlistview.h>
+#include <tqlistview.h>
void ConfigToolboxDialog::init()
{
@@ -40,31 +40,31 @@ void ConfigToolboxDialog::init()
ListViewDnd *commonDnd = new ListViewDnd( listViewCommon );
commonDnd->setDragMode( ListViewDnd::Both | ListViewDnd::Move | ListViewDnd::Flat );
- QObject::connect( toolsDnd, SIGNAL( dropped( QListViewItem * ) ),
- commonDnd, SLOT( confirmDrop( QListViewItem * ) ) );
- QObject::connect( commonDnd, SIGNAL( dropped( QListViewItem * ) ),
- commonDnd, SLOT( confirmDrop( QListViewItem * ) ) );
+ TQObject::connect( toolsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ),
+ commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) );
+ TQObject::connect( commonDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ),
+ commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) );
- QDict<QListViewItem> groups;
- QAction *a;
+ TQDict<TQListViewItem> groups;
+ TQAction *a;
for ( a = MainWindow::self->toolActions.last();
a;
a = MainWindow::self->toolActions.prev() ) {
- QString grp = ( (WidgetAction*)a )->group();
- QListViewItem *parent = groups.find( grp );
+ TQString grp = ( (WidgetAction*)a )->group();
+ TQListViewItem *parent = groups.find( grp );
if ( !parent ) {
- parent = new QListViewItem( listViewTools );
+ parent = new TQListViewItem( listViewTools );
parent->setText( 0, grp );
parent->setOpen( TRUE );
groups.insert( grp, parent );
}
- QListViewItem *i = new QListViewItem( parent );
+ TQListViewItem *i = new TQListViewItem( parent );
i->setText( 0, a->text() );
i->setPixmap( 0, a->iconSet().pixmap() );
}
for ( a = MainWindow::self->commonWidgetsPage.last(); a;
a = MainWindow::self->commonWidgetsPage.prev() ) {
- QListViewItem *i = new QListViewItem( listViewCommon );
+ TQListViewItem *i = new TQListViewItem( listViewCommon );
i->setText( 0, a->text() );
i->setPixmap( 0, a->iconSet().pixmap() );
}
@@ -74,12 +74,12 @@ void ConfigToolboxDialog::init()
void ConfigToolboxDialog::addTool()
{
- QListView *src = listViewTools;
+ TQListView *src = listViewTools;
bool addKids = FALSE;
- QListViewItem *nextSibling = 0;
- QListViewItem *nextParent = 0;
- QListViewItemIterator it = src->firstChild();
+ TQListViewItem *nextSibling = 0;
+ TQListViewItem *nextParent = 0;
+ TQListViewItemIterator it = src->firstChild();
for ( ; *it; it++ ) {
// Hit the nextSibling, turn of child processing
if ( (*it) == nextSibling )
@@ -88,7 +88,7 @@ void ConfigToolboxDialog::addTool()
if ( (*it)->isSelected() ) {
if ( (*it)->childCount() == 0 ) {
// Selected, no children
- QListViewItem *i = new QListViewItem( listViewCommon, listViewCommon->lastItem() );
+ TQListViewItem *i = new TQListViewItem( listViewCommon, listViewCommon->lastItem() );
i->setText( 0, (*it)->text(0) );
i->setPixmap( 0, *((*it)->pixmap(0)) );
listViewCommon->setCurrentItem( i );
@@ -107,7 +107,7 @@ void ConfigToolboxDialog::addTool()
}
} else if ( ((*it)->childCount() == 0) && addKids ) {
// Leaf node, and we _do_ process children
- QListViewItem *i = new QListViewItem( listViewCommon, listViewCommon->lastItem() );
+ TQListViewItem *i = new TQListViewItem( listViewCommon, listViewCommon->lastItem() );
i->setText( 0, (*it)->text(0) );
i->setPixmap( 0, *((*it)->pixmap(0)) );
listViewCommon->setCurrentItem( i );
@@ -119,7 +119,7 @@ void ConfigToolboxDialog::addTool()
void ConfigToolboxDialog::removeTool()
{
- QListViewItemIterator it = listViewCommon->firstChild();
+ TQListViewItemIterator it = listViewCommon->firstChild();
while ( *it ) {
if ( (*it)->isSelected() )
delete (*it);
@@ -131,8 +131,8 @@ void ConfigToolboxDialog::removeTool()
void ConfigToolboxDialog::moveToolUp()
{
- QListViewItem *next = 0;
- QListViewItem *item = listViewCommon->firstChild();
+ TQListViewItem *next = 0;
+ TQListViewItem *item = listViewCommon->firstChild();
for ( int i = 0; i < listViewCommon->childCount(); ++i ) {
next = item->itemBelow();
if ( item->isSelected() && (i > 0) && !item->itemAbove()->isSelected() )
@@ -145,8 +145,8 @@ void ConfigToolboxDialog::moveToolUp()
void ConfigToolboxDialog::moveToolDown()
{
int count = listViewCommon->childCount();
- QListViewItem *next = 0;
- QListViewItem *item = listViewCommon->lastItem();
+ TQListViewItem *next = 0;
+ TQListViewItem *item = listViewCommon->lastItem();
for ( int i = 0; i < count; ++i ) {
next = item->itemAbove();
if ( item->isSelected() && (i > 0) && !item->itemBelow()->isSelected() )
@@ -154,7 +154,7 @@ void ConfigToolboxDialog::moveToolDown()
item = next;
}
- // QListViewItem *item = listViewCommon->firstChild();
+ // TQListViewItem *item = listViewCommon->firstChild();
// for ( int i = 0; i < listViewCommon->childCount(); ++i ) {
//if ( item == listViewCommon->currentItem() ) {
// item->moveItem( item->itemBelow() );
@@ -166,10 +166,10 @@ void ConfigToolboxDialog::moveToolDown()
}
-void ConfigToolboxDialog::currentToolChanged( QListViewItem *i )
+void ConfigToolboxDialog::currentToolChanged( TQListViewItem *i )
{
bool canAdd = FALSE;
- QListViewItemIterator it = listViewTools->firstChild();
+ TQListViewItemIterator it = listViewTools->firstChild();
for ( ; *it; it++ ) {
if ( (*it)->isSelected() ) {
canAdd = TRUE;
@@ -180,13 +180,13 @@ void ConfigToolboxDialog::currentToolChanged( QListViewItem *i )
}
-void ConfigToolboxDialog::currentCommonToolChanged( QListViewItem *i )
+void ConfigToolboxDialog::currentCommonToolChanged( TQListViewItem *i )
{
buttonUp->setEnabled( (bool) (i && i->itemAbove()) );
buttonDown->setEnabled( (bool) (i && i->itemBelow()) );
bool canRemove = FALSE;
- QListViewItemIterator it = listViewCommon->firstChild();
+ TQListViewItemIterator it = listViewCommon->firstChild();
for ( ; *it; it++ ) {
if ( (*it)->isSelected() ) {
canRemove = TRUE;
@@ -200,9 +200,9 @@ void ConfigToolboxDialog::currentCommonToolChanged( QListViewItem *i )
void ConfigToolboxDialog::ok()
{
MainWindow::self->commonWidgetsPage.clear();
- QListViewItem *item = listViewCommon->firstChild();
+ TQListViewItem *item = listViewCommon->firstChild();
for ( int j = 0; j < listViewCommon->childCount(); item = item->itemBelow(), ++j ) {
- QAction *a = 0;
+ TQAction *a = 0;
for ( a = MainWindow::self->toolActions.last();
a;
a = MainWindow::self->toolActions.prev() ) {
diff --git a/kdevdesigner/designer/connectiondialog.ui.h b/kdevdesigner/designer/connectiondialog.ui.h
index 3c6cd932..f8df4230 100644
--- a/kdevdesigner/designer/connectiondialog.ui.h
+++ b/kdevdesigner/designer/connectiondialog.ui.h
@@ -64,25 +64,25 @@ static const char * invalid_connection[] = {
" "
};
-static QPixmap *invalidConnection = 0;
-static QPixmap *validConnection = 0;
+static TQPixmap *invalidConnection = 0;
+static TQPixmap *validConnection = 0;
void ConnectionDialog::init()
{
- connect( connectionsTable, SIGNAL( currentChanged( int, int ) ),
- this, SLOT( updateEditSlotsButton() ) );
- connect( connectionsTable, SIGNAL( resorted() ),
- this, SLOT( updateConnectionContainers() ) );
+ connect( connectionsTable, TQT_SIGNAL( currentChanged( int, int ) ),
+ this, TQT_SLOT( updateEditSlotsButton() ) );
+ connect( connectionsTable, TQT_SIGNAL( resorted() ),
+ this, TQT_SLOT( updateConnectionContainers() ) );
buttonEditSlots->setEnabled( FALSE );
if ( !invalidConnection ) {
- invalidConnection = new QPixmap( invalid_connection );
- validConnection = new QPixmap( valid_connection );
+ invalidConnection = new TQPixmap( invalid_connection );
+ validConnection = new TQPixmap( valid_connection );
}
- QValueList<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( MainWindow::self->formWindow() );
- for ( QValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
+ for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
it != conns.end(); ++it ) {
ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver,
(*it).signal, (*it).slot );
@@ -96,13 +96,13 @@ void ConnectionDialog::init()
void ConnectionDialog::addConnection()
{
- addConnection( defaultSender, defaultReceiver, QString::null, QString::null );
+ addConnection( defaultSender, defaultReceiver, TQString::null, TQString::null );
ensureConnectionVisible();
}
-ConnectionContainer *ConnectionDialog::addConnection( QObject *sender, QObject *receiver,
- const QString &signal,
- const QString &slot )
+ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject *receiver,
+ const TQString &signal,
+ const TQString &slot )
{
connectionsTable->insertRows( connectionsTable->numRows() );
@@ -144,17 +144,17 @@ ConnectionContainer *ConnectionDialog::addConnection( QObject *sender, QObject *
re->setSlot( sl );
sl->setSlot( sl );
- connect( re, SIGNAL( currentReceiverChanged( QObject * ) ),
- this, SLOT( updateEditSlotsButton() ) );
+ connect( re, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ),
+ this, TQT_SLOT( updateEditSlotsButton() ) );
ConnectionContainer *c = new ConnectionContainer( this, se, si, re, sl, row );
connections.append( c );
- connect( c, SIGNAL( changed( ConnectionContainer * ) ),
- this, SLOT( updateConnectionState( ConnectionContainer * ) ) );
+ connect( c, TQT_SIGNAL( changed( ConnectionContainer * ) ),
+ this, TQT_SLOT( updateConnectionState( ConnectionContainer * ) ) );
connectionsTable->setCurrentCell( row, 0 );
- connectionsTable->verticalHeader()->setLabel( row, *invalidConnection, QString::null );
+ connectionsTable->verticalHeader()->setLabel( row, *invalidConnection, TQString::null );
if ( sender )
se->setSenderEx( sender );
@@ -178,19 +178,19 @@ void ConnectionDialog::updateConnectionState( ConnectionContainer *c )
c->repaint();
if ( c->isValid() )
connectionsTable->verticalHeader()->setLabel( c->row(),
- *validConnection, QString::null );
+ *validConnection, TQString::null );
else
connectionsTable->verticalHeader()->setLabel( c->row(),
- *invalidConnection, QString::null );
+ *invalidConnection, TQString::null );
}
void ConnectionDialog::okClicked()
{
- QValueList<MetaDataBase::Connection> oldConnections =
+ TQValueList<MetaDataBase::Connection> oldConnections =
MetaDataBase::connections( MainWindow::self->formWindow() );
- QPtrList<Command> newConnectionCmds;
- QPtrList<Command> oldConnectionCmds;
+ TQPtrList<Command> newConnectionCmds;
+ TQPtrList<Command> oldConnectionCmds;
for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) {
MetaDataBase::Connection conn;
@@ -214,9 +214,9 @@ void ConnectionDialog::okClicked()
}
- QValueList<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( MainWindow::self->formWindow() );
- for ( QValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
+ for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
it != conns.end(); ++it ) {
RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Signal/Slot "
"Connection" ),
@@ -231,7 +231,7 @@ void ConnectionDialog::okClicked()
MacroCommand *cmd2 = new MacroCommand( i18n( "Remove Signal/Slot Connections" ),
MainWindow::self->formWindow(),
oldConnectionCmds );
- QPtrList<Command> cmds;
+ TQPtrList<Command> cmds;
cmds.append( cmd2 );
cmds.append( cmd1 );
MacroCommand *cmd = new MacroCommand( i18n( "Edit Signal/Slot Connections" ),
@@ -269,14 +269,14 @@ void ConnectionDialog::editSlots()
connectionsTable->setCurrentCell( connectionsTable->currentRow(), 0 );
for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) {
if ( c->receiverItem()->currentText() !=
- QString( MainWindow::self->formWindow()->mainContainer()->name() ) )
+ TQString( MainWindow::self->formWindow()->mainContainer()->name() ) )
continue;
c->slotItem()->customSlotsChanged();
}
connectionsTable->setCurrentCell( connectionsTable->currentRow(), currentCol );
}
-void ConnectionDialog::setDefault( QObject *sender, QObject *receiver )
+void ConnectionDialog::setDefault( TQObject *sender, TQObject *receiver )
{
defaultSender = sender;
defaultReceiver = receiver;
@@ -291,13 +291,13 @@ void ConnectionDialog::updateEditSlotsButton()
if ( !c || !c->receiverItem() )
return;
buttonEditSlots->setEnabled( c->receiverItem()->currentText() ==
- QString( MainWindow::self->formWindow()->
+ TQString( MainWindow::self->formWindow()->
mainContainer()->name() ) );
}
void ConnectionDialog::updateConnectionContainers()
{
- QPtrList<ConnectionContainer> newContainers;
+ TQPtrList<ConnectionContainer> newContainers;
for ( int i = 0; i < connectionsTable->numRows(); ++i ) {
for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) {
if ( c->senderItem() == connectionsTable->item( i, 0 ) ) {
diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp
index 197eef65..9f1c3fa6 100644
--- a/kdevdesigner/designer/connectionitems.cpp
+++ b/kdevdesigner/designer/connectionitems.cpp
@@ -30,30 +30,30 @@
#include "metadatabase.h"
#include "widgetfactory.h"
#include "project.h"
-#include <qpainter.h>
-#include <qcombobox.h>
-#include <qmetaobject.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
-#include <qaction.h>
-#include <qdatabrowser.h>
+#include <tqpainter.h>
+#include <tqcombobox.h>
+#include <tqmetaobject.h>
+#include <tqcombobox.h>
+#include <tqlistbox.h>
+#include <tqaction.h>
+#include <tqdatabrowser.h>
static const char* const ignore_slots[] = {
"destroyed()",
- "setCaption(const QString&)",
- "setIcon(const QPixmap&)",
- "setIconText(const QString&)",
+ "setCaption(const TQString&)",
+ "setIcon(const TQPixmap&)",
+ "setIconText(const TQString&)",
"setMouseTracking(bool)",
"clearFocus()",
"setUpdatesEnabled(bool)",
"update()",
"update(int,int,int,int)",
- "update(const QRect&)",
+ "update(const TQRect&)",
"repaint()",
"repaint(bool)",
"repaint(int,int,int,int,bool)",
- "repaint(const QRect&,bool)",
- "repaint(const QRegion&,bool)",
+ "repaint(const TQRect&,bool)",
+ "repaint(const TQRegion&,bool)",
"show()",
"hide()",
"iconify()",
@@ -65,91 +65,91 @@ static const char* const ignore_slots[] = {
"constPolish()",
"raise()",
"lower()",
- "stackUnder(QWidget*)",
+ "stackUnder(TQWidget*)",
"move(int,int)",
- "move(const QPoint&)",
+ "move(const TQPoint&)",
"resize(int,int)",
- "resize(const QSize&)",
+ "resize(const TQSize&)",
"setGeometry(int,int,int,int)",
- "setGeometry(const QRect&)",
+ "setGeometry(const TQRect&)",
"focusProxyDestroyed()",
"showExtension(bool)",
"setUpLayout()",
- "showDockMenu(const QPoint&)",
+ "showDockMenu(const TQPoint&)",
"init()",
"destroy()",
"deleteLater()",
0
};
-ConnectionItem::ConnectionItem( QTable *table, FormWindow *fw )
- : QComboTableItem( table, QStringList(), FALSE ), formWindow( fw ), conn( 0 )
+ConnectionItem::ConnectionItem( TQTable *table, FormWindow *fw )
+ : TQComboTableItem( table, TQStringList(), FALSE ), formWindow( fw ), conn( 0 )
{
setReplaceable( FALSE );
}
-void ConnectionItem::senderChanged( QObject * )
+void ConnectionItem::senderChanged( TQObject * )
{
emit changed();
- QWidget *w = table()->cellWidget( row(), col() );
+ TQWidget *w = table()->cellWidget( row(), col() );
if ( w )
setContentFromEditor( w );
}
-void ConnectionItem::receiverChanged( QObject * )
+void ConnectionItem::receiverChanged( TQObject * )
{
emit changed();
- QWidget *w = table()->cellWidget( row(), col() );
+ TQWidget *w = table()->cellWidget( row(), col() );
if ( w )
setContentFromEditor( w );
}
-void ConnectionItem::signalChanged( const QString & )
+void ConnectionItem::signalChanged( const TQString & )
{
emit changed();
- QWidget *w = table()->cellWidget( row(), col() );
+ TQWidget *w = table()->cellWidget( row(), col() );
if ( w )
setContentFromEditor( w );
}
-void ConnectionItem::slotChanged( const QString & )
+void ConnectionItem::slotChanged( const TQString & )
{
emit changed();
- QWidget *w = table()->cellWidget( row(), col() );
+ TQWidget *w = table()->cellWidget( row(), col() );
if ( w )
setContentFromEditor( w );
}
void ConnectionItem::setSender( SenderItem *i )
{
- connect( i, SIGNAL( currentSenderChanged( QObject * ) ),
- this, SLOT( senderChanged( QObject * ) ) );
+ connect( i, TQT_SIGNAL( currentSenderChanged( TQObject * ) ),
+ this, TQT_SLOT( senderChanged( TQObject * ) ) );
}
void ConnectionItem::setReceiver( ReceiverItem *i )
{
- connect( i, SIGNAL( currentReceiverChanged( QObject * ) ),
- this, SLOT( receiverChanged( QObject * ) ) );
+ connect( i, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ),
+ this, TQT_SLOT( receiverChanged( TQObject * ) ) );
}
void ConnectionItem::setSignal( SignalItem *i )
{
- connect( i, SIGNAL( currentSignalChanged( const QString & ) ),
- this, SLOT( signalChanged( const QString & ) ) );
+ connect( i, TQT_SIGNAL( currentSignalChanged( const TQString & ) ),
+ this, TQT_SLOT( signalChanged( const TQString & ) ) );
}
void ConnectionItem::setSlot( SlotItem *i )
{
- connect( i, SIGNAL( currentSlotChanged( const QString & ) ),
- this, SLOT( slotChanged( const QString & ) ) );
+ connect( i, TQT_SIGNAL( currentSlotChanged( const TQString & ) ),
+ this, TQT_SLOT( slotChanged( const TQString & ) ) );
}
-void ConnectionItem::paint( QPainter *p, const QColorGroup &cg,
- const QRect &cr, bool selected )
+void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg,
+ const TQRect &cr, bool selected )
{
p->fillRect( 0, 0, cr.width(), cr.height(),
- selected ? cg.brush( QColorGroup::Highlight )
- : cg.brush( QColorGroup::Base ) );
+ selected ? cg.brush( TQColorGroup::Highlight )
+ : cg.brush( TQColorGroup::Base ) );
int w = cr.width();
int h = cr.height();
@@ -157,14 +157,14 @@ void ConnectionItem::paint( QPainter *p, const QColorGroup &cg,
int x = 0;
if ( currentText()[0] == '<' )
- p->setPen( QObject::red );
+ p->setPen( TQObject::red );
else if ( selected )
p->setPen( cg.highlightedText() );
else
p->setPen( cg.text() );
- QFont f( p->font() );
- QFont oldf( p->font() );
+ TQFont f( p->font() );
+ TQFont oldf( p->font() );
if ( conn && conn->isModified() ) {
f.setBold( TRUE );
p->setFont( f );
@@ -181,29 +181,29 @@ void ConnectionItem::setConnection( ConnectionContainer *c )
// ------------------------------------------------------------------
-static void appendChildActions( QAction *action, QStringList &lst )
+static void appendChildActions( TQAction *action, TQStringList &lst )
{
- QObjectListIt it( *action->children() );
+ TQObjectListIt it( *action->children() );
while ( it.current() ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
- if ( !::qt_cast<QAction*>(o) )
+ if ( !::qt_cast<TQAction*>(o) )
continue;
lst << o->name();
- if ( o->children() && ::qt_cast<QActionGroup*>(o) )
- appendChildActions( (QAction*)o, lst );
+ if ( o->children() && ::qt_cast<TQActionGroup*>(o) )
+ appendChildActions( (TQAction*)o, lst );
}
}
-static QStringList flatActions( const QPtrList<QAction> &l )
+static TQStringList flatActions( const TQPtrList<TQAction> &l )
{
- QStringList lst;
+ TQStringList lst;
- QPtrListIterator<QAction> it( l );
+ TQPtrListIterator<TQAction> it( l );
while ( it.current() ) {
- QAction *action = it.current();
+ TQAction *action = it.current();
lst << action->name();
- if ( action->children() && ::qt_cast<QActionGroup*>(action) )
+ if ( action->children() && ::qt_cast<TQActionGroup*>(action) )
appendChildActions( action, lst );
++it;
}
@@ -213,18 +213,18 @@ static QStringList flatActions( const QPtrList<QAction> &l )
// ------------------------------------------------------------------
-SenderItem::SenderItem( QTable *table, FormWindow *fw )
+SenderItem::SenderItem( TQTable *table, FormWindow *fw )
: ConnectionItem( table, fw )
{
- QStringList lst;
+ TQStringList lst;
- QPtrDictIterator<QWidget> it( *formWindow->widgets() );
+ TQPtrDictIterator<TQWidget> it( *formWindow->widgets() );
while ( it.current() ) {
if ( lst.find( it.current()->name() ) != lst.end() ) {
++it;
continue;
}
- if ( !QString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
+ if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
!::qt_cast<QLayoutWidget*>(it.current()) &&
!::qt_cast<Spacer*>(it.current()) &&
!::qt_cast<SizeHandle*>(it.current()) &&
@@ -241,24 +241,24 @@ SenderItem::SenderItem( QTable *table, FormWindow *fw )
setStringList( lst );
}
-QWidget *SenderItem::createEditor() const
+TQWidget *SenderItem::createEditor() const
{
- QComboBox *cb = (QComboBox*)ConnectionItem::createEditor();
+ TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor();
cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) );
- connect( cb, SIGNAL( activated( const QString & ) ),
- this, SLOT( senderChanged( const QString & ) ) );
+ connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( senderChanged( const TQString & ) ) );
return cb;
}
-void SenderItem::setSenderEx( QObject *sender )
+void SenderItem::setSenderEx( TQObject *sender )
{
setCurrentItem( sender->name() );
emit currentSenderChanged( sender );
}
-void SenderItem::senderChanged( const QString &sender )
+void SenderItem::senderChanged( const TQString &sender )
{
- QObject *o = formWindow->child( sender, "QObject" );
+ TQObject *o = formWindow->child( sender, "TQObject" );
if ( !o )
o = formWindow->findAction( sender );
if ( !o )
@@ -270,18 +270,18 @@ void SenderItem::senderChanged( const QString &sender )
// ------------------------------------------------------------------
-ReceiverItem::ReceiverItem( QTable *table, FormWindow *fw )
+ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw )
: ConnectionItem( table, fw )
{
- QStringList lst;
+ TQStringList lst;
- QPtrDictIterator<QWidget> it( *formWindow->widgets() );
+ TQPtrDictIterator<TQWidget> it( *formWindow->widgets() );
while ( it.current() ) {
if ( lst.find( it.current()->name() ) != lst.end() ) {
++it;
continue;
}
- if ( !QString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
+ if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
!::qt_cast<QLayoutWidget*>(it.current()) &&
!::qt_cast<Spacer*>(it.current()) &&
!::qt_cast<SizeHandle*>(it.current()) &&
@@ -298,24 +298,24 @@ ReceiverItem::ReceiverItem( QTable *table, FormWindow *fw )
setStringList( lst );
}
-QWidget *ReceiverItem::createEditor() const
+TQWidget *ReceiverItem::createEditor() const
{
- QComboBox *cb = (QComboBox*)ConnectionItem::createEditor();
+ TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor();
cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) );
- connect( cb, SIGNAL( activated( const QString & ) ),
- this, SLOT( receiverChanged( const QString & ) ) );
+ connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( receiverChanged( const TQString & ) ) );
return cb;
}
-void ReceiverItem::setReceiverEx( QObject *receiver )
+void ReceiverItem::setReceiverEx( TQObject *receiver )
{
setCurrentItem( receiver->name() );
emit currentReceiverChanged( receiver );
}
-void ReceiverItem::receiverChanged( const QString &receiver )
+void ReceiverItem::receiverChanged( const TQString &receiver )
{
- QObject *o = formWindow->child( receiver, "QObject" );
+ TQObject *o = formWindow->child( receiver, "TQObject" );
if ( !o )
o = formWindow->findAction( receiver );
if ( !o )
@@ -327,34 +327,34 @@ void ReceiverItem::receiverChanged( const QString &receiver )
// ------------------------------------------------------------------
-SignalItem::SignalItem( QTable *table, FormWindow *fw )
+SignalItem::SignalItem( TQTable *table, FormWindow *fw )
: ConnectionItem( table, fw )
{
- QStringList lst;
+ TQStringList lst;
lst << "<No Signal>";
lst.sort();
setStringList( lst );
}
-void SignalItem::senderChanged( QObject *sender )
+void SignalItem::senderChanged( TQObject *sender )
{
- QStrList sigs = sender->metaObject()->signalNames( TRUE );
+ TQStrList sigs = sender->metaObject()->signalNames( TRUE );
sigs.remove( "destroyed()" );
- sigs.remove( "destroyed(QObject*)" );
+ sigs.remove( "destroyed(TQObject*)" );
sigs.remove( "accessibilityChanged(int)" );
sigs.remove( "accessibilityChanged(int,int)" );
- QStringList lst = QStringList::fromStrList( sigs );
+ TQStringList lst = TQStringList::fromStrList( sigs );
if ( ::qt_cast<CustomWidget*>(sender) ) {
MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget();
- for ( QValueList<QCString>::Iterator it = w->lstSignals.begin();
+ for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin();
it != w->lstSignals.end(); ++it )
lst << MetaDataBase::normalizeFunction( *it );
}
if ( sender == formWindow->mainContainer() ) {
- QStringList extra = MetaDataBase::signalList( formWindow );
+ TQStringList extra = MetaDataBase::signalList( formWindow );
if ( !extra.isEmpty() )
lst += extra;
}
@@ -367,21 +367,21 @@ void SignalItem::senderChanged( QObject *sender )
ConnectionItem::senderChanged( sender );
}
-QWidget *SignalItem::createEditor() const
+TQWidget *SignalItem::createEditor() const
{
- QComboBox *cb = (QComboBox*)ConnectionItem::createEditor();
+ TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor();
cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) );
- connect( cb, SIGNAL( activated( const QString & ) ),
- this, SIGNAL( currentSignalChanged( const QString & ) ) );
+ connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SIGNAL( currentSignalChanged( const TQString & ) ) );
return cb;
}
// ------------------------------------------------------------------
-SlotItem::SlotItem( QTable *table, FormWindow *fw )
+SlotItem::SlotItem( TQTable *table, FormWindow *fw )
: ConnectionItem( table, fw )
{
- QStringList lst;
+ TQStringList lst;
lst << "<No Slot>";
lst.sort();
setStringList( lst );
@@ -390,14 +390,14 @@ SlotItem::SlotItem( QTable *table, FormWindow *fw )
lastSignal = "<No Signal>";
}
-void SlotItem::receiverChanged( QObject *receiver )
+void SlotItem::receiverChanged( TQObject *receiver )
{
lastReceiver = receiver;
updateSlotList();
ConnectionItem::receiverChanged( receiver );
}
-void SlotItem::signalChanged( const QString &signal )
+void SlotItem::signalChanged( const TQString &signal )
{
lastSignal = signal;
updateSlotList();
@@ -408,7 +408,7 @@ bool SlotItem::ignoreSlot( const char* slot ) const
{
#ifndef QT_NO_SQL
if ( qstrcmp( slot, "update()" ) == 0 &&
- ::qt_cast<QDataBrowser*>(lastReceiver) )
+ ::qt_cast<TQDataBrowser*>(lastReceiver) )
return FALSE;
#endif
@@ -417,14 +417,14 @@ bool SlotItem::ignoreSlot( const char* slot ) const
return TRUE;
}
- if ( !formWindow->isMainContainer( (QWidget*)lastReceiver ) ) {
+ if ( !formWindow->isMainContainer( (TQWidget*)lastReceiver ) ) {
if ( qstrcmp( slot, "close()" ) == 0 )
return TRUE;
}
if ( qstrcmp( slot, "setFocus()" ) == 0 )
if ( lastReceiver->isWidgetType() &&
- ( (QWidget*)lastReceiver )->focusPolicy() == QWidget::NoFocus )
+ ( (TQWidget*)lastReceiver )->focusPolicy() == TQWidget::NoFocus )
return TRUE;
return FALSE;
@@ -432,7 +432,7 @@ bool SlotItem::ignoreSlot( const char* slot ) const
void SlotItem::updateSlotList()
{
- QStringList lst;
+ TQStringList lst;
if ( !lastReceiver || lastSignal == "<No Signal>" ) {
lst << "<No Slot>";
lst.sort();
@@ -440,15 +440,15 @@ void SlotItem::updateSlotList()
return;
}
- QString signal = MetaDataBase::normalizeFunction( lastSignal );
+ TQString signal = MetaDataBase::normalizeFunction( lastSignal );
int n = lastReceiver->metaObject()->numSlots( TRUE );
- QStringList slts;
+ TQStringList slts;
for( int i = 0; i < n; ++i ) {
// accept only public slots. For the form window, also accept protected slots
const QMetaData* md = lastReceiver->metaObject()->slot( i, TRUE );
if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->access == QMetaData::Public) ||
- (formWindow->isMainContainer( (QWidget*)lastReceiver ) &&
+ (formWindow->isMainContainer( (TQWidget*)lastReceiver ) &&
lastReceiver->metaObject()->slot(i, TRUE)->access ==
QMetaData::Protected) ) &&
!ignoreSlot( md->name ) &&
@@ -460,12 +460,12 @@ void SlotItem::updateSlotList()
LanguageInterface *iface =
MetaDataBase::languageInterface( formWindow->project()->language() );
if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) {
- if ( formWindow->isMainContainer( (QWidget*)lastReceiver ) ) {
- QValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( formWindow );
+ if ( formWindow->isMainContainer( (TQWidget*)lastReceiver ) ) {
+ TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( formWindow );
if ( !moreSlots.isEmpty() ) {
- for ( QValueList<MetaDataBase::Function>::Iterator it = moreSlots.begin();
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = moreSlots.begin();
it != moreSlots.end(); ++it ) {
- QCString s = (*it).function;
+ TQCString s = (*it).function;
if ( !s.data() )
continue;
s = MetaDataBase::normalizeFunction( s );
@@ -480,9 +480,9 @@ void SlotItem::updateSlotList()
if ( ::qt_cast<CustomWidget*>(lastReceiver) ) {
MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget();
- for ( QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin();
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin();
it != w->lstSlots.end(); ++it ) {
- QCString s = (*it).function;
+ TQCString s = (*it).function;
if ( !s.data() )
continue;
s = MetaDataBase::normalizeFunction( s );
@@ -498,18 +498,18 @@ void SlotItem::updateSlotList()
setStringList( lst );
}
-QWidget *SlotItem::createEditor() const
+TQWidget *SlotItem::createEditor() const
{
- QComboBox *cb = (QComboBox*)ConnectionItem::createEditor();
+ TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor();
cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) );
- connect( cb, SIGNAL( activated( const QString & ) ),
- this, SIGNAL( currentSlotChanged( const QString & ) ) );
+ connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SIGNAL( currentSlotChanged( const TQString & ) ) );
return cb;
}
void SlotItem::customSlotsChanged()
{
- QString currSlot = currentText();
+ TQString currSlot = currentText();
updateSlotList();
setCurrentItem( "<No Slot>" );
setCurrentItem( currSlot );
diff --git a/kdevdesigner/designer/connectionitems.h b/kdevdesigner/designer/connectionitems.h
index 2442e475..2af42b6b 100644
--- a/kdevdesigner/designer/connectionitems.h
+++ b/kdevdesigner/designer/connectionitems.h
@@ -29,7 +29,7 @@
class FormWindow;
-#include <qtable.h>
+#include <tqtable.h>
class SenderItem;
class ReceiverItem;
@@ -38,16 +38,16 @@ class SlotItem;
class ConnectionContainer;
-class ConnectionItem : public QObject,
+class ConnectionItem : public TQObject,
public QComboTableItem
{
Q_OBJECT
public:
- ConnectionItem( QTable *table, FormWindow *fw );
+ ConnectionItem( TQTable *table, FormWindow *fw );
- void paint( QPainter *p, const QColorGroup &cg,
- const QRect &cr, bool selected );
+ void paint( TQPainter *p, const TQColorGroup &cg,
+ const TQRect &cr, bool selected );
void setSender( SenderItem *i );
void setReceiver( ReceiverItem *i );
@@ -56,10 +56,10 @@ public:
void setConnection( ConnectionContainer *c );
public slots:
- virtual void senderChanged( QObject *sender );
- virtual void receiverChanged( QObject *receiver );
- virtual void signalChanged( const QString &sig );
- virtual void slotChanged( const QString &slot );
+ virtual void senderChanged( TQObject *sender );
+ virtual void receiverChanged( TQObject *receiver );
+ virtual void signalChanged( const TQString &sig );
+ virtual void slotChanged( const TQString &slot );
signals:
void changed();
@@ -79,15 +79,15 @@ class SenderItem : public ConnectionItem
Q_OBJECT
public:
- SenderItem( QTable *table, FormWindow *fw );
- QWidget *createEditor() const;
- void setSenderEx( QObject *sender );
+ SenderItem( TQTable *table, FormWindow *fw );
+ TQWidget *createEditor() const;
+ void setSenderEx( TQObject *sender );
signals:
- void currentSenderChanged( QObject *sender );
+ void currentSenderChanged( TQObject *sender );
private slots:
- void senderChanged( const QString &sender );
+ void senderChanged( const TQString &sender );
};
@@ -98,15 +98,15 @@ class ReceiverItem : public ConnectionItem
Q_OBJECT
public:
- ReceiverItem( QTable *table, FormWindow *fw );
- QWidget *createEditor() const;
- void setReceiverEx( QObject *receiver );
+ ReceiverItem( TQTable *table, FormWindow *fw );
+ TQWidget *createEditor() const;
+ void setReceiverEx( TQObject *receiver );
signals:
- void currentReceiverChanged( QObject *receiver );
+ void currentReceiverChanged( TQObject *receiver );
private slots:
- void receiverChanged( const QString &receiver );
+ void receiverChanged( const TQString &receiver );
};
@@ -117,13 +117,13 @@ class SignalItem : public ConnectionItem
Q_OBJECT
public:
- SignalItem( QTable *table, FormWindow *fw );
+ SignalItem( TQTable *table, FormWindow *fw );
- void senderChanged( QObject *sender );
- QWidget *createEditor() const;
+ void senderChanged( TQObject *sender );
+ TQWidget *createEditor() const;
signals:
- void currentSignalChanged( const QString & );
+ void currentSignalChanged( const TQString & );
};
@@ -134,24 +134,24 @@ class SlotItem : public ConnectionItem
Q_OBJECT
public:
- SlotItem( QTable *table, FormWindow *fw );
+ SlotItem( TQTable *table, FormWindow *fw );
- void receiverChanged( QObject *receiver );
- void signalChanged( const QString &signal );
- QWidget *createEditor() const;
+ void receiverChanged( TQObject *receiver );
+ void signalChanged( const TQString &signal );
+ TQWidget *createEditor() const;
void customSlotsChanged();
signals:
- void currentSlotChanged( const QString & );
+ void currentSlotChanged( const TQString & );
private:
void updateSlotList();
bool ignoreSlot( const char* slot ) const;
private:
- QObject *lastReceiver;
- QString lastSignal;
+ TQObject *lastReceiver;
+ TQString lastSignal;
};
@@ -162,18 +162,18 @@ class ConnectionContainer : public QObject
Q_OBJECT
public:
- ConnectionContainer( QObject *parent, SenderItem *i1, SignalItem *i2,
+ ConnectionContainer( TQObject *parent, SenderItem *i1, SignalItem *i2,
ReceiverItem *i3, SlotItem *i4, int r )
- : QObject( parent ), mod( FALSE ), se( i1 ), si( i2 ),
+ : TQObject( parent ), mod( FALSE ), se( i1 ), si( i2 ),
re( i3 ), sl( i4 ), rw ( r ) {
i1->setConnection( this );
i2->setConnection( this );
i3->setConnection( this );
i4->setConnection( this );
- connect( i1, SIGNAL( changed() ), this, SLOT( somethingChanged() ) );
- connect( i2, SIGNAL( changed() ), this, SLOT( somethingChanged() ) );
- connect( i3, SIGNAL( changed() ), this, SLOT( somethingChanged() ) );
- connect( i4, SIGNAL( changed() ), this, SLOT( somethingChanged() ) );
+ connect( i1, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) );
+ connect( i2, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) );
+ connect( i3, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) );
+ connect( i4, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) );
}
bool isModified() const { return mod; }
diff --git a/kdevdesigner/designer/connectiontable.cpp b/kdevdesigner/designer/connectiontable.cpp
index 7fed1b07..3cfdb057 100644
--- a/kdevdesigner/designer/connectiontable.cpp
+++ b/kdevdesigner/designer/connectiontable.cpp
@@ -28,8 +28,8 @@
#include <klocale.h>
-ConnectionTable::ConnectionTable( QWidget *parent, const char *name )
- : QTable( 0, 4, parent, name )
+ConnectionTable::ConnectionTable( TQWidget *parent, const char *name )
+ : TQTable( 0, 4, parent, name )
{
setSorting( TRUE );
setShowGrid( FALSE );
@@ -50,7 +50,7 @@ void ConnectionTable::sortColumn( int col, bool ascending, bool )
horizontalHeader()->setSortIndicator( col, ascending );
if ( isEditing() )
endEdit( currEditRow(), currEditCol(), FALSE, FALSE );
- QTable::sortColumn( col, ascending, TRUE );
+ TQTable::sortColumn( col, ascending, TRUE );
setCurrentCell( 0, 0 );
emit resorted();
}
diff --git a/kdevdesigner/designer/connectiontable.h b/kdevdesigner/designer/connectiontable.h
index 288b544f..4db4bf51 100644
--- a/kdevdesigner/designer/connectiontable.h
+++ b/kdevdesigner/designer/connectiontable.h
@@ -27,14 +27,14 @@
#ifndef CONNECTIONTABLE_H
#define CONNECTIONTABLE_H
-#include <qtable.h>
+#include <tqtable.h>
class ConnectionTable : public QTable
{
Q_OBJECT
public:
- ConnectionTable( QWidget *parent, const char *name );
+ ConnectionTable( TQWidget *parent, const char *name );
void sortColumn( int col, bool ascending, bool wholeRows );
diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp
index dc0ed1a8..99fa00fd 100644
--- a/kdevdesigner/designer/customwidgeteditorimpl.cpp
+++ b/kdevdesigner/designer/customwidgeteditorimpl.cpp
@@ -36,32 +36,32 @@
#include <kfiledialog.h>
#include <klineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qlistview.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qtextcodec.h>
-#include <qcheckbox.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqfiledialog.h>
+#include <tqmessagebox.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
+#include <tqlistview.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqtextcodec.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-CustomWidgetEditor::CustomWidgetEditor( QWidget *parent, MainWindow *mw )
+CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw )
: CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw )
{
- connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
- checkTimer = new QTimer( this );
- connect( checkTimer, SIGNAL( timeout() ),
- this, SLOT( checkWidgetName() ) );
+ connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ checkTimer = new TQTimer( this );
+ connect( checkTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( checkWidgetName() ) );
editClass->setEnabled( FALSE );
editHeader->setEnabled( FALSE );
@@ -73,7 +73,7 @@ CustomWidgetEditor::CustomWidgetEditor( QWidget *parent, MainWindow *mw )
sizeVer->setEnabled( FALSE );
checkContainer->setEnabled( FALSE );
localGlobalCombo->setEnabled( FALSE );
- editClass->setValidator( new AsciiValidator( QString(":"), editClass ) );
+ editClass->setValidator( new AsciiValidator( TQString(":"), editClass ) );
editSignal->setValidator( new AsciiValidator( TRUE, editSignal ) );
editSlot->setValidator( new AsciiValidator( TRUE, editSignal ) );
editProperty->setValidator( new AsciiValidator( editSignal ) );
@@ -88,13 +88,13 @@ CustomWidgetEditor::CustomWidgetEditor( QWidget *parent, MainWindow *mw )
void CustomWidgetEditor::setupDefinition()
{
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
- QListBoxItem *i;
+ TQListBoxItem *i;
if ( w->pixmap )
- i = new QListBoxPixmap( boxWidgets, *w->pixmap, w->className );
+ i = new TQListBoxPixmap( boxWidgets, *w->pixmap, w->className );
else
- i = new QListBoxText( boxWidgets, w->className );
+ i = new TQListBoxText( boxWidgets, w->className );
customWidgets.insert( i, w );
}
@@ -113,8 +113,8 @@ void CustomWidgetEditor::setupSignals()
if ( !w )
return;
listSignals->clear();
- for ( QValueList<QCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
- listSignals->insertItem( QString( *it ) );
+ for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ listSignals->insertItem( TQString( *it ) );
if ( listSignals->firstItem() ) {
listSignals->setCurrentItem( listSignals->firstItem() );
listSignals->setSelected( listSignals->firstItem(), TRUE );
@@ -131,8 +131,8 @@ void CustomWidgetEditor::setupSlots()
if ( !w )
return;
listSlots->clear();
- for ( QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
- (void)new QListViewItem( listSlots, (*it).function, (*it).access );
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ (void)new TQListViewItem( listSlots, (*it).function, (*it).access );
if ( listSlots->firstChild() ) {
listSlots->setCurrentItem( listSlots->firstChild() );
@@ -150,8 +150,8 @@ void CustomWidgetEditor::setupProperties()
if ( !w )
return;
listProperties->clear();
- for ( QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
- (void)new QListViewItem( listProperties, (*it).property, (*it).type );
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
+ (void)new TQListViewItem( listProperties, (*it).property, (*it).type );
if ( listProperties->firstChild() ) {
listProperties->setCurrentItem( listProperties->firstChild() );
@@ -159,7 +159,7 @@ void CustomWidgetEditor::setupProperties()
}
}
-void CustomWidgetEditor::currentWidgetChanged( QListBoxItem *i )
+void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i )
{
checkTimer->stop();
checkWidgetName();
@@ -217,25 +217,25 @@ void CustomWidgetEditor::addWidgetClicked()
checkWidgetName();
MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget;
- QString s = w->className;
+ TQString s = w->className;
if ( !MetaDataBase::addCustomWidget( w ) ) {
- QMessageBox::information( this, i18n( "Adding Custom Widget" ),
+ TQMessageBox::information( this, i18n( "Adding Custom Widget" ),
i18n( "Custom widget names must be unique.\n"
"A custom widget called '%1' already exists, so it is not possible "
"to add another widget with this name." ).arg( s ) );
return;
}
- QListBoxPixmap *i = new QListBoxPixmap( boxWidgets, *w->pixmap, w->className );
+ TQListBoxPixmap *i = new TQListBoxPixmap( boxWidgets, *w->pixmap, w->className );
customWidgets.insert( i, w );
boxWidgets->setCurrentItem( i );
boxWidgets->setSelected( i, TRUE );
}
-void CustomWidgetEditor::classNameChanged( const QString &s )
+void CustomWidgetEditor::classNameChanged( const TQString &s )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -246,7 +246,7 @@ void CustomWidgetEditor::classNameChanged( const QString &s )
boxWidgets->blockSignals( TRUE );
oldName = w->className;
w->className = s;
- QListBoxItem *old = i;
+ TQListBoxItem *old = i;
if ( w->pixmap )
boxWidgets->changeItem( *w->pixmap, s, boxWidgets->currentItem() );
else
@@ -265,11 +265,11 @@ void CustomWidgetEditor::deleteWidgetClicked()
checkTimer->stop();
checkWidgetName();
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( mainWindow->isCustomWidgetUsed( w ) ) {
- QMessageBox::information( mainWindow, i18n( "Removing Custom Widget" ),
+ TQMessageBox::information( mainWindow, i18n( "Removing Custom Widget" ),
i18n( "The custom widget '%1' is in use, so it cannot be removed." ).
arg( w->className ) );
return;
@@ -293,9 +293,9 @@ void CustomWidgetEditor::deleteWidgetClicked()
}
}
-void CustomWidgetEditor::headerFileChanged( const QString &s )
+void CustomWidgetEditor::headerFileChanged( const TQString &s )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -305,7 +305,7 @@ void CustomWidgetEditor::headerFileChanged( const QString &s )
void CustomWidgetEditor::heightChanged( int h )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -316,7 +316,7 @@ void CustomWidgetEditor::heightChanged( int h )
void CustomWidgetEditor::includePolicyChanged( int p )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -326,19 +326,19 @@ void CustomWidgetEditor::includePolicyChanged( int p )
void CustomWidgetEditor::pixmapChoosen()
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
- QPixmap pix = qChoosePixmap( this );
+ TQPixmap pix = qChoosePixmap( this );
if ( pix.isNull() )
return;
delete w->pixmap;
- w->pixmap = new QPixmap( pix );
+ w->pixmap = new TQPixmap( pix );
boxWidgets->blockSignals( TRUE );
- QListBoxItem *old = i;
+ TQListBoxItem *old = i;
boxWidgets->changeItem( *w->pixmap, w->className, boxWidgets->currentItem() );
i = boxWidgets->item( boxWidgets->currentItem() );
customWidgets.insert( i, w );
@@ -349,7 +349,7 @@ void CustomWidgetEditor::pixmapChoosen()
void CustomWidgetEditor::widthChanged( int wid )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -358,12 +358,12 @@ void CustomWidgetEditor::widthChanged( int wid )
updateCustomWidgetSizes();
}
-MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( QListBoxItem *i )
+MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( TQListBoxItem *i )
{
if ( !i )
return 0;
- QMap<QListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.find( i );
+ TQMap<TQListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.find( i );
if ( it == customWidgets.end() )
return 0;
return *it;
@@ -371,12 +371,12 @@ MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( QListBoxItem *i )
void CustomWidgetEditor::chooseHeader()
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
- QString h = KFileDialog::getOpenFileName( QString::null, i18n( "*.h *.h++ *.hxx *.hh|Header Files" ), this );
+ TQString h = KFileDialog::getOpenFileName( TQString::null, i18n( "*.h *.h++ *.hxx *.hh|Header Files" ), this );
if ( h.isEmpty() )
return;
editHeader->setText( h );
@@ -385,16 +385,16 @@ void CustomWidgetEditor::chooseHeader()
void CustomWidgetEditor::checkWidgetName()
{
- QListBoxItem *i = oldItem ? oldItem : boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = oldItem ? oldItem : boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
oldItem = 0;
if ( !i || !w )
return;
if ( MetaDataBase::isWidgetNameUsed( w ) ) {
- QString s = w->className;
+ TQString s = w->className;
w->className = oldName;
- QMessageBox::information( this, i18n( "Renaming Custom Widget" ),
+ TQMessageBox::information( this, i18n( "Renaming Custom Widget" ),
i18n( "Custom widget names must be unique.\n"
"A custom widget called '%1' already exists, so it is not possible "
"to rename this widget with this name." ).arg( s ) );
@@ -415,7 +415,7 @@ void CustomWidgetEditor::closeClicked()
accept();
}
-void CustomWidgetEditor::currentSignalChanged( QListBoxItem *i )
+void CustomWidgetEditor::currentSignalChanged( TQListBoxItem *i )
{
editSignal->blockSignals( TRUE );
editSignal->setText( "" );
@@ -436,7 +436,7 @@ void CustomWidgetEditor::currentSignalChanged( QListBoxItem *i )
void CustomWidgetEditor::addSignal()
{
- QListBoxItem *i = new QListBoxText( listSignals, "signal()" );
+ TQListBoxItem *i = new TQListBoxText( listSignals, "signal()" );
listSignals->setCurrentItem( i );
listSignals->setSelected( i, TRUE );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
@@ -446,7 +446,7 @@ void CustomWidgetEditor::addSignal()
void CustomWidgetEditor::removeSignal()
{
- QString s = listSignals->currentText();
+ TQString s = listSignals->currentText();
delete listSignals->item( listSignals->currentItem() );
if ( listSignals->currentItem() != -1 )
listSignals->setSelected( listSignals->currentItem(), TRUE );
@@ -455,13 +455,13 @@ void CustomWidgetEditor::removeSignal()
w->lstSignals.remove( s.latin1() );
}
-void CustomWidgetEditor::signalNameChanged( const QString &s )
+void CustomWidgetEditor::signalNameChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || listSignals->currentItem() == -1 )
return;
- QValueList<QCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() );
+ TQValueList<TQCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() );
if ( it != w->lstSignals.end() )
w->lstSignals.remove( it );
listSignals->blockSignals( TRUE );
@@ -470,7 +470,7 @@ void CustomWidgetEditor::signalNameChanged( const QString &s )
w->lstSignals.append( s.latin1() );
}
-void CustomWidgetEditor::slotAccessChanged( const QString &s )
+void CustomWidgetEditor::slotAccessChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || !listSlots->currentItem() )
@@ -479,7 +479,7 @@ void CustomWidgetEditor::slotAccessChanged( const QString &s )
MetaDataBase::Function slot;
slot.function = listSlots->currentItem()->text( 0 );
slot.access = listSlots->currentItem()->text( 1 );
- QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
+ TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
if ( it != w->lstSlots.end() )
w->lstSlots.remove( it );
listSlots->currentItem()->setText( 1, s );
@@ -488,7 +488,7 @@ void CustomWidgetEditor::slotAccessChanged( const QString &s )
w->lstSlots.append( slot );
}
-void CustomWidgetEditor::slotNameChanged( const QString &s )
+void CustomWidgetEditor::slotNameChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || !listSlots->currentItem() )
@@ -498,7 +498,7 @@ void CustomWidgetEditor::slotNameChanged( const QString &s )
slot.function = listSlots->currentItem()->text( 0 );
slot.access = listSlots->currentItem()->text( 1 );
slot.type = "slot";
- QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
+ TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
if ( it != w->lstSlots.end() )
w->lstSlots.remove( it );
listSlots->currentItem()->setText( 0, s );
@@ -509,7 +509,7 @@ void CustomWidgetEditor::slotNameChanged( const QString &s )
void CustomWidgetEditor::addSlot()
{
- QListViewItem *i = new QListViewItem( listSlots, "slot()", "public" );
+ TQListViewItem *i = new TQListViewItem( listSlots, "slot()", "public" );
listSlots->setCurrentItem( i );
listSlots->setSelected( i, TRUE );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
@@ -538,7 +538,7 @@ void CustomWidgetEditor::removeSlot()
w->lstSlots.remove( slot );
}
-void CustomWidgetEditor::currentSlotChanged( QListViewItem *i )
+void CustomWidgetEditor::currentSlotChanged( TQListViewItem *i )
{
editSlot->blockSignals( TRUE );
editSlot->setText( "" );
@@ -565,7 +565,7 @@ void CustomWidgetEditor::currentSlotChanged( QListViewItem *i )
comboAccess->blockSignals( FALSE );
}
-void CustomWidgetEditor::propertyTypeChanged( const QString &s )
+void CustomWidgetEditor::propertyTypeChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || !listProperties->currentItem() )
@@ -574,7 +574,7 @@ void CustomWidgetEditor::propertyTypeChanged( const QString &s )
MetaDataBase::Property property;
property.property = listProperties->currentItem()->text( 0 );
property.type = listProperties->currentItem()->text( 1 );
- QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
+ TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
if ( it != w->lstProperties.end() )
w->lstProperties.remove( it );
listProperties->currentItem()->setText( 1, s );
@@ -583,7 +583,7 @@ void CustomWidgetEditor::propertyTypeChanged( const QString &s )
w->lstProperties.append( property );
}
-void CustomWidgetEditor::propertyNameChanged( const QString &s )
+void CustomWidgetEditor::propertyNameChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || !listProperties->currentItem() )
@@ -592,7 +592,7 @@ void CustomWidgetEditor::propertyNameChanged( const QString &s )
MetaDataBase::Property property;
property.property = listProperties->currentItem()->text( 0 );
property.type = listProperties->currentItem()->text( 1 );
- QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
+ TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
if ( it != w->lstProperties.end() )
w->lstProperties.remove( it );
listProperties->currentItem()->setText( 0, s );
@@ -603,7 +603,7 @@ void CustomWidgetEditor::propertyNameChanged( const QString &s )
void CustomWidgetEditor::addProperty()
{
- QListViewItem *i = new QListViewItem( listProperties, "property", "String" );
+ TQListViewItem *i = new TQListViewItem( listProperties, "property", "String" );
listProperties->setCurrentItem( i );
listProperties->setSelected( i, TRUE );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
@@ -631,7 +631,7 @@ void CustomWidgetEditor::removeProperty()
w->lstProperties.remove( property );
}
-void CustomWidgetEditor::currentPropertyChanged( QListViewItem *i )
+void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i )
{
editProperty->blockSignals( TRUE );
editProperty->setText( "" );
@@ -661,16 +661,16 @@ void CustomWidgetEditor::currentPropertyChanged( QListViewItem *i )
comboType->blockSignals( FALSE );
}
-static QString makeIndent2( int indent )
+static TQString makeIndent2( int indent )
{
- QString s;
+ TQString s;
s.fill( ' ', indent * 4 );
return s;
}
-static QString entitize2( const QString &s )
+static TQString entitize2( const TQString &s )
{
- QString s2 = s;
+ TQString s2 = s;
s2 = s2.replace( "\"", "&quot;" );
s2 = s2.replace( "&", "&amp;" );
s2 = s2.replace( ">", "&gt;" );
@@ -681,18 +681,18 @@ static QString entitize2( const QString &s )
void CustomWidgetEditor::saveDescription()
{
- QString fn = KFileDialog::getSaveFileName( QString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
+ TQString fn = KFileDialog::getSaveFileName( TQString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
if ( fn.isEmpty() )
return;
- if ( QFileInfo( fn ).extension() != "cw" )
+ if ( TQFileInfo( fn ).extension() != "cw" )
fn += ".cw";
- QFile f( fn );
+ TQFile f( fn );
if ( !f.open( IO_WriteOnly ) )
return;
- QTextStream ts( &f );
- ts.setCodec( QTextCodec::codecForName( "UTF-8" ) );
+ TQTextStream ts( &f );
+ ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) );
int indent = 0;
ts << "<!DOCTYPE CW><CW>" << endl;
@@ -700,7 +700,7 @@ void CustomWidgetEditor::saveDescription()
ts << makeIndent2( indent ) << "<customwidgets>" << endl;
indent++;
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
ts << makeIndent2( indent ) << "<customwidget>" << endl;
indent++;
@@ -727,15 +727,15 @@ void CustomWidgetEditor::saveDescription()
indent--;
ts << makeIndent2( indent ) << "</pixmap>" << endl;
if ( !w->lstSignals.isEmpty() ) {
- for ( QValueList<QCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
ts << makeIndent2( indent ) << "<signal>" << entitize2( *it ) << "</signal>" << endl;
}
if ( !w->lstSlots.isEmpty() ) {
- for ( QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
ts << makeIndent2( indent ) << "<slot access=\"" << (*it).access << "\">" << entitize2( (*it).function ) << "</slot>" << endl;
}
if ( !w->lstProperties.isEmpty() ) {
- for ( QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
ts << makeIndent2( indent ) << "<property type=\"" << (*it).type << "\">" << entitize2( (*it).property ) << "</property>" << endl;
}
indent--;
@@ -749,23 +749,23 @@ void CustomWidgetEditor::saveDescription()
void CustomWidgetEditor::loadDescription()
{
- QString fn = KFileDialog::getOpenFileName( QString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
+ TQString fn = KFileDialog::getOpenFileName( TQString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
if ( fn.isEmpty() )
return;
- QFile f( fn );
+ TQFile f( fn );
if ( !f.open( IO_ReadOnly ) )
return;
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &f, &errMsg, &errLine ) ) {
- qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
return;
}
- QDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
while ( firstWidget.tagName() != "customwidgets" )
firstWidget = firstWidget.nextSibling().toElement();
@@ -782,23 +782,23 @@ void CustomWidgetEditor::updateCustomWidgetSizes()
{
if ( cwLst.isEmpty() )
cwLst = *mainWindow->queryList( "CustomWidget" );
- for ( QObject *o = cwLst.first(); o; o = cwLst.next() )
- ( (QWidget*)o )->updateGeometry();
+ for ( TQObject *o = cwLst.first(); o; o = cwLst.next() )
+ ( (TQWidget*)o )->updateGeometry();
}
void CustomWidgetEditor::horDataChanged( int a )
{
- QSizePolicy::SizeType st = int_to_size_type( a );
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQSizePolicy::SizeType st = int_to_size_type( a );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
- QSizePolicy osp = w->sizePolicy;
+ TQSizePolicy osp = w->sizePolicy;
w->sizePolicy.setHorData( st );
if ( cwLst.isEmpty() )
cwLst = *mainWindow->queryList( "CustomWidget" );
- for ( QObject *o = cwLst.first(); o; o = cwLst.next() ) {
+ for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) {
CustomWidget *cw = (CustomWidget*)o;
if ( cw->realClassName() == boxWidgets->currentText() ) {
if ( cw->sizePolicy() == osp )
@@ -809,17 +809,17 @@ void CustomWidgetEditor::horDataChanged( int a )
void CustomWidgetEditor::verDataChanged( int a )
{
- QSizePolicy::SizeType st = int_to_size_type( a );
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQSizePolicy::SizeType st = int_to_size_type( a );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
- QSizePolicy osp = w->sizePolicy;
+ TQSizePolicy osp = w->sizePolicy;
w->sizePolicy.setVerData( st );
if ( cwLst.isEmpty() )
cwLst = *mainWindow->queryList( "CustomWidget" );
- for ( QObject *o = cwLst.first(); o; o = cwLst.next() ) {
+ for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) {
CustomWidget *cw = (CustomWidget*)o;
if ( cw->realClassName() == boxWidgets->currentText() ) {
if ( cw->sizePolicy() == osp )
@@ -830,7 +830,7 @@ void CustomWidgetEditor::verDataChanged( int a )
void CustomWidgetEditor::widgetIsContainer( bool b )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
diff --git a/kdevdesigner/designer/customwidgeteditorimpl.h b/kdevdesigner/designer/customwidgeteditorimpl.h
index cdbf402f..6bf06d18 100644
--- a/kdevdesigner/designer/customwidgeteditorimpl.h
+++ b/kdevdesigner/designer/customwidgeteditorimpl.h
@@ -30,8 +30,8 @@
#include "customwidgeteditor.h"
#include "metadatabase.h"
-#include <qmap.h>
-#include <qobjectlist.h>
+#include <tqmap.h>
+#include <tqobjectlist.h>
class QTimer;
class QListBoxItem;
@@ -42,14 +42,14 @@ class CustomWidgetEditor : public CustomWidgetEditorBase
Q_OBJECT
public:
- CustomWidgetEditor( QWidget *parent , MainWindow *mw);
+ CustomWidgetEditor( TQWidget *parent , MainWindow *mw);
protected slots:
void addWidgetClicked();
- void classNameChanged( const QString & );
- void currentWidgetChanged( QListBoxItem * );
+ void classNameChanged( const TQString & );
+ void currentWidgetChanged( TQListBoxItem * );
void deleteWidgetClicked();
- void headerFileChanged( const QString & );
+ void headerFileChanged( const TQString & );
void heightChanged( int );
void includePolicyChanged( int );
void pixmapChoosen();
@@ -57,20 +57,20 @@ protected slots:
void chooseHeader();
void checkWidgetName();
void closeClicked();
- void currentSignalChanged( QListBoxItem *i );
+ void currentSignalChanged( TQListBoxItem *i );
void addSignal();
void removeSignal();
- void signalNameChanged( const QString &s );
- void slotAccessChanged( const QString & );
- void slotNameChanged( const QString & );
+ void signalNameChanged( const TQString &s );
+ void slotAccessChanged( const TQString & );
+ void slotNameChanged( const TQString & );
void addSlot();
void removeSlot();
- void currentSlotChanged( QListViewItem * );
- void propertyTypeChanged( const QString & );
- void propertyNameChanged( const QString & );
+ void currentSlotChanged( TQListViewItem * );
+ void propertyTypeChanged( const TQString & );
+ void propertyNameChanged( const TQString & );
void addProperty();
void removeProperty();
- void currentPropertyChanged( QListViewItem * );
+ void currentPropertyChanged( TQListViewItem * );
void saveDescription();
void loadDescription();
void horDataChanged( int );
@@ -78,7 +78,7 @@ protected slots:
void widgetIsContainer( bool );
private:
- MetaDataBase::CustomWidget *findWidget( QListBoxItem *i );
+ MetaDataBase::CustomWidget *findWidget( TQListBoxItem *i );
void setupDefinition();
void setupSignals();
void setupSlots();
@@ -86,12 +86,12 @@ private:
void updateCustomWidgetSizes();
private:
- QMap<QListBoxItem*, MetaDataBase::CustomWidget*> customWidgets;
- QString oldName;
- QTimer *checkTimer;
- QListBoxItem *oldItem;
+ TQMap<TQListBoxItem*, MetaDataBase::CustomWidget*> customWidgets;
+ TQString oldName;
+ TQTimer *checkTimer;
+ TQListBoxItem *oldItem;
MainWindow *mainWindow;
- QObjectList cwLst;
+ TQObjectList cwLst;
};
diff --git a/kdevdesigner/designer/database.cpp b/kdevdesigner/designer/database.cpp
index a92a04c8..c9621604 100644
--- a/kdevdesigner/designer/database.cpp
+++ b/kdevdesigner/designer/database.cpp
@@ -37,10 +37,10 @@
#include "mainwindow.h"
#endif
-#include <qsqldatabase.h>
-#include <qsqlform.h>
-#include <qsqlcursor.h>
-#include <qsqlrecord.h>
+#include <tqsqldatabase.h>
+#include <tqsqlform.h>
+#include <tqsqlcursor.h>
+#include <tqsqlrecord.h>
DatabaseSupport::DatabaseSupport()
{
@@ -49,40 +49,40 @@ DatabaseSupport::DatabaseSupport()
parent = 0;
}
-void DatabaseSupport::initPreview( const QString &connection, const QString &table, QObject *o,
- const QMap<QString, QString> &databaseControls )
+void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o,
+ const TQMap<TQString, TQString> &databaseControls )
{
tbl = table;
dbControls = databaseControls;
parent = o;
if ( connection != "(default)" )
- con = QSqlDatabase::database( connection );
+ con = TQSqlDatabase::database( connection );
else
- con = QSqlDatabase::database();
- frm = new QSqlForm( o, table );
- for ( QMap<QString, QString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) {
- QObject *chld = parent->child( it.key(), "QWidget" );
+ con = TQSqlDatabase::database();
+ frm = new TQSqlForm( o, table );
+ for ( TQMap<TQString, TQString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) {
+ TQObject *chld = parent->child( it.key(), "TQWidget" );
if ( !chld )
continue;
- frm->insert( (QWidget*)chld, *it );
+ frm->insert( (TQWidget*)chld, *it );
}
}
-QDesignerDataBrowser::QDesignerDataBrowser( QWidget *parent, const char *name )
- : QDataBrowser( parent, name )
+QDesignerDataBrowser::QDesignerDataBrowser( TQWidget *parent, const char *name )
+ : TQDataBrowser( parent, name )
{
}
-bool QDesignerDataBrowser::event( QEvent* e )
+bool QDesignerDataBrowser::event( TQEvent* e )
{
- bool b = QDataBrowser::event( e );
+ bool b = TQDataBrowser::event( e );
#if defined(DESIGNER)
if ( MainWindow::self->isPreviewing() ) {
#endif
- if ( e->type() == QEvent::Show ) {
+ if ( e->type() == TQEvent::Show ) {
if ( con ) {
- QSqlCursor* cursor = new QSqlCursor( tbl, TRUE, con );
+ TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con );
setSqlCursor( cursor, TRUE );
setForm( frm );
refresh();
@@ -96,18 +96,18 @@ bool QDesignerDataBrowser::event( QEvent* e )
return b;
}
-QDesignerDataView::QDesignerDataView( QWidget *parent, const char *name )
- : QDataView( parent, name )
+QDesignerDataView::QDesignerDataView( TQWidget *parent, const char *name )
+ : TQDataView( parent, name )
{
}
-bool QDesignerDataView::event( QEvent* e )
+bool QDesignerDataView::event( TQEvent* e )
{
- bool b = QDataView::event( e );
+ bool b = TQDataView::event( e );
#if defined(DESIGNER)
if ( MainWindow::self->isPreviewing() ) {
#endif
- if ( e->type() == QEvent::Show ) {
+ if ( e->type() == TQEvent::Show ) {
setForm( frm );
readFields();
return TRUE;
diff --git a/kdevdesigner/designer/database.h b/kdevdesigner/designer/database.h
index 530085fb..600018ed 100644
--- a/kdevdesigner/designer/database.h
+++ b/kdevdesigner/designer/database.h
@@ -27,13 +27,13 @@
#ifndef DATABASE_H
#define DATABASE_H
-#include "qfeatures.h"
+#include "tqfeatures.h"
#ifndef QT_NO_SQL
-#include <qdataview.h>
-#include <qdatabrowser.h>
-#include <qsqlcursor.h>
-#include <qstring.h>
+#include <tqdataview.h>
+#include <tqdatabrowser.h>
+#include <tqsqlcursor.h>
+#include <tqstring.h>
class QSqlDatabase;
class QSqlForm;
@@ -44,38 +44,38 @@ public:
DatabaseSupport();
virtual ~DatabaseSupport() {}
- void initPreview( const QString &connection, const QString &table, QObject *o,
- const QMap<QString, QString> &databaseControls );
+ void initPreview( const TQString &connection, const TQString &table, TQObject *o,
+ const TQMap<TQString, TQString> &databaseControls );
protected:
- QSqlDatabase* con;
- QSqlForm* frm;
- QString tbl;
- QMap<QString, QString> dbControls;
- QObject *parent;
+ TQSqlDatabase* con;
+ TQSqlForm* frm;
+ TQString tbl;
+ TQMap<TQString, TQString> dbControls;
+ TQObject *parent;
};
-class QDesignerDataBrowser : public QDataBrowser, public DatabaseSupport
+class QDesignerDataBrowser : public TQDataBrowser, public DatabaseSupport
{
Q_OBJECT
public:
- QDesignerDataBrowser( QWidget *parent, const char *name );
+ QDesignerDataBrowser( TQWidget *parent, const char *name );
protected:
- bool event( QEvent* e );
+ bool event( TQEvent* e );
};
-class QDesignerDataView : public QDataView, public DatabaseSupport
+class QDesignerDataView : public TQDataView, public DatabaseSupport
{
Q_OBJECT
public:
- QDesignerDataView( QWidget *parent, const char *name );
+ QDesignerDataView( TQWidget *parent, const char *name );
protected:
- bool event( QEvent* e );
+ bool event( TQEvent* e );
};
#endif
diff --git a/kdevdesigner/designer/dbconnectionimpl.cpp b/kdevdesigner/designer/dbconnectionimpl.cpp
index 4867ed39..fb5697ca 100644
--- a/kdevdesigner/designer/dbconnectionimpl.cpp
+++ b/kdevdesigner/designer/dbconnectionimpl.cpp
@@ -28,14 +28,14 @@
#include "dbconnection.h"
#include "project.h"
#include "asciivalidator.h"
-#include <qgroupbox.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
+#include <tqgroupbox.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
#include <klineedit.h>
-#include <qlayout.h>
-#include <qsqldatabase.h>
+#include <tqlayout.h>
+#include <tqsqldatabase.h>
-DatabaseConnectionEditor::DatabaseConnectionEditor( DatabaseConnection* connection, QWidget* parent,
+DatabaseConnectionEditor::DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent,
const char* name, bool modal, WFlags fl )
: DatabaseConnectionEditorBase( parent, name, modal, fl ), conn( connection )
{
diff --git a/kdevdesigner/designer/dbconnectionimpl.h b/kdevdesigner/designer/dbconnectionimpl.h
index daef2c21..f85b978e 100644
--- a/kdevdesigner/designer/dbconnectionimpl.h
+++ b/kdevdesigner/designer/dbconnectionimpl.h
@@ -38,7 +38,7 @@ class DatabaseConnectionEditor : public DatabaseConnectionEditorBase
Q_OBJECT
public:
- DatabaseConnectionEditor( DatabaseConnection* connection, QWidget* parent = 0,
+ DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~DatabaseConnectionEditor();
@@ -49,7 +49,7 @@ private:
private:
DatabaseConnection *conn;
- QGridLayout* lay;
+ TQGridLayout* lay;
DatabaseConnectionWidget* connectionWidget;
};
diff --git a/kdevdesigner/designer/dbconnectionsimpl.cpp b/kdevdesigner/designer/dbconnectionsimpl.cpp
index 6f059336..1d3c1a0b 100644
--- a/kdevdesigner/designer/dbconnectionsimpl.cpp
+++ b/kdevdesigner/designer/dbconnectionsimpl.cpp
@@ -25,18 +25,18 @@
**********************************************************************/
#include "dbconnectionsimpl.h"
-#include <qptrlist.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqptrlist.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include "project.h"
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
#include <klineedit.h>
-#include <qpushbutton.h>
-#include <qsqldatabase.h>
-#include <qmessagebox.h>
-#include <qapplication.h>
+#include <tqpushbutton.h>
+#include <tqsqldatabase.h>
+#include <tqmessagebox.h>
+#include <tqapplication.h>
#include "mainwindow.h"
#include "asciivalidator.h"
@@ -51,17 +51,17 @@ static bool blockChanges = FALSE;
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, QWidget* parent, const char* name, bool modal, WFlags fl )
+DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl )
: DatabaseConnectionBase( parent, name, modal, fl ), project( pro )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
connectionWidget = new DatabaseConnectionWidget( grp );
grpLayout->addWidget( connectionWidget, 0, 0 );
#ifndef QT_NO_SQL
- QPtrList<DatabaseConnection> lst = project->databaseConnections();
+ TQPtrList<DatabaseConnection> lst = project->databaseConnections();
for ( DatabaseConnection *conn = lst.first(); conn; conn = lst.next() )
listConnections->insertItem( conn->name() );
- connectionWidget->comboDriver->insertStringList( QSqlDatabase::drivers() );
+ connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() );
#endif
connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) );
enableAll( FALSE );
@@ -90,13 +90,13 @@ void DatabaseConnectionsEditor::newConnection()
{
blockChanges = TRUE;
enableAll( TRUE );
- QString n( "(default)" );
+ TQString n( "(default)" );
if ( project->databaseConnection( n ) ) {
n = "connection";
int i = 2;
- while ( project->databaseConnection( n + QString::number( i ) ) )
+ while ( project->databaseConnection( n + TQString::number( i ) ) )
++i;
- n = n + QString::number( i );
+ n = n + TQString::number( i );
}
connectionWidget->editName->setText( n );
listConnections->clearSelection();
@@ -125,7 +125,7 @@ void DatabaseConnectionsEditor::doConnect()
listConnections->setCurrentItem( listConnections->count() - 1 );
project->saveConnections();
} else {
- QMessageBox::warning( MainWindow::self, i18n( "Connection" ),
+ TQMessageBox::warning( MainWindow::self, i18n( "Connection" ),
i18n( "Could not connect to the database.\n"
"Please ensure that the database server is running "
"and that all the connection information is correct.\n"
@@ -147,7 +147,7 @@ void DatabaseConnectionsEditor::doConnect()
#endif
}
-void DatabaseConnectionsEditor::currentConnectionChanged( const QString &s )
+void DatabaseConnectionsEditor::currentConnectionChanged( const TQString &s )
{
#ifndef QT_NO_SQL
DatabaseConnection *conn = project->databaseConnection( s );
@@ -169,7 +169,7 @@ void DatabaseConnectionsEditor::currentConnectionChanged( const QString &s )
#endif
}
-void DatabaseConnectionsEditor::connectionNameChanged( const QString &s )
+void DatabaseConnectionsEditor::connectionNameChanged( const TQString &s )
{
if ( listConnections->currentItem() == 0 || blockChanges )
return;
diff --git a/kdevdesigner/designer/dbconnectionsimpl.h b/kdevdesigner/designer/dbconnectionsimpl.h
index fdb70427..220e24a8 100644
--- a/kdevdesigner/designer/dbconnectionsimpl.h
+++ b/kdevdesigner/designer/dbconnectionsimpl.h
@@ -37,7 +37,7 @@ class DatabaseConnectionsEditor : public DatabaseConnectionBase
Q_OBJECT
public:
- DatabaseConnectionsEditor( Project *pro, QWidget* parent = 0,
+ DatabaseConnectionsEditor( Project *pro, TQWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~DatabaseConnectionsEditor();
@@ -45,8 +45,8 @@ protected slots:
void deleteConnection();
void newConnection();
void doConnect();
- void currentConnectionChanged( const QString & );
- void connectionNameChanged( const QString &s );
+ void currentConnectionChanged( const TQString & );
+ void connectionNameChanged( const TQString &s );
private:
void enableAll( bool b );
diff --git a/kdevdesigner/designer/defs.cpp b/kdevdesigner/designer/defs.cpp
index 11b3dca0..de1c7dfc 100644
--- a/kdevdesigner/designer/defs.cpp
+++ b/kdevdesigner/designer/defs.cpp
@@ -26,59 +26,59 @@
#include "defs.h"
-int size_type_to_int( QSizePolicy::SizeType t )
+int size_type_to_int( TQSizePolicy::SizeType t )
{
- if ( t == QSizePolicy::Fixed )
+ if ( t == TQSizePolicy::Fixed )
return 0;
- if ( t == QSizePolicy::Minimum )
+ if ( t == TQSizePolicy::Minimum )
return 1;
- if ( t == QSizePolicy::Maximum )
+ if ( t == TQSizePolicy::Maximum )
return 2;
- if ( t == QSizePolicy::Preferred )
+ if ( t == TQSizePolicy::Preferred )
return 3;
- if ( t == QSizePolicy::MinimumExpanding )
+ if ( t == TQSizePolicy::MinimumExpanding )
return 4;
- if ( t == QSizePolicy::Expanding )
+ if ( t == TQSizePolicy::Expanding )
return 5;
- if ( t == QSizePolicy::Ignored )
+ if ( t == TQSizePolicy::Ignored )
return 6;
return 0;
}
-QString size_type_to_string( QSizePolicy::SizeType t )
+TQString size_type_to_string( TQSizePolicy::SizeType t )
{
- if ( t == QSizePolicy::Fixed )
+ if ( t == TQSizePolicy::Fixed )
return "Fixed";
- if ( t == QSizePolicy::Minimum )
+ if ( t == TQSizePolicy::Minimum )
return "Minimum";
- if ( t == QSizePolicy::Maximum )
+ if ( t == TQSizePolicy::Maximum )
return "Maximum";
- if ( t == QSizePolicy::Preferred )
+ if ( t == TQSizePolicy::Preferred )
return "Preferred";
- if ( t == QSizePolicy::MinimumExpanding )
+ if ( t == TQSizePolicy::MinimumExpanding )
return "MinimumExpanding";
- if ( t == QSizePolicy::Expanding )
+ if ( t == TQSizePolicy::Expanding )
return "Expanding";
- if ( t == QSizePolicy::Ignored )
+ if ( t == TQSizePolicy::Ignored )
return "Ignored";
- return QString();
+ return TQString();
}
-QSizePolicy::SizeType int_to_size_type( int i )
+TQSizePolicy::SizeType int_to_size_type( int i )
{
if ( i == 0 )
- return QSizePolicy::Fixed;
+ return TQSizePolicy::Fixed;
if ( i == 1 )
- return QSizePolicy::Minimum;
+ return TQSizePolicy::Minimum;
if ( i == 2 )
- return QSizePolicy::Maximum;
+ return TQSizePolicy::Maximum;
if ( i == 3 )
- return QSizePolicy::Preferred;
+ return TQSizePolicy::Preferred;
if ( i == 4 )
- return QSizePolicy::MinimumExpanding;
+ return TQSizePolicy::MinimumExpanding;
if ( i == 5 )
- return QSizePolicy::Expanding;
+ return TQSizePolicy::Expanding;
if ( i == 6 )
- return QSizePolicy::Ignored;
- return QSizePolicy::Preferred;
+ return TQSizePolicy::Ignored;
+ return TQSizePolicy::Preferred;
}
diff --git a/kdevdesigner/designer/defs.h b/kdevdesigner/designer/defs.h
index 80a11671..e79d676c 100644
--- a/kdevdesigner/designer/defs.h
+++ b/kdevdesigner/designer/defs.h
@@ -27,16 +27,16 @@
#ifndef DEFS_H
#define DEFS_H
-#include <qsizepolicy.h>
-#include <qstring.h>
+#include <tqsizepolicy.h>
+#include <tqstring.h>
#define POINTER_TOOL 32000
#define CONNECT_TOOL 32001
#define ORDER_TOOL 32002
#define BUDDY_TOOL 32004
-int size_type_to_int( QSizePolicy::SizeType t );
-QString size_type_to_string( QSizePolicy::SizeType t );
-QSizePolicy::SizeType int_to_size_type( int i );
+int size_type_to_int( TQSizePolicy::SizeType t );
+TQString size_type_to_string( TQSizePolicy::SizeType t );
+TQSizePolicy::SizeType int_to_size_type( int i );
#endif
diff --git a/kdevdesigner/designer/designer_pch.h b/kdevdesigner/designer/designer_pch.h
index 6b53f984..883a7a7c 100644
--- a/kdevdesigner/designer/designer_pch.h
+++ b/kdevdesigner/designer/designer_pch.h
@@ -9,30 +9,30 @@
#if defined __cplusplus
#include <private/qucomextra_p.h>
-#include <qaction.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdialog.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qmap.h>
-#include <qmessagebox.h>
-#include <qmetaobject.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qvariant.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
+#include <tqaction.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdialog.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqmap.h>
+#include <tqmessagebox.h>
+#include <tqmetaobject.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqvariant.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
#include "command.h"
#include "formwindow.h"
diff --git a/kdevdesigner/designer/designeraction.cpp b/kdevdesigner/designer/designeraction.cpp
index c797db5a..129bf3e5 100644
--- a/kdevdesigner/designer/designeraction.cpp
+++ b/kdevdesigner/designer/designeraction.cpp
@@ -25,13 +25,13 @@ DesignerAction::~DesignerAction()
void DesignerAction::setDisabled( bool d )
{
- QAction::setEnabled(!d);
+ TQAction::setEnabled(!d);
emit actionEnabled(!d);
}
void DesignerAction::setEnabled( bool e )
{
- QAction::setEnabled(e);
+ TQAction::setEnabled(e);
emit actionEnabled(e);
}
diff --git a/kdevdesigner/designer/designeraction.h b/kdevdesigner/designer/designeraction.h
index d8153574..0efd69dd 100644
--- a/kdevdesigner/designer/designeraction.h
+++ b/kdevdesigner/designer/designeraction.h
@@ -20,24 +20,24 @@
#ifndef DESIGNERACTION_H
#define DESIGNERACTION_H
-#include <qaction.h>
+#include <tqaction.h>
class DesignerAction : public QAction
{
Q_OBJECT
public:
- DesignerAction(QObject *parent = 0, const char *name = 0)
- :QAction(parent, name) {}
- DesignerAction ( const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0 )
- :QAction(menuText, accel, parent, name) {}
- DesignerAction ( const QIconSet & icon, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0 )
- :QAction(icon, menuText, accel, parent, name) {}
- DesignerAction ( const QString & text, const QIconSet & icon, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0, bool toggle = FALSE )
- :QAction(text, icon, menuText, accel, parent, name, toggle) {}
- DesignerAction ( const QString & text, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0, bool toggle = FALSE )
- :QAction(text, menuText, accel, parent, name, toggle) {}
- DesignerAction ( QObject * parent, const char * name, bool toggle )
- :QAction(parent, name, toggle) {}
+ DesignerAction(TQObject *parent = 0, const char *name = 0)
+ :TQAction(parent, name) {}
+ DesignerAction ( const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 )
+ :TQAction(menuText, accel, parent, name) {}
+ DesignerAction ( const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 )
+ :TQAction(icon, menuText, accel, parent, name) {}
+ DesignerAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE )
+ :TQAction(text, icon, menuText, accel, parent, name, toggle) {}
+ DesignerAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE )
+ :TQAction(text, menuText, accel, parent, name, toggle) {}
+ DesignerAction ( TQObject * parent, const char * name, bool toggle )
+ :TQAction(parent, name, toggle) {}
~DesignerAction();
virtual void setEnabled(bool e);
diff --git a/kdevdesigner/designer/designerapp.cpp b/kdevdesigner/designer/designerapp.cpp
index 480bc65b..3a0016c4 100644
--- a/kdevdesigner/designer/designerapp.cpp
+++ b/kdevdesigner/designer/designerapp.cpp
@@ -31,30 +31,30 @@
#include <kiconloader.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qsettings.h>
-#include <qsplashscreen.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqsettings.h>
+#include <tqsplashscreen.h>
#ifdef Q_WS_WIN
#include <qt_windows.h>
#include <process.h>
#endif
-static QSplashScreen *splash = 0;
+static TQSplashScreen *splash = 0;
-void set_splash_status( const QString &txt )
+void set_splash_status( const TQString &txt )
{
if ( !splash )
return;
- QString splashText = "Licensed to "
- + QString::fromLatin1( QT_PRODUCT_LICENSEE ) + "\n"
+ TQString splashText = "Licensed to "
+ + TQString::fromLatin1( QT_PRODUCT_LICENSEE ) + "\n"
+ txt;
splash->message( splashText, Qt::AlignRight|Qt::AlignTop );
}
DesignerApplication::DesignerApplication( int &argc, char **argv )
- : QApplication( argc, argv )
+ : TQApplication( argc, argv )
{
#if defined(Q_WS_WIN)
if ( winVersion() & Qt::WV_NT_based )
@@ -64,23 +64,23 @@ DesignerApplication::DesignerApplication( int &argc, char **argv )
#endif
}
-QSplashScreen *DesignerApplication::showSplash()
+TQSplashScreen *DesignerApplication::showSplash()
{
- QRect screen = QApplication::desktop()->screenGeometry();
- QSettings config;
- config.insertSearchPath( QSettings::Windows, "/Trolltech" );
+ TQRect screen = TQApplication::desktop()->screenGeometry();
+ TQSettings config;
+ config.insertSearchPath( TQSettings::Windows, "/Trolltech" );
- QRect mainRect;
- QString keybase = settingsKey();
+ TQRect mainRect;
+ TQString keybase = settingsKey();
bool show = config.readBoolEntry( keybase + "SplashScreen", TRUE );
mainRect.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", 0 ) );
mainRect.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", 0 ) );
mainRect.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", 500 ) );
mainRect.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", 500 ) );
- screen = QApplication::desktop()->screenGeometry( QApplication::desktop()->screenNumber( mainRect.center() ) );
+ screen = TQApplication::desktop()->screenGeometry( TQApplication::desktop()->screenNumber( mainRect.center() ) );
if ( show ) {
- splash = new QSplashScreen( UserIcon("designer_splash.png") );
+ splash = new TQSplashScreen( UserIcon("designer_splash.png") );
splash->show();
set_splash_status( "Initializing..." );
}
@@ -93,19 +93,19 @@ void DesignerApplication::closeSplash()
splash->hide();
}
-static QString *settings_key = 0;
-static QString *old_settings_key = 0;
+static TQString *settings_key = 0;
+static TQString *old_settings_key = 0;
-QString DesignerApplication::settingsKey()
+TQString DesignerApplication::settingsKey()
{
if ( !settings_key )
- settings_key = new QString( "/Qt Designer/" +
- QString::number( (QT_VERSION >> 16) & 0xff ) +
- "." + QString::number( (QT_VERSION >> 8) & 0xff ) + "/" );
+ settings_key = new TQString( "/Qt Designer/" +
+ TQString::number( (QT_VERSION >> 16) & 0xff ) +
+ "." + TQString::number( (QT_VERSION >> 8) & 0xff ) + "/" );
return *settings_key;
}
-QString DesignerApplication::oldSettingsKey()
+TQString DesignerApplication::oldSettingsKey()
{
if ( !old_settings_key ) {
int majorVer = (QT_VERSION >> 16) & 0xff;
@@ -116,17 +116,17 @@ QString DesignerApplication::oldSettingsKey()
if ( !minorVer == 0 )
minorVer--;
- old_settings_key = new QString( "/Qt Designer/" +
- QString::number( majorVer ) +
- "." + QString::number( minorVer ) + "/" );
+ old_settings_key = new TQString( "/Qt Designer/" +
+ TQString::number( majorVer ) +
+ "." + TQString::number( minorVer ) + "/" );
}
return *old_settings_key;
}
-void DesignerApplication::setSettingsKey( const QString &key )
+void DesignerApplication::setSettingsKey( const TQString &key )
{
if ( !settings_key )
- settings_key = new QString( key );
+ settings_key = new TQString( key );
else
*settings_key = key;
}
@@ -135,20 +135,20 @@ void DesignerApplication::setSettingsKey( const QString &key )
bool DesignerApplication::winEventFilter( MSG *msg )
{
if ( msg->message == DESIGNER_OPENFILE ) {
- QFile f( QDir::homeDirPath() + "/.designerargs" );
- QFileInfo fi(f);
+ TQFile f( TQDir::homeDirPath() + "/.designerargs" );
+ TQFileInfo fi(f);
if ( fi.lastModified() == lastMod )
- return QApplication::winEventFilter( msg );
+ return TQApplication::winEventFilter( msg );
lastMod = fi.lastModified();
f.open( IO_ReadOnly );
- QString args;
+ TQString args;
f.readLine( args, f.size() );
- QStringList lst = QStringList::split( " ", args );
+ TQStringList lst = TQStringList::split( " ", args );
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
- QString arg = (*it).stripWhiteSpace();
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQString arg = (*it).stripWhiteSpace();
if ( arg[0] != '-' ) {
- QObjectList* l = MainWindow::self->queryList( "FormWindow" );
+ TQObjectList* l = MainWindow::self->queryList( "FormWindow" );
FormWindow* fw = (FormWindow*) l->first();
FormWindow* totop = 0;
bool haveit = FALSE;
@@ -171,6 +171,6 @@ bool DesignerApplication::winEventFilter( MSG *msg )
}
return TRUE;
}
- return QApplication::winEventFilter( msg );
+ return TQApplication::winEventFilter( msg );
}
#endif
diff --git a/kdevdesigner/designer/designerapp.h b/kdevdesigner/designer/designerapp.h
index d78d55af..3284bb91 100644
--- a/kdevdesigner/designer/designerapp.h
+++ b/kdevdesigner/designer/designerapp.h
@@ -29,7 +29,7 @@
class QSplashScreen;
-#include <qapplication.h>
+#include <tqapplication.h>
class DesignerApplication : public QApplication
{
@@ -38,15 +38,15 @@ public:
DesignerApplication( int &argc, char **argv );
- QSplashScreen *showSplash();
+ TQSplashScreen *showSplash();
static void closeSplash();
- static QString settingsKey();
- static QString oldSettingsKey();
- static void setSettingsKey( const QString &key );
+ static TQString settingsKey();
+ static TQString oldSettingsKey();
+ static void setSettingsKey( const TQString &key );
protected:
- QDateTime lastMod;
+ TQDateTime lastMod;
#if defined(Q_WS_WIN)
bool winEventFilter( MSG *msg );
diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp
index 798f45b6..dca4bbd8 100644
--- a/kdevdesigner/designer/designerappiface.cpp
+++ b/kdevdesigner/designer/designerappiface.cpp
@@ -24,8 +24,8 @@
**
**********************************************************************/
-#include <qmenubar.h>
-#include <qpopupmenu.h>
+#include <tqmenubar.h>
+#include <tqpopupmenu.h>
#include "designerappiface.h"
#include "mainwindow.h"
#include "project.h"
@@ -35,14 +35,14 @@
#include "command.h"
#include "outputwindow.h"
#include "../shared/widgetdatabase.h"
-#include <qvariant.h>
-#include <qlistview.h>
-#include <qtextedit.h>
-#include <qstatusbar.h>
+#include <tqvariant.h>
+#include <tqlistview.h>
+#include <tqtextedit.h>
+#include <tqstatusbar.h>
#include "pixmapcollection.h"
#include "hierarchyview.h"
#include <stdlib.h>
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include "popupmenueditor.h"
#include "menubareditor.h"
@@ -88,12 +88,12 @@ DesignerSourceFile *DesignerInterfaceImpl::currentSourceFile() const
return 0;
}
-QPtrList<DesignerProject> DesignerInterfaceImpl::projectList() const
+TQPtrList<DesignerProject> DesignerInterfaceImpl::projectList() const
{
return mainWindow->projectList();
}
-void DesignerInterfaceImpl::showStatusMessage( const QString &text, int ms ) const
+void DesignerInterfaceImpl::showStatusMessage( const TQString &text, int ms ) const
{
if ( text.isEmpty() ) {
mainWindow->statusBar()->clear();
@@ -115,7 +115,7 @@ DesignerOutputDock *DesignerInterfaceImpl::outputDock() const
return mainWindow->outputWindow() ? mainWindow->outputWindow()->iFace() : 0;
}
-void DesignerInterfaceImpl::setModified( bool b, QWidget *window )
+void DesignerInterfaceImpl::setModified( bool b, TQWidget *window )
{
mainWindow->setModified( b, window );
}
@@ -127,15 +127,15 @@ void DesignerInterfaceImpl::updateFunctionList()
mainWindow->objectHierarchy()->updateClassBrowsers();
}
-void DesignerInterfaceImpl::onProjectChange( QObject *receiver, const char *slot )
+void DesignerInterfaceImpl::onProjectChange( TQObject *receiver, const char *slot )
{
- QObject::connect( mainWindow, SIGNAL( projectChanged() ), receiver, slot );
+ TQObject::connect( mainWindow, TQT_SIGNAL( projectChanged() ), receiver, slot );
}
-void DesignerInterfaceImpl::onFormChange( QObject *receiver, const char *slot )
+void DesignerInterfaceImpl::onFormChange( TQObject *receiver, const char *slot )
{
- QObject::connect( mainWindow, SIGNAL( formWindowChanged() ), receiver, slot );
- QObject::connect( mainWindow, SIGNAL( editorChanged() ), receiver, slot );
+ TQObject::connect( mainWindow, TQT_SIGNAL( formWindowChanged() ), receiver, slot );
+ TQObject::connect( mainWindow, TQT_SIGNAL( editorChanged() ), receiver, slot );
}
bool DesignerInterfaceImpl::singleProjectMode() const
@@ -143,8 +143,8 @@ bool DesignerInterfaceImpl::singleProjectMode() const
return mainWindow->singleProjectMode();
}
-void DesignerInterfaceImpl::showError( QWidget *widget,
- int line, const QString &message )
+void DesignerInterfaceImpl::showError( TQWidget *widget,
+ int line, const TQString &message )
{
mainWindow->showErrorMessage( widget, line, message );
}
@@ -154,12 +154,12 @@ void DesignerInterfaceImpl::runFinished()
mainWindow->finishedRun();
}
-void DesignerInterfaceImpl::showStackFrame( QWidget *w, int line )
+void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line )
{
mainWindow->showStackFrame( w, line );
}
-void DesignerInterfaceImpl::showDebugStep( QWidget *w, int line )
+void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line )
{
mainWindow->showDebugStep( w, line );
}
@@ -169,7 +169,7 @@ void DesignerInterfaceImpl::runProjectPrecondition()
mainWindow->runProjectPrecondition();
}
-void DesignerInterfaceImpl::runProjectPostcondition( QObjectList *l )
+void DesignerInterfaceImpl::runProjectPostcondition( TQObjectList *l )
{
mainWindow->runProjectPostcondition( l );
}
@@ -179,18 +179,18 @@ DesignerProjectImpl::DesignerProjectImpl( Project *pr )
{
}
-QPtrList<DesignerFormWindow> DesignerProjectImpl::formList() const
+TQPtrList<DesignerFormWindow> DesignerProjectImpl::formList() const
{
- QPtrList<DesignerFormWindow> list;
- QObjectList *forms = project->formList();
+ TQPtrList<DesignerFormWindow> list;
+ TQObjectList *forms = project->formList();
if ( !forms )
return list;
- QPtrListIterator<QObject> it( *forms );
+ TQPtrListIterator<TQObject> it( *forms );
while ( it.current() ) {
- QObject *obj = it.current();
+ TQObject *obj = it.current();
++it;
- QWidget *par = ::qt_cast<FormWindow*>(obj->parent());
+ TQWidget *par = ::qt_cast<FormWindow*>(obj->parent());
if ( !obj->isWidgetType() || !par )
continue;
@@ -201,20 +201,20 @@ QPtrList<DesignerFormWindow> DesignerProjectImpl::formList() const
return list;
}
-QString DesignerProjectImpl::formFileName( const QString &form ) const
+TQString DesignerProjectImpl::formFileName( const TQString &form ) const
{
- for ( QPtrListIterator<FormFile> forms = project->formFiles();
+ for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
- if ( QString( forms.current()->formName() ) == form )
+ if ( TQString( forms.current()->formName() ) == form )
return forms.current()->fileName();
}
- return QString::null;
+ return TQString::null;
}
-QStringList DesignerProjectImpl::formNames() const
+TQStringList DesignerProjectImpl::formNames() const
{
- QStringList l;
- for ( QPtrListIterator<FormFile> forms = project->formFiles();
+ TQStringList l;
+ for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
FormFile* f = forms.current();
if ( f->isFake() )
@@ -232,30 +232,30 @@ void DesignerProjectImpl::removeForm( DesignerFormWindow * )
{
}
-QString DesignerProjectImpl::fileName() const
+TQString DesignerProjectImpl::fileName() const
{
return project->fileName();
}
-void DesignerProjectImpl::setFileName( const QString & )
+void DesignerProjectImpl::setFileName( const TQString & )
{
}
-QString DesignerProjectImpl::projectName() const
+TQString DesignerProjectImpl::projectName() const
{
return project->projectName();
}
-void DesignerProjectImpl::setProjectName( const QString & )
+void DesignerProjectImpl::setProjectName( const TQString & )
{
}
-QString DesignerProjectImpl::databaseFile() const
+TQString DesignerProjectImpl::databaseFile() const
{
- return QString::null;
+ return TQString::null;
}
-void DesignerProjectImpl::setDatabaseFile( const QString & )
+void DesignerProjectImpl::setDatabaseFile( const TQString & )
{
}
@@ -264,11 +264,11 @@ void DesignerProjectImpl::setupDatabases() const
MainWindow::self->editDatabaseConnections();
}
-QPtrList<DesignerDatabase> DesignerProjectImpl::databaseConnections() const
+TQPtrList<DesignerDatabase> DesignerProjectImpl::databaseConnections() const
{
- QPtrList<DesignerDatabase> lst;
+ TQPtrList<DesignerDatabase> lst;
#ifndef QT_NO_SQL
- QPtrList<DatabaseConnection> conns = project->databaseConnections();
+ TQPtrList<DatabaseConnection> conns = project->databaseConnections();
for ( DatabaseConnection *d = conns.first(); d; d = conns.next() )
lst.append( d->iFace() );
#endif
@@ -287,26 +287,26 @@ void DesignerProjectImpl::save() const
{
}
-void DesignerProjectImpl::setLanguage( const QString &l )
+void DesignerProjectImpl::setLanguage( const TQString &l )
{
project->setLanguage( l );
}
-QString DesignerProjectImpl::language() const
+TQString DesignerProjectImpl::language() const
{
return project->language();
}
-void DesignerProjectImpl::setCustomSetting( const QString &key, const QString &value )
+void DesignerProjectImpl::setCustomSetting( const TQString &key, const TQString &value )
{
project->setCustomSetting( key, value );
}
-QString DesignerProjectImpl::customSetting( const QString &key ) const
+TQString DesignerProjectImpl::customSetting( const TQString &key ) const
{
if ( key == "QTSCRIPT_PACKAGES" ) {
- QString s = getenv( "QTSCRIPT_PACKAGES" );
- QString s2 = project->customSetting( "QUICK_PACKAGES" );
+ TQString s = getenv( "QTSCRIPT_PACKAGES" );
+ TQString s2 = project->customSetting( "QUICK_PACKAGES" );
if ( !s.isEmpty() && !s2.isEmpty() )
#if defined(Q_OS_WIN32)
s += ";";
@@ -324,40 +324,40 @@ DesignerPixmapCollection *DesignerProjectImpl::pixmapCollection() const
return project->pixmapCollection()->iFace();
}
-void DesignerProjectImpl::breakPoints( QMap<QString, QValueList<uint> > &bps ) const
+void DesignerProjectImpl::breakPoints( TQMap<TQString, TQValueList<uint> > &bps ) const
{
MainWindow::self->saveAllBreakPoints();
- for ( QPtrListIterator<SourceFile> sources = project->sourceFiles();
+ for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
bps.insert( project->makeRelative( f->fileName() ) + " <Source-File>", MetaDataBase::breakPoints( f ) );
}
- for ( QPtrListIterator<FormFile> forms = project->formFiles();
+ for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
if ( forms.current()->formWindow() )
- bps.insert( QString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( forms.current()->formWindow() ) );
+ bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( forms.current()->formWindow() ) );
}
}
-QString DesignerProjectImpl::breakPointCondition( QObject *o, int line ) const
+TQString DesignerProjectImpl::breakPointCondition( TQObject *o, int line ) const
{
return MetaDataBase::breakPointCondition( MainWindow::self->findRealObject( o ), line );
}
-void DesignerProjectImpl::setBreakPointCondition( QObject *o, int line, const QString &condition )
+void DesignerProjectImpl::setBreakPointCondition( TQObject *o, int line, const TQString &condition )
{
MetaDataBase::setBreakPointCondition( MainWindow::self->findRealObject( o ), line, condition );
}
void DesignerProjectImpl::clearAllBreakpoints() const
{
- QValueList<uint> empty;
- for ( QPtrListIterator<SourceFile> sources = project->sourceFiles();
+ TQValueList<uint> empty;
+ for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
MetaDataBase::setBreakPoints( f, empty );
}
- for ( QPtrListIterator<FormFile> forms = project->formFiles();
+ for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
if ( forms.current()->formWindow() )
MetaDataBase::setBreakPoints( forms.current()->formWindow(), empty );
@@ -365,57 +365,57 @@ void DesignerProjectImpl::clearAllBreakpoints() const
}
}
-void DesignerProjectImpl::setIncludePath( const QString &platform, const QString &path )
+void DesignerProjectImpl::setIncludePath( const TQString &platform, const TQString &path )
{
project->setIncludePath( platform, path );
}
-void DesignerProjectImpl::setLibs( const QString &platform, const QString &path )
+void DesignerProjectImpl::setLibs( const TQString &platform, const TQString &path )
{
project->setLibs( platform, path );
}
-void DesignerProjectImpl::setDefines( const QString &platform, const QString &path )
+void DesignerProjectImpl::setDefines( const TQString &platform, const TQString &path )
{
project->setDefines( platform, path );
}
-void DesignerProjectImpl::setConfig( const QString &platform, const QString &config )
+void DesignerProjectImpl::setConfig( const TQString &platform, const TQString &config )
{
project->setConfig( platform, config );
}
-void DesignerProjectImpl::setTemplate( const QString &t )
+void DesignerProjectImpl::setTemplate( const TQString &t )
{
project->setTemplate( t );
}
-QString DesignerProjectImpl::config( const QString &platform ) const
+TQString DesignerProjectImpl::config( const TQString &platform ) const
{
return project->config( platform );
}
-QString DesignerProjectImpl::libs( const QString &platform ) const
+TQString DesignerProjectImpl::libs( const TQString &platform ) const
{
return project->libs( platform );
}
-QString DesignerProjectImpl::defines( const QString &platform ) const
+TQString DesignerProjectImpl::defines( const TQString &platform ) const
{
return project->defines( platform );
}
-QString DesignerProjectImpl::includePath( const QString &platform ) const
+TQString DesignerProjectImpl::includePath( const TQString &platform ) const
{
return project->includePath( platform );
}
-QString DesignerProjectImpl::templte() const
+TQString DesignerProjectImpl::templte() const
{
return project->templte();
}
-bool DesignerProjectImpl::isGenericObject( QObject *o ) const
+bool DesignerProjectImpl::isGenericObject( TQObject *o ) const
{
return !!project->fakeFormFileFor( o );
}
@@ -432,66 +432,66 @@ DesignerDatabaseImpl::DesignerDatabaseImpl( DatabaseConnection *d )
{
}
-QString DesignerDatabaseImpl::name() const
+TQString DesignerDatabaseImpl::name() const
{
return db->name();
}
-void DesignerDatabaseImpl::setName( const QString & )
+void DesignerDatabaseImpl::setName( const TQString & )
{
}
-QString DesignerDatabaseImpl::driver() const
+TQString DesignerDatabaseImpl::driver() const
{
return db->driver();
}
-void DesignerDatabaseImpl::setDriver( const QString & )
+void DesignerDatabaseImpl::setDriver( const TQString & )
{
}
-QString DesignerDatabaseImpl::database() const
+TQString DesignerDatabaseImpl::database() const
{
return db->database();
}
-void DesignerDatabaseImpl::setDatabase( const QString & )
+void DesignerDatabaseImpl::setDatabase( const TQString & )
{
}
-QString DesignerDatabaseImpl::userName() const
+TQString DesignerDatabaseImpl::userName() const
{
return db->username();
}
-void DesignerDatabaseImpl::setUserName( const QString & )
+void DesignerDatabaseImpl::setUserName( const TQString & )
{
}
-QString DesignerDatabaseImpl::password() const
+TQString DesignerDatabaseImpl::password() const
{
return db->password();
}
-void DesignerDatabaseImpl::setPassword( const QString & )
+void DesignerDatabaseImpl::setPassword( const TQString & )
{
}
-QString DesignerDatabaseImpl::hostName() const
+TQString DesignerDatabaseImpl::hostName() const
{
return db->hostname();
}
-void DesignerDatabaseImpl::setHostName( const QString & )
+void DesignerDatabaseImpl::setHostName( const TQString & )
{
}
-QStringList DesignerDatabaseImpl::tables() const
+TQStringList DesignerDatabaseImpl::tables() const
{
return db->tables();
}
-QMap<QString, QStringList> DesignerDatabaseImpl::fields() const
+TQMap<TQString, TQStringList> DesignerDatabaseImpl::fields() const
{
return db->fields();
}
@@ -506,15 +506,15 @@ void DesignerDatabaseImpl::close() const
db->close();
}
-void DesignerDatabaseImpl::setFields( const QMap<QString, QStringList> & )
+void DesignerDatabaseImpl::setFields( const TQMap<TQString, TQStringList> & )
{
}
-void DesignerDatabaseImpl::setTables( const QStringList & )
+void DesignerDatabaseImpl::setTables( const TQStringList & )
{
}
-QSqlDatabase* DesignerDatabaseImpl::connection()
+TQSqlDatabase* DesignerDatabaseImpl::connection()
{
return db->connection();
}
@@ -527,7 +527,7 @@ DesignerPixmapCollectionImpl::DesignerPixmapCollectionImpl( PixmapCollection *co
{
}
-void DesignerPixmapCollectionImpl::addPixmap( const QPixmap &p, const QString &name, bool force )
+void DesignerPixmapCollectionImpl::addPixmap( const TQPixmap &p, const TQString &name, bool force )
{
PixmapCollection::Pixmap pix;
pix.pix = p;
@@ -538,7 +538,7 @@ void DesignerPixmapCollectionImpl::addPixmap( const QPixmap &p, const QString &n
MetaDataBase::setPixmapKey( fw, p.serialNumber(), name );
}
-QPixmap DesignerPixmapCollectionImpl::pixmap( const QString &name ) const
+TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const
{
return pixCollection->pixmap( name );
}
@@ -550,22 +550,22 @@ DesignerFormWindowImpl::DesignerFormWindowImpl( FormWindow *fw )
{
}
-QString DesignerFormWindowImpl::name() const
+TQString DesignerFormWindowImpl::name() const
{
return formWindow->name();
}
-void DesignerFormWindowImpl::setName( const QString &n )
+void DesignerFormWindowImpl::setName( const TQString &n )
{
formWindow->setName( n );
}
-QString DesignerFormWindowImpl::fileName() const
+TQString DesignerFormWindowImpl::fileName() const
{
return formWindow->fileName();
}
-void DesignerFormWindowImpl::setFileName( const QString & )
+void DesignerFormWindowImpl::setFileName( const TQString & )
{
}
@@ -578,25 +578,25 @@ bool DesignerFormWindowImpl::isModified() const
return formWindow->commandHistory()->isModified();
}
-void DesignerFormWindowImpl::insertWidget( QWidget * )
+void DesignerFormWindowImpl::insertWidget( TQWidget * )
{
}
-QWidget *DesignerFormWindowImpl::create( const char *className, QWidget *parent, const char *name )
+TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *parent, const char *name )
{
- QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name );
formWindow->insertWidget( w, TRUE );
formWindow->killAccels( formWindow->mainContainer() );
return w;
}
-void DesignerFormWindowImpl::removeWidget( QWidget * )
+void DesignerFormWindowImpl::removeWidget( TQWidget * )
{
}
-QWidgetList DesignerFormWindowImpl::widgets() const
+TQWidgetList DesignerFormWindowImpl::widgets() const
{
- return QWidgetList();
+ return TQWidgetList();
}
void DesignerFormWindowImpl::undo()
@@ -653,17 +653,17 @@ void DesignerFormWindowImpl::layoutG()
formWindow->layoutGrid();
}
-void DesignerFormWindowImpl::layoutHContainer( QWidget* w )
+void DesignerFormWindowImpl::layoutHContainer( TQWidget* w )
{
formWindow->layoutHorizontalContainer( w );
}
-void DesignerFormWindowImpl::layoutVContainer( QWidget* w )
+void DesignerFormWindowImpl::layoutVContainer( TQWidget* w )
{
formWindow->layoutVerticalContainer( w );
}
-void DesignerFormWindowImpl::layoutGContainer( QWidget* w )
+void DesignerFormWindowImpl::layoutGContainer( TQWidget* w )
{
formWindow->layoutGridContainer( w );
}
@@ -672,7 +672,7 @@ void DesignerFormWindowImpl::breakLayout()
{
}
-void DesignerFormWindowImpl::selectWidget( QWidget * w )
+void DesignerFormWindowImpl::selectWidget( TQWidget * w )
{
formWindow->selectWidget( w, TRUE );
}
@@ -686,38 +686,38 @@ void DesignerFormWindowImpl::clearSelection()
formWindow->clearSelection();
}
-bool DesignerFormWindowImpl::isWidgetSelected( QWidget * ) const
+bool DesignerFormWindowImpl::isWidgetSelected( TQWidget * ) const
{
return FALSE;
}
-QWidgetList DesignerFormWindowImpl::selectedWidgets() const
+TQWidgetList DesignerFormWindowImpl::selectedWidgets() const
{
return formWindow->selectedWidgets();
}
-QWidget *DesignerFormWindowImpl::currentWidget() const
+TQWidget *DesignerFormWindowImpl::currentWidget() const
{
return formWindow->currentWidget();
}
-QWidget *DesignerFormWindowImpl::form() const
+TQWidget *DesignerFormWindowImpl::form() const
{
return formWindow;
}
-void DesignerFormWindowImpl::setCurrentWidget( QWidget * )
+void DesignerFormWindowImpl::setCurrentWidget( TQWidget * )
{
}
-QPtrList<QAction> DesignerFormWindowImpl::actionList() const
+TQPtrList<TQAction> DesignerFormWindowImpl::actionList() const
{
- return QPtrList<QAction>();
+ return TQPtrList<TQAction>();
}
-QAction *DesignerFormWindowImpl::createAction( const QString& text, const QIconSet& icon, const QString& menuText, int accel,
- QObject* parent, const char* name, bool toggle )
+TQAction *DesignerFormWindowImpl::createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
+ TQObject* parent, const char* name, bool toggle )
{
QDesignerAction *a = new QDesignerAction( parent );
a->setName( name );
@@ -730,7 +730,7 @@ QAction *DesignerFormWindowImpl::createAction( const QString& text, const QIconS
return a;
}
-void DesignerFormWindowImpl::addAction( QAction *a )
+void DesignerFormWindowImpl::addAction( TQAction *a )
{
if ( formWindow->actionList().findRef( a ) != -1 )
return;
@@ -744,7 +744,7 @@ void DesignerFormWindowImpl::addAction( QAction *a )
setPropertyChanged( a, "iconSet", TRUE );
}
-void DesignerFormWindowImpl::removeAction( QAction *a )
+void DesignerFormWindowImpl::removeAction( TQAction *a )
{
formWindow->actionList().removeRef( a );
}
@@ -753,14 +753,14 @@ void DesignerFormWindowImpl::preview() const
{
}
-void DesignerFormWindowImpl::addConnection( QObject *sender, const char *signal, QObject *receiver, const char *slot )
+void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot )
{
MetaDataBase::addConnection( formWindow, sender, signal, receiver, slot );
}
-void DesignerFormWindowImpl::addFunction( const QCString &function, const QString &specifier,
- const QString &access, const QString &type,
- const QString &language, const QString &returnType )
+void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier,
+ const TQString &access, const TQString &type,
+ const TQString &language, const TQString &returnType )
{
MetaDataBase::addFunction( formWindow, function, specifier, access, type, language, returnType );
formWindow->mainWindow()->functionsChanged();
@@ -768,49 +768,49 @@ void DesignerFormWindowImpl::addFunction( const QCString &function, const QStrin
-void DesignerFormWindowImpl::setProperty( QObject *o, const char *property, const QVariant &value )
+void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, const TQVariant &value )
{
int id = o->metaObject()->findProperty( property, TRUE );
- const QMetaProperty* p = o->metaObject()->property( id, TRUE );
+ const TQMetaProperty* p = o->metaObject()->property( id, TRUE );
if ( p && p->isValid() )
o->setProperty( property, value );
else
MetaDataBase::setFakeProperty( o, property, value );
}
-QVariant DesignerFormWindowImpl::property( QObject *o, const char *prop ) const
+TQVariant DesignerFormWindowImpl::property( TQObject *o, const char *prop ) const
{
int id = o->metaObject()->findProperty( prop, TRUE );
- const QMetaProperty* p = o->metaObject()->property( id, TRUE );
+ const TQMetaProperty* p = o->metaObject()->property( id, TRUE );
if ( p && p->isValid() )
return o->property( prop );
return MetaDataBase::fakeProperty( o, prop );
}
-void DesignerFormWindowImpl::setPropertyChanged( QObject *o, const char *property, bool changed )
+void DesignerFormWindowImpl::setPropertyChanged( TQObject *o, const char *property, bool changed )
{
MetaDataBase::setPropertyChanged( o, property, changed );
}
-bool DesignerFormWindowImpl::isPropertyChanged( QObject *o, const char *property ) const
+bool DesignerFormWindowImpl::isPropertyChanged( TQObject *o, const char *property ) const
{
return MetaDataBase::isPropertyChanged( o, property );
}
-void DesignerFormWindowImpl::setColumnFields( QObject *o, const QMap<QString, QString> &f )
+void DesignerFormWindowImpl::setColumnFields( TQObject *o, const TQMap<TQString, TQString> &f )
{
MetaDataBase::setColumnFields( o, f );
}
-QStringList DesignerFormWindowImpl::implementationIncludes() const
+TQStringList DesignerFormWindowImpl::implementationIncludes() const
{
- QValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
- QStringList lst;
- for ( QValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
+ TQStringList lst;
+ for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include inc = *it;
if ( inc.implDecl != "in implementation" )
continue;
- QString s = inc.header;
+ TQString s = inc.header;
if ( inc.location == "global" ) {
s.prepend( "<" );
s.append( ">" );
@@ -823,15 +823,15 @@ QStringList DesignerFormWindowImpl::implementationIncludes() const
return lst;
}
-QStringList DesignerFormWindowImpl::declarationIncludes() const
+TQStringList DesignerFormWindowImpl::declarationIncludes() const
{
- QValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
- QStringList lst;
- for ( QValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
+ TQStringList lst;
+ for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include inc = *it;
if ( inc.implDecl == "in implementation" )
continue;
- QString s = inc.header;
+ TQString s = inc.header;
if ( inc.location == "global" ) {
s.prepend( "<" );
s.append( ">" );
@@ -844,19 +844,19 @@ QStringList DesignerFormWindowImpl::declarationIncludes() const
return lst;
}
-void DesignerFormWindowImpl::setImplementationIncludes( const QStringList &lst )
+void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst )
{
- QValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
- QValueList<MetaDataBase::Include> includes;
- for ( QValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
+ TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
+ TQValueList<MetaDataBase::Include> includes;
+ for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
MetaDataBase::Include inc = *it;
if ( inc.implDecl == "in implementation" )
continue;
includes << inc;
}
- for ( QStringList::ConstIterator sit = lst.begin(); sit != lst.end(); ++sit ) {
- QString s = *sit;
+ for ( TQStringList::ConstIterator sit = lst.begin(); sit != lst.end(); ++sit ) {
+ TQString s = *sit;
if ( s.startsWith( "#include" ) )
s.remove( (uint)0, 8 );
s = s.simplifyWhiteSpace();
@@ -886,19 +886,19 @@ void DesignerFormWindowImpl::setImplementationIncludes( const QStringList &lst )
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
-void DesignerFormWindowImpl::setDeclarationIncludes( const QStringList &lst )
+void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst )
{
- QValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
- QValueList<MetaDataBase::Include> includes;
- for ( QValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
+ TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
+ TQValueList<MetaDataBase::Include> includes;
+ for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
MetaDataBase::Include inc = *it;
if ( inc.implDecl == "in declaration" )
continue;
includes << inc;
}
- for ( QStringList::ConstIterator sit = lst.begin(); sit != lst.end(); ++sit ) {
- QString s = *sit;
+ for ( TQStringList::ConstIterator sit = lst.begin(); sit != lst.end(); ++sit ) {
+ TQString s = *sit;
if ( s.startsWith( "#include" ) )
s.remove( (uint)0, 8 );
s = s.simplifyWhiteSpace();
@@ -928,41 +928,41 @@ void DesignerFormWindowImpl::setDeclarationIncludes( const QStringList &lst )
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
-QStringList DesignerFormWindowImpl::forwardDeclarations() const
+TQStringList DesignerFormWindowImpl::forwardDeclarations() const
{
return MetaDataBase::forwards( formWindow );
}
-void DesignerFormWindowImpl::setForwardDeclarations( const QStringList &lst )
+void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst )
{
MetaDataBase::setForwards( formWindow, lst );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
-QStringList DesignerFormWindowImpl::signalList() const
+TQStringList DesignerFormWindowImpl::signalList() const
{
return MetaDataBase::signalList( formWindow );
}
-void DesignerFormWindowImpl::setSignalList( const QStringList &lst )
+void DesignerFormWindowImpl::setSignalList( const TQStringList &lst )
{
MetaDataBase::setSignalList( formWindow, lst );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
-void DesignerFormWindowImpl::onModificationChange( QObject *receiver, const char *slot )
+void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const char *slot )
{
- QObject::connect( formWindow, SIGNAL( modificationChanged( bool, FormWindow * ) ), receiver, slot );
+ TQObject::connect( formWindow, TQT_SIGNAL( modificationChanged( bool, FormWindow * ) ), receiver, slot );
}
-void DesignerFormWindowImpl::addMenu( const QString &text, const QString &name )
+void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name )
{
- if ( !::qt_cast<QMainWindow*>(formWindow->mainContainer()) )
+ if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
- QMainWindow *mw = (QMainWindow*)formWindow->mainContainer();
+ TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw );
- QString n = name;
+ TQString n = name;
formWindow->unify( popup, n, TRUE );
popup->setName( n );
MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
@@ -975,11 +975,11 @@ void DesignerFormWindowImpl::addMenu( const QString &text, const QString &name )
MetaDataBase::addEntry( popup );
}
-void DesignerFormWindowImpl::addMenuAction( const QString &menu, QAction *a )
+void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
{
- if ( !::qt_cast<QMainWindow*>(formWindow->mainContainer()) )
+ if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
- QMainWindow *mw = (QMainWindow*)formWindow->mainContainer();
+ TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
if ( !mw->child( 0, "MenuBarEditor" ) )
return;
PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" );
@@ -988,37 +988,37 @@ void DesignerFormWindowImpl::addMenuAction( const QString &menu, QAction *a )
popup->insert( a );
}
-void DesignerFormWindowImpl::addMenuSeparator( const QString &menu )
+void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
{
- if ( !::qt_cast<QMainWindow*>(formWindow->mainContainer()) )
+ if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
- QMainWindow *mw = (QMainWindow*)formWindow->mainContainer();
+ TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
if ( !mw->child( 0, "MenuBarEditor" ) )
return;
PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" );
if ( !popup )
return;
- QAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
popup->insert( a );
}
-void DesignerFormWindowImpl::addToolBar( const QString &text, const QString &name )
+void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name )
{
- if ( !::qt_cast<QMainWindow*>(formWindow->mainContainer()) )
+ if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
- QMainWindow *mw = (QMainWindow*)formWindow->mainContainer();
- QToolBar *tb = new QDesignerToolBar( mw );
- QString n = name;
+ TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
+ TQToolBar *tb = new QDesignerToolBar( mw );
+ TQString n = name;
formWindow->unify( tb, n, TRUE );
tb->setName( n );
mw->addToolBar( tb, text );
}
-void DesignerFormWindowImpl::addToolBarAction( const QString &tbn, QAction *a )
+void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a )
{
- if ( !::qt_cast<QMainWindow*>(formWindow->mainContainer()) )
+ if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
- QMainWindow *mw = (QMainWindow*)formWindow->mainContainer();
+ TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" );
if ( !tb )
return;
@@ -1026,15 +1026,15 @@ void DesignerFormWindowImpl::addToolBarAction( const QString &tbn, QAction *a )
tb->addAction( a );
}
-void DesignerFormWindowImpl::addToolBarSeparator( const QString &tbn )
+void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn )
{
- if ( !::qt_cast<QMainWindow*>(formWindow->mainContainer()) )
+ if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
- QMainWindow *mw = (QMainWindow*)formWindow->mainContainer();
+ TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" );
if ( !tb )
return;
- QAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
a->addTo( tb );
tb->addAction( a );
}
@@ -1043,7 +1043,7 @@ DesignerDockImpl::DesignerDockImpl()
{
}
-QDockWindow *DesignerDockImpl::dockWindow() const
+TQDockWindow *DesignerDockImpl::dockWindow() const
{
return 0;
}
@@ -1053,14 +1053,14 @@ DesignerOutputDockImpl::DesignerOutputDockImpl( OutputWindow *ow )
{
}
-QWidget *DesignerOutputDockImpl::addView( const QString &title )
+TQWidget *DesignerOutputDockImpl::addView( const TQString &title )
{
- QWidget *page = new QWidget( outWin );
+ TQWidget *page = new TQWidget( outWin );
outWin->addTab( page, title );
return page;
}
-void DesignerOutputDockImpl::appendDebug( const QString &s )
+void DesignerOutputDockImpl::appendDebug( const TQString &s )
{
outWin->appendDebug( s );
}
@@ -1069,13 +1069,13 @@ void DesignerOutputDockImpl::clearDebug()
{
}
-void DesignerOutputDockImpl::appendError( const QString &s, int l )
+void DesignerOutputDockImpl::appendError( const TQString &s, int l )
{
- QStringList ls;
+ TQStringList ls;
ls << s;
- QValueList<uint> ll;
+ TQValueList<uint> ll;
ll << l;
- outWin->setErrorMessages( ls, ll, FALSE, QStringList(), QObjectList() );
+ outWin->setErrorMessages( ls, ll, FALSE, TQStringList(), TQObjectList() );
}
void DesignerOutputDockImpl::clearError()
@@ -1087,7 +1087,7 @@ DesignerSourceFileImpl::DesignerSourceFileImpl( SourceFile *e )
{
}
-QString DesignerSourceFileImpl::fileName() const
+TQString DesignerSourceFileImpl::fileName() const
{
return ed->fileName();
}
diff --git a/kdevdesigner/designer/designerappiface.h b/kdevdesigner/designer/designerappiface.h
index a9eace16..8566ac8e 100644
--- a/kdevdesigner/designer/designerappiface.h
+++ b/kdevdesigner/designer/designerappiface.h
@@ -44,23 +44,23 @@ public:
DesignerProject *currentProject() const;
DesignerFormWindow *currentForm() const;
DesignerSourceFile *currentSourceFile() const;
- QPtrList<DesignerProject> projectList() const;
- void showStatusMessage( const QString &, int ms = 0 ) const;
+ TQPtrList<DesignerProject> projectList() const;
+ void showStatusMessage( const TQString &, int ms = 0 ) const;
DesignerDock *createDock() const;
DesignerOutputDock *outputDock() const;
- void setModified( bool b, QWidget *window );
+ void setModified( bool b, TQWidget *window );
void updateFunctionList();
- void onProjectChange( QObject *receiver, const char *slot );
- void onFormChange( QObject *receiver, const char *slot );
+ void onProjectChange( TQObject *receiver, const char *slot );
+ void onFormChange( TQObject *receiver, const char *slot );
bool singleProjectMode() const;
- void showError( QWidget *widget, int line, const QString &message );
+ void showError( TQWidget *widget, int line, const TQString &message );
void runFinished();
- void showStackFrame( QWidget *w, int line );
- void showDebugStep( QWidget *w, int line );
+ void showStackFrame( TQWidget *w, int line );
+ void showDebugStep( TQWidget *w, int line );
void runProjectPrecondition();
- void runProjectPostcondition( QObjectList *l );
+ void runProjectPostcondition( TQObjectList *l );
QRESULT queryInterface( const QUuid &uuid, QUnknownInterface** iface );
@@ -76,42 +76,42 @@ class DesignerProjectImpl: public DesignerProject
public:
DesignerProjectImpl( Project *pr );
- QPtrList<DesignerFormWindow> formList() const;
- QStringList formNames() const;
- QString formFileName( const QString &form ) const;
+ TQPtrList<DesignerFormWindow> formList() const;
+ TQStringList formNames() const;
+ TQString formFileName( const TQString &form ) const;
void addForm( DesignerFormWindow * );
void removeForm( DesignerFormWindow * );
- QString fileName() const;
- void setFileName( const QString & );
- QString projectName() const;
- void setProjectName( const QString & );
- QString databaseFile() const;
- void setDatabaseFile( const QString & );
+ TQString fileName() const;
+ void setFileName( const TQString & );
+ TQString projectName() const;
+ void setProjectName( const TQString & );
+ TQString databaseFile() const;
+ void setDatabaseFile( const TQString & );
void setupDatabases() const;
- QPtrList<DesignerDatabase> databaseConnections() const;
+ TQPtrList<DesignerDatabase> databaseConnections() const;
void addDatabase( DesignerDatabase * );
void removeDatabase( DesignerDatabase * );
void save() const;
- void setLanguage( const QString & );
- QString language() const;
- void setCustomSetting( const QString &key, const QString &value );
- QString customSetting( const QString &key ) const;
+ void setLanguage( const TQString & );
+ TQString language() const;
+ void setCustomSetting( const TQString &key, const TQString &value );
+ TQString customSetting( const TQString &key ) const;
DesignerPixmapCollection *pixmapCollection() const;
- void breakPoints( QMap<QString, QValueList<uint> > &bps ) const;
- QString breakPointCondition( QObject *o, int line ) const;
- void setBreakPointCondition( QObject *o, int line, const QString &condition );
+ void breakPoints( TQMap<TQString, TQValueList<uint> > &bps ) const;
+ TQString breakPointCondition( TQObject *o, int line ) const;
+ void setBreakPointCondition( TQObject *o, int line, const TQString &condition );
void clearAllBreakpoints() const;
- void setIncludePath( const QString &platform, const QString &path );
- void setLibs( const QString &platform, const QString &path );
- void setDefines( const QString &platform, const QString &path );
- void setConfig( const QString &platform, const QString &config );
- void setTemplate( const QString &t );
- QString config( const QString &platform ) const;
- QString libs( const QString &platform ) const;
- QString defines( const QString &platform ) const;
- QString includePath( const QString &platform ) const;
- QString templte() const;
- bool isGenericObject( QObject *o ) const;
+ void setIncludePath( const TQString &platform, const TQString &path );
+ void setLibs( const TQString &platform, const TQString &path );
+ void setDefines( const TQString &platform, const TQString &path );
+ void setConfig( const TQString &platform, const TQString &config );
+ void setTemplate( const TQString &t );
+ TQString config( const TQString &platform ) const;
+ TQString libs( const TQString &platform ) const;
+ TQString defines( const TQString &platform ) const;
+ TQString includePath( const TQString &platform ) const;
+ TQString templte() const;
+ bool isGenericObject( TQObject *o ) const;
private:
Project *project;
@@ -126,25 +126,25 @@ class DesignerDatabaseImpl: public DesignerDatabase
public:
DesignerDatabaseImpl( DatabaseConnection *d );
- QString name() const;
- void setName( const QString & );
- QString driver() const;
- void setDriver( const QString & );
- QString database() const;
- void setDatabase( const QString & );
- QString userName() const;
- void setUserName( const QString & );
- QString password() const;
- void setPassword( const QString & );
- QString hostName() const;
- void setHostName( const QString & );
- QStringList tables() const;
- void setTables( const QStringList & );
- QMap<QString, QStringList> fields() const;
- void setFields( const QMap<QString, QStringList> & );
+ TQString name() const;
+ void setName( const TQString & );
+ TQString driver() const;
+ void setDriver( const TQString & );
+ TQString database() const;
+ void setDatabase( const TQString & );
+ TQString userName() const;
+ void setUserName( const TQString & );
+ TQString password() const;
+ void setPassword( const TQString & );
+ TQString hostName() const;
+ void setHostName( const TQString & );
+ TQStringList tables() const;
+ void setTables( const TQStringList & );
+ TQMap<TQString, TQStringList> fields() const;
+ void setFields( const TQMap<TQString, TQStringList> & );
void open( bool suppressDialog = TRUE ) const;
void close() const;
- QSqlDatabase* connection();
+ TQSqlDatabase* connection();
private:
DatabaseConnection *db;
@@ -155,8 +155,8 @@ class DesignerPixmapCollectionImpl : public DesignerPixmapCollection
{
public:
DesignerPixmapCollectionImpl( PixmapCollection *coll );
- void addPixmap( const QPixmap &p, const QString &name, bool force );
- QPixmap pixmap( const QString &name ) const;
+ void addPixmap( const TQPixmap &p, const TQString &name, bool force );
+ TQPixmap pixmap( const TQString &name ) const;
private:
PixmapCollection *pixCollection;
@@ -168,16 +168,16 @@ class DesignerFormWindowImpl: public DesignerFormWindow
public:
DesignerFormWindowImpl( FormWindow *fw );
- QString name() const;
- void setName( const QString &n );
- QString fileName() const;
- void setFileName( const QString & );
+ TQString name() const;
+ void setName( const TQString &n );
+ TQString fileName() const;
+ void setFileName( const TQString & );
void save() const;
bool isModified() const;
- void insertWidget( QWidget * );
- QWidget *create( const char *className, QWidget *parent, const char *name );
- void removeWidget( QWidget * );
- QWidgetList widgets() const;
+ void insertWidget( TQWidget * );
+ TQWidget *create( const char *className, TQWidget *parent, const char *name );
+ void removeWidget( TQWidget * );
+ TQWidgetList widgets() const;
void undo();
void redo();
void cut();
@@ -191,48 +191,48 @@ public:
void layoutHSplit();
void layoutVSplit();
void layoutG();
- void layoutHContainer( QWidget* w );
- void layoutVContainer( QWidget* w );
- void layoutGContainer( QWidget* w );
+ void layoutHContainer( TQWidget* w );
+ void layoutVContainer( TQWidget* w );
+ void layoutGContainer( TQWidget* w );
void breakLayout();
- void selectWidget( QWidget * );
+ void selectWidget( TQWidget * );
void selectAll();
void clearSelection();
- bool isWidgetSelected( QWidget * ) const;
- QWidgetList selectedWidgets() const;
- QWidget *currentWidget() const;
- QWidget *form() const;
- void setCurrentWidget( QWidget * );
- QPtrList<QAction> actionList() const;
- QAction *createAction( const QString& text, const QIconSet& icon, const QString& menuText, int accel,
- QObject* parent, const char* name = 0, bool toggle = FALSE );
- void addAction( QAction * );
- void removeAction( QAction * );
+ bool isWidgetSelected( TQWidget * ) const;
+ TQWidgetList selectedWidgets() const;
+ TQWidget *currentWidget() const;
+ TQWidget *form() const;
+ void setCurrentWidget( TQWidget * );
+ TQPtrList<TQAction> actionList() const;
+ TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
+ TQObject* parent, const char* name = 0, bool toggle = FALSE );
+ void addAction( TQAction * );
+ void removeAction( TQAction * );
void preview() const;
- void addFunction( const QCString &function, const QString& specifier, const QString &access,
- const QString &type, const QString &language, const QString &returnType );
- void addConnection( QObject *sender, const char *signal, QObject *receiver, const char *slot );
- void setProperty( QObject *o, const char *property, const QVariant &value );
- QVariant property( QObject *o, const char *property ) const;
- void setPropertyChanged( QObject *o, const char *property, bool changed );
- bool isPropertyChanged( QObject *o, const char *property ) const;
- void setColumnFields( QObject *o, const QMap<QString, QString> & );
- QStringList implementationIncludes() const;
- QStringList declarationIncludes() const;
- void setImplementationIncludes( const QStringList &lst );
- void setDeclarationIncludes( const QStringList &lst );
- QStringList forwardDeclarations() const;
- void setForwardDeclarations( const QStringList &lst );
- QStringList signalList() const;
- void setSignalList( const QStringList &lst );
- void addMenu( const QString &text, const QString &name );
- void addMenuAction( const QString &menu, QAction *a );
- void addMenuSeparator( const QString &menu );
- void addToolBar( const QString &text, const QString &name );
- void addToolBarAction( const QString &tb, QAction *a );
- void addToolBarSeparator( const QString &tb );
-
- void onModificationChange( QObject *receiver, const char *slot );
+ void addFunction( const TQCString &function, const TQString& specifier, const TQString &access,
+ const TQString &type, const TQString &language, const TQString &returnType );
+ void addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot );
+ void setProperty( TQObject *o, const char *property, const TQVariant &value );
+ TQVariant property( TQObject *o, const char *property ) const;
+ void setPropertyChanged( TQObject *o, const char *property, bool changed );
+ bool isPropertyChanged( TQObject *o, const char *property ) const;
+ void setColumnFields( TQObject *o, const TQMap<TQString, TQString> & );
+ TQStringList implementationIncludes() const;
+ TQStringList declarationIncludes() const;
+ void setImplementationIncludes( const TQStringList &lst );
+ void setDeclarationIncludes( const TQStringList &lst );
+ TQStringList forwardDeclarations() const;
+ void setForwardDeclarations( const TQStringList &lst );
+ TQStringList signalList() const;
+ void setSignalList( const TQStringList &lst );
+ void addMenu( const TQString &text, const TQString &name );
+ void addMenuAction( const TQString &menu, TQAction *a );
+ void addMenuSeparator( const TQString &menu );
+ void addToolBar( const TQString &text, const TQString &name );
+ void addToolBarAction( const TQString &tb, TQAction *a );
+ void addToolBarSeparator( const TQString &tb );
+
+ void onModificationChange( TQObject *receiver, const char *slot );
private:
FormWindow *formWindow;
@@ -244,7 +244,7 @@ class DesignerDockImpl: public DesignerDock
public:
DesignerDockImpl();
- QDockWindow *dockWindow() const;
+ TQDockWindow *dockWindow() const;
};
class DesignerOutputDockImpl: public DesignerOutputDock
@@ -252,10 +252,10 @@ class DesignerOutputDockImpl: public DesignerOutputDock
public:
DesignerOutputDockImpl( OutputWindow *ow );
- QWidget *addView( const QString &pageName );
- void appendDebug( const QString & );
+ TQWidget *addView( const TQString &pageName );
+ void appendDebug( const TQString & );
void clearDebug();
- void appendError( const QString &, int );
+ void appendError( const TQString &, int );
void clearError();
private:
@@ -267,7 +267,7 @@ class DesignerSourceFileImpl : public DesignerSourceFile
{
public:
DesignerSourceFileImpl( SourceFile *e );
- QString fileName() const;
+ TQString fileName() const;
private:
SourceFile *ed;
diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp
index 19506e22..fd773bd0 100644
--- a/kdevdesigner/designer/editfunctionsimpl.cpp
+++ b/kdevdesigner/designer/editfunctionsimpl.cpp
@@ -36,30 +36,30 @@
#include <klineedit.h>
#include "kdevdesigner_part.h"
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qstrlist.h>
-#include <qmessagebox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qcheckbox.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqstrlist.h>
+#include <tqmessagebox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-EditFunctions::EditFunctions( QWidget *parent, FormWindow *fw, bool justSlots )
+EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
: EditFunctionsBase( parent, 0, TRUE ), formWindow( fw )
{
- connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
id = 0;
functList.clear();
- QValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( fw );
- for ( QValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) {
- QListViewItem *i = new QListViewItem( functionListView );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( fw );
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) {
+ TQListViewItem *i = new TQListViewItem( functionListView );
i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) );
i->setText( 0, (*it).function );
@@ -105,40 +105,40 @@ EditFunctions::EditFunctions( QWidget *parent, FormWindow *fw, bool justSlots )
lastType = "function";
// Enable rename for all QListViewItems
- QListViewItemIterator lvit = functionListView->firstChild();
+ TQListViewItemIterator lvit = functionListView->firstChild();
for ( ; *lvit; lvit++ )
(*lvit)->setRenameEnabled( 0, TRUE );
// Connect listview signal to signal-relay
- QObject::connect( functionListView,
- SIGNAL( itemRenamed( QListViewItem*, int, const QString & ) ),
+ TQObject::connect( functionListView,
+ TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ),
this,
- SLOT( emitItemRenamed(QListViewItem*, int, const QString&) ) );
+ TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) );
- // Connect signal-relay to QLineEdit "functionName"
- QObjectList *l = parent->queryList( "QLineEdit", "functionName" );
- QObject *obj;
- QObjectListIt itemsLineEditIt( *l );
+ // Connect signal-relay to TQLineEdit "functionName"
+ TQObjectList *l = parent->queryList( "TQLineEdit", "functionName" );
+ TQObject *obj;
+ TQObjectListIt itemsLineEditIt( *l );
while ( (obj = itemsLineEditIt.current()) != 0 ) {
++itemsLineEditIt;
- QObject::connect( this,
- SIGNAL( itemRenamed( const QString & ) ),
+ TQObject::connect( this,
+ TQT_SIGNAL( itemRenamed( const TQString & ) ),
obj,
- SLOT( setText( const QString & ) ) );
+ TQT_SLOT( setText( const TQString & ) ) );
}
delete l;
}
void EditFunctions::okClicked()
{
- QValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
- QString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() );
- QPtrList<Command> commands;
- QValueList<MetaDataBase::Function>::Iterator fit;
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
+ TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() );
+ TQPtrList<Command> commands;
+ TQValueList<MetaDataBase::Function>::Iterator fit;
if ( !functionList.isEmpty() ) {
for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) {
bool functionFound = FALSE;
- QValueList<FunctItem>::Iterator it = functList.begin();
+ TQValueList<FunctItem>::Iterator it = functList.begin();
for ( ; it != functList.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).oldName ) ==
MetaDataBase::normalizeFunction( (*fit).function ) ) {
@@ -157,11 +157,11 @@ void EditFunctions::okClicked()
}
bool invalidFunctions = FALSE;
- QValueList<FunctItem> invalidItems;
+ TQValueList<FunctItem> invalidItems;
if ( !functList.isEmpty() ) {
- QStrList lst;
- QValueList<FunctItem>::Iterator it = functList.begin();
+ TQStrList lst;
+ TQValueList<FunctItem>::Iterator it = functList.begin();
for ( ; it != functList.end(); ++it ) {
MetaDataBase::Function function;
function.function = (*it).newName;
@@ -172,7 +172,7 @@ void EditFunctions::okClicked()
function.language = formWindow->project()->language();
if ( function.returnType.isEmpty() )
function.returnType = "void";
- QString s = function.function;
+ TQString s = function.function;
s = s.simplifyWhiteSpace();
bool startNum = s[ 0 ] >= '0' && s[ 0 ] <= '9';
bool noParens = s.contains( '(' ) != 1 || s.contains( ')' ) != 1;
@@ -200,7 +200,7 @@ void EditFunctions::okClicked()
if ( MetaDataBase::normalizeFunction( (*it).newName ) != MetaDataBase::normalizeFunction( (*it).oldName ) ||
(*it).spec != (*it).oldSpec || (*it).access != (*it).oldAccess || (*it).type != (*it).oldType ||
(*it).retTyp != (*it).oldRetTyp ) {
- QString normalizedOldName = MetaDataBase::normalizeFunction( (*it).oldName );
+ TQString normalizedOldName = MetaDataBase::normalizeFunction( (*it).oldName );
if ((*it).oldName.endsWith("const")) // make sure we get the 'const' when we remove the old name
normalizedOldName += " const";
commands.append( new ChangeFunctionAttribCommand( i18n( "Change Function Attributes" ),
@@ -213,13 +213,13 @@ void EditFunctions::okClicked()
}
if ( invalidFunctions ) {
- if ( QMessageBox::information( this, i18n( "Edit Functions" ),
+ if ( TQMessageBox::information( this, i18n( "Edit Functions" ),
i18n( "Some syntactically incorrect functions have been defined.\n"
"Remove these functions?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) {
- QValueList<FunctItem>::Iterator it = functList.begin();
+ TQValueList<FunctItem>::Iterator it = functList.begin();
while ( it != functList.end() ) {
bool found = FALSE;
- QValueList<FunctItem>::Iterator vit = invalidItems.begin();
+ TQValueList<FunctItem>::Iterator vit = invalidItems.begin();
for ( ; vit != invalidItems.end(); ++vit ) {
if ( (*vit).newName == (*it).newName ) {
invalidItems.remove( vit );
@@ -230,10 +230,10 @@ void EditFunctions::okClicked()
if ( found ) {
int delId = (*it).id;
it = functList.remove( it );
- QMap<QListViewItem*, int>::Iterator fit = functionIds.begin();
+ TQMap<TQListViewItem*, int>::Iterator fit = functionIds.begin();
while ( fit != functionIds.end() ) {
if ( *fit == delId ) {
- QListViewItem *litem = fit.key();
+ TQListViewItem *litem = fit.key();
functionIds.remove( fit );
delete litem;
if ( functionListView->currentItem() )
@@ -266,9 +266,9 @@ void EditFunctions::okClicked()
accept();
}
-void EditFunctions::functionAdd( const QString &access, const QString &type )
+void EditFunctions::functionAdd( const TQString &access, const TQString &type )
{
- QListViewItem *i = new QListViewItem( functionListView );
+ TQListViewItem *i = new TQListViewItem( functionListView );
i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) );
i->setRenameEnabled( 0, TRUE );
i->setText( 1, "void" );
@@ -332,7 +332,7 @@ void EditFunctions::functionRemove()
functionListView->blockSignals( TRUE );
removedFunctions << MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ) );
int delId = functionIds[ functionListView->currentItem() ];
- QValueList<FunctItem>::Iterator it = functList.begin();
+ TQValueList<FunctItem>::Iterator it = functList.begin();
while ( it != functList.end() ) {
if ( (*it).id == delId ) {
functList.remove( it );
@@ -348,7 +348,7 @@ void EditFunctions::functionRemove()
currentItemChanged( functionListView->currentItem() );
}
-void EditFunctions::currentItemChanged( QListViewItem *i )
+void EditFunctions::currentItemChanged( TQListViewItem *i )
{
functionName->blockSignals( TRUE );
functionName->setText( "" );
@@ -363,9 +363,9 @@ void EditFunctions::currentItemChanged( QListViewItem *i )
functionName->blockSignals( TRUE );
functionName->setText( i->text( 0 ) );
editType->setText( i->text( 1 ) );
- QString specifier = i->text( 2 );
- QString access = i->text( 3 );
- QString type = i->text( 4 );
+ TQString specifier = i->text( 2 );
+ TQString access = i->text( 3 );
+ TQString type = i->text( 4 );
if ( specifier == "pure virtual" )
functionSpecifier->setCurrentItem( 2 );
else if ( specifier == "non virtual" )
@@ -389,7 +389,7 @@ void EditFunctions::currentItemChanged( QListViewItem *i )
boxProperties->setEnabled( TRUE );
}
-void EditFunctions::currentTextChanged( const QString &txt )
+void EditFunctions::currentTextChanged( const TQString &txt )
{
if ( !functionListView->currentItem() )
return;
@@ -407,7 +407,7 @@ void EditFunctions::currentTextChanged( const QString &txt )
}
}
-void EditFunctions::currentSpecifierChanged( const QString& s )
+void EditFunctions::currentSpecifierChanged( const TQString& s )
{
if ( !functionListView->currentItem() )
return;
@@ -416,7 +416,7 @@ void EditFunctions::currentSpecifierChanged( const QString& s )
functionListView->currentItem()->setText( 2, s );
}
-void EditFunctions::currentAccessChanged( const QString& a )
+void EditFunctions::currentAccessChanged( const TQString& a )
{
if ( !functionListView->currentItem() )
return;
@@ -425,7 +425,7 @@ void EditFunctions::currentAccessChanged( const QString& a )
}
-void EditFunctions::currentReturnTypeChanged( const QString &type )
+void EditFunctions::currentReturnTypeChanged( const TQString &type )
{
if ( !functionListView->currentItem() )
return;
@@ -433,7 +433,7 @@ void EditFunctions::currentReturnTypeChanged( const QString &type )
functionListView->currentItem()->setText( 1, type );
}
-void EditFunctions::currentTypeChanged( const QString &type )
+void EditFunctions::currentTypeChanged( const TQString &type )
{
if ( !functionListView->currentItem() )
return;
@@ -451,16 +451,16 @@ void EditFunctions::currentTypeChanged( const QString &type )
}
}
-void EditFunctions::changeItem( QListViewItem *item, Attribute a, const QString &nV )
+void EditFunctions::changeItem( TQListViewItem *item, Attribute a, const TQString &nV )
{
int itemId;
- QMap<QListViewItem*, int>::Iterator fit = functionIds.find( item );
+ TQMap<TQListViewItem*, int>::Iterator fit = functionIds.find( item );
if ( fit != functionIds.end() )
itemId = *fit;
else
return;
- QValueList<FunctItem>::Iterator it = functList.begin();
+ TQValueList<FunctItem>::Iterator it = functList.begin();
for ( ; it != functList.end(); ++it ) {
if ( (*it).id == itemId ) {
switch( a ) {
@@ -484,9 +484,9 @@ void EditFunctions::changeItem( QListViewItem *item, Attribute a, const QString
}
}
-void EditFunctions::setCurrentFunction( const QString &function )
+void EditFunctions::setCurrentFunction( const TQString &function )
{
- QListViewItemIterator it( functionListView );
+ TQListViewItemIterator it( functionListView );
while ( it.current() ) {
if ( MetaDataBase::normalizeFunction( it.current()->text( 0 ) ) == function ) {
functionListView->setCurrentItem( it.current() );
@@ -502,10 +502,10 @@ void EditFunctions::displaySlots( bool justSlots )
{
functionIds.clear();
functionListView->clear();
- for ( QValueList<FunctItem>::Iterator it = functList.begin(); it != functList.end(); ++it ) {
+ for ( TQValueList<FunctItem>::Iterator it = functList.begin(); it != functList.end(); ++it ) {
if ( (*it).type == "function" && justSlots )
continue;
- QListViewItem *i = new QListViewItem( functionListView );
+ TQListViewItem *i = new TQListViewItem( functionListView );
functionIds.insert( i, (*it).id );
i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) );
i->setText( 0, (*it).newName );
@@ -528,7 +528,7 @@ void EditFunctions::displaySlots( bool justSlots )
functionListView->setSelected( functionListView->firstChild(), TRUE );
}
-void EditFunctions::emitItemRenamed( QListViewItem *, int, const QString & text )
+void EditFunctions::emitItemRenamed( TQListViewItem *, int, const TQString & text )
{
- emit itemRenamed( text ); // Relay signal ( to QLineEdit )
+ emit itemRenamed( text ); // Relay signal ( to TQLineEdit )
}
diff --git a/kdevdesigner/designer/editfunctionsimpl.h b/kdevdesigner/designer/editfunctionsimpl.h
index f19f9d72..f068c9dc 100644
--- a/kdevdesigner/designer/editfunctionsimpl.h
+++ b/kdevdesigner/designer/editfunctionsimpl.h
@@ -30,7 +30,7 @@
#include "editfunctions.h"
#include "hierarchyview.h"
#include "metadatabase.h"
-#include <qmap.h>
+#include <tqmap.h>
class FormWindow;
class QListViewItem;
@@ -40,55 +40,55 @@ class EditFunctions : public EditFunctionsBase
Q_OBJECT
public:
- EditFunctions( QWidget *parent, FormWindow *fw, bool showOnlySlots = FALSE );
+ EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = FALSE );
- void setCurrentFunction( const QString &function );
- void functionAdd( const QString &access = QString::null,
- const QString &type = QString::null );
+ void setCurrentFunction( const TQString &function );
+ void functionAdd( const TQString &access = TQString::null,
+ const TQString &type = TQString::null );
void functionAdd() { functionAdd( "public" ); }
signals:
- void itemRenamed(const QString &);
+ void itemRenamed(const TQString &);
protected slots:
void okClicked();
void functionRemove();
- void currentItemChanged( QListViewItem * );
- void currentTextChanged( const QString &txt );
- void currentSpecifierChanged( const QString &s );
- void currentAccessChanged( const QString &a );
- void currentReturnTypeChanged( const QString &type );
- void currentTypeChanged( const QString &type );
+ void currentItemChanged( TQListViewItem * );
+ void currentTextChanged( const TQString &txt );
+ void currentSpecifierChanged( const TQString &s );
+ void currentAccessChanged( const TQString &a );
+ void currentReturnTypeChanged( const TQString &type );
+ void currentTypeChanged( const TQString &type );
void displaySlots( bool justSlots );
- void emitItemRenamed( QListViewItem *, int, const QString & );
+ void emitItemRenamed( TQListViewItem *, int, const TQString & );
private:
enum Attribute { Name, Specifier, Access, ReturnType, Type };
struct FunctItem {
int id;
- QString oldName;
- QString newName;
- QString oldRetTyp;
- QString retTyp;
- QString spec;
- QString oldSpec;
- QString access;
- QString oldAccess;
- QString type;
- QString oldType;
+ TQString oldName;
+ TQString newName;
+ TQString oldRetTyp;
+ TQString retTyp;
+ TQString spec;
+ TQString oldSpec;
+ TQString access;
+ TQString oldAccess;
+ TQString type;
+ TQString oldType;
Q_DUMMY_COMPARISON_OPERATOR( FunctItem )
};
- void changeItem( QListViewItem *item, Attribute a, const QString &nV );
+ void changeItem( TQListViewItem *item, Attribute a, const TQString &nV );
FormWindow *formWindow;
- QMap<QListViewItem*, int> functionIds;
- QStringList removedFunctions;
- QValueList<MetaDataBase::Function> itemList;
- QValueList<FunctItem> functList;
+ TQMap<TQListViewItem*, int> functionIds;
+ TQStringList removedFunctions;
+ TQValueList<MetaDataBase::Function> itemList;
+ TQValueList<FunctItem> functList;
int id;
- QString lastType;
+ TQString lastType;
};
#endif
diff --git a/kdevdesigner/designer/filechooser.cpp b/kdevdesigner/designer/filechooser.cpp
index 5a882b37..9f1287e0 100644
--- a/kdevdesigner/designer/filechooser.cpp
+++ b/kdevdesigner/designer/filechooser.cpp
@@ -25,31 +25,31 @@
**********************************************************************/
#include "filechooser.h"
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qfiledialog.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqfiledialog.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-FileChooser::FileChooser( QWidget *parent, const char *name )
- : QWidget( parent, name ), md( File )
+FileChooser::FileChooser( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), md( File )
{
- QHBoxLayout *layout = new QHBoxLayout( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this );
layout->setMargin( 0 );
- lineEdit = new QLineEdit( this, "filechooser_lineedit" );
+ lineEdit = new TQLineEdit( this, "filechooser_lineedit" );
layout->addWidget( lineEdit );
- connect( lineEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( fileNameChanged( const QString & ) ) );
+ connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( fileNameChanged( const TQString & ) ) );
- button = new QPushButton( "...", this, "filechooser_button" );
+ button = new TQPushButton( "...", this, "filechooser_button" );
button->setFixedWidth( button->fontMetrics().width( " ... " ) );
layout->addWidget( button );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( chooseFile() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( chooseFile() ) );
setFocusProxy( lineEdit );
}
@@ -64,21 +64,21 @@ FileChooser::Mode FileChooser::mode() const
return md;
}
-void FileChooser::setFileName( const QString &fn )
+void FileChooser::setFileName( const TQString &fn )
{
lineEdit->setText( fn );
}
-QString FileChooser::fileName() const
+TQString FileChooser::fileName() const
{
return lineEdit->text();
}
void FileChooser::chooseFile()
{
- QString fn;
+ TQString fn;
if ( mode() == File )
- fn = KFileDialog::getOpenFileName( lineEdit->text(), QString::null, this );
+ fn = KFileDialog::getOpenFileName( lineEdit->text(), TQString::null, this );
else
fn = KFileDialog::getExistingDirectory( lineEdit->text(),this );
diff --git a/kdevdesigner/designer/filechooser.h b/kdevdesigner/designer/filechooser.h
index 6647a1d5..552b645c 100644
--- a/kdevdesigner/designer/filechooser.h
+++ b/kdevdesigner/designer/filechooser.h
@@ -27,7 +27,7 @@
#ifndef FILECHOOSER_H
#define FILECHOOSER_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLineEdit;
class QPushButton;
@@ -38,29 +38,29 @@ class FileChooser : public QWidget
Q_ENUMS( Mode )
Q_PROPERTY( Mode mode READ mode WRITE setMode )
- Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
+ Q_PROPERTY( TQString fileName READ fileName WRITE setFileName )
public:
- FileChooser( QWidget *parent = 0, const char *name = 0);
+ FileChooser( TQWidget *parent = 0, const char *name = 0);
enum Mode { File, Directory };
- QString fileName() const;
+ TQString fileName() const;
Mode mode() const;
public slots:
- void setFileName( const QString &fn );
+ void setFileName( const TQString &fn );
void setMode( Mode m );
signals:
- void fileNameChanged( const QString & );
+ void fileNameChanged( const TQString & );
private slots:
void chooseFile();
private:
- QLineEdit *lineEdit;
- QPushButton *button;
+ TQLineEdit *lineEdit;
+ TQPushButton *button;
Mode md;
};
diff --git a/kdevdesigner/designer/finddialog.ui.h b/kdevdesigner/designer/finddialog.ui.h
index c9b4f230..0abde994 100644
--- a/kdevdesigner/designer/finddialog.ui.h
+++ b/kdevdesigner/designer/finddialog.ui.h
@@ -49,7 +49,7 @@ void FindDialog::doFind()
}
-void FindDialog::setEditor( EditorInterface * e, QObject * fw )
+void FindDialog::setEditor( EditorInterface * e, TQObject * fw )
{
if ( fw != formWindow )
checkBegin->setChecked( TRUE );
diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp
index cde7eb8b..e65ed706 100644
--- a/kdevdesigner/designer/formfile.cpp
+++ b/kdevdesigner/designer/formfile.cpp
@@ -34,22 +34,22 @@
#include "../interfaces/languageinterface.h"
#include "resource.h"
#include "workspace.h"
-#include <qmessagebox.h>
-#include <qfile.h>
-#include <qstatusbar.h>
+#include <tqmessagebox.h>
+#include <tqfile.h>
+#include <tqstatusbar.h>
#include "propertyeditor.h"
-#include <qworkspace.h>
+#include <tqworkspace.h>
#include <stdlib.h>
#include "designerappiface.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kfiledialog.h>
#include <klocale.h>
#include "kdevdesigner_part.h"
-static QString make_func_pretty( const QString &s )
+static TQString make_func_pretty( const TQString &s )
{
- QString res = s;
+ TQString res = s;
if ( res.find( ")" ) - res.find( "(" ) == 1 )
return res;
res.replace( "(", "( " );
@@ -64,7 +64,7 @@ static QString make_func_pretty( const QString &s )
return res;
}
-FormFile::FormFile( const QString &fn, bool temp, Project *p, const char *name )
+FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name )
: filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ),
timeStamp( 0, fn + codeExtension() ), codeEdited( FALSE ), pkg( FALSE ),
cm( FALSE ), codeFileStat( None )
@@ -77,7 +77,7 @@ FormFile::FormFile( const QString &fn, bool temp, Project *p, const char *name )
if ( !temp )
checkFileName( FALSE );
- connect(this, SIGNAL(somethingChanged(FormFile* )), this, SLOT(emitNewStatus(FormFile* )));
+ connect(this, TQT_SIGNAL(somethingChanged(FormFile* )), this, TQT_SLOT(emitNewStatus(FormFile* )));
}
FormFile::~FormFile()
@@ -97,7 +97,7 @@ void FormFile::setFormWindow( FormWindow *f )
if ( fw )
fw->setFormFile( this );
parseCode( cod, FALSE );
- QTimer::singleShot( 0, this, SLOT( notifyFormWindowChange() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( notifyFormWindowChange() ) );
}
void FormFile::setEditor( SourceEditor *e )
@@ -105,7 +105,7 @@ void FormFile::setEditor( SourceEditor *e )
ed = e;
}
-void FormFile::setFileName( const QString &fn )
+void FormFile::setFileName( const TQString &fn )
{
if ( fn == filename )
return;
@@ -123,7 +123,7 @@ void FormFile::setFileName( const QString &fn )
loadCode();
}
-void FormFile::setCode( const QString &c )
+void FormFile::setCode( const TQString &c )
{
cod = c;
}
@@ -138,25 +138,25 @@ SourceEditor *FormFile::editor() const
return ed;
}
-QString FormFile::fileName() const
+TQString FormFile::fileName() const
{
return filename;
}
-QString FormFile::absFileName() const
+TQString FormFile::absFileName() const
{
return pro->makeAbsolute( filename );
}
-QString FormFile::codeFile() const
+TQString FormFile::codeFile() const
{
- QString codeExt = codeExtension();
+ TQString codeExt = codeExtension();
if ( codeExt.isEmpty() )
return "";
return filename + codeExt;
}
-QString FormFile::code()
+TQString FormFile::code()
{
return cod;
}
@@ -176,22 +176,22 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
return FALSE;
}
- if ( QFile::exists( pro->makeAbsolute( filename ) ) ) {
- QString fn( pro->makeAbsolute( filename ) );
+ if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) {
+ TQString fn( pro->makeAbsolute( filename ) );
#if defined(Q_OS_WIN32)
fn += ".bak";
#else
fn += "~";
#endif
- QFile f( pro->makeAbsolute( filename ) );
+ TQFile f( pro->makeAbsolute( filename ) );
if ( f.open( IO_ReadOnly ) ) {
- QFile f2( fn );
+ TQFile f2( fn );
if ( f2.open( IO_WriteOnly | IO_Translate ) ) {
- QCString data( f.size() );
+ TQCString data( f.size() );
f.readBlock( data.data(), f.size() );
f2.writeBlock( data );
} else {
- QMessageBox::warning( MainWindow::self, i18n( "Save" ),
+ TQMessageBox::warning( MainWindow::self, i18n( "Save" ),
i18n( "The file %1 could not be saved" ).arg( codeFile() ) );
}
}
@@ -199,22 +199,22 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
}
if ( isModified( WFormCode ) ) {
- if ( QFile::exists( pro->makeAbsolute( codeFile() ) ) ) {
- QString fn( pro->makeAbsolute( codeFile() ) );
+ if ( TQFile::exists( pro->makeAbsolute( codeFile() ) ) ) {
+ TQString fn( pro->makeAbsolute( codeFile() ) );
#if defined(Q_OS_WIN32)
fn += ".bak";
#else
fn += "~";
#endif
- QFile f( pro->makeAbsolute( codeFile() ) );
+ TQFile f( pro->makeAbsolute( codeFile() ) );
if ( f.open( IO_ReadOnly ) ) {
- QFile f2( fn );
+ TQFile f2( fn );
if ( f2.open( IO_WriteOnly | IO_Translate) ) {
- QCString data( f.size() );
+ TQCString data( f.size() );
f.readBlock( data.data(), f.size() );
f2.writeBlock( data );
- } else if ( qApp->type() != QApplication::Tty ) {
- QMessageBox::warning( MainWindow::self, i18n( "Save" ),
+ } else if ( qApp->type() != TQApplication::Tty ) {
+ TQMessageBox::warning( MainWindow::self, i18n( "Save" ),
i18n( "The file %1 could not be saved" ).arg( codeFile() ) );
}
}
@@ -246,19 +246,19 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
bool FormFile::saveAs( bool ignoreModified )
{
- QString f = pro->makeAbsolute( fileName() );
+ TQString f = pro->makeAbsolute( fileName() );
if ( fileNameTemp && formWindow() ) {
- f = QString( formWindow()->name() ).lower();
+ f = TQString( formWindow()->name() ).lower();
f.replace( "::", "_" );
f = pro->makeAbsolute( f + ".ui" );
}
bool saved = FALSE;
if ( ignoreModified ) {
- QString dir = QStringList::split( ':', pro->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first();
- f = QFileInfo( f ).fileName();
+ TQString dir = TQStringList::split( ':', pro->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first();
+ f = TQFileInfo( f ).fileName();
f.prepend( dir + "/" );
}
- QString fn;
+ TQString fn;
while ( !saved ) {
fn = KFileDialog::getSaveFileName( f,
i18n( "*.ui|Qt User-Interface Files" ) + "\n" +
@@ -267,17 +267,17 @@ bool FormFile::saveAs( bool ignoreModified )
MainWindow::self ? &MainWindow::self->lastSaveFilter : 0*/ );
if ( fn.isEmpty() )
return FALSE;
- QFileInfo fi( fn );
+ TQFileInfo fi( fn );
if ( fi.extension() != "ui" )
fn += ".ui";
fileNameTemp = FALSE;
filename = pro->makeRelative( fn );
- QFileInfo relfi( filename );
+ TQFileInfo relfi( filename );
if ( relfi.exists() ) {
- if ( QMessageBox::warning( MainWindow::self, i18n( "File Already Exists" ),
+ if ( TQMessageBox::warning( MainWindow::self, i18n( "File Already Exists" ),
i18n( "The file already exists. Do you wish to overwrite it?" ),
- QMessageBox::Yes,
- QMessageBox::No ) == QMessageBox::Yes ) {
+ TQMessageBox::Yes,
+ TQMessageBox::No ) == TQMessageBox::Yes ) {
saved = TRUE;
} else {
filename = f;
@@ -325,7 +325,7 @@ bool FormFile::closeEvent()
if ( editor() )
editor()->save();
- switch ( QMessageBox::warning( MainWindow::self, i18n( "Save Form" ),
+ switch ( TQMessageBox::warning( MainWindow::self, i18n( "Save Form" ),
i18n( "Save changes to form '%1'?" ).arg( filename ),
i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) {
case 0: // save
@@ -437,7 +437,7 @@ bool FormFile::setupUihFile( bool askForUih )
}
if ( codeFileStat != FormFile::Ok && !ed ) {
if ( hasFormCode() ) {
- int i = QMessageBox::information( MainWindow::self, i18n( "Using ui.h File" ),
+ int i = TQMessageBox::information( MainWindow::self, i18n( "Using ui.h File" ),
i18n( "An \"ui.h\" file for this form already exists.\n"
"Do you want to use it or create a new one?" ),
i18n( "Use Existing" ), i18n( "Create New" ),
@@ -447,9 +447,9 @@ bool FormFile::setupUihFile( bool askForUih )
if ( i == 1 )
createFormCode();
} else {
- if ( QMessageBox::Yes != QMessageBox::information( MainWindow::self, i18n( "Creating ui.h file" ),
+ if ( TQMessageBox::Yes != TQMessageBox::information( MainWindow::self, i18n( "Creating ui.h file" ),
i18n( "Do you want to create an new \"ui.h\" file?" ),
- QMessageBox::Yes, QMessageBox::No ) )
+ TQMessageBox::Yes, TQMessageBox::No ) )
return FALSE;
createFormCode();
}
@@ -474,12 +474,12 @@ SourceEditor *FormFile::showEditor( bool askForUih )
}
static int ui_counter = 0;
-QString FormFile::createUnnamedFileName()
+TQString FormFile::createUnnamedFileName()
{
- return QString( "unnamed" ) + QString::number( ++ui_counter ) + QString( ".ui" );
+ return TQString( "unnamed" ) + TQString::number( ++ui_counter ) + TQString( ".ui" );
}
-QString FormFile::codeExtension() const
+TQString FormFile::codeExtension() const
{
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
if ( iface )
@@ -487,9 +487,9 @@ QString FormFile::codeExtension() const
return "";
}
-QString FormFile::codeComment() const
+TQString FormFile::codeComment() const
{
- return QString( "/****************************************************************************\n"
+ return TQString( "/****************************************************************************\n"
"** ui.h extension file, included from the uic-generated form implementation.\n"
"**\n"
"** If you want to add, delete, or rename functions or slots, use\n"
@@ -504,7 +504,7 @@ QString FormFile::codeComment() const
bool FormFile::hasFormCode() const
{
- return !cod.isEmpty() && cod != QString( codeComment() );
+ return !cod.isEmpty() && cod != TQString( codeComment() );
}
int FormFile::codeFileState() const
@@ -526,12 +526,12 @@ void FormFile::createFormCode()
return;
if ( pro->isCpp() )
cod = codeComment();
- QValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow() );
- for ( QValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) {
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow() );
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) {
cod += (!cod.isEmpty() ? "\n\n" : "") +
iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function),
(*it).returnType.isEmpty() ?
- QString( "void" ) :
+ TQString( "void" ) :
(*it).returnType, (*it).access ) +
"\n" + iface->createEmptyFunction();
}
@@ -546,13 +546,13 @@ void FormFile::load()
bool FormFile::loadCode()
{
- QFile f( pro->makeAbsolute( codeFile() ) );
+ TQFile f( pro->makeAbsolute( codeFile() ) );
if ( !f.open( IO_ReadOnly ) ) {
cod = "";
setCodeFileState( FormFile::None );
return FALSE;
}
- QTextStream ts( &f );
+ TQTextStream ts( &f );
cod = ts.read();
parseCode( cod, FALSE );
if ( hasFormCode() && codeFileStat != FormFile::Ok )
@@ -571,24 +571,24 @@ void FormFile::setCodeEdited( bool b )
codeEdited = b;
}
-void FormFile::parseCode( const QString &txt, bool allowModify )
+void FormFile::parseCode( const TQString &txt, bool allowModify )
{
if ( !formWindow() )
return;
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
if ( !iface )
return;
- QValueList<LanguageInterface::Function> functions;
- QValueList<MetaDataBase::Function> newFunctions, oldFunctions;
+ TQValueList<LanguageInterface::Function> functions;
+ TQValueList<MetaDataBase::Function> newFunctions, oldFunctions;
oldFunctions = MetaDataBase::functionList( formWindow() );
iface->functions( txt, &functions );
- QMap<QString, QString> funcs;
- for ( QValueList<LanguageInterface::Function>::Iterator it = functions.begin();
+ TQMap<TQString, TQString> funcs;
+ for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin();
it != functions.end(); ++it ) {
bool found = FALSE;
- for ( QValueList<MetaDataBase::Function>::Iterator fit = oldFunctions.begin();
+ for ( TQValueList<MetaDataBase::Function>::Iterator fit = oldFunctions.begin();
fit != oldFunctions.end(); ++fit ) {
- QString f( (*fit).function );
+ TQString f( (*fit).function );
if ( MetaDataBase::normalizeFunction( f ) ==
MetaDataBase::normalizeFunction( (*it).name ) ) {
found = TRUE;
@@ -651,13 +651,13 @@ void FormFile::checkTimeStamp()
return;
timeStamp.update();
if ( codeEdited ) {
- if ( QMessageBox::information( MainWindow::self, i18n( "Qt Designer" ),
+ if ( TQMessageBox::information( MainWindow::self, i18n( "Qt Designer" ),
i18n( "File '%1' has been changed outside Qt Designer.\n"
"Do you want to reload it?" ).arg( timeStamp.fileName() ),
i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) {
- QFile f( timeStamp.fileName() );
+ TQFile f( timeStamp.fileName() );
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
editor()->editorInterface()->setText( ts.read() );
editor()->save();
if ( MainWindow::self )
@@ -690,10 +690,10 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
if ( !iface )
return;
- QValueList<LanguageInterface::Function> funcs;
+ TQValueList<LanguageInterface::Function> funcs;
iface->functions( cod, &funcs );
bool hasFunc = FALSE;
- for ( QValueList<LanguageInterface::Function>::Iterator it = funcs.begin();
+ for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin();
it != funcs.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).name ) == MetaDataBase::normalizeFunction( function.function ) ) {
hasFunc = TRUE;
@@ -705,15 +705,15 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
if ( !codeEdited && !timeStamp.isUpToDate() )
loadCode();
MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( formWindow() );
- QString cn;
+ TQString cn;
if ( mi.classNameChanged )
cn = mi.className;
if ( cn.isEmpty() )
cn = formWindow()->name();
- QString body = "\n\n" + iface->createFunctionStart( cn,
+ TQString body = "\n\n" + iface->createFunctionStart( cn,
make_func_pretty( function.function ),
function.returnType.isEmpty() ?
- QString( "void" ) :
+ TQString( "void" ) :
function.returnType, function.access ) +
"\n" + iface->createEmptyFunction();
cod += body;
@@ -734,13 +734,13 @@ void FormFile::removeFunctionCode( MetaDataBase::Function function )
return;
checkTimeStamp();
- QString sourceCode = code();
+ TQString sourceCode = code();
if ( sourceCode.isEmpty() )
return;
- QValueList<LanguageInterface::Function> functions;
+ TQValueList<LanguageInterface::Function> functions;
iface->functions( sourceCode, &functions );
- QString fu = MetaDataBase::normalizeFunction( function.function );
- for ( QValueList<LanguageInterface::Function>::Iterator fit = functions.begin(); fit != functions.end(); ++fit ) {
+ TQString fu = MetaDataBase::normalizeFunction( function.function );
+ for ( TQValueList<LanguageInterface::Function>::Iterator fit = functions.begin(); fit != functions.end(); ++fit ) {
if ( MetaDataBase::normalizeFunction( (*fit).name ) == fu ) {
int line = 0;
int start = 0;
@@ -773,10 +773,10 @@ void FormFile::removeFunctionCode( MetaDataBase::Function function )
}
}
-void FormFile::functionNameChanged( const QString &oldName, const QString &newName )
+void FormFile::functionNameChanged( const TQString &oldName, const TQString &newName )
{
if ( !cod.isEmpty() ) {
- QString funcStart = QString( formWindow()->name() ) + QString( "::" );
+ TQString funcStart = TQString( formWindow()->name() ) + TQString( "::" );
int i = cod.find( funcStart + oldName );
if ( i != -1 ) {
cod.remove( i + funcStart.length(), oldName.length() );
@@ -785,11 +785,11 @@ void FormFile::functionNameChanged( const QString &oldName, const QString &newNa
}
}
-void FormFile::functionRetTypeChanged( const QString &fuName, const QString &oldType, const QString &newType )
+void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType )
{
if ( !cod.isEmpty() ) {
- QString oldFunct = oldType + " " + QString( formWindow()->name() ) + "::" + fuName;
- QString newFunct = newType + " " + QString( formWindow()->name() ) + "::" + fuName;
+ TQString oldFunct = oldType + " " + TQString( formWindow()->name() ) + "::" + fuName;
+ TQString newFunct = newType + " " + TQString( formWindow()->name() ) + "::" + fuName;
int i = cod.find( oldFunct );
if ( i != -1 ) {
@@ -799,7 +799,7 @@ void FormFile::functionRetTypeChanged( const QString &fuName, const QString &old
}
}
-QString FormFile::formName() const
+TQString FormFile::formName() const
{
FormFile* that = (FormFile*) this;
if ( formWindow() ) {
@@ -808,11 +808,11 @@ QString FormFile::formName() const
}
if ( !cachedFormName.isNull() )
return cachedFormName;
- QFile f( pro->makeAbsolute( filename ) );
+ TQFile f( pro->makeAbsolute( filename ) );
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
- QString line;
- QString className;
+ TQTextStream ts( &f );
+ TQString line;
+ TQString className;
while ( !ts.eof() ) {
line = ts.readLine();
if ( !className.isEmpty() ) {
@@ -852,11 +852,11 @@ bool FormFile::checkFileName( bool allowBreak )
{
FormFile *ff = pro->findFormFile( filename, this );
if ( ff )
- QMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ),
+ TQMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ),
i18n( "The project already contains a form with a\n"
"filename of '%1'. Please choose a new filename." ).arg( filename ) );
while ( ff ) {
- QString fn;
+ TQString fn;
while ( fn.isEmpty() ) {
fn = KFileDialog::getSaveFileName( pro->makeAbsolute( fileName() ),
i18n( "*.ui|Qt User-Interface Files" ) + "\n" +
@@ -873,8 +873,8 @@ bool FormFile::checkFileName( bool allowBreak )
return TRUE;
}
-void FormFile::addConnection( const QString &sender, const QString &signal,
- const QString &receiver, const QString &slot )
+void FormFile::addConnection( const TQString &sender, const TQString &signal,
+ const TQString &receiver, const TQString &slot )
{
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
if ( iface )
@@ -883,8 +883,8 @@ void FormFile::addConnection( const QString &sender, const QString &signal,
ed->editorInterface()->setText( cod );
}
-void FormFile::removeConnection( const QString &sender, const QString &signal,
- const QString &receiver, const QString &slot )
+void FormFile::removeConnection( const TQString &sender, const TQString &signal,
+ const TQString &receiver, const TQString &slot )
{
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
if ( iface )
diff --git a/kdevdesigner/designer/formfile.h b/kdevdesigner/designer/formfile.h
index 65d0f389..a2767d33 100644
--- a/kdevdesigner/designer/formfile.h
+++ b/kdevdesigner/designer/formfile.h
@@ -27,7 +27,7 @@
#ifndef FORMFILE_H
#define FORMFILE_H
-#include <qobject.h>
+#include <tqobject.h>
#include "timestamp.h"
#include "metadatabase.h"
@@ -49,25 +49,25 @@ public:
enum UihState { None, Ok, Deleted };
- FormFile( const QString &fn, bool temp, Project *p, const char *name = 0 );
+ FormFile( const TQString &fn, bool temp, Project *p, const char *name = 0 );
~FormFile();
void setFormWindow( FormWindow *f );
void setEditor( SourceEditor *e );
- void setFileName( const QString &fn );
- void setCode( const QString &c );
+ void setFileName( const TQString &fn );
+ void setCode( const TQString &c );
void setModified( bool m, int who = WAnyOrAll );
void setCodeEdited( bool b );
FormWindow *formWindow() const;
SourceEditor *editor() const;
- QString fileName() const;
- QString absFileName() const;
+ TQString fileName() const;
+ TQString absFileName() const;
bool supportsCodeFile() const { return !codeExtension().isEmpty(); }
- QString codeComment() const;
- QString codeFile() const;
- QString code();
+ TQString codeComment() const;
+ TQString codeFile() const;
+ TQString code();
bool isCodeEdited() const;
bool loadCode();
@@ -84,23 +84,23 @@ public:
bool isUihFileUpToDate();
void addFunctionCode( MetaDataBase::Function function );
void removeFunctionCode( MetaDataBase::Function function );
- void functionNameChanged( const QString &oldName, const QString &newName );
- void functionRetTypeChanged( const QString &fuName, const QString &oldType, const QString &newType );
+ void functionNameChanged( const TQString &oldName, const TQString &newName );
+ void functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType );
void showFormWindow();
SourceEditor *showEditor( bool askForUih = TRUE );
- static QString createUnnamedFileName();
- QString formName() const;
+ static TQString createUnnamedFileName();
+ TQString formName() const;
bool isFake() const { return fake; }
- void parseCode( const QString &txt, bool allowModify );
+ void parseCode( const TQString &txt, bool allowModify );
- void addConnection( const QString &sender, const QString &signal,
- const QString &receiver, const QString &slot );
- void removeConnection( const QString &sender, const QString &signal,
- const QString &receiver, const QString &slot );
+ void addConnection( const TQString &sender, const TQString &signal,
+ const TQString &receiver, const TQString &slot );
+ void removeConnection( const TQString &sender, const TQString &signal,
+ const TQString &receiver, const TQString &slot );
bool hasTempFileName() const { return fileNameTemp; }
void setCodeFileState( UihState );
@@ -122,19 +122,19 @@ private:
bool isCodeModified() const;
void setFormWindowModified( bool m );
void setCodeModified( bool m );
- QString codeExtension() const;
+ TQString codeExtension() const;
bool checkFileName( bool allowBreak );
private:
- QString filename;
+ TQString filename;
bool fileNameTemp;
Project *pro;
FormWindow *fw;
SourceEditor *ed;
- QString cod;
+ TQString cod;
TimeStamp timeStamp;
bool codeEdited;
- QString cachedFormName;
+ TQString cachedFormName;
bool fake;
bool pkg;
bool cm;
diff --git a/kdevdesigner/designer/formsettingsimpl.cpp b/kdevdesigner/designer/formsettingsimpl.cpp
index ce76dde7..edbb8134 100644
--- a/kdevdesigner/designer/formsettingsimpl.cpp
+++ b/kdevdesigner/designer/formsettingsimpl.cpp
@@ -32,18 +32,18 @@
#include "mainwindow.h"
#include "project.h"
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qradiobutton.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqradiobutton.h>
#include <klineedit.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
-FormSettings::FormSettings( QWidget *parent, FormWindow *fw )
+FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
: FormSettingsBase( parent, 0, TRUE ), formwindow( fw )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw );
if ( info.classNameChanged && !info.className.isEmpty() )
editClassName->setText( info.className );
@@ -52,8 +52,8 @@ FormSettings::FormSettings( QWidget *parent, FormWindow *fw )
editComment->setText( info.comment );
editAuthor->setText( info.author );
- editClassName->setValidator( new AsciiValidator( QString( ":" ), editClassName ) );
- editPixmapFunction->setValidator( new AsciiValidator( QString( ":" ), editPixmapFunction ) );
+ editClassName->setValidator( new AsciiValidator( TQString( ":" ), editClassName ) );
+ editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), editPixmapFunction ) );
if ( formwindow->savePixmapInline() )
radioPixmapInline->setChecked( TRUE );
@@ -65,8 +65,8 @@ FormSettings::FormSettings( QWidget *parent, FormWindow *fw )
radioProjectImageFile->setEnabled( !fw->project()->isDummy() );
spinSpacing->setValue( formwindow->layoutDefaultSpacing() );
spinMargin->setValue( formwindow->layoutDefaultMargin() );
- editSpacingFunction->setValidator( new AsciiValidator( QString( ":" ), editSpacingFunction ) );
- editMarginFunction->setValidator( new AsciiValidator( QString( ":" ), editMarginFunction ) );
+ editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), editSpacingFunction ) );
+ editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), editMarginFunction ) );
checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() );
editSpacingFunction->setText( formwindow->spacingFunction() );
editMarginFunction->setText( formwindow->marginFunction() );
@@ -76,7 +76,7 @@ void FormSettings::okClicked()
{
MetaDataBase::MetaInfo info;
info.className = editClassName->text();
- info.classNameChanged = info.className != QString( formwindow->name() );
+ info.classNameChanged = info.className != TQString( formwindow->name() );
info.comment = editComment->text();
info.author = editAuthor->text();
MetaDataBase::setMetaInfo( formwindow, info );
diff --git a/kdevdesigner/designer/formsettingsimpl.h b/kdevdesigner/designer/formsettingsimpl.h
index 08750fbc..d8944ae5 100644
--- a/kdevdesigner/designer/formsettingsimpl.h
+++ b/kdevdesigner/designer/formsettingsimpl.h
@@ -36,7 +36,7 @@ class FormSettings : public FormSettingsBase
Q_OBJECT
public:
- FormSettings( QWidget *parent, FormWindow *fw );
+ FormSettings( TQWidget *parent, FormWindow *fw );
protected slots:
void okClicked();
diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp
index d9de42cc..9c90e383 100644
--- a/kdevdesigner/designer/formwindow.cpp
+++ b/kdevdesigner/designer/formwindow.cpp
@@ -48,30 +48,30 @@
#include <klocale.h>
#include "kdevdesigner_part.h"
-#include <qevent.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qlabel.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qstatusbar.h>
-#include <qapplication.h>
-#include <qpalette.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qsizegrip.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
-#include <qmetaobject.h>
-#include <qtooltip.h>
-#include <qfeatures.h>
-#include <qaccel.h>
-#include <qpixmapcache.h>
-#include <qbitmap.h>
-#include <qsplitter.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqlabel.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqstatusbar.h>
+#include <tqapplication.h>
+#include <tqpalette.h>
+#include <tqmessagebox.h>
+#include <tqpopupmenu.h>
+#include <tqsizegrip.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
+#include <tqmetaobject.h>
+#include <tqtooltip.h>
+#include <tqfeatures.h>
+#include <tqaccel.h>
+#include <tqpixmapcache.h>
+#include <tqbitmap.h>
+#include <tqsplitter.h>
// FormWindow should be able to work to some limited degree
// (existance, loading) without a MainWindow. Functions which require
@@ -81,36 +81,36 @@
#define CHECK_MAINWINDOW Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return
#define CHECK_MAINWINDOW_VALUE( v ) Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return v
-static void setCursorToAll( const QCursor &c, QWidget *start )
+static void setCursorToAll( const TQCursor &c, TQWidget *start )
{
start->setCursor( c );
- QObjectList *l = (QObjectList*)start->children();
+ TQObjectList *l = (TQObjectList*)start->children();
if ( l ) {
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() && !::qt_cast<SizeHandle*>(o) )
- setCursorToAll( c, ( (QWidget*)o ) );
+ setCursorToAll( c, ( (TQWidget*)o ) );
}
}
}
-static void restoreCursors( QWidget *start, FormWindow *fw )
+static void restoreCursors( TQWidget *start, FormWindow *fw )
{
if ( fw->widgets()->find( start ) )
start->setCursor( MetaDataBase::cursor( start ) );
else
start->setCursor( Qt::ArrowCursor );
- QObjectList *l = (QObjectList*)start->children();
+ TQObjectList *l = (TQObjectList*)start->children();
if ( l ) {
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() && !::qt_cast<SizeHandle*>(o) )
- restoreCursors( ( (QWidget*)o ), fw );
+ restoreCursors( ( (TQWidget*)o ), fw );
}
}
}
#if defined(Q_WS_WIN32) // #### needed for the workaround for repaint problem on windows
#include <qt_windows.h>
-static void flickerfree_update( QWidget *w )
+static void flickerfree_update( TQWidget *w )
{
InvalidateRect( w->winId(), 0, FALSE );
}
@@ -134,8 +134,8 @@ static void flickerfree_update( QWidget *w )
event filter which is implemented in MainWindow::eventFilter().
*/
-FormWindow::FormWindow( FormFile *f, MainWindow *mw, QWidget *parent, const char *name )
- : QWidget( parent, name, WDestructiveClose ), mainwindow( mw ),
+FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WDestructiveClose ), mainwindow( mw ),
commands( 100 ), pixInline( TRUE ), pixProject( FALSE )
{
ff = f;
@@ -143,8 +143,8 @@ FormWindow::FormWindow( FormFile *f, MainWindow *mw, QWidget *parent, const char
initSlots();
}
-FormWindow::FormWindow( FormFile *f, QWidget *parent, const char *name )
- : QWidget( parent, name, WDestructiveClose ), mainwindow( 0 ),
+FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ),
commands( 100 ), pixInline( TRUE )
{
ff = f;
@@ -171,34 +171,34 @@ void FormWindow::init()
drawRubber = FALSE;
setFocusPolicy( ClickFocus );
sizePreviewLabel = 0;
- checkSelectionsTimer = new QTimer( this, "checkSelectionsTimer" );
- connect( checkSelectionsTimer, SIGNAL( timeout() ),
- this, SLOT( invalidCheckedSelections() ) );
- updatePropertiesTimer = new QTimer( this );
- connect( updatePropertiesTimer, SIGNAL( timeout() ),
- this, SLOT( updatePropertiesTimerDone() ) );
- showPropertiesTimer = new QTimer( this );
+ checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" );
+ connect( checkSelectionsTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( invalidCheckedSelections() ) );
+ updatePropertiesTimer = new TQTimer( this );
+ connect( updatePropertiesTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( updatePropertiesTimerDone() ) );
+ showPropertiesTimer = new TQTimer( this );
//!!!!
- connect( showPropertiesTimer, SIGNAL( timeout() ),
- this, SLOT( showPropertiesTimerDone() ) );
- selectionChangedTimer = new QTimer( this );
- connect( selectionChangedTimer, SIGNAL( timeout() ),
- this, SLOT( selectionChangedTimerDone() ) );
- windowsRepaintWorkaroundTimer = new QTimer( this );
- connect( windowsRepaintWorkaroundTimer, SIGNAL( timeout() ),
- this, SLOT( windowsRepaintWorkaroundTimerTimeout() ) );
+ connect( showPropertiesTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( showPropertiesTimerDone() ) );
+ selectionChangedTimer = new TQTimer( this );
+ connect( selectionChangedTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( selectionChangedTimerDone() ) );
+ windowsRepaintWorkaroundTimer = new TQTimer( this );
+ connect( windowsRepaintWorkaroundTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( windowsRepaintWorkaroundTimerTimeout() ) );
insertParent = 0;
- connect( &commands, SIGNAL( undoRedoChanged( bool, bool, const QString &, const QString & ) ),
- this, SIGNAL( undoRedoChanged( bool, bool, const QString &, const QString & ) ) );
+ connect( &commands, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
+ this, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) );
propShowBlocked = FALSE;
setIcon( SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) );
- connect( &commands, SIGNAL( modificationChanged( bool ) ),
- this, SLOT( modificationChanged( bool ) ) );
+ connect( &commands, TQT_SIGNAL( modificationChanged( bool ) ),
+ this, TQT_SLOT( modificationChanged( bool ) ) );
buffer = 0;
- QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QFrame" ), this );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this );
setMainContainer( w );
propertyWidget = w;
targetContainer = 0;
@@ -225,7 +225,7 @@ void FormWindow::initSlots()
return;
Project *p = project() ? project() : MainWindow::self->currProject();
if ( p && p->isCpp() ) {
- QString code = formFile()->code();
+ TQString code = formFile()->code();
if ( code.isEmpty() )
formFile()->setCode( formFile()->codeComment() );
}
@@ -242,28 +242,28 @@ FormWindow::~FormWindow()
delete iface;
}
-void FormWindow::closeEvent( QCloseEvent *e )
+void FormWindow::closeEvent( TQCloseEvent *e )
{
- QGuardedPtr<FormWindow> that = this;
+ TQGuardedPtr<FormWindow> that = this;
if ( ff->closeEvent() && ( !that || ( mainwindow && mainwindow->unregisterClient( this ) ) ) )
e->accept();
else
e->ignore();
}
-void FormWindow::paintGrid( QWidget *w, QPaintEvent *e )
+void FormWindow::paintGrid( TQWidget *w, TQPaintEvent *e )
{
if ( !mainWindow() || !mainWindow()->showGrid() )
return;
- QPixmap grid;
- QString grid_name;
+ TQPixmap grid;
+ TQString grid_name;
grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y());
- if( !QPixmapCache::find( grid_name, grid ) ) {
- grid = QPixmap( 350 + ( 350 % mainWindow()->grid().x() ), 350 + ( 350 % mainWindow()->grid().y() ) );
- grid.fill( colorGroup().color( QColorGroup::Foreground ) );
- QBitmap mask( grid.width(), grid.height() );
+ if( !TQPixmapCache::find( grid_name, grid ) ) {
+ grid = TQPixmap( 350 + ( 350 % mainWindow()->grid().x() ), 350 + ( 350 % mainWindow()->grid().y() ) );
+ grid.fill( colorGroup().color( TQColorGroup::Foreground ) );
+ TQBitmap mask( grid.width(), grid.height() );
mask.fill( color0 );
- QPainter p( &mask );
+ TQPainter p( &mask );
p.setPen( color1 );
for ( int y = 0; y < grid.width(); y += mainWindow()->grid().y()) {
for ( int x = 0; x < grid.height(); x += mainWindow()->grid().x() ) {
@@ -271,11 +271,11 @@ void FormWindow::paintGrid( QWidget *w, QPaintEvent *e )
}
}
grid.setMask( mask );
- QPixmapCache::insert( grid_name, grid );
+ TQPixmapCache::insert( grid_name, grid );
}
- QPainter p( w );
+ TQPainter p( w );
p.setClipRegion( e->rect() );
- p.drawTiledPixmap( QRect( 0, 0, width(), height() ), grid );
+ p.drawTiledPixmap( TQRect( 0, 0, width(), height() ), grid );
}
/*! For operations like drawing a rubber band or drawing the rect
@@ -293,7 +293,7 @@ void FormWindow::beginUnclippedPainter( bool doNot )
if ( !unclipped )
clearWFlags( WPaintUnclipped );
if ( doNot ) {
- unclippedPainter->setPen( QPen( color0, 2 ) );
+ unclippedPainter->setPen( TQPen( color0, 2 ) );
unclippedPainter->setRasterOp( NotROP );
}
}
@@ -312,32 +312,32 @@ void FormWindow::endUnclippedPainter()
unclippedPainter = 0;
}
-QPoint FormWindow::gridPoint( const QPoint &p )
+TQPoint FormWindow::gridPoint( const TQPoint &p )
{
- return QPoint( ( p.x() / grid().x() ) * grid().x(),
+ return TQPoint( ( p.x() / grid().x() ) * grid().x(),
( p.y() / grid().y() ) * grid().y() );
}
-void FormWindow::drawSizePreview( const QPoint &pos, const QString& text )
+void FormWindow::drawSizePreview( const TQPoint &pos, const TQString& text )
{
unclippedPainter->save();
- unclippedPainter->setPen( QPen( colorGroup().foreground(), 1 ));
+ unclippedPainter->setPen( TQPen( colorGroup().foreground(), 1 ));
unclippedPainter->setRasterOp( CopyROP );
if ( !sizePreviewPixmap.isNull() )
unclippedPainter->drawPixmap( sizePreviewPos, sizePreviewPixmap );
if ( text.isNull() ) {
- sizePreviewPixmap = QPixmap(); // set null again
+ sizePreviewPixmap = TQPixmap(); // set null again
unclippedPainter->restore();
return;
}
- QRect r = fontMetrics().boundingRect( 0, 0, 0, 0, AlignCenter, text );
- r = QRect( pos + QPoint( 10, 10 ), r.size() + QSize( 5, 5 ) );
+ TQRect r = fontMetrics().boundingRect( 0, 0, 0, 0, AlignCenter, text );
+ r = TQRect( pos + TQPoint( 10, 10 ), r.size() + TQSize( 5, 5 ) );
checkPreviewGeometry( r );
sizePreviewPos = r.topLeft();
- sizePreviewPixmap = QPixmap::grabWindow( winId(), r.x(), r.y(), r.width(), r.height() );
- unclippedPainter->setBrush( QColor( 255, 255, 128 ) );
+ sizePreviewPixmap = TQPixmap::grabWindow( winId(), r.x(), r.y(), r.width(), r.height() );
+ unclippedPainter->setBrush( TQColor( 255, 255, 128 ) );
unclippedPainter->drawRect( r );
unclippedPainter->drawText( r, AlignCenter, text );
unclippedPainter->restore();
@@ -354,57 +354,57 @@ void FormWindow::insertWidget()
bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 );
Orientation orient = Horizontal;
- QString n = WidgetDatabase::className( currTool );
- if ( useSizeHint && ( n == "Spacer" || n == "QSlider" || n == "Line" || n == "QScrollBar" ) ) {
- QPopupMenu m( mainWindow() );
+ TQString n = WidgetDatabase::className( currTool );
+ if ( useSizeHint && ( n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar" ) ) {
+ TQPopupMenu m( mainWindow() );
m.insertItem( i18n( "&Horizontal" ) );
int ver = m.insertItem( i18n( "&Vertical" ) );
- int r = m.exec( QCursor::pos() );
+ int r = m.exec( TQCursor::pos() );
if ( r == ver )
orient = Vertical;
}
- QWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient );
+ TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient );
if ( !w )
return;
if ( !savePixmapInline() && currTool == WidgetDatabase::idFromClassName( "PixmapLabel" ) ) { // ### what to do for pixmaps in project
- QPixmap pix;
+ TQPixmap pix;
// we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that
pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() );
- ( (QLabel*)w )->setPixmap( pix );
+ ( (TQLabel*)w )->setPixmap( pix );
}
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) );
if ( WidgetDatabase::isCustomWidget( id ) ) {
- QWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> "
+ TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
"menu to add and change custom widgets. You can add "
"properties as well as signals and slots to integrate custom widgets into "
"<i>Qt Designer</i>, and provide a pixmap which will be used to represent "
"the widget on the form.</p>")
.arg(WidgetDatabase::toolTip( id )) );
- QToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) );
+ TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) );
} else {
- QString tt = WidgetDatabase::toolTip( id );
- QString wt = WidgetDatabase::whatsThis( id );
+ TQString tt = WidgetDatabase::toolTip( id );
+ TQString wt = WidgetDatabase::whatsThis( id );
if ( !wt.isEmpty() && !tt.isEmpty() )
- QWhatsThis::add( w, QString("<b>A %1</b><p>%2</p>").arg( tt ).arg( wt ) );
+ TQWhatsThis::add( w, TQString("<b>A %1</b><p>%2</p>").arg( tt ).arg( wt ) );
}
- QString s = w->name();
+ TQString s = w->name();
unify( w, s, TRUE );
w->setName( s );
insertWidget( w );
- QRect r( currRect );
+ TQRect r( currRect );
if ( !oldRectValid ||
( currRect.width() < 2 && currRect.height() < 2 ) )
- r = QRect( rectAnchor, QSize( 0, 0 ) );
+ r = TQRect( rectAnchor, TQSize( 0, 0 ) );
- QPoint p = r.topLeft();
+ TQPoint p = r.topLeft();
p = mapToGlobal( p );
p = insertParent->mapFromGlobal( p );
- r = QRect( p, r.size() );
+ r = TQRect( p, r.size() );
if ( useSizeHint ) {
if ( n == "Spacer" ) {
@@ -426,31 +426,31 @@ void FormWindow::insertWidget()
if ( r.height() < 2 * grid().y() )
r.setHeight( 2 * grid().y() );
- const QObjectList *l = insertParent->children();
- QObjectListIt it( *l );
- QWidgetList lst;
+ const TQObjectList *l = insertParent->children();
+ TQObjectListIt it( *l );
+ TQWidgetList lst;
if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
for ( ; it.current(); ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
if ( o->isWidgetType() &&
- ( (QWidget*)o )->isVisibleTo( this ) &&
- insertedWidgets.find( (QWidget*)o ) && o != w ) {
- QRect r2( ( (QWidget*)o )->pos(),
- ( (QWidget*)o )->size() );
+ ( (TQWidget*)o )->isVisibleTo( this ) &&
+ insertedWidgets.find( (TQWidget*)o ) && o != w ) {
+ TQRect r2( ( (TQWidget*)o )->pos(),
+ ( (TQWidget*)o )->size() );
if ( r.contains( r2 ) )
- lst.append( (QWidget*)o );
+ lst.append( (TQWidget*)o );
}
}
}
if ( !lst.isEmpty() ) {
- QWidget *pw = WidgetFactory::containerOfWidget( w );
+ TQWidget *pw = WidgetFactory::containerOfWidget( w );
if (pw) {
- QValueList<QPoint> op, np;
- for ( QWidget *i = lst.first(); i; i = lst.next() ) {
+ TQValueList<TQPoint> op, np;
+ for ( TQWidget *i = lst.first(); i; i = lst.next() ) {
op.append( i->pos() );
- QPoint pos = pw->mapFromGlobal( i->mapToGlobal( QPoint( 0, 0 ) ) );
+ TQPoint pos = pw->mapFromGlobal( i->mapToGlobal( TQPoint( 0, 0 ) ) );
pos -= r.topLeft();
np.append( pos );
}
@@ -465,7 +465,7 @@ void FormWindow::insertWidget()
InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r );
- QPtrList<Command> commands;
+ TQPtrList<Command> commands;
commands.append( mv );
commands.append( cmd );
@@ -491,12 +491,12 @@ void FormWindow::insertWidget()
}
}
-void FormWindow::insertWidget( QWidget *w, bool checkName )
+void FormWindow::insertWidget( TQWidget *w, bool checkName )
{
if ( !w )
return;
if ( checkName ) {
- QString s = w->name();
+ TQString s = w->name();
unify( w, s, TRUE );
w->setName( s );
}
@@ -504,19 +504,19 @@ void FormWindow::insertWidget( QWidget *w, bool checkName )
MetaDataBase::addEntry( w );
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) );
if ( WidgetDatabase::isCustomWidget( id ) ) {
- QWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> "
+ TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
"menu to add and change custom widgets. You can add "
"properties as well as signals and slots to integrate custom widgets into "
"<i>Qt Designer</i>, and provide a pixmap which will be used to represent "
"the widget on the form.</p>")
.arg(WidgetDatabase::toolTip( id )) );
- QToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) );
+ TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) );
} else {
- QString tt = WidgetDatabase::toolTip( id );
- QString wt = WidgetDatabase::whatsThis( id );
+ TQString tt = WidgetDatabase::toolTip( id );
+ TQString wt = WidgetDatabase::whatsThis( id );
if ( !wt.isEmpty() && !tt.isEmpty() )
- QWhatsThis::add( w, QString("<b>A %1</b><p>%2</p>").arg( tt ).arg( wt ) );
+ TQWhatsThis::add( w, TQString("<b>A %1</b><p>%2</p>").arg( tt ).arg( wt ) );
}
restoreCursors( w, this );
@@ -524,13 +524,13 @@ void FormWindow::insertWidget( QWidget *w, bool checkName )
w->show();
}
-void FormWindow::removeWidget( QWidget *w )
+void FormWindow::removeWidget( TQWidget *w )
{
MetaDataBase::removeEntry( w );
widgets()->take( w );
}
-void FormWindow::handleContextMenu( QContextMenuEvent *e, QWidget *w )
+void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
switch ( currTool ) {
@@ -539,12 +539,12 @@ void FormWindow::handleContextMenu( QContextMenuEvent *e, QWidget *w )
raiseChildSelections( w ); // raise selections and select widget
selectWidget( w );
// if widget is laid out, find the first non-laid out super-widget
- QWidget *realWidget = w; // but store the original one
+ TQWidget *realWidget = w; // but store the original one
while ( w->parentWidget() &&
( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout ||
!insertedWidgets.find(w) ) )
w = w->parentWidget();
- if ( ::qt_cast<QMainWindow*>(mainContainer()) && ((QMainWindow*)mainContainer())->centralWidget() == realWidget ) {
+ if ( ::qt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) {
e->accept();
mainwindow->popupFormWindowMenu( e->globalPos(), this );
} else {
@@ -562,16 +562,16 @@ void FormWindow::handleContextMenu( QContextMenuEvent *e, QWidget *w )
}
}
-void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
+void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
checkedSelectionsForMove = FALSE;
checkSelectionsTimer->stop();
if ( !sizePreviewLabel ) {
- sizePreviewLabel = new QLabel( this );
+ sizePreviewLabel = new TQLabel( this );
sizePreviewLabel->hide();
- sizePreviewLabel->setBackgroundColor( QColor( 255, 255, 128 ) );
- sizePreviewLabel->setFrameStyle( QFrame::Plain | QFrame::Box );
+ sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) );
+ sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box );
}
switch ( currTool ) {
@@ -582,7 +582,7 @@ void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
w->raise();
if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection
drawRubber = TRUE;
- currRect = QRect( 0, 0, -1, -1 );
+ currRect = TQRect( 0, 0, -1, -1 );
startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber );
break;
}
@@ -594,13 +594,13 @@ void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
} else { // ...widget selected
// only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) {
- QObjectList *l = w->queryList( "QWidget" );
+ TQObjectList *l = w->queryList( "TQWidget" );
setPropertyShowingBlocked( TRUE );
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( !o->isWidgetType() )
continue;
- if ( insertedWidgets.find( (QWidget*)o ) )
- selectWidget( (QWidget*)o, FALSE );
+ if ( insertedWidgets.find( (TQWidget*)o ) )
+ selectWidget( (TQWidget*)o, FALSE );
}
setPropertyShowingBlocked( FALSE );
delete l;
@@ -624,7 +624,7 @@ void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
if ( e->button() == LeftButton ) { // left button: store original geometry and more as the widget might start moving
widgetPressed = TRUE;
- widgetGeom = QRect( w->pos(), w->size() );
+ widgetGeom = TQRect( w->pos(), w->size() );
oldPressPos = w->mapFromGlobal( e->globalPos() );
origPressPos = oldPressPos;
checkedSelectionsForMove = FALSE;
@@ -640,12 +640,12 @@ void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
drawRubber = TRUE;
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) {
clearSelection( FALSE );
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
propertyWidget = mainContainer();
if ( opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
}
- currRect = QRect( 0, 0, -1, -1 );
+ currRect = TQRect( 0, 0, -1, -1 );
startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber );
}
}
@@ -656,7 +656,7 @@ void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
break;
validForBuddy = FALSE;
if ( currTool == BUDDY_TOOL ) {
- if ( !::qt_cast<QLabel*>(w) )
+ if ( !::qt_cast<TQLabel*>(w) )
break;
clearSelection( FALSE );
validForBuddy = TRUE;
@@ -676,14 +676,14 @@ void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
if ( !isMainContainer( w ) ) { // press on a child widget
orderedWidgets.removeRef( w );
orderedWidgets.append( w );
- for ( QWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
+ for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
int i = stackedWidgets.findRef( wid );
if ( i != -1 ) {
stackedWidgets.removeRef( wid );
stackedWidgets.insert( 0, wid );
}
}
- QWidgetList oldl = MetaDataBase::tabOrder( this );
+ TQWidgetList oldl = MetaDataBase::tabOrder( this );
TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets );
cmd->execute();
commandHistory()->addCommand( cmd, TRUE );
@@ -694,11 +694,11 @@ void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
if ( e->button() == LeftButton ) {
insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow
if ( !isMainContainer( w ) ) { // press was not on formwindow, check if we can find another parent
- QWidget *wid = w;
+ TQWidget *wid = w;
for (;;) {
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) );
if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) &&
- !::qt_cast<QLayoutWidget*>(wid) && !::qt_cast<QSplitter*>(wid) ) {
+ !::qt_cast<QLayoutWidget*>(wid) && !::qt_cast<TQSplitter*>(wid) ) {
insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it
break;
} else {
@@ -714,7 +714,7 @@ void FormWindow::handleMousePress( QMouseEvent *e, QWidget *w )
}
}
-void FormWindow::handleMouseDblClick( QMouseEvent *, QWidget *w )
+void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
{
CHECK_MAINWINDOW;
switch ( currTool ) {
@@ -722,14 +722,14 @@ void FormWindow::handleMouseDblClick( QMouseEvent *, QWidget *w )
if ( !isMainContainer( w ) ) { // press on a child widget
orderedWidgets.clear();
orderedWidgets.append( w );
- for ( QWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
+ for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
int i = stackedWidgets.findRef( wid );
if ( i != -1 ) {
stackedWidgets.removeRef( wid );
stackedWidgets.insert( 0, wid );
}
}
- QWidgetList oldl = MetaDataBase::tabOrder( this );
+ TQWidgetList oldl = MetaDataBase::tabOrder( this );
TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets );
cmd->execute();
commandHistory()->addCommand( cmd, TRUE );
@@ -743,13 +743,13 @@ void FormWindow::handleMouseDblClick( QMouseEvent *, QWidget *w )
}
}
-void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
+void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
if ( ( e->state() & LeftButton ) != LeftButton )
return;
- QWidget *newendWidget = endWidget, *oldendWidget = endWidget, *wid;
+ TQWidget *newendWidget = endWidget, *oldendWidget = endWidget, *wid;
bool drawRecRect;
switch ( currTool ) {
case POINTER_TOOL:
@@ -761,23 +761,23 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
w = w->parentWidget();
// calc correct position
- QPoint pos = w->mapFromGlobal( e->globalPos() );
+ TQPoint pos = w->mapFromGlobal( e->globalPos() );
#if 0
- QPoint mpos = w->mapToParent( pos );
+ TQPoint mpos = w->mapToParent( pos );
// check if we are not outside the visible area, else correct coords
if ( mpos.x() < 0 )
- pos.setX( w->mapFromParent( QPoint( 0, mpos.y() ) ).x() );
+ pos.setX( w->mapFromParent( TQPoint( 0, mpos.y() ) ).x() );
if ( mpos.y() < 0 )
- pos.setY( w->mapFromParent( QPoint( mpos.x(), 0 ) ).y() );
+ pos.setY( w->mapFromParent( TQPoint( mpos.x(), 0 ) ).y() );
if ( mpos.x() > w->parentWidget()->width() )
- pos.setX( w->mapFromParent( QPoint( w->parentWidget()->width(), mpos.y() ) ).x() );
+ pos.setX( w->mapFromParent( TQPoint( w->parentWidget()->width(), mpos.y() ) ).x() );
if ( mpos.y() > w->parentWidget()->height() )
- pos.setY( w->mapFromParent( QPoint( mpos.x(), w->parentWidget()->height() ) ).y() );
+ pos.setY( w->mapFromParent( TQPoint( mpos.x(), w->parentWidget()->height() ) ).y() );
#endif
// calc move distance and store it
- QPoint d = oldPressPos - pos;
+ TQPoint d = oldPressPos - pos;
if ( QABS( d.x() ) < grid().x() )
d.setX( 0 );
if ( QABS( d.y() ) < grid().y() )
@@ -795,7 +795,7 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
int y = widgetGeom.y() - d.y();
widgetGeom.setY( y );
y = ( y / grid().y() ) * grid().y();
- QPoint p = w->pos();
+ TQPoint p = w->pos();
if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move
if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected...
@@ -808,8 +808,8 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
}
// check whether we would have to reparent the selection and highlight the possible new parent container
- QMapConstIterator<QWidget*, QPoint> it = moving.begin();
- QWidget* wa = containerAt( e->globalPos(), it.key() );
+ TQMapConstIterator<TQWidget*, TQPoint> it = moving.begin();
+ TQWidget* wa = containerAt( e->globalPos(), it.key() );
if ( wa && !isMainContainer( wa ) && !isCentralWidget( wa ) ) {
wa = WidgetFactory::containerOfWidget( wa );
// ok, looks like we moved onto a container
@@ -839,7 +839,7 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
moveSelectedWidgets( x - p.x(), y - p.y() );
sizePreviewLabel->setText( i18n( "%1/%2" ).arg( w->pos().x() ).arg( w->pos().y() ) );
sizePreviewLabel->adjustSize();
- QRect lg( mapFromGlobal( e->globalPos() ) + QPoint( 16, 16 ), sizePreviewLabel->size() );
+ TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() );
checkPreviewGeometry( lg );
sizePreviewLabel->setGeometry( lg );
sizePreviewLabel->raise();
@@ -848,7 +848,7 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
windowsRepaintWorkaroundTimer->start( 100, TRUE );
#endif
} else { // if we don't need to move, do some indication
- QRect lg( mapFromGlobal( e->globalPos() ) + QPoint( 16, 16 ), sizePreviewLabel->size() );
+ TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() );
checkPreviewGeometry( lg );
sizePreviewLabel->move( lg.x(), lg.y() );
}
@@ -866,7 +866,7 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
newendWidget = wid;
if ( ::qt_cast<QLayoutWidget*>(newendWidget) || ::qt_cast<Spacer*>(newendWidget) )
- newendWidget = (QWidget*)endWidget;
+ newendWidget = (TQWidget*)endWidget;
drawRecRect = newendWidget != endWidget;
if ( newendWidget &&
( isMainContainer( newendWidget ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( newendWidget ) )
@@ -876,8 +876,8 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
currentPos = mapFromGlobal( e->globalPos() );
qApp->processEvents();
if ( drawRecRect )
- restoreRect( QRect( mapToForm( ( (QWidget*)oldendWidget )->parentWidget(), ( (QWidget*)oldendWidget )->pos() ),
- ( (QWidget*)oldendWidget )->size() ) );
+ restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ),
+ ( (TQWidget*)oldendWidget )->size() ) );
drawConnectionLine();
break;
case BUDDY_TOOL:
@@ -892,7 +892,7 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
else
newendWidget = 0;
if ( ::qt_cast<QLayoutWidget*>(newendWidget) || ::qt_cast<Spacer*>(newendWidget) )
- newendWidget = (QWidget*)endWidget;
+ newendWidget = (TQWidget*)endWidget;
drawRecRect = newendWidget != endWidget;
if ( !newendWidget )
endWidget = newendWidget;
@@ -906,8 +906,8 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
currentPos = mapFromGlobal( e->globalPos() );
qApp->processEvents();
if ( drawRecRect && oldendWidget )
- restoreRect( QRect( mapToForm( ( (QWidget*)oldendWidget )->parentWidget(), ( (QWidget*)oldendWidget )->pos() ),
- ( (QWidget*)oldendWidget )->size() ) );
+ restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ),
+ ( (TQWidget*)oldendWidget )->size() ) );
drawConnectionLine();
break;
case ORDER_TOOL:
@@ -919,7 +919,7 @@ void FormWindow::handleMouseMove( QMouseEvent *e, QWidget *w )
}
}
-void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
+void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
if ( e->button() != LeftButton )
@@ -945,11 +945,11 @@ void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
if ( propertyWidget && propertyWidget->isWidgetType() && !isMainContainer( propertyWidget ) )
emitUpdateProperties( propertyWidget );
- QMapConstIterator<QWidget*,QPoint> it = moving.begin();
- QWidget *oldParent = it.key()->parentWidget();
- QWidget *newParent = oldParent;
+ TQMapConstIterator<TQWidget*,TQPoint> it = moving.begin();
+ TQWidget *oldParent = it.key()->parentWidget();
+ TQWidget *newParent = oldParent;
// check whether we have to reparent the selection
- QWidget* wa = containerAt( e->globalPos(), it.key() );
+ TQWidget* wa = containerAt( e->globalPos(), it.key() );
if ( wa ) {
wa = WidgetFactory::containerOfWidget( wa );
// ok, looks like we moved onto a container
@@ -960,7 +960,7 @@ void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
// break layout if necessary
if ( WidgetFactory::layoutType( wa ) != WidgetFactory::NoLayout ) {
- if ( QMessageBox::information( mainWindow(), i18n( "Inserting Widget" ),
+ if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ),
i18n( "You tried to insert a widget into the "
"layout Container Widget '%1'.\n"
"This is not possible. "
@@ -975,18 +975,18 @@ void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
// doesn't need to be a command, the MoveCommand does reparenting too
bool emitSelChanged = FALSE;
- for ( QMap<QWidget*, QPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) {
- QWidget *i = it.key();
- if ( !emitSelChanged && ::qt_cast<QButton*>(i) ) {
- if ( ::qt_cast<QButtonGroup*>(i->parentWidget()) || ::qt_cast<QButtonGroup*>(wa) )
+ for ( TQMap<TQWidget*, TQPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) {
+ TQWidget *i = it.key();
+ if ( !emitSelChanged && ::qt_cast<TQButton*>(i) ) {
+ if ( ::qt_cast<TQButtonGroup*>(i->parentWidget()) || ::qt_cast<TQButtonGroup*>(wa) )
emitSelChanged = TRUE;
- if ( !::qt_cast<QButtonGroup*>(wa) ) {
+ if ( !::qt_cast<TQButtonGroup*>(wa) ) {
MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE );
- if ( ::qt_cast<QButtonGroup*>(i->parentWidget()) )
- ( (QButtonGroup*)i->parentWidget() )->remove( (QButton*)i );
+ if ( ::qt_cast<TQButtonGroup*>(i->parentWidget()) )
+ ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i );
}
}
- QPoint pos = wa->mapFromGlobal( i->mapToGlobal( QPoint(0,0) ) );
+ TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) );
i->reparent( wa, pos, TRUE );
raiseSelection( i );
raiseChildSelections( i );
@@ -1002,8 +1002,8 @@ void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
}
make_move_command:
- QWidgetList widgets; // collect the widgets and its old and new positions which have been moved
- QValueList<QPoint> oldPos, newPos;
+ TQWidgetList widgets; // collect the widgets and its old and new positions which have been moved
+ TQValueList<TQPoint> oldPos, newPos;
for ( it = moving.begin(); it != moving.end(); ++it ) {
widgets.append( it.key() );
oldPos.append( *it );
@@ -1027,13 +1027,13 @@ void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
case BUDDY_TOOL:
restoreConnectionLine();
if ( startWidget )
- restoreRect( QRect( mapToForm( ( (QWidget*)startWidget )->parentWidget(),
- ( (QWidget*)startWidget )->pos() ),
- ((QWidget*)startWidget )->size() ) );
+ restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(),
+ ( (TQWidget*)startWidget )->pos() ),
+ ((TQWidget*)startWidget )->size() ) );
if ( endWidget )
- restoreRect( QRect( mapToForm( ( (QWidget*)endWidget )->parentWidget(),
- ( (QWidget*)endWidget )->pos() ),
- ( (QWidget*)endWidget )->size() ) );
+ restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(),
+ ( (TQWidget*)endWidget )->pos() ),
+ ( (TQWidget*)endWidget )->size() ) );
endUnclippedPainter();
qApp->processEvents();
@@ -1041,7 +1041,7 @@ void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
if ( currTool == CONNECT_TOOL )
editConnections();
else if ( currTool == BUDDY_TOOL && validForBuddy && startWidget != endWidget ) {
- QString oldBuddy = startWidget->property( "buddy" ).toString();
+ TQString oldBuddy = startWidget->property( "buddy" ).toString();
if ( oldBuddy.isNull() )
oldBuddy = "";
SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ),
@@ -1065,7 +1065,7 @@ void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
if ( insertParent ) { // we should insert the new widget now
endRectDraw();
if ( WidgetFactory::layoutType( insertParent ) != WidgetFactory::NoLayout ) {
- if ( QMessageBox::information( mainWindow(), i18n( "Inserting Widget" ),
+ if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ),
i18n( "You tried to insert a widget into the "
"layout Container Widget '%1'.\n"
"This is not possible. "
@@ -1092,7 +1092,7 @@ void FormWindow::handleMouseRelease( QMouseEvent *e, QWidget *w )
buffer = 0;
}
-void FormWindow::handleKeyPress( QKeyEvent *e, QWidget *w )
+void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
e->ignore();
@@ -1103,12 +1103,12 @@ void FormWindow::handleKeyPress( QKeyEvent *e, QWidget *w )
e->key() == Key_Up ||
e->key() == Key_Down ) &&
propertyWidget->isWidgetType() )
- checkSelectionsForMove( (QWidget*)propertyWidget );
+ checkSelectionsForMove( (TQWidget*)propertyWidget );
checkSelectionsTimer->start( 1000, TRUE );
if ( e->key() == Key_Left || e->key() == Key_Right ||
e->key() == Key_Up || e->key() == Key_Down ) {
- QWidgetList widgets;
- QValueList<QPoint> oldPos, newPos;
+ TQWidgetList widgets;
+ TQValueList<TQPoint> oldPos, newPos;
for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) {
if ( s->isUsed() ) {
int dx = 0, dy = 0;
@@ -1149,7 +1149,7 @@ void FormWindow::handleKeyPress( QKeyEvent *e, QWidget *w )
widgets.append( s->widget() );
oldPos.append( s->widget()->pos() );
- newPos.append( s->widget()->pos() + QPoint( dx, dy ) );
+ newPos.append( s->widget()->pos() + TQPoint( dx, dy ) );
}
}
if ( !widgets.isEmpty() ) {
@@ -1160,7 +1160,7 @@ void FormWindow::handleKeyPress( QKeyEvent *e, QWidget *w )
}
}
if ( !e->isAccepted() ) {
- QObjectList *l = queryList( "QWidget" );
+ TQObjectList *l = queryList( "TQWidget" );
if ( !l )
return;
if ( l->find( w ) != -1 )
@@ -1170,35 +1170,35 @@ void FormWindow::handleKeyPress( QKeyEvent *e, QWidget *w )
}
-void FormWindow::handleKeyRelease( QKeyEvent *e, QWidget * )
+void FormWindow::handleKeyRelease( TQKeyEvent *e, TQWidget * )
{
e->ignore();
}
-void FormWindow::selectWidget( QObject *o, bool select )
+void FormWindow::selectWidget( TQObject *o, bool select )
{
CHECK_MAINWINDOW;
if ( !o->isWidgetType() ) {
- // ########### do QObject stuff
+ // ########### do TQObject stuff
return;
}
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
if ( isMainContainer( w ) ) {
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
propertyWidget = mainContainer();
if ( opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
return;
}
- if ( ::qt_cast<QMainWindow*>(mainContainer()) && w == ( (QMainWindow*)mainContainer() )->centralWidget() ) {
- QObject *opw = propertyWidget;
+ if ( ::qt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) {
+ TQObject *opw = propertyWidget;
propertyWidget = mainContainer();
if ( opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
return;
}
@@ -1207,10 +1207,10 @@ void FormWindow::selectWidget( QObject *o, bool select )
return;
if ( select ) {
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
propertyWidget = w;
if ( opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
if ( !isPropertyShowingBlocked() )
emitShowProperties( propertyWidget );
WidgetSelection *s = usedSelections.find( w );
@@ -1236,27 +1236,27 @@ void FormWindow::selectWidget( QObject *o, bool select )
WidgetSelection *s = usedSelections.find( w );
if ( s )
s->setWidget( 0 );
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
if ( !usedSelections.isEmpty() )
- propertyWidget = QPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget();
+ propertyWidget = TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget();
else
propertyWidget = mainContainer();
if ( opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
if ( !isPropertyShowingBlocked() )
emitShowProperties( propertyWidget );
emitSelectionChanged();
}
}
-QPoint FormWindow::grid() const
+TQPoint FormWindow::grid() const
{
if ( !mainWindow() || !mainWindow()->snapGrid() )
- return QPoint( 1, 1 );
+ return TQPoint( 1, 1 );
return mainWindow()->grid();
}
-void FormWindow::updateSelection( QWidget *w )
+void FormWindow::updateSelection( TQWidget *w )
{
WidgetSelection *s = usedSelections.find( w );
if ( !w->isVisibleTo( this ) )
@@ -1265,14 +1265,14 @@ void FormWindow::updateSelection( QWidget *w )
s->updateGeometry();
}
-void FormWindow::raiseSelection( QWidget *w )
+void FormWindow::raiseSelection( TQWidget *w )
{
WidgetSelection *s = usedSelections.find( w );
if ( s )
s->show();
}
-void FormWindow::repaintSelection( QWidget *w )
+void FormWindow::repaintSelection( TQWidget *w )
{
WidgetSelection *s = usedSelections.find( w );
if ( s )
@@ -1281,52 +1281,52 @@ void FormWindow::repaintSelection( QWidget *w )
void FormWindow::clearSelection( bool changePropertyDisplay )
{
- QPtrDictIterator<WidgetSelection> it( usedSelections );
+ TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it )
it.current()->setWidget( 0, FALSE );
usedSelections.clear();
if ( changePropertyDisplay ) {
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
propertyWidget = mainContainer();
if ( opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
}
emitSelectionChanged();
}
-void FormWindow::startRectDraw( const QPoint &p, const QPoint &global, QWidget *, RectType t )
+void FormWindow::startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t )
{
- QPoint pos( p );
+ TQPoint pos( p );
pos = mapFromGlobal( global );
oldRectValid = FALSE;
beginUnclippedPainter( TRUE );
if ( t == Rubber )
- unclippedPainter->setPen( QPen( color0, 1 ) );
+ unclippedPainter->setPen( TQPen( color0, 1 ) );
if ( t == Insert )
rectAnchor = gridPoint( pos );
else if ( t == Rubber )
rectAnchor = pos;
- currRect = QRect( rectAnchor, QPoint( 0, 0 ) );
+ currRect = TQRect( rectAnchor, TQPoint( 0, 0 ) );
if ( t == Insert )
drawSizePreview( pos, i18n("Use Size Hint") );
}
-void FormWindow::continueRectDraw( const QPoint &p, const QPoint &global, QWidget *, RectType t )
+void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t )
{
- QPoint pos =p;
+ TQPoint pos =p;
pos = mapFromGlobal( global );
- QPoint p2;
+ TQPoint p2;
if ( t == Insert )
p2 = gridPoint( pos );
else if ( t == Rubber )
p2 = pos;
- QRect r( rectAnchor, p2 );
+ TQRect r( rectAnchor, p2 );
r = r.normalize();
if ( currRect == r ) {
- QString t = i18n( "%1/%2" );
+ TQString t = i18n( "%1/%2" );
t = t.arg( r.width() - 1 ).arg( r.height() - 1 );
drawSizePreview( pos, t );
return;
@@ -1338,11 +1338,11 @@ void FormWindow::continueRectDraw( const QPoint &p, const QPoint &global, QWidge
oldRectValid = TRUE;
currRect = r;
if ( t == Insert ) {
- QString t = i18n( "%1/%2" );
+ TQString t = i18n( "%1/%2" );
t = t.arg( r.width() - 1 ).arg( r.height() - 1 );
drawSizePreview( pos, t );
}
- unclippedPainter->setClipRegion( QRegion( rect() ).subtract( QRect( sizePreviewPos, sizePreviewPixmap.size() ) ) );
+ unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) );
unclippedPainter->drawRect( currRect );
unclippedPainter->setClipping( FALSE );
} else {
@@ -1359,22 +1359,22 @@ void FormWindow::endRectDraw()
if ( oldRectValid )
unclippedPainter->drawRect( currRect );
- drawSizePreview( QPoint(-1,-1), QString::null );
+ drawSizePreview( TQPoint(-1,-1), TQString::null );
endUnclippedPainter();
}
void FormWindow::selectWidgets()
{
- QObjectList *l = mainContainer()->queryList( "QWidget" );
+ TQObjectList *l = mainContainer()->queryList( "TQWidget" );
if ( l ) {
- for ( QObject *o = l->first(); o; o = l->next() ) {
- if ( ( (QWidget*)o )->isVisibleTo( this ) &&
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
+ if ( ( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets[ (void*)o ] ) {
- QPoint p = ( (QWidget*)o )->mapToGlobal( QPoint(0,0) );
+ TQPoint p = ( (TQWidget*)o )->mapToGlobal( TQPoint(0,0) );
p = mapFromGlobal( p );
- QRect r( p, ( (QWidget*)o )->size() );
+ TQRect r( p, ( (TQWidget*)o )->size() );
if ( r.intersects( currRect ) && !r.contains( currRect ) )
- selectWidget( (QWidget*)o );
+ selectWidget( (TQWidget*)o );
}
}
delete l;
@@ -1382,19 +1382,19 @@ void FormWindow::selectWidgets()
emitSelectionChanged();
}
-bool FormWindow::isWidgetSelected( QObject *w )
+bool FormWindow::isWidgetSelected( TQObject *w )
{
if ( w->isWidgetType() )
- return usedSelections.find( (QWidget*)w ) != 0;
+ return usedSelections.find( (TQWidget*)w ) != 0;
return FALSE; // #### do stuff for QObjects
}
void FormWindow::moveSelectedWidgets( int dx, int dy )
{
- QPtrDictIterator<WidgetSelection> it( usedSelections );
+ TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) {
WidgetSelection *s = it.current();
- QWidget *w = s->widget();
+ TQWidget *w = s->widget();
if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout )
continue;
w->move( w->x() + dx, w->y() + dy );
@@ -1418,15 +1418,15 @@ void FormWindow::redo()
commandHistory()->redo();
}
-void FormWindow::raiseChildSelections( QWidget *w )
+void FormWindow::raiseChildSelections( TQWidget *w )
{
- QObjectList *l = w->queryList( "QWidget" );
+ TQObjectList *l = w->queryList( "TQWidget" );
if ( !l || !l->first() ) {
delete l;
return;
}
- QPtrDictIterator<WidgetSelection> it( usedSelections );
+ TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) {
if ( l->findRef( it.current()->widget() ) != -1 )
it.current()->show();
@@ -1434,27 +1434,27 @@ void FormWindow::raiseChildSelections( QWidget *w )
delete l;
}
-void FormWindow::updateChildSelections( QWidget *w )
+void FormWindow::updateChildSelections( TQWidget *w )
{
- QObjectList *l = w->queryList( "QWidget" );
+ TQObjectList *l = w->queryList( "TQWidget" );
if ( l ) {
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() &&
- insertedWidgets.find( (QWidget*)o ) )
- updateSelection( (QWidget*)o );
+ insertedWidgets.find( (TQWidget*)o ) )
+ updateSelection( (TQWidget*)o );
}
delete l;
}
}
-void FormWindow::checkSelectionsForMove( QWidget *w )
+void FormWindow::checkSelectionsForMove( TQWidget *w )
{
checkedSelectionsForMove = TRUE;
- QObjectList *l = w->parentWidget()->queryList( "QWidget", 0, FALSE, FALSE );
+ TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, FALSE, FALSE );
moving.clear();
if ( l ) {
- QPtrDictIterator<WidgetSelection> it( usedSelections );
+ TQPtrDictIterator<WidgetSelection> it( usedSelections );
WidgetSelection *sel;
while ( ( sel = it.current() ) != 0 ) {
if ( it.current()->widget() == mainContainer() )
@@ -1479,10 +1479,10 @@ void FormWindow::checkSelectionsForMove( QWidget *w )
void FormWindow::deleteWidgets()
{
CHECK_MAINWINDOW;
- QWidgetList widgets;
- QPtrDictIterator<WidgetSelection> it( usedSelections );
+ TQWidgetList widgets;
+ TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) {
- QWidget *tb = 0;
+ TQWidget *tb = 0;
if ( !( tb = mainWindow()->isAToolBarChild( it.current()->widget() ) ) )
widgets.append( it.current()->widget() );
else
@@ -1499,28 +1499,28 @@ void FormWindow::deleteWidgets()
void FormWindow::editAdjustSize()
{
- QPtrList<Command> commands;
- QWidgetList widgets = selectedWidgets();
+ TQPtrList<Command> commands;
+ TQWidgetList widgets = selectedWidgets();
if ( widgets.isEmpty() ) {
- QRect oldr = geometry();
+ TQRect oldr = geometry();
mainContainer()->adjustSize();
resize( mainContainer()->size() );
// check whether our own size constraint hit us
if ( size() != mainContainer()->size() )
mainContainer()->resize( size() );
- QRect nr = geometry();
+ TQRect nr = geometry();
if ( oldr != nr ) {
ResizeCommand *cmd = new ResizeCommand( i18n( "Adjust Size" ), this, this, oldr, nr );
commandHistory()->addCommand( cmd );
}
return;
}
- 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 )
continue;
- QRect oldr = w->geometry();
+ TQRect oldr = w->geometry();
w->adjustSize();
- QRect nr = w->geometry();
+ TQRect nr = w->geometry();
if ( oldr != nr )
commands.append( new ResizeCommand( i18n("Adjust Size"), this, w, oldr, nr ) );
}
@@ -1535,29 +1535,29 @@ void FormWindow::editAdjustSize()
}
-QWidgetList FormWindow::selectedWidgets() const
+TQWidgetList FormWindow::selectedWidgets() const
{
- QWidgetList widgets;
- QPtrDictIterator<WidgetSelection> it( usedSelections );
+ TQWidgetList widgets;
+ TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it )
widgets.append( it.current()->widget() );
return widgets;
}
-void FormWindow::widgetChanged( QObject *w )
+void FormWindow::widgetChanged( TQObject *w )
{
if ( w->isWidgetType() )
- updateSelection( (QWidget*)w );
- // ########## do QObject stuff
+ updateSelection( (TQWidget*)w );
+ // ########## do TQObject stuff
}
-QLabel *FormWindow::sizePreview() const
+TQLabel *FormWindow::sizePreview() const
{
if ( !sizePreviewLabel ) {
- ( (FormWindow*)this )->sizePreviewLabel = new QLabel( (FormWindow*)this );
+ ( (FormWindow*)this )->sizePreviewLabel = new TQLabel( (FormWindow*)this );
( (FormWindow*)this )->sizePreviewLabel->hide();
- ( (FormWindow*)this )->sizePreviewLabel->setBackgroundColor( QColor( 255, 255, 128 ) );
- ( (FormWindow*)this )->sizePreviewLabel->setFrameStyle( QFrame::Plain | QFrame::Box );
+ ( (FormWindow*)this )->sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) );
+ ( (FormWindow*)this )->sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box );
}
return sizePreviewLabel;
}
@@ -1567,39 +1567,39 @@ void FormWindow::invalidCheckedSelections()
checkedSelectionsForMove = FALSE;
}
-void FormWindow::checkPreviewGeometry( QRect &r )
+void FormWindow::checkPreviewGeometry( TQRect &r )
{
if ( !rect().contains( r ) ) {
if ( r.left() < rect().left() )
- r.moveTopLeft( QPoint( 0, r.top() ) );
+ r.moveTopLeft( TQPoint( 0, r.top() ) );
if ( r.right() > rect().right() )
- r.moveBottomRight( QPoint( rect().right(), r.bottom() ) );
+ r.moveBottomRight( TQPoint( rect().right(), r.bottom() ) );
if ( r.top() < rect().top() )
- r.moveTopLeft( QPoint( r.left(), rect().top() ) );
+ r.moveTopLeft( TQPoint( r.left(), rect().top() ) );
if ( r.bottom() > rect().bottom() )
- r.moveBottomRight( QPoint( r.right(), rect().bottom() ) );
+ r.moveBottomRight( TQPoint( r.right(), rect().bottom() ) );
}
}
-void FormWindow::focusInEvent( QFocusEvent * ){
+void FormWindow::focusInEvent( TQFocusEvent * ){
if (ff)
ff->checkTimeStamp();
}
-void FormWindow::focusOutEvent( QFocusEvent * )
+void FormWindow::focusOutEvent( TQFocusEvent * )
{
if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) {
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
propertyWidget = mainContainer();
if ( opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
}
}
-void FormWindow::resizeEvent( QResizeEvent *e )
+void FormWindow::resizeEvent( TQResizeEvent *e )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
if ( currTool == ORDER_TOOL )
repositionOrderIndicators();
if ( isVisible() )
@@ -1613,44 +1613,44 @@ void FormWindow::resizeEvent( QResizeEvent *e )
void FormWindow::windowsRepaintWorkaroundTimerTimeout()
{
#if defined(Q_WS_WIN32)
- QObjectList *l = queryList( "QWidget" );
- for ( QObject *o = l->first(); o; o = l->next() ) {
- flickerfree_update( (QWidget*)o );
+ TQObjectList *l = queryList( "TQWidget" );
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
+ flickerfree_update( (TQWidget*)o );
}
flickerfree_update( this );
delete l;
#endif
}
-QPtrDict<QWidget> *FormWindow::widgets()
+TQPtrDict<TQWidget> *FormWindow::widgets()
{
return &insertedWidgets;
}
-QWidget *FormWindow::designerWidget( QObject *o ) const
+TQWidget *FormWindow::designerWidget( TQObject *o ) const
{
if ( !o || !o->isWidgetType() )
return 0;
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
while ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] || isCentralWidget( w ) )
- w = (QWidget*)w->parent();
+ w = (TQWidget*)w->parent();
return w;
}
-void FormWindow::emitShowProperties( QObject *w )
+void FormWindow::emitShowProperties( TQObject *w )
{
if ( w ) {
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
propertyWidget = w;
if ( opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
}
showPropertiesTimer->stop();
// showPropertiesTimer->start( 0, TRUE );
showPropertiesTimerDone();
}
-void FormWindow::emitUpdateProperties( QObject *w )
+void FormWindow::emitUpdateProperties( TQObject *w )
{
if ( w == propertyWidget ) {
updatePropertiesTimer->stop();
@@ -1700,13 +1700,13 @@ void FormWindow::currentToolChanged()
case BUDDY_TOOL:
restoreConnectionLine();
if ( startWidget )
- restoreRect( QRect( mapToForm( ( (QWidget*)startWidget )->parentWidget(),
- ( (QWidget*)startWidget )->pos() ),
- ( (QWidget*)startWidget )->size() ) );
+ restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(),
+ ( (TQWidget*)startWidget )->pos() ),
+ ( (TQWidget*)startWidget )->size() ) );
if ( endWidget )
- restoreRect( QRect( mapToForm( ( (QWidget*)endWidget )->parentWidget(),
- ( (QWidget*)endWidget )->pos() ),
- ( (QWidget*)endWidget )->size() ) );
+ restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(),
+ ( (TQWidget*)endWidget )->pos() ),
+ ( (TQWidget*)endWidget )->size() ) );
endUnclippedPainter();
break;
case POINTER_TOOL:
@@ -1771,12 +1771,12 @@ void FormWindow::showOrderIndicators()
{
hideOrderIndicators();
orderIndicators.setAutoDelete( TRUE );
- QObjectList *l = mainContainer()->queryList( "QWidget" );
+ TQObjectList *l = mainContainer()->queryList( "TQWidget" );
stackedWidgets = MetaDataBase::tabOrder( this );
if ( l ) {
int order = 1;
- for ( QObject *o = l->first(); o; o = l->next() ) {
- QWidget* w = (QWidget*) o;
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
+ TQWidget* w = (TQWidget*) o;
if ( w->isShown() &&
insertedWidgets[ (void*)w ] &&
w->focusPolicy() != NoFocus ) {
@@ -1799,7 +1799,7 @@ void FormWindow::hideOrderIndicators()
void FormWindow::updateOrderIndicators()
{
int order = 1;
- for ( QWidget *w = stackedWidgets.first(); w; w = stackedWidgets.next() ) {
+ for ( TQWidget *w = stackedWidgets.first(); w; w = stackedWidgets.next() ) {
for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() )
i->setOrder( order, w );
order++;
@@ -1820,25 +1820,25 @@ void FormWindow::updateUndoInfo()
bool FormWindow::checkCustomWidgets()
{
- QStringList missingCustomWidgets;
- QPtrDictIterator<QWidget> it( insertedWidgets );
+ TQStringList missingCustomWidgets;
+ TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) {
- QString className = WidgetFactory::classNameOf( it.current() );
+ TQString className = WidgetFactory::classNameOf( it.current() );
if ( !MetaDataBase::hasCustomWidget( className ) )
missingCustomWidgets << className;
}
}
if ( !missingCustomWidgets.isEmpty() ) {
- QString txt = i18n( "The following custom widgets are used in '%1',\n"
+ TQString txt = i18n( "The following custom widgets are used in '%1',\n"
"but are not known to Qt Designer:\n" ).arg( name() );
- for ( QStringList::Iterator sit = missingCustomWidgets.begin(); sit != missingCustomWidgets.end(); ++sit )
+ for ( TQStringList::Iterator sit = missingCustomWidgets.begin(); sit != missingCustomWidgets.end(); ++sit )
txt += " " + *sit + "\n";
txt += i18n( "If you save this form and generate code for it using uic, \n"
"the generated code will not compile.\n"
"Do you want to save this form now?" );
- if ( QMessageBox::information( mainWindow(), i18n( "Save Form" ), txt ) == 1 )
+ if ( TQMessageBox::information( mainWindow(), i18n( "Save Form" ), txt ) == 1 )
return FALSE;
}
return TRUE;
@@ -1859,9 +1859,9 @@ int FormWindow::numSelectedWidgets() const
return usedSelections.count();
}
-QString FormWindow::copy()
+TQString FormWindow::copy()
{
- CHECK_MAINWINDOW_VALUE( QString::null );
+ CHECK_MAINWINDOW_VALUE( TQString::null );
Resource resource( mainWindow() );
resource.setWidget( this );
return resource.copy();
@@ -1869,8 +1869,8 @@ QString FormWindow::copy()
void FormWindow::lowerWidgets()
{
- QWidgetList widgets;
- QPtrDictIterator<WidgetSelection> it( usedSelections );
+ TQWidgetList widgets;
+ TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it )
widgets.append( it.current()->widget() );
@@ -1879,22 +1879,22 @@ void FormWindow::lowerWidgets()
commandHistory()->addCommand( cmd );
}
-void find_accel( const QString &txt, QMap<QChar, QWidgetList > &accels, QWidget *w )
+void find_accel( const TQString &txt, TQMap<TQChar, TQWidgetList > &accels, TQWidget *w )
{
int i = txt.find( "&" );
if ( i == -1 )
return;
- QChar c = txt[ i + 1 ];
+ TQChar c = txt[ i + 1 ];
if ( c.isNull() || c == '&' )
return;
c = c.lower();
- QMap<QChar, QWidgetList >::Iterator it = accels.find( c );
+ TQMap<TQChar, TQWidgetList >::Iterator it = accels.find( c );
if ( it == accels.end() ) {
- QWidgetList wl;
+ TQWidgetList wl;
wl.append( w );
accels.insert( c, wl );
} else {
- QWidgetList *wl = &*it;
+ TQWidgetList *wl = &*it;
wl->append( w );
}
}
@@ -1902,18 +1902,18 @@ void find_accel( const QString &txt, QMap<QChar, QWidgetList > &accels, QWidget
void FormWindow::checkAccels()
{
CHECK_MAINWINDOW;
- QMap<QChar, QWidgetList > accels;
- QObjectList *l = mainContainer()->queryList( "QWidget" );
+ TQMap<TQChar, TQWidgetList > accels;
+ TQObjectList *l = mainContainer()->queryList( "TQWidget" );
if ( l ) {
- for ( QObject *o = l->first(); o; o = l->next() ) {
- if ( ( (QWidget*)o )->isVisibleTo( this ) &&
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
+ if ( ( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets[ (void*)o ] ) {
- QWidget *w = (QWidget*)o;
- const QMetaProperty* text =
+ TQWidget *w = (TQWidget*)o;
+ const TQMetaProperty* text =
w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
- const QMetaProperty* title =
+ const TQMetaProperty* title =
w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
- const QMetaProperty* pageTitle =
+ const TQMetaProperty* pageTitle =
w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE );
if ( text )
find_accel( w->property( "text" ).toString(), accels, w );
@@ -1929,15 +1929,15 @@ void FormWindow::checkAccels()
}
bool ok = TRUE;
- QWidget *wid;
- for ( QMap<QChar, QWidgetList >::Iterator it = accels.begin(); it != accels.end(); ++it ) {
+ TQWidget *wid;
+ for ( TQMap<TQChar, TQWidgetList >::Iterator it = accels.begin(); it != accels.end(); ++it ) {
if ( (*it).count() > 1 ) {
ok = FALSE;
- switch ( QMessageBox::information( mainWindow(), i18n( "Check Accelerators" ),
+ switch ( TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ),
i18n( "Accelerator '%1' is used once.", "Accelerator '%1' is used %n times.", (*it).count()
).arg( it.key().upper() ),
i18n( "&Select" ),
- i18n( "&Cancel" ), QString::null, 2 ) ) {
+ i18n( "&Cancel" ), TQString::null, 2 ) ) {
case 0: // select
clearSelection( FALSE );
for ( wid = (*it).first(); wid; wid = (*it).next() )
@@ -1950,14 +1950,14 @@ void FormWindow::checkAccels()
}
if ( ok )
- QMessageBox::information( mainWindow(), i18n( "Check Accelerators" ),
+ TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ),
i18n( "No accelerator is used more than once." ) );
}
void FormWindow::raiseWidgets()
{
- QWidgetList widgets;
- QPtrDictIterator<WidgetSelection> it( usedSelections );
+ TQWidgetList widgets;
+ TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it )
widgets.append( it.current()->widget() );
@@ -1966,7 +1966,7 @@ void FormWindow::raiseWidgets()
commandHistory()->addCommand( cmd );
}
-void FormWindow::paste( const QString &cb, QWidget *parent )
+void FormWindow::paste( const TQString &cb, TQWidget *parent )
{
CHECK_MAINWINDOW;
Resource resource( mainWindow() );
@@ -1978,12 +1978,12 @@ void FormWindow::selectAll()
{
checkedSelectionsForMove = FALSE;
blockSignals( TRUE );
- QObjectList *l = mainContainer()->queryList( "QWidget" );
+ TQObjectList *l = mainContainer()->queryList( "TQWidget" );
if ( l ) {
- for ( QObject *o = l->first(); o; o = l->next() ) {
- if ( ( (QWidget*)o )->isVisibleTo( this ) &&
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
+ if ( ( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets[ (void*)o ] ) {
- selectWidget( (QWidget*)o );
+ selectWidget( (TQWidget*)o );
}
}
delete l;
@@ -1998,7 +1998,7 @@ void FormWindow::selectAll()
void FormWindow::layoutHorizontal()
{
- QWidgetList widgets( selectedWidgets() );
+ TQWidgetList widgets( selectedWidgets() );
LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out Horizontally" ),
this, mainContainer(), 0, widgets );
clearSelection( FALSE );
@@ -2008,7 +2008,7 @@ void FormWindow::layoutHorizontal()
void FormWindow::layoutVertical()
{
- QWidgetList widgets( selectedWidgets() );
+ TQWidgetList widgets( selectedWidgets() );
LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out Vertically" ),
this, mainContainer(), 0, widgets );
clearSelection( FALSE );
@@ -2018,7 +2018,7 @@ void FormWindow::layoutVertical()
void FormWindow::layoutHorizontalSplit()
{
- QWidgetList widgets( selectedWidgets() );
+ TQWidgetList widgets( selectedWidgets() );
LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( i18n( "Lay Out Horizontally (in splitter)" ),
this, mainContainer(), 0, widgets );
clearSelection( FALSE );
@@ -2028,7 +2028,7 @@ void FormWindow::layoutHorizontalSplit()
void FormWindow::layoutVerticalSplit()
{
- QWidgetList widgets( selectedWidgets() );
+ TQWidgetList widgets( selectedWidgets() );
LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( i18n( "Lay Out Vertically (in splitter)" ),
this, mainContainer(), 0, widgets );
clearSelection( FALSE );
@@ -2041,7 +2041,7 @@ void FormWindow::layoutGrid()
int xres = grid().x();
int yres = grid().y();
- QWidgetList widgets( selectedWidgets() );
+ TQWidgetList widgets( selectedWidgets() );
LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out in a Grid" ),
this, mainContainer(), 0, widgets, xres, yres );
clearSelection( FALSE );
@@ -2049,19 +2049,19 @@ void FormWindow::layoutGrid()
cmd->execute();
}
-void FormWindow::layoutHorizontalContainer( QWidget *w )
+void FormWindow::layoutHorizontalContainer( TQWidget *w )
{
if ( w == this )
w = mainContainer();
- QObjectList *l = (QObjectList*)WidgetFactory::containerOfWidget(w)->children();
+ TQObjectList *l = (TQObjectList*)WidgetFactory::containerOfWidget(w)->children();
if ( !l )
return;
- QWidgetList widgets;
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ TQWidgetList widgets;
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() &&
- ( (QWidget*)o )->isVisibleTo( this ) &&
- insertedWidgets.find( (QWidget*)o ) )
- widgets.append( (QWidget*)o );
+ ( (TQWidget*)o )->isVisibleTo( this ) &&
+ insertedWidgets.find( (TQWidget*)o ) )
+ widgets.append( (TQWidget*)o );
}
LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out Children Horizontally" ),
this, mainContainer(), w, widgets );
@@ -2070,19 +2070,19 @@ void FormWindow::layoutHorizontalContainer( QWidget *w )
cmd->execute();
}
-void FormWindow::layoutVerticalContainer( QWidget *w )
+void FormWindow::layoutVerticalContainer( TQWidget *w )
{
if ( w == this )
w = mainContainer();
- QObjectList *l = (QObjectList*)WidgetFactory::containerOfWidget(w)->children();
+ TQObjectList *l = (TQObjectList*)WidgetFactory::containerOfWidget(w)->children();
if ( !l )
return;
- QWidgetList widgets;
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ TQWidgetList widgets;
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() &&
- ( (QWidget*)o )->isVisibleTo( this ) &&
- insertedWidgets.find( (QWidget*)o ) )
- widgets.append( (QWidget*)o );
+ ( (TQWidget*)o )->isVisibleTo( this ) &&
+ insertedWidgets.find( (TQWidget*)o ) )
+ widgets.append( (TQWidget*)o );
}
LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out Children Vertically" ),
this, mainContainer(), w, widgets );
@@ -2091,22 +2091,22 @@ void FormWindow::layoutVerticalContainer( QWidget *w )
cmd->execute();
}
-void FormWindow::layoutGridContainer( QWidget *w )
+void FormWindow::layoutGridContainer( TQWidget *w )
{
if ( w == this )
w = mainContainer();
int xres = grid().x();
int yres = grid().y();
- QObjectList *l = (QObjectList*)WidgetFactory::containerOfWidget(w)->children();
+ TQObjectList *l = (TQObjectList*)WidgetFactory::containerOfWidget(w)->children();
if ( !l )
return;
- QWidgetList widgets;
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ TQWidgetList widgets;
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() &&
- ( (QWidget*)o )->isVisibleTo( this ) &&
- insertedWidgets.find( (QWidget*)o ) )
- widgets.append( (QWidget*)o );
+ ( (TQWidget*)o )->isVisibleTo( this ) &&
+ insertedWidgets.find( (TQWidget*)o ) )
+ widgets.append( (TQWidget*)o );
}
LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out Children in a Grid" ),
this, mainContainer(), w, widgets, xres, yres );
@@ -2115,12 +2115,12 @@ void FormWindow::layoutGridContainer( QWidget *w )
cmd->execute();
}
-void FormWindow::breakLayout( QWidget *w )
+void FormWindow::breakLayout( TQWidget *w )
{
if ( w == this )
w = mainContainer();
w = WidgetFactory::containerOfWidget( w );
- QPtrList<Command> commands;
+ TQPtrList<Command> commands;
for (;;) {
if ( !w || w == this )
@@ -2130,7 +2130,7 @@ void FormWindow::breakLayout( QWidget *w )
Command *cmd = breakLayoutCommand( w );
if ( cmd )
commands.insert( 0, cmd );
- if ( !::qt_cast<QLayoutWidget*>(w) && !::qt_cast<QSplitter*>(w) )
+ if ( !::qt_cast<QLayoutWidget*>(w) && !::qt_cast<TQSplitter*>(w) )
break;
}
w = w->parentWidget();
@@ -2145,27 +2145,27 @@ void FormWindow::breakLayout( QWidget *w )
cmd->execute();
}
-BreakLayoutCommand *FormWindow::breakLayoutCommand( QWidget *w )
+BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w )
{
CHECK_MAINWINDOW_VALUE( 0 );
- QObjectList *l = (QObjectList*)w->children();
+ TQObjectList *l = (TQObjectList*)w->children();
if ( !l )
return 0;
- QWidgetList widgets;
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ TQWidgetList widgets;
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() &&
- !mainWindow()->isAToolBarChild( (QWidget*)o ) &&
- ( (QWidget*)o )->isVisibleTo( this ) &&
- insertedWidgets.find( (QWidget*)o ) )
- widgets.append( (QWidget*)o );
+ !mainWindow()->isAToolBarChild( (TQWidget*)o ) &&
+ ( (TQWidget*)o )->isVisibleTo( this ) &&
+ insertedWidgets.find( (TQWidget*)o ) )
+ widgets.append( (TQWidget*)o );
}
return new BreakLayoutCommand( i18n( "Break Layout" ), this, WidgetFactory::widgetOfContainer( w ), widgets );
}
int FormWindow::numVisibleWidgets() const
{
- QPtrDictIterator<QWidget> it( insertedWidgets );
+ TQPtrDictIterator<TQWidget> it( insertedWidgets );
int visible = 0;
for ( ; it.current(); ++it ) {
if ( it.current()->isVisibleTo( (FormWindow*)this ) )
@@ -2174,23 +2174,23 @@ int FormWindow::numVisibleWidgets() const
return visible;
}
-bool FormWindow::hasInsertedChildren( QWidget *w ) const
+bool FormWindow::hasInsertedChildren( TQWidget *w ) const
{
if ( !w )
return FALSE;
w = WidgetFactory::containerOfWidget( w );
if ( !w )
return FALSE;
- QObjectList *l = w->queryList( "QWidget" );
+ TQObjectList *l = w->queryList( "TQWidget" );
if ( !l || !l->first() ) {
delete l;
return FALSE;
}
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() &&
- ( (QWidget*)o )->isVisibleTo( (FormWindow*)this ) &&
- insertedWidgets.find( (QWidget*)o ) ) {
+ ( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) &&
+ insertedWidgets.find( (TQWidget*)o ) ) {
delete l;
return TRUE;
}
@@ -2200,7 +2200,7 @@ bool FormWindow::hasInsertedChildren( QWidget *w ) const
return FALSE;
}
-bool FormWindow::allowMove( QWidget *w )
+bool FormWindow::allowMove( TQWidget *w )
{
w = w->parentWidget();
while ( w ) {
@@ -2221,8 +2221,8 @@ void FormWindow::editConnections()
ConnectionDialog dlg( mainwindow );
mainWindow()->statusMessage( i18n( "Edit connections...") );
- dlg.addConnection( startWidget, endWidget, QString::null, QString::null );
- QTimer::singleShot( 0, &dlg, SLOT(ensureConnectionVisible()) );
+ dlg.addConnection( startWidget, endWidget, TQString::null, TQString::null );
+ TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) );
dlg.exec();
}
@@ -2230,8 +2230,8 @@ void FormWindow::saveBackground()
{
if ( buffer )
delete buffer;
- buffer = new QPixmap( width(), height() );
- *buffer = QPixmap::grabWindow( winId() );
+ buffer = new TQPixmap( width(), height() );
+ *buffer = TQPixmap::grabWindow( winId() );
}
void FormWindow::restoreConnectionLine()
@@ -2241,7 +2241,7 @@ void FormWindow::restoreConnectionLine()
int a =QABS( startPos.x() - currentPos.x() );
int b = QABS( startPos.y() - currentPos.y() );
- QRect r( startPos, currentPos );
+ TQRect r( startPos, currentPos );
if ( a < 32 || b < 32 ) { // special case: vertical or horizontal line
r = r.normalize();
@@ -2265,7 +2265,7 @@ void FormWindow::restoreConnectionLine()
int dx = 2 * w / 3;
int dy = 2 * h / 3;
- QPoint p( startPos );
+ TQPoint p( startPos );
if ( r.x() > r.right() ) {
dx = dx * -1;
@@ -2281,7 +2281,7 @@ void FormWindow::restoreConnectionLine()
w = h = 64;
r = r.normalize();
while ( r.contains( p ) ) {
- unclippedPainter->drawPixmap( p, *buffer, QRect( p, QSize( w, h ) ) );
+ unclippedPainter->drawPixmap( p, *buffer, TQRect( p, TQSize( w, h ) ) );
unclippedPainter->setPen( red );
p.setX( p.x() + dx );
p.setY( p.y() + dy );
@@ -2291,15 +2291,15 @@ void FormWindow::restoreConnectionLine()
startPos.x() - 10, startPos.y() - 10, 20, 20 );
}
-void FormWindow::restoreRect( const QRect &rect )
+void FormWindow::restoreRect( const TQRect &rect )
{
if (!unclippedPainter || !buffer)
return;
- QRect r( rect );
+ TQRect r( rect );
r = r.normalize();
- r = QRect( r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4 );
+ r = TQRect( r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4 );
unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, r.width() + 4, 4 );
unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, 4, r.height() + 4 );
@@ -2312,36 +2312,36 @@ void FormWindow::drawConnectionLine()
if ( !unclippedPainter )
return;
- unclippedPainter->setPen( QPen( white, 2 ) );
+ unclippedPainter->setPen( TQPen( white, 2 ) );
unclippedPainter->drawLine( startPos, currentPos );
if ( validForBuddy )
- unclippedPainter->setPen( QPen( darkRed, 1 ) );
+ unclippedPainter->setPen( TQPen( darkRed, 1 ) );
else
- unclippedPainter->setPen( QPen( darkCyan, 1 ) );
+ unclippedPainter->setPen( TQPen( darkCyan, 1 ) );
unclippedPainter->drawLine( startPos, currentPos );
if ( validForBuddy )
- unclippedPainter->setPen( QPen( darkGreen, 1 ) );
+ unclippedPainter->setPen( TQPen( darkGreen, 1 ) );
else
- unclippedPainter->setPen( QPen( magenta, 1 ) );
+ unclippedPainter->setPen( TQPen( magenta, 1 ) );
if ( startWidget ) {
- QWidget *s = (QWidget*)startWidget;
- QPoint p = mapToForm( s, QPoint(0,0) );
- unclippedPainter->drawRect( QRect( p + QPoint( 2, 2 ), s->size() - QSize( 4, 4 ) ) );
+ TQWidget *s = (TQWidget*)startWidget;
+ TQPoint p = mapToForm( s, TQPoint(0,0) );
+ unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), s->size() - TQSize( 4, 4 ) ) );
}
if ( endWidget ) {
- QWidget *e = (QWidget*)endWidget;
- QPoint p = mapToForm( e, QPoint(0,0) );
- unclippedPainter->drawRect( QRect( p + QPoint( 2, 2 ), e->size() - QSize( 4, 4 ) ) );
+ TQWidget *e = (TQWidget*)endWidget;
+ TQPoint p = mapToForm( e, TQPoint(0,0) );
+ unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), e->size() - TQSize( 4, 4 ) ) );
}
}
-QString FormWindow::fileName() const
+TQString FormWindow::fileName() const
{
return ff->absFileName();
}
-void FormWindow::setFileName( const QString &fn )
+void FormWindow::setFileName( const TQString &fn )
{
ff->setFileName( fn );
emit fileNameChanged( ff->fileName(), this );
@@ -2353,33 +2353,33 @@ void FormWindow::modificationChanged( bool m )
emit modificationChanged( m, ff->fileName() );
}
-bool FormWindow::unify( QObject *w, QString &s, bool changeIt )
+bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
{
bool found = !isMainContainer( w ) && qstrcmp( name(), s.latin1() ) == 0;
if ( !found ) {
- QString orig = s;
+ TQString orig = s;
int num = 1;
- QPtrDictIterator<QWidget> it( insertedWidgets );
+ TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current();) {
if ( it.current() != w &&
qstrcmp( it.current()->name(), s.latin1() ) == 0 ) {
found = TRUE;
if ( !changeIt )
break;
- s = orig + "_" + QString::number( ++num );
+ s = orig + "_" + TQString::number( ++num );
it.toFirst();
} else {
++it;
}
}
if ( !found ) {
- QPtrList<QAction> al;
- QAction *a = 0;
+ TQPtrList<TQAction> al;
+ TQAction *a = 0;
for ( a = actions.first(); a; a = actions.next() ) {
- QObjectList *l = a->queryList( "QAction" );
+ TQObjectList *l = a->queryList( "TQAction" );
al.append( a );
- for ( QObject *ao = l->first(); ao; ao = l->next() )
- al.append( (QAction*)ao );
+ for ( TQObject *ao = l->first(); ao; ao = l->next() )
+ al.append( (TQAction*)ao );
delete l;
}
for ( a = al.first(); a; a = al.next() ) {
@@ -2388,35 +2388,35 @@ bool FormWindow::unify( QObject *w, QString &s, bool changeIt )
found = TRUE;
if ( !changeIt )
break;
- s = orig + "_" + QString::number( ++num );
+ s = orig + "_" + TQString::number( ++num );
a = actions.first();
}
}
}
- if ( ::qt_cast<QMainWindow*>(mainContainer()) && !found ) {
- QObjectList *l = mainContainer()->queryList( "PopupMenuEditor" );
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ if ( ::qt_cast<TQMainWindow*>(mainContainer()) && !found ) {
+ TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" );
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o != w &&
qstrcmp ( o->name(), s.latin1() ) == 0 ) {
found = TRUE;
if ( !changeIt )
break;
- s = orig + "_" + QString::number( ++num );
+ s = orig + "_" + TQString::number( ++num );
o = l->first();
}
}
delete l;
}
- if ( ::qt_cast<QMainWindow*>(mainContainer()) ) {
+ if ( ::qt_cast<TQMainWindow*>(mainContainer()) ) {
if ( !found ) {
- QObjectList *l = mainContainer()->queryList( "QDockWindow", 0, TRUE );
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE );
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o != w &&
qstrcmp( o->name(), s.latin1() ) == 0 ) {
found = TRUE;
if ( !changeIt )
break;
- s = orig + "_" + QString::number( ++num );
+ s = orig + "_" + TQString::number( ++num );
o = l->first();
}
}
@@ -2432,7 +2432,7 @@ bool FormWindow::unify( QObject *w, QString &s, bool changeIt )
bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
{
- QPtrDictIterator<QWidget> it( insertedWidgets );
+ TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) {
if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 )
@@ -2446,11 +2446,11 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
bool FormWindow::isDatabaseWidgetUsed() const
{
#ifndef QT_NO_SQL
- QStringList dbClasses;
- dbClasses << "QDataTable"; // add more here
- QPtrDictIterator<QWidget> it( insertedWidgets );
+ TQStringList dbClasses;
+ dbClasses << "TQDataTable"; // add more here
+ TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) {
- QString c( it.current()->className() );
+ TQString c( it.current()->className() );
if ( dbClasses.contains( c ) > 0 ) {
return TRUE;
}
@@ -2462,7 +2462,7 @@ bool FormWindow::isDatabaseWidgetUsed() const
bool FormWindow::isDatabaseAware() const
{
#ifndef QT_NO_SQL
- if ( QString(mContainer->className()) == "QDesignerDataBrowser" || QString(mContainer->className()) == "QDesignerDataView" )
+ if ( TQString(mContainer->className()) == "QDesignerDataBrowser" || TQString(mContainer->className()) == "QDesignerDataView" )
return TRUE;
return isDatabaseWidgetUsed();
#else
@@ -2487,18 +2487,18 @@ void FormWindow::visibilityChanged()
This is the equivalent to mapFromGlobal(w->mapToGlobal(pos) ) but
avoids the two roundtrips to the X-Server on Unix/X11.
*/
-QPoint FormWindow::mapToForm( const QWidget* w, const QPoint& pos ) const
+TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const
{
- QPoint p = pos;
- const QWidget* i = w;
- while ( i && !i->isTopLevel() && !isMainContainer( (QWidget*)i ) ) {
+ TQPoint p = pos;
+ const TQWidget* i = w;
+ while ( i && !i->isTopLevel() && !isMainContainer( (TQWidget*)i ) ) {
p = i->mapToParent( p );
i = i->parentWidget();
}
return mapFromGlobal( w->mapToGlobal( pos ) );
}
-static int widgetDepth( QWidget *w )
+static int widgetDepth( TQWidget *w )
{
int d = -1;
while ( w && !w->isTopLevel() ) {
@@ -2509,7 +2509,7 @@ static int widgetDepth( QWidget *w )
return d;
}
-static bool isChildOf( QWidget *c, QWidget *p )
+static bool isChildOf( TQWidget *c, TQWidget *p )
{
while ( c && !c->isTopLevel() ) {
if ( c == p )
@@ -2519,12 +2519,12 @@ static bool isChildOf( QWidget *c, QWidget *p )
return FALSE;
}
-QWidget *FormWindow::containerAt( const QPoint &pos, QWidget *notParentOf )
+TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
{
- QPtrDictIterator<QWidget> it( insertedWidgets );
- QWidget *container = 0;
+ TQPtrDictIterator<TQWidget> it( insertedWidgets );
+ TQWidget *container = 0;
int depth = -1;
- QWidgetList selected = selectedWidgets();
+ TQWidgetList selected = selectedWidgets();
if ( rect().contains( mapFromGlobal( pos ) ) ) {
container = mainContainer();
depth = widgetDepth( container );
@@ -2532,7 +2532,7 @@ QWidget *FormWindow::containerAt( const QPoint &pos, QWidget *notParentOf )
for ( ; it.current(); ++it ) {
if ( ::qt_cast<QLayoutWidget*>(it.current())
- || ::qt_cast<QSplitter*>(it.current()) )
+ || ::qt_cast<TQSplitter*>(it.current()) )
continue;
if ( !it.current()->isVisibleTo( this ) )
continue;
@@ -2543,7 +2543,7 @@ QWidget *FormWindow::containerAt( const QPoint &pos, QWidget *notParentOf )
continue;
// the rectangles of all ancestors of the container must contain the insert position
- QWidget *w = it.current();
+ TQWidget *w = it.current();
while ( w && !w->isTopLevel() ) {
if ( !w->rect().contains( ( w->mapFromGlobal( pos ) ) ) )
break;
@@ -2553,8 +2553,8 @@ QWidget *FormWindow::containerAt( const QPoint &pos, QWidget *notParentOf )
int wd = widgetDepth( it.current() );
if ( wd == depth && container ) {
- if ( ( (QObjectList*)it.current()->parentWidget()->children() )->find( it.current() ) >
- ( (QObjectList*)container->parentWidget()->children() )->find( container ) )
+ if ( ( (TQObjectList*)it.current()->parentWidget()->children() )->find( it.current() ) >
+ ( (TQObjectList*)container->parentWidget()->children() )->find( container ) )
wd++;
}
if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) {
@@ -2566,12 +2566,12 @@ QWidget *FormWindow::containerAt( const QPoint &pos, QWidget *notParentOf )
return container;
}
-bool FormWindow::isMainContainer( QObject *w ) const
+bool FormWindow::isMainContainer( TQObject *w ) const
{
- return w && w->isWidgetType() && ( w == (QWidget*)this || w == mainContainer() );
+ return w && w->isWidgetType() && ( w == (TQWidget*)this || w == mainContainer() );
}
-void FormWindow::setMainContainer( QWidget *w )
+void FormWindow::setMainContainer( TQWidget *w )
{
bool resetPropertyWidget = isMainContainer( propertyWidget );
if ( mContainer )
@@ -2582,13 +2582,13 @@ void FormWindow::setMainContainer( QWidget *w )
mContainer = w;
insertedWidgets.insert( mContainer, mContainer );
delete layout();
- QHBoxLayout *l = new QHBoxLayout( this );
+ TQHBoxLayout *l = new TQHBoxLayout( this );
l->addWidget( w );
if ( resetPropertyWidget ) {
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
propertyWidget = mContainer;
if ( opw && opw->isWidgetType() )
- repaintSelection( (QWidget*)opw );
+ repaintSelection( (TQWidget*)opw );
}
if ( project() ) {
LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() );
@@ -2618,7 +2618,7 @@ bool FormWindow::savePixmapInProject() const
return pixProject;
}
-QString FormWindow::pixmapLoaderFunction() const
+TQString FormWindow::pixmapLoaderFunction() const
{
return pixLoader;
}
@@ -2637,12 +2637,12 @@ void FormWindow::setSavePixmapInProject( bool b )
pixInline = FALSE;
}
-void FormWindow::setPixmapLoaderFunction( const QString &func )
+void FormWindow::setPixmapLoaderFunction( const TQString &func )
{
pixLoader = func;
}
-void FormWindow::setActiveObject( QObject *o )
+void FormWindow::setActiveObject( TQObject *o )
{
emitShowProperties( o );
propertyWidget = o;
@@ -2658,25 +2658,25 @@ Project *FormWindow::project() const
return proj;
}
-QAction *FormWindow::findAction( const QString &name )
+TQAction *FormWindow::findAction( const TQString &name )
{
- for ( QAction *a = actionList().first(); a; a = actionList().next() ) {
- if ( QString( a->name() ) == name )
+ for ( TQAction *a = actionList().first(); a; a = actionList().next() ) {
+ if ( TQString( a->name() ) == name )
return a;
- QAction *ac = (QAction*)a->child( name.latin1(), "QAction" );
+ TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" );
if ( ac )
return ac;
}
return 0;
}
-void FormWindow::killAccels( QObject *top )
+void FormWindow::killAccels( TQObject *top )
{
- QObjectList *l = top->queryList( "QAccel" );
+ TQObjectList *l = top->queryList( "TQAccel" );
if ( !l )
return;
- for ( QObject *o = l->first(); o; o = l->next() )
- ( (QAccel*)o )->setEnabled( FALSE );
+ for ( TQObject *o = l->first(); o; o = l->next() )
+ ( (TQAccel*)o )->setEnabled( FALSE );
delete l;
}
@@ -2687,11 +2687,11 @@ DesignerFormWindow *FormWindow::iFace()
return iface;
}
-bool FormWindow::isCentralWidget( QObject *w ) const
+bool FormWindow::isCentralWidget( TQObject *w ) const
{
- if ( !::qt_cast<QMainWindow*>(mainContainer()) )
+ if ( !::qt_cast<TQMainWindow*>(mainContainer()) )
return FALSE;
- return w == ( (QMainWindow*)mainContainer() )->centralWidget();
+ return w == ( (TQMainWindow*)mainContainer() )->centralWidget();
}
int FormWindow::layoutDefaultSpacing() const
@@ -2714,12 +2714,12 @@ void FormWindow::setLayoutDefaultMargin( int s )
defMargin = s;
}
-void FormWindow::setSpacingFunction( const QString &funct )
+void FormWindow::setSpacingFunction( const TQString &funct )
{
spacFunction = funct;
}
-QString FormWindow::spacingFunction() const
+TQString FormWindow::spacingFunction() const
{
return spacFunction;
}
@@ -2734,12 +2734,12 @@ bool FormWindow::hasLayoutFunctions() const
return hasLayoutFunc;
}
-void FormWindow::setMarginFunction( const QString &funct )
+void FormWindow::setMarginFunction( const TQString &funct )
{
margFunction = funct;
}
-QString FormWindow::marginFunction() const
+TQString FormWindow::marginFunction() const
{
return margFunction;
}
@@ -2753,17 +2753,17 @@ void FormWindow::setFormFile( FormFile *f )
{
ff = f;
if ( ff )
- connect( this, SIGNAL( modificationChanged(bool, const QString&) ), ff, SLOT( formWindowChangedSomehow() ) );
+ connect( this, TQT_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQT_SLOT( formWindowChangedSomehow() ) );
}
-bool FormWindow::canBeBuddy( const QWidget *w ) const
+bool FormWindow::canBeBuddy( const TQWidget *w ) const
{
- return w->focusPolicy() != QWidget::NoFocus;
+ return w->focusPolicy() != TQWidget::NoFocus;
}
-bool FormWindow::event( QEvent *e )
+bool FormWindow::event( TQEvent *e )
{
- if (e->type() == QEvent::ShowMaximized)
+ if (e->type() == TQEvent::ShowMaximized)
{
#if QT_VERSION >= 0x030300
if ( isMaximized() )
@@ -2771,5 +2771,5 @@ bool FormWindow::event( QEvent *e )
#endif
return true;
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
diff --git a/kdevdesigner/designer/formwindow.h b/kdevdesigner/designer/formwindow.h
index 782a26c3..6a27961a 100644
--- a/kdevdesigner/designer/formwindow.h
+++ b/kdevdesigner/designer/formwindow.h
@@ -32,11 +32,11 @@
#include "sizehandle.h"
#include "actiondnd.h"
-#include <qwidget.h>
-#include <qptrdict.h>
-#include <qpixmap.h>
-#include <qwidgetlist.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqptrdict.h>
+#include <tqpixmap.h>
+#include <tqwidgetlist.h>
+#include <tqmap.h>
class QPaintEvent;
class QMouseEvent;
@@ -65,28 +65,28 @@ class OrderIndicator;
class FormWindow : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
+ Q_PROPERTY( TQString fileName READ fileName WRITE setFileName )
public:
- FormWindow( FormFile *f, MainWindow *mw, QWidget *parent, const char *name = 0 );
- FormWindow( FormFile *f, QWidget *parent, const char *name = 0 );
+ FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name = 0 );
+ FormWindow( FormFile *f, TQWidget *parent, const char *name = 0 );
~FormWindow();
void init();
virtual void setMainWindow( MainWindow *w );
- virtual QString fileName() const;
- virtual void setFileName( const QString &fn );
+ virtual TQString fileName() const;
+ virtual void setFileName( const TQString &fn );
- virtual QPoint grid() const;
- virtual QPoint gridPoint( const QPoint &p );
+ virtual TQPoint grid() const;
+ virtual TQPoint gridPoint( const TQPoint &p );
virtual CommandHistory *commandHistory();
virtual void undo();
virtual void redo();
- virtual QString copy();
- virtual void paste( const QString &cb, QWidget *parent );
+ virtual TQString copy();
+ virtual void paste( const TQString &cb, TQWidget *parent );
virtual void lowerWidgets();
virtual void raiseWidgets();
virtual void checkAccels();
@@ -97,53 +97,53 @@ public:
virtual void layoutVerticalSplit();
virtual void layoutGrid();
- virtual void layoutHorizontalContainer( QWidget *w );
- virtual void layoutVerticalContainer( QWidget *w );
- virtual void layoutGridContainer( QWidget *w );
+ virtual void layoutHorizontalContainer( TQWidget *w );
+ virtual void layoutVerticalContainer( TQWidget *w );
+ virtual void layoutGridContainer( TQWidget *w );
- virtual void breakLayout( QWidget *w );
+ virtual void breakLayout( TQWidget *w );
- virtual void selectWidget( QObject *w, bool select = TRUE );
+ virtual void selectWidget( TQObject *w, bool select = TRUE );
virtual void selectAll();
- virtual void updateSelection( QWidget *w );
- virtual void raiseSelection( QWidget *w );
- virtual void repaintSelection( QWidget *w );
+ virtual void updateSelection( TQWidget *w );
+ virtual void raiseSelection( TQWidget *w );
+ virtual void repaintSelection( TQWidget *w );
virtual void clearSelection( bool changePropertyDisplay = TRUE );
virtual void selectWidgets();
- bool isWidgetSelected( QObject *w );
- virtual void updateChildSelections( QWidget *w );
- virtual void raiseChildSelections( QWidget *w );
+ bool isWidgetSelected( TQObject *w );
+ virtual void updateChildSelections( TQWidget *w );
+ virtual void raiseChildSelections( TQWidget *w );
- virtual void emitUpdateProperties( QObject *w );
- virtual void emitShowProperties( QObject *w = 0 );
+ virtual void emitUpdateProperties( TQObject *w );
+ virtual void emitShowProperties( TQObject *w = 0 );
virtual void emitSelectionChanged();
virtual void setPropertyShowingBlocked( bool b );
bool isPropertyShowingBlocked() const;
- virtual QLabel *sizePreview() const;
- virtual void checkPreviewGeometry( QRect &r );
+ virtual TQLabel *sizePreview() const;
+ virtual void checkPreviewGeometry( TQRect &r );
- virtual QPtrDict<QWidget> *widgets();
- virtual QWidgetList selectedWidgets() const;
+ virtual TQPtrDict<TQWidget> *widgets();
+ virtual TQWidgetList selectedWidgets() const;
- virtual QWidget *designerWidget( QObject *o ) const;
+ virtual TQWidget *designerWidget( TQObject *o ) const;
- virtual void handleContextMenu( QContextMenuEvent *e, QWidget *w );
- virtual void handleMousePress( QMouseEvent *e, QWidget *w );
- virtual void handleMouseRelease( QMouseEvent *e, QWidget *w );
- virtual void handleMouseDblClick( QMouseEvent *e, QWidget *w );
- virtual void handleMouseMove( QMouseEvent *e, QWidget *w );
- virtual void handleKeyPress( QKeyEvent *e, QWidget *w );
- virtual void handleKeyRelease( QKeyEvent *e, QWidget *w );
+ virtual void handleContextMenu( TQContextMenuEvent *e, TQWidget *w );
+ virtual void handleMousePress( TQMouseEvent *e, TQWidget *w );
+ virtual void handleMouseRelease( TQMouseEvent *e, TQWidget *w );
+ virtual void handleMouseDblClick( TQMouseEvent *e, TQWidget *w );
+ virtual void handleMouseMove( TQMouseEvent *e, TQWidget *w );
+ virtual void handleKeyPress( TQKeyEvent *e, TQWidget *w );
+ virtual void handleKeyRelease( TQKeyEvent *e, TQWidget *w );
virtual void updateUndoInfo();
virtual MainWindow *mainWindow() const { return mainwindow; }
bool checkCustomWidgets();
- virtual void insertWidget( QWidget *w, bool checkName = FALSE );
- virtual void removeWidget( QWidget *w );
+ virtual void insertWidget( TQWidget *w, bool checkName = FALSE );
+ virtual void removeWidget( TQWidget *w );
virtual void deleteWidgets();
virtual void editAdjustSize();
virtual void editConnections();
@@ -151,43 +151,43 @@ public:
virtual int numSelectedWidgets() const;
virtual int numVisibleWidgets() const;
- virtual bool hasInsertedChildren( QWidget *w ) const;
+ virtual bool hasInsertedChildren( TQWidget *w ) const;
- virtual QWidget *currentWidget() const { return propertyWidget && propertyWidget->isWidgetType() ? (QWidget*)propertyWidget : 0; } // #####
- virtual bool unify( QObject *w, QString &s, bool changeIt );
+ virtual TQWidget *currentWidget() const { return propertyWidget && propertyWidget->isWidgetType() ? (TQWidget*)propertyWidget : 0; } // #####
+ virtual bool unify( TQObject *w, TQString &s, bool changeIt );
virtual bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w );
virtual bool isDatabaseWidgetUsed() const;
virtual bool isDatabaseAware() const;
- virtual QPoint mapToForm( const QWidget* w, const QPoint& ) const;
+ virtual TQPoint mapToForm( const TQWidget* w, const TQPoint& ) const;
- bool isMainContainer( QObject *w ) const;
- bool isCentralWidget( QObject *w ) const;
- QWidget *mainContainer() const { return mContainer; }
- void setMainContainer( QWidget *w );
+ bool isMainContainer( TQObject *w ) const;
+ bool isCentralWidget( TQObject *w ) const;
+ TQWidget *mainContainer() const { return mContainer; }
+ void setMainContainer( TQWidget *w );
- void paintGrid( QWidget *w, QPaintEvent *e );
+ void paintGrid( TQWidget *w, TQPaintEvent *e );
bool savePixmapInline() const;
- QString pixmapLoaderFunction() const;
+ TQString pixmapLoaderFunction() const;
void setSavePixmapInline( bool b );
- void setPixmapLoaderFunction( const QString &func );
+ void setPixmapLoaderFunction( const TQString &func );
bool savePixmapInProject() const;
void setSavePixmapInProject( bool b );
void setToolFixed() { toolFixed = TRUE; }
- void setActiveObject( QObject *o );
+ void setActiveObject( TQObject *o );
- QPtrList<QAction> &actionList() { return actions; }
- QAction *findAction( const QString &name );
+ TQPtrList<TQAction> &actionList() { return actions; }
+ TQAction *findAction( const TQString &name );
void setProject( Project *pro );
Project *project() const;
- void killAccels( QObject *top );
+ void killAccels( TQObject *top );
DesignerFormWindow *iFace();
@@ -195,10 +195,10 @@ public:
int layoutDefaultMargin() const;
void setLayoutDefaultSpacing( int s );
void setLayoutDefaultMargin( int s );
- QString spacingFunction() const;
- QString marginFunction() const;
- void setSpacingFunction( const QString &func );
- void setMarginFunction( const QString &func );
+ TQString spacingFunction() const;
+ TQString marginFunction() const;
+ void setSpacingFunction( const TQString &func );
+ void setMarginFunction( const TQString &func );
bool hasLayoutFunctions() const;
void hasLayoutFunctions( bool b );
@@ -207,31 +207,31 @@ public:
void setFormFile( FormFile *f );
bool isFake() const { return fake; }
- bool canBeBuddy( const QWidget* ) const;
+ bool canBeBuddy( const TQWidget* ) const;
public slots:
- virtual void widgetChanged( QObject *w );
+ virtual void widgetChanged( TQObject *w );
virtual void currentToolChanged();
virtual void visibilityChanged();
virtual void modificationChanged( bool m );
signals:
- void showProperties( QObject *w );
- void updateProperties( QObject *w );
+ void showProperties( TQObject *w );
+ void updateProperties( TQObject *w );
void undoRedoChanged( bool undoAvailable, bool redoAvailable,
- const QString &undoCmd, const QString &redoCmd );
+ const TQString &undoCmd, const TQString &redoCmd );
void selectionChanged();
void modificationChanged( bool m, FormWindow *fw );
- void modificationChanged( bool m, const QString &s );
- void fileNameChanged( const QString &s, FormWindow *fw );
+ void modificationChanged( bool m, const TQString &s );
+ void fileNameChanged( const TQString &s, FormWindow *fw );
protected:
- virtual void closeEvent( QCloseEvent *e );
- virtual void focusInEvent( QFocusEvent *e );
- virtual void focusOutEvent( QFocusEvent *e );
- virtual void resizeEvent( QResizeEvent *e );
- void mouseDoubleClickEvent( QMouseEvent *e ) { handleMouseDblClick( e, mainContainer() ); }
- virtual bool event( QEvent *e );
+ virtual void closeEvent( TQCloseEvent *e );
+ virtual void focusInEvent( TQFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
+ void mouseDoubleClickEvent( TQMouseEvent *e ) { handleMouseDblClick( e, mainContainer() ); }
+ virtual bool event( TQEvent *e );
private:
enum RectType { Insert, Rubber };
@@ -239,30 +239,30 @@ private:
void beginUnclippedPainter( bool doNot );
void endUnclippedPainter();
void drawConnectionLine();
- void drawSizePreview( const QPoint &pos, const QString& text );
+ void drawSizePreview( const TQPoint &pos, const TQString& text );
void insertWidget();
void moveSelectedWidgets( int dx, int dy );
- void startRectDraw( const QPoint &p, const QPoint &global, QWidget *w, RectType t );
- void continueRectDraw( const QPoint &p, const QPoint &global, QWidget *w, RectType t );
+ void startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t );
+ void continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t );
void endRectDraw();
- void checkSelectionsForMove( QWidget *w );
- BreakLayoutCommand *breakLayoutCommand( QWidget *w );
+ void checkSelectionsForMove( TQWidget *w );
+ BreakLayoutCommand *breakLayoutCommand( TQWidget *w );
- bool allowMove( QWidget *w );
+ bool allowMove( TQWidget *w );
void saveBackground();
void restoreConnectionLine();
- void restoreRect( const QRect &rect ) ;
+ void restoreRect( const TQRect &rect ) ;
void showOrderIndicators();
void updateOrderIndicators();
void repositionOrderIndicators();
void hideOrderIndicators();
- QWidget *containerAt( const QPoint &pos, QWidget *notParentOf );
+ TQWidget *containerAt( const TQPoint &pos, TQWidget *notParentOf );
private slots:
void invalidCheckedSelections();
@@ -275,44 +275,44 @@ private:
int currTool;
bool oldRectValid, widgetPressed, drawRubber, checkedSelectionsForMove;
bool validForBuddy;
- QRect currRect;
- QPoint rectAnchor;
- QPainter *unclippedPainter;
- QPoint sizePreviewPos;
- QPixmap sizePreviewPixmap;
+ TQRect currRect;
+ TQPoint rectAnchor;
+ TQPainter *unclippedPainter;
+ TQPoint sizePreviewPos;
+ TQPixmap sizePreviewPixmap;
MainWindow *mainwindow;
- QPtrList<WidgetSelection> selections;
- QPtrDict<WidgetSelection> usedSelections;
- QRect widgetGeom, rubber;
- QPoint oldPressPos, origPressPos;
+ TQPtrList<WidgetSelection> selections;
+ TQPtrDict<WidgetSelection> usedSelections;
+ TQRect widgetGeom, rubber;
+ TQPoint oldPressPos, origPressPos;
CommandHistory commands;
- QMap<QWidget*, QPoint> moving;
- QWidget *insertParent;
- QObject *propertyWidget;
- QLabel *sizePreviewLabel;
- QTimer *checkSelectionsTimer;
- QPtrDict<QWidget> insertedWidgets;
+ TQMap<TQWidget*, TQPoint> moving;
+ TQWidget *insertParent;
+ TQObject *propertyWidget;
+ TQLabel *sizePreviewLabel;
+ TQTimer *checkSelectionsTimer;
+ TQPtrDict<TQWidget> insertedWidgets;
bool propShowBlocked;
- QTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer,
+ TQTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer,
*windowsRepaintWorkaroundTimer;
- QPoint startPos, currentPos;
- QWidget *startWidget, *endWidget;
- QPixmap *buffer;
- QPtrList<OrderIndicator> orderIndicators;
- QWidgetList orderedWidgets;
- QWidgetList stackedWidgets;
- QWidget *mContainer;
+ TQPoint startPos, currentPos;
+ TQWidget *startWidget, *endWidget;
+ TQPixmap *buffer;
+ TQPtrList<OrderIndicator> orderIndicators;
+ TQWidgetList orderedWidgets;
+ TQWidgetList stackedWidgets;
+ TQWidget *mContainer;
bool pixInline, pixProject;
- QString pixLoader;
+ TQString pixLoader;
bool toolFixed;
- QPtrList<QAction> actions;
+ TQPtrList<TQAction> actions;
Project *proj;
DesignerFormWindow *iface;
- QWidget* targetContainer;
- QPalette restorePalette;
+ TQWidget* targetContainer;
+ TQPalette restorePalette;
bool hadOwnPalette;
int defSpacing, defMargin;
- QString spacFunction, margFunction;
+ TQString spacFunction, margFunction;
bool hasLayoutFunc;
FormFile *ff;
bool fake;
diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp
index 8c204ac3..0b2fc17e 100644
--- a/kdevdesigner/designer/hierarchyview.cpp
+++ b/kdevdesigner/designer/hierarchyview.cpp
@@ -46,47 +46,47 @@
#include "kdevdesigner_part.h"
#include <klocale.h>
-#include <qpalette.h>
-#include <qobjectlist.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qtabwidget.h>
-#include <qwizard.h>
-#include <qwidgetstack.h>
-#include <qtabbar.h>
-#include <qfeatures.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqpalette.h>
+#include <tqobjectlist.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
+#include <tqtabwidget.h>
+#include <tqwizard.h>
+#include <tqwidgetstack.h>
+#include <tqtabbar.h>
+#include <tqfeatures.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include "../interfaces/languageinterface.h"
-#include <qworkspace.h>
-#include <qaccel.h>
-#include <qmessagebox.h>
+#include <tqworkspace.h>
+#include <tqaccel.h>
+#include <tqmessagebox.h>
#include <stdlib.h>
-QListViewItem *newItem = 0;
+TQListViewItem *newItem = 0;
static QPluginManager<ClassBrowserInterface> *classBrowserInterfaceManager = 0;
-HierarchyItem::HierarchyItem( Type type, QListViewItem *parent, QListViewItem *after,
- const QString &txt1, const QString &txt2, const QString &txt3 )
- : QListViewItem( parent, after, txt1, txt2, txt3 ), typ( type )
+HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after,
+ const TQString &txt1, const TQString &txt2, const TQString &txt3 )
+ : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type )
{
}
-HierarchyItem::HierarchyItem( Type type, QListView *parent, QListViewItem *after,
- const QString &txt1, const QString &txt2, const QString &txt3 )
- : QListViewItem( parent, after, txt1, txt2, txt3 ), typ( type )
+HierarchyItem::HierarchyItem( Type type, TQListView *parent, TQListViewItem *after,
+ const TQString &txt1, const TQString &txt2, const TQString &txt3 )
+ : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type )
{
}
-void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align )
{
- QColorGroup g( cg );
- g.setColor( QColorGroup::Base, backgroundColor() );
- g.setColor( QColorGroup::Foreground, Qt::black );
- g.setColor( QColorGroup::Text, Qt::black );
- QString txt = text( 0 );
+ TQColorGroup g( cg );
+ g.setColor( TQColorGroup::Base, backgroundColor() );
+ g.setColor( TQColorGroup::Foreground, Qt::black );
+ g.setColor( TQColorGroup::Text, Qt::black );
+ TQString txt = text( 0 );
if ( rtti() == Function &&
MainWindow::self->currProject()->isCpp() &&
( txt == "init()" || txt == "destroy()" ) ) {
@@ -95,14 +95,14 @@ void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
setText( 0, txt + " " + "(Constructor)" );
else
setText( 0, txt + " " + "(Destructor)" );
- QListViewItem::paintCell( p, g, column, width, align );
+ TQListViewItem::paintCell( p, g, column, width, align );
setText( 0, txt );
listView()->setUpdatesEnabled( TRUE );
} else {
- QListViewItem::paintCell( p, g, column, width, align );
+ TQListViewItem::paintCell( p, g, column, width, align );
}
p->save();
- p->setPen( QPen( cg.dark(), 1 ) );
+ p->setPen( TQPen( cg.dark(), 1 ) );
if ( column == 0 )
p->drawLine( 0, 0, 0, height() - 1 );
if ( listView()->firstChild() != this ) {
@@ -116,7 +116,7 @@ void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
p->restore();
}
-QColor HierarchyItem::backgroundColor()
+TQColor HierarchyItem::backgroundColor()
{
updateBackColor();
return backColor;
@@ -129,7 +129,7 @@ void HierarchyItem::updateBackColor()
return;
}
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
--it;
if ( it.current() ) {
if ( ( ( HierarchyItem*)it.current() )->backColor == *backColor1 )
@@ -141,12 +141,12 @@ void HierarchyItem::updateBackColor()
}
}
-void HierarchyItem::setObject( QObject *o )
+void HierarchyItem::setObject( TQObject *o )
{
obj = o;
}
-QObject *HierarchyItem::object() const
+TQObject *HierarchyItem::object() const
{
return obj;
}
@@ -155,25 +155,25 @@ void HierarchyItem::okRename( int col )
{
if ( newItem == this )
newItem = 0;
- QListViewItem::okRename( col );
+ TQListViewItem::okRename( col );
}
void HierarchyItem::cancelRename( int col )
{
if ( newItem == this ) {
newItem = 0;
- QListViewItem::cancelRename( col );
+ TQListViewItem::cancelRename( col );
delete this;
return;
}
- QListViewItem::cancelRename( col );
+ TQListViewItem::cancelRename( col );
}
-HierarchyList::HierarchyList( QWidget *parent, FormWindow *fw, bool doConnects )
- : QListView( parent ), formWindow( fw )
+HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects )
+ : TQListView( parent ), formWindow( fw )
{
DesignerFormPix = SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance());
DesignerLayoutPix = SmallIcon( "designer_layout.png" , KDevDesignerPartFactory::instance());
@@ -189,64 +189,64 @@ HierarchyList::HierarchyList( QWidget *parent, FormWindow *fw, bool doConnects )
tabWidgetMenu = 0;
addColumn( i18n( "Name" ) );
addColumn( i18n( "Class" ) );
- QPalette p( palette() );
- p.setColor( QColorGroup::Base, QColor( *backColor2 ) );
+ TQPalette p( palette() );
+ p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) );
(void)*selectedBack; // hack
setPalette( p );
- disconnect( header(), SIGNAL( sectionClicked( int ) ),
- this, SLOT( changeSortColumn( int ) ) );
+ disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+ this, TQT_SLOT( changeSortColumn( int ) ) );
setSorting( -1 );
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
if ( doConnects ) {
- connect( this, SIGNAL( clicked( QListViewItem * ) ),
- this, SLOT( objectClicked( QListViewItem * ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
- this, SLOT( objectDoubleClicked( QListViewItem * ) ) );
- connect( this, SIGNAL( returnPressed( QListViewItem * ) ),
- this, SLOT( objectClicked( QListViewItem * ) ) );
- connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint&, int ) ),
- this, SLOT( showRMBMenu( QListViewItem *, const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ this, TQT_SLOT( objectClicked( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQT_SLOT( objectDoubleClicked( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ this, TQT_SLOT( objectClicked( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ),
+ this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) );
}
deselect = TRUE;
setColumnWidthMode( 1, Manual );
}
-void HierarchyList::keyPressEvent( QKeyEvent *e )
+void HierarchyList::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Shift || e->key() == Key_Control )
deselect = FALSE;
else
deselect = TRUE;
- QListView::keyPressEvent( e );
+ TQListView::keyPressEvent( e );
}
-void HierarchyList::keyReleaseEvent( QKeyEvent *e )
+void HierarchyList::keyReleaseEvent( TQKeyEvent *e )
{
deselect = TRUE;
- QListView::keyReleaseEvent( e );
+ TQListView::keyReleaseEvent( e );
}
-void HierarchyList::viewportMousePressEvent( QMouseEvent *e )
+void HierarchyList::viewportMousePressEvent( TQMouseEvent *e )
{
if ( e->state() & ShiftButton || e->state() & ControlButton )
deselect = FALSE;
else
deselect = TRUE;
- QListView::viewportMousePressEvent( e );
+ TQListView::viewportMousePressEvent( e );
}
-void HierarchyList::viewportMouseReleaseEvent( QMouseEvent *e )
+void HierarchyList::viewportMouseReleaseEvent( TQMouseEvent *e )
{
- QListView::viewportMouseReleaseEvent( e );
+ TQListView::viewportMouseReleaseEvent( e );
}
-QObject *HierarchyList::handleObjectClick( QListViewItem *i )
+TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
{
if ( !i )
return 0;
- QObject *o = findObject( i );
+ TQObject *o = findObject( i );
if ( !o )
return 0;
if ( formWindow == o ) {
@@ -256,33 +256,33 @@ QObject *HierarchyList::handleObjectClick( QListViewItem *i )
return 0;
}
if ( o->isWidgetType() ) {
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
if ( !formWindow->widgets()->find( w ) ) {
- if ( ::qt_cast<QWidgetStack*>(w->parent()) ) {
- if (::qt_cast<QTabWidget*>(w->parent()->parent()) ) {
- ((QTabWidget*)w->parent()->parent())->showPage( w );
- o = (QWidget*)w->parent()->parent();
+ if ( ::qt_cast<TQWidgetStack*>(w->parent()) ) {
+ if (::qt_cast<TQTabWidget*>(w->parent()->parent()) ) {
+ ((TQTabWidget*)w->parent()->parent())->showPage( w );
+ o = (TQWidget*)w->parent()->parent();
formWindow->emitUpdateProperties( formWindow->currentWidget() );
- } else if ( ::qt_cast<QWizard*>(w->parent()->parent()) ) {
+ } else if ( ::qt_cast<TQWizard*>(w->parent()->parent()) ) {
((QDesignerWizard*)w->parent()->parent())->
setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
- o = (QWidget*)w->parent()->parent();
+ o = (TQWidget*)w->parent()->parent();
formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else {
- ( (QWidgetStack*)w->parent() )->raiseWidget( w );
- if ( (QWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) )
+ ( (TQWidgetStack*)w->parent() )->raiseWidget( w );
+ if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) )
( (QDesignerWidgetStack*)w->parent() )->updateButtons();
}
- } else if ( ::qt_cast<QMenuBar*>(w) || ::qt_cast<QDockWindow*>(w) ) {
+ } else if ( ::qt_cast<TQMenuBar*>(w) || ::qt_cast<TQDockWindow*>(w) ) {
formWindow->setActiveObject( w );
- } else if ( ::qt_cast<QPopupMenu*>(w) ) {
+ } else if ( ::qt_cast<TQPopupMenu*>(w) ) {
return 0; // ### we could try to find our menu bar and change the currentMenu to our index
} else {
return 0;
}
}
- } else if ( ::qt_cast<QAction*>(o) ) {
- MainWindow::self->actioneditor()->setCurrentAction( (QAction*)o );
+ } else if ( ::qt_cast<TQAction*>(o) ) {
+ MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o );
deselect = TRUE;
}
@@ -293,13 +293,13 @@ QObject *HierarchyList::handleObjectClick( QListViewItem *i )
}
-void HierarchyList::objectDoubleClicked( QListViewItem *i )
+void HierarchyList::objectDoubleClicked( TQListViewItem *i )
{
- QObject *o = handleObjectClick( i );
+ TQObject *o = handleObjectClick( i );
if ( !o )
return;
- if ( o->isWidgetType() && ( (QWidget*)o )->isVisibleTo( formWindow ) ) {
- QWidget *w = (QWidget*)o;
+ if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) {
+ TQWidget *w = (TQWidget*)o;
if ( !w->parentWidget() ||
WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
w->raise();
@@ -307,25 +307,25 @@ void HierarchyList::objectDoubleClicked( QListViewItem *i )
}
}
-void HierarchyList::objectClicked( QListViewItem *i )
+void HierarchyList::objectClicked( TQListViewItem *i )
{
- QObject *o = handleObjectClick( i );
+ TQObject *o = handleObjectClick( i );
if ( !o )
return;
- if ( o->isWidgetType() && ( (QWidget*)o )->isVisibleTo( formWindow ) ) {
- QWidget *w = (QWidget*)o;
+ if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) {
+ TQWidget *w = (TQWidget*)o;
formWindow->selectWidget( w, TRUE );
}
}
-QObject *HierarchyList::findObject( QListViewItem *i )
+TQObject *HierarchyList::findObject( TQListViewItem *i )
{
return ( (HierarchyItem*)i )->object();
}
-QListViewItem *HierarchyList::findItem( QObject *o )
+TQListViewItem *HierarchyList::findItem( TQObject *o )
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (HierarchyItem*)it.current() )->object() == o )
return it.current();
@@ -334,42 +334,42 @@ QListViewItem *HierarchyList::findItem( QObject *o )
return 0;
}
-QObject *HierarchyList::current() const
+TQObject *HierarchyList::current() const
{
if ( currentItem() )
return ( (HierarchyItem*)currentItem() )->object();
return 0;
}
-void HierarchyList::changeNameOf( QObject *o, const QString &name )
+void HierarchyList::changeNameOf( TQObject *o, const TQString &name )
{
- QListViewItem *item = findItem( o );
+ TQListViewItem *item = findItem( o );
if ( !item )
return;
item->setText( 0, name );
}
-void HierarchyList::changeDatabaseOf( QObject *o, const QString &info )
+void HierarchyList::changeDatabaseOf( TQObject *o, const TQString &info )
{
#ifndef QT_NO_SQL
if ( !formWindow->isDatabaseAware() )
return;
- QListViewItem *item = findItem( o );
+ TQListViewItem *item = findItem( o );
if ( !item )
return;
item->setText( 2, info );
#endif
}
-static QPtrList<QWidgetStack> *widgetStacks = 0;
+static TQPtrList<TQWidgetStack> *widgetStacks = 0;
void HierarchyList::setup()
{
if ( !formWindow || formWindow->isFake() )
return;
clear();
- QWidget *w = formWindow->mainContainer();
+ TQWidget *w = formWindow->mainContainer();
#ifndef QT_NO_SQL
if ( formWindow->isDatabaseAware() ) {
if ( columns() == 2 ) {
@@ -386,33 +386,33 @@ void HierarchyList::setup()
}
#endif
if ( !widgetStacks )
- widgetStacks = new QPtrList<QWidgetStack>;
+ widgetStacks = new TQPtrList<TQWidgetStack>;
if ( w )
insertObject( w, 0 );
widgetStacks->clear();
}
-void HierarchyList::setOpen( QListViewItem *i, bool b )
+void HierarchyList::setOpen( TQListViewItem *i, bool b )
{
- QListView::setOpen( i, b );
+ TQListView::setOpen( i, b );
}
-void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
+void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
{
- if ( QString( o->name() ).startsWith( "qt_dead_widget_" ) )
+ if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
return;
bool fakeMainWindow = FALSE;
- if ( ::qt_cast<QMainWindow*>(o) ) {
- QObject *cw = ( (QMainWindow*)o )->centralWidget();
+ if ( ::qt_cast<TQMainWindow*>(o) ) {
+ TQObject *cw = ( (TQMainWindow*)o )->centralWidget();
if ( cw ) {
o = cw;
fakeMainWindow = TRUE;
}
}
- QListViewItem *item = 0;
- QString className = WidgetFactory::classNameOf( o );
+ TQListViewItem *item = 0;
+ TQString className = WidgetFactory::classNameOf( o );
if ( ::qt_cast<QLayoutWidget*>(o) ) {
- switch ( WidgetFactory::layoutType( (QWidget*)o ) ) {
+ switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) {
case WidgetFactory::HBox:
className = "HBox";
break;
@@ -427,27 +427,27 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
}
}
- QString dbInfo;
+ TQString dbInfo;
#ifndef QT_NO_SQL
dbInfo = MetaDataBase::fakeProperty( o, "database" ).toStringList().join(".");
#endif
- QString name = o->name();
- if ( ::qt_cast<QWidgetStack*>(o->parent()) ) {
- if ( ::qt_cast<QTabWidget*>(o->parent()->parent()) )
- name = ( (QTabWidget*)o->parent()->parent() )->tabLabel( (QWidget*)o );
- else if ( ::qt_cast<QWizard*>(o->parent()->parent()) )
- name = ( (QWizard*)o->parent()->parent() )->title( (QWidget*)o );
+ TQString name = o->name();
+ if ( ::qt_cast<TQWidgetStack*>(o->parent()) ) {
+ if ( ::qt_cast<TQTabWidget*>(o->parent()->parent()) )
+ name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
+ else if ( ::qt_cast<TQWizard*>(o->parent()->parent()) )
+ name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o );
}
- QToolBox *tb;
+ TQToolBox *tb;
if ( o->parent() && o->parent()->parent() &&
- (tb = ::qt_cast<QToolBox*>(o->parent()->parent()->parent())) )
- name = tb->itemLabel( tb->indexOf((QWidget*)o) );
+ (tb = ::qt_cast<TQToolBox*>(o->parent()->parent()->parent())) )
+ name = tb->itemLabel( tb->indexOf((TQWidget*)o) );
if ( fakeMainWindow ) {
name = o->parent()->name();
- className = "QMainWindow";
+ className = "TQMainWindow";
}
if ( !parent )
@@ -462,53 +462,53 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
else
item->setPixmap( 0, WidgetDatabase::iconSet(
WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ).
- pixmap( QIconSet::Small, QIconSet::Normal ) );
- if ( ::qt_cast<QAction*>(o) )
- item->setPixmap( 0, ( (QAction*)o )->iconSet().pixmap() );
+ pixmap( TQIconSet::Small, TQIconSet::Normal ) );
+ if ( ::qt_cast<TQAction*>(o) )
+ item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() );
( (HierarchyItem*)item )->setObject( o );
- const QObjectList *l = o->children();
+ const TQObjectList *l = o->children();
if ( ::qt_cast<QDesignerToolBar*>(o) )
l = 0;
if ( l ) {
- QObjectListIt it( *l );
+ TQObjectListIt it( *l );
it.toLast();
for ( ; it.current(); --it ) {
if ( !it.current()->isWidgetType() ||
- ( (QWidget*)it.current() )->isHidden() )
+ ( (TQWidget*)it.current() )->isHidden() )
continue;
- if ( !formWindow->widgets()->find( (QWidget*)it.current() ) ) {
- if ( ::qt_cast<QWidgetStack*>(it.current()->parent()) ||
- ::qt_cast<QWidgetStack*>(it.current()) ) {
- QObject *obj = it.current();
+ if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
+ if ( ::qt_cast<TQWidgetStack*>(it.current()->parent()) ||
+ ::qt_cast<TQWidgetStack*>(it.current()) ) {
+ TQObject *obj = it.current();
QDesignerTabWidget *tw = ::qt_cast<QDesignerTabWidget*>(it.current()->parent());
QDesignerWizard *dw = ::qt_cast<QDesignerWizard*>(it.current()->parent());
- QWidgetStack *stack = 0;
- if ( dw || tw || ::qt_cast<QWidgetStack*>(obj) )
- stack = (QWidgetStack*)obj;
+ TQWidgetStack *stack = 0;
+ if ( dw || tw || ::qt_cast<TQWidgetStack*>(obj) )
+ stack = (TQWidgetStack*)obj;
else
- stack = (QWidgetStack*)obj->parent();
+ stack = (TQWidgetStack*)obj->parent();
if ( widgetStacks->findRef( stack ) != -1 )
continue;
widgetStacks->append( stack );
- QObjectList *l2 = stack->queryList( "QWidget", 0, TRUE, FALSE );
+ TQObjectList *l2 = stack->queryList( "TQWidget", 0, TRUE, FALSE );
for ( obj = l2->last(); obj; obj = l2->prev() ) {
if ( qstrcmp( obj->className(),
"QWidgetStackPrivate::Invisible" ) == 0 ||
- ( tw && !tw->tabBar()->tab( stack->id( (QWidget*)obj ) ) ) ||
- ( dw && dw->isPageRemoved( (QWidget*)obj ) ) )
+ ( tw && !tw->tabBar()->tab( stack->id( (TQWidget*)obj ) ) ) ||
+ ( dw && dw->isPageRemoved( (TQWidget*)obj ) ) )
continue;
if ( qstrcmp( obj->name(), "designer_wizardstack_button" ) == 0 )
continue;
- if ( stack->id( (QWidget*)obj ) == -1 )
+ if ( stack->id( (TQWidget*)obj ) == -1 )
continue;
insertObject( obj, item );
}
delete l2;
- } else if ( ::qt_cast<QToolBox*>(it.current()->parent()) ) {
- if ( !::qt_cast<QScrollView*>(it.current()) )
+ } else if ( ::qt_cast<TQToolBox*>(it.current()->parent()) ) {
+ if ( !::qt_cast<TQScrollView*>(it.current()) )
continue;
- QToolBox *tb = (QToolBox*)it.current()->parent();
+ TQToolBox *tb = (TQToolBox*)it.current()->parent();
for ( int i = tb->count() - 1; i >= 0; --i )
insertObject( tb->item( i ), item );
}
@@ -519,8 +519,8 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
}
if ( fakeMainWindow ) {
- QObjectList *l = o->parent()->queryList( "QDesignerToolBar" );
- QObject *obj;
+ TQObjectList *l = o->parent()->queryList( "QDesignerToolBar" );
+ TQObject *obj;
for ( obj = l->first(); obj; obj = l->next() )
insertObject( obj, item );
delete l;
@@ -529,16 +529,16 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
insertObject( obj, item );
delete l;
} else if ( ::qt_cast<QDesignerToolBar*>(o) || ::qt_cast<PopupMenuEditor*>(o) ) {
- QPtrList<QAction> actions;
+ TQPtrList<TQAction> actions;
if ( ::qt_cast<QDesignerToolBar*>(o) )
actions = ( (QDesignerToolBar*)o )->insertedActions();
else
( (PopupMenuEditor*)o )->insertedActions( actions );
- QPtrListIterator<QAction> it( actions );
+ TQPtrListIterator<TQAction> it( actions );
it.toLast();
while ( it.current() ) {
- QAction *a = it.current();
+ TQAction *a = it.current();
if ( ::qt_cast<QDesignerAction*>(a) ) {
QDesignerAction *da = (QDesignerAction*)a;
if ( da->supportsMenu() )
@@ -551,8 +551,8 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
--it;
}
} else if ( ::qt_cast<QDesignerActionGroup*>(o) && o->children() ) {
- QObjectList *l = (QObjectList*)o->children();
- for ( QObject *obj = l->last(); obj; obj = l->prev() ) {
+ TQObjectList *l = (TQObjectList*)o->children();
+ for ( TQObject *obj = l->last(); obj; obj = l->prev() ) {
if ( ::qt_cast<QDesignerAction*>(obj) ) {
QDesignerAction *da = (QDesignerAction*)obj;
if ( da->supportsMenu() )
@@ -574,9 +574,9 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
}
}
-void HierarchyList::setCurrent( QObject *o )
+void HierarchyList::setCurrent( TQObject *o )
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (HierarchyItem*)it.current() )->object() == o ) {
blockSignals( TRUE );
@@ -589,22 +589,22 @@ void HierarchyList::setCurrent( QObject *o )
}
}
-void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p )
+void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
{
if ( !i )
return;
- QObject *o = findObject( i );
+ TQObject *o = findObject( i );
if ( !o )
return;
if ( !o->isWidgetType() ||
- ( o != formWindow && !formWindow->widgets()->find( (QWidget*)o ) ) )
+ ( o != formWindow && !formWindow->widgets()->find( (TQWidget*)o ) ) )
return;
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
if ( w->isVisibleTo( formWindow ) ) {
- if ( !::qt_cast<QTabWidget*>(w) && !::qt_cast<QWizard*>(w) ) {
+ if ( !::qt_cast<TQTabWidget*>(w) && !::qt_cast<TQWizard*>(w) ) {
if ( !normalMenu )
normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this );
normalMenu->popup( p );
@@ -612,8 +612,8 @@ void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p )
if ( !tabWidgetMenu )
tabWidgetMenu =
formWindow->mainWindow()->setupTabWidgetHierarchyMenu(
- this, SLOT( addTabPage() ),
- SLOT( removeTabPage() ) );
+ this, TQT_SLOT( addTabPage() ),
+ TQT_SLOT( removeTabPage() ) );
tabWidgetMenu->popup( p );
}
}
@@ -621,19 +621,19 @@ void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p )
void HierarchyList::addTabPage()
{
- QObject *o = current();
+ TQObject *o = current();
if ( !o || !o->isWidgetType() )
return;
- QWidget *w = (QWidget*)o;
- if ( ::qt_cast<QTabWidget*>(w) ) {
- QTabWidget *tw = (QTabWidget*)w;
+ TQWidget *w = (TQWidget*)o;
+ if ( ::qt_cast<TQTabWidget*>(w) ) {
+ TQTabWidget *tw = (TQTabWidget*)w;
AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ).
arg( tw->name() ), formWindow,
tw, "Tab" );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- } else if ( ::qt_cast<QWizard*>(w) ) {
- QWizard *wiz = (QWizard*)formWindow->mainContainer();
+ } else if ( ::qt_cast<TQWizard*>(w) ) {
+ TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ).
arg( wiz->name() ), formWindow,
wiz, "Page" );
@@ -644,12 +644,12 @@ void HierarchyList::addTabPage()
void HierarchyList::removeTabPage()
{
- QObject *o = current();
+ TQObject *o = current();
if ( !o || !o->isWidgetType() )
return;
- QWidget *w = (QWidget*)o;
- if ( ::qt_cast<QTabWidget*>(w) ) {
- QTabWidget *tw = (QTabWidget*)w;
+ TQWidget *w = (TQWidget*)o;
+ if ( ::qt_cast<TQTabWidget*>(w) ) {
+ TQTabWidget *tw = (TQTabWidget*)w;
if ( tw->currentPage() ) {
QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
DeleteTabPageCommand *cmd =
@@ -659,8 +659,8 @@ void HierarchyList::removeTabPage()
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
- } else if ( ::qt_cast<QWizard*>(w) ) {
- QWizard *wiz = (QWizard*)formWindow->mainContainer();
+ } else if ( ::qt_cast<TQWizard*>(w) ) {
+ TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) {
QDesignerWizard *dw = (QDesignerWizard*)wiz;
DeleteWizardPageCommand *cmd =
@@ -676,13 +676,13 @@ void HierarchyList::removeTabPage()
// ------------------------------------------------------------
-FormDefinitionView::FormDefinitionView( QWidget *parent, FormWindow *fw )
+FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw )
: HierarchyList( parent, fw, TRUE )
{
header()->hide();
removeColumn( 1 );
- connect( this, SIGNAL( itemRenamed( QListViewItem *, int, const QString & ) ),
- this, SLOT( renamed( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
+ this, TQT_SLOT( renamed( TQListViewItem * ) ) );
popupOpen = FALSE;
}
@@ -692,10 +692,10 @@ void FormDefinitionView::setup()
return;
if ( !formWindow->project()->isCpp() )
return;
- QListViewItem *i = firstChild();
+ TQListViewItem *i = firstChild();
while ( i ) {
if ( i->rtti() == HierarchyItem::DefinitionParent ) {
- QListViewItem *a = i;
+ TQListViewItem *a = i;
i = i->nextSibling();
delete a;
continue;
@@ -705,18 +705,18 @@ void FormDefinitionView::setup()
LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() );
if ( lIface ) {
- QStringList defs = lIface->definitions();
- for ( QStringList::Iterator dit = defs.begin(); dit != defs.end(); ++dit ) {
+ TQStringList defs = lIface->definitions();
+ for ( TQStringList::Iterator dit = defs.begin(); dit != defs.end(); ++dit ) {
HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0,
- i18n( *dit ), QString::null, QString::null );
+ i18n( *dit ), TQString::null, TQString::null );
itemDef->setPixmap( 0, DesignerFolderPix );
itemDef->setOpen( TRUE );
- QStringList entries =
+ TQStringList entries =
lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() );
HierarchyItem *item = 0;
- for ( QStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) {
+ for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) {
item = new HierarchyItem( HierarchyItem::Definition,
- itemDef, item, *eit, QString::null, QString::null );
+ itemDef, item, *eit, TQString::null, TQString::null );
item->setRenameEnabled( 0, TRUE );
}
}
@@ -730,10 +730,10 @@ void FormDefinitionView::setupVariables()
{
bool pubOpen, protOpen, privOpen;
pubOpen = protOpen = privOpen = TRUE;
- QListViewItem *i = firstChild();
+ TQListViewItem *i = firstChild();
while ( i ) {
if ( i->rtti() == HierarchyItem::VarParent ) {
- QListViewItem *a = i;
+ TQListViewItem *a = i;
i = i->firstChild();
while ( i ) {
if ( i->rtti() == HierarchyItem::VarPublic )
@@ -751,31 +751,31 @@ void FormDefinitionView::setupVariables()
}
HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, i18n( "Class Variables" ),
- QString::null, QString::null );
+ TQString::null, TQString::null );
itemVar->setPixmap( 0, DesignerFolderPix );
itemVar->setOpen( TRUE );
itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, i18n( "private" ),
- QString::null, QString::null );
+ TQString::null, TQString::null );
itemVarProt = new HierarchyItem( HierarchyItem::VarProtected, itemVar, 0, i18n( "protected" ),
- QString::null, QString::null );
+ TQString::null, TQString::null );
itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ),
- QString::null, QString::null );
+ TQString::null, TQString::null );
- QValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( formWindow );
- QValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() );
+ TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( formWindow );
+ TQValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() );
if ( !varList.isEmpty() && itemVar ) {
for (;;) {
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
if ( (*it).varAccess == "public" )
item = new HierarchyItem( HierarchyItem::Variable, itemVarPubl, 0, (*it).varName,
- QString::null, QString::null );
+ TQString::null, TQString::null );
else if ( (*it).varAccess == "private" )
item = new HierarchyItem( HierarchyItem::Variable, itemVarPriv, 0, (*it).varName,
- QString::null, QString::null );
+ TQString::null, TQString::null );
else // default is protected
item = new HierarchyItem( HierarchyItem::Variable, itemVarProt, 0, (*it).varName,
- QString::null, QString::null );
+ TQString::null, TQString::null );
item->setPixmap( 0, DesignerEditSlotsPix );
if ( it == varList.begin() )
break;
@@ -795,11 +795,11 @@ void FormDefinitionView::refresh()
bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv;
fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE;
- QListViewItem *i = firstChild();
+ TQListViewItem *i = firstChild();
while ( i ) {
if ( i->rtti() == HierarchyItem::SlotParent ||
i->rtti() == HierarchyItem::FunctParent ) {
- QListViewItem *a = i;
+ TQListViewItem *a = i;
i = i->firstChild();
while ( i ) {
switch( i->rtti() ) {
@@ -832,51 +832,51 @@ void FormDefinitionView::refresh()
itemFunct = new HierarchyItem( HierarchyItem::FunctParent,
- this, 0, i18n( "Functions" ), QString::null, QString::null );
+ this, 0, i18n( "Functions" ), TQString::null, TQString::null );
itemFunct->moveItem( i );
itemFunct->setPixmap( 0, DesignerFolderPix );
itemFunctPriv = new HierarchyItem( HierarchyItem::FunctPrivate, itemFunct, 0,
- i18n( "private" ), QString::null, QString::null );
+ i18n( "private" ), TQString::null, TQString::null );
itemFunctProt = new HierarchyItem( HierarchyItem::FunctProtected, itemFunct, 0,
- i18n( "protected" ), QString::null, QString::null );
+ i18n( "protected" ), TQString::null, TQString::null );
itemFunctPubl = new HierarchyItem( HierarchyItem::FunctPublic, itemFunct, 0,
- i18n( "public" ), QString::null, QString::null );
+ i18n( "public" ), TQString::null, TQString::null );
itemSlots = new HierarchyItem( HierarchyItem::SlotParent,
- this, 0, i18n( "Slots" ), QString::null, QString::null );
+ this, 0, i18n( "Slots" ), TQString::null, TQString::null );
itemSlots->setPixmap( 0, DesignerFolderPix );
itemPrivate = new HierarchyItem( HierarchyItem::SlotPrivate, itemSlots, 0, i18n( "private" ),
- QString::null, QString::null );
+ TQString::null, TQString::null );
itemProtected = new HierarchyItem( HierarchyItem::SlotProtected, itemSlots, 0, i18n( "protected" ),
- QString::null, QString::null );
+ TQString::null, TQString::null );
itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ),
- QString::null, QString::null );
+ TQString::null, TQString::null );
- QValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
- QValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
+ TQValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() );
if ( !functionList.isEmpty() && itemFunct ) {
for (;;) {
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
if ( (*it).type == "slot" ) {
if ( (*it).access == "protected" )
item = new HierarchyItem( HierarchyItem::Slot, itemProtected, 0, (*it).function,
- QString::null, QString::null );
+ TQString::null, TQString::null );
else if ( (*it).access == "private" )
item = new HierarchyItem( HierarchyItem::Slot, itemPrivate, 0, (*it).function,
- QString::null, QString::null );
+ TQString::null, TQString::null );
else // default is public
item = new HierarchyItem( HierarchyItem::Slot, itemPublic, 0, (*it).function,
- QString::null, QString::null );
+ TQString::null, TQString::null );
} else {
if ( (*it).access == "protected" )
item = new HierarchyItem( HierarchyItem::Function, itemFunctProt, 0, (*it).function,
- QString::null, QString::null );
+ TQString::null, TQString::null );
else if ( (*it).access == "private" )
item = new HierarchyItem( HierarchyItem::Function, itemFunctPriv, 0, (*it).function,
- QString::null, QString::null );
+ TQString::null, TQString::null );
else // default is public
item = new HierarchyItem( HierarchyItem::Function, itemFunctPubl, 0, (*it).function,
- QString::null, QString::null );
+ TQString::null, TQString::null );
}
item->setPixmap( 0, DesignerEditSlotsPix );
if ( it == functionList.begin() )
@@ -897,11 +897,11 @@ void FormDefinitionView::refresh()
}
-void FormDefinitionView::setCurrent( QWidget * )
+void FormDefinitionView::setCurrent( TQWidget * )
{
}
-void FormDefinitionView::objectClicked( QListViewItem *i )
+void FormDefinitionView::objectClicked( TQListViewItem *i )
{
if ( !i )
return;
@@ -947,13 +947,13 @@ static HierarchyItem::Type getChildType( int type )
return (HierarchyItem::Type)type;
}
-void HierarchyList::insertEntry( QListViewItem *i, const QPixmap &pix, const QString &s )
+void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const TQString &s )
{
- QListViewItem *after = i->firstChild();
+ TQListViewItem *after = i->firstChild();
while ( after && after->nextSibling() )
after = after->nextSibling();
HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, after, s,
- QString::null, QString::null );
+ TQString::null, TQString::null );
if ( !pix.isNull() )
item->setPixmap( 0, pix );
item->setRenameEnabled( 0, TRUE );
@@ -964,9 +964,9 @@ void HierarchyList::insertEntry( QListViewItem *i, const QPixmap &pix, const QSt
item->startRename( 0 );
}
-void FormDefinitionView::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
- QListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
+ TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
if ( !i )
return;
@@ -1002,7 +1002,7 @@ void FormDefinitionView::contentsMouseDoubleClickEvent( QMouseEvent *e )
case HierarchyItem::VarProtected:
case HierarchyItem::VarPrivate: {
VariableDialog varDia( formWindow, this );
- QListViewItem *i = selectedItem();
+ TQListViewItem *i = selectedItem();
if ( i )
varDia.setCurrentItem( i->text( 0 ) );
varDia.exec();
@@ -1014,7 +1014,7 @@ void FormDefinitionView::contentsMouseDoubleClickEvent( QMouseEvent *e )
insertEntry( i );
}
-void FormDefinitionView::execFunctionDialog( const QString &access, const QString &type, bool addFunc )
+void FormDefinitionView::execFunctionDialog( const TQString &access, const TQString &type, bool addFunc )
{
FormFile *formFile = formWindow->formFile();
if ( !formFile || !formFile->isUihFileUpToDate() )
@@ -1031,7 +1031,7 @@ void FormDefinitionView::execFunctionDialog( const QString &access, const QStrin
dlg.exec();
}
-void FormDefinitionView::showRMBMenu( QListViewItem *i, const QPoint &pos )
+void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
{
if ( !i )
return;
@@ -1042,7 +1042,7 @@ void FormDefinitionView::showRMBMenu( QListViewItem *i, const QPoint &pos )
const int PROPS = 4;
const int GOIMPL = 5;
- QPopupMenu menu;
+ TQPopupMenu menu;
bool insertDelete = FALSE;
if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent ||
@@ -1087,10 +1087,10 @@ void FormDefinitionView::showRMBMenu( QListViewItem *i, const QPoint &pos )
case HierarchyItem::VarPrivate:
case HierarchyItem::Variable: {
VariableDialog varDia( formWindow, this );
- QListViewItem *i = selectedItem();
+ TQListViewItem *i = selectedItem();
if ( i )
varDia.setCurrentItem( i->text( 0 ) );
- if ( varDia.exec() == QDialog::Accepted )
+ if ( varDia.exec() == TQDialog::Accepted )
formWindow->commandHistory()->setModified( TRUE );
break;
}
@@ -1103,7 +1103,7 @@ void FormDefinitionView::showRMBMenu( QListViewItem *i, const QPoint &pos )
i = i->parent();
ListEditor dia( this, 0, TRUE );
dia.setCaption( i18n( "Edit %1" ).arg( i->text( 0 ) ) );
- QStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() );
+ TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() );
dia.setList( entries );
dia.exec();
Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( i->text( 0 )), formWindow,
@@ -1140,10 +1140,10 @@ void FormDefinitionView::showRMBMenu( QListViewItem *i, const QPoint &pos )
} else if ( res == DEL ) {
if ( i->rtti() == HierarchyItem::Slot || i->rtti() == HierarchyItem::Function ) {
- QCString funct( MetaDataBase::normalizeFunction( i->text( 0 ) ).latin1() );
+ TQCString funct( MetaDataBase::normalizeFunction( i->text( 0 ) ).latin1() );
Command *cmd = new RemoveFunctionCommand( i18n( "Remove Function" ), formWindow, funct,
- QString::null, QString::null, QString::null,
- QString::null, formWindow->project()->language() );
+ TQString::null, TQString::null, TQString::null,
+ TQString::null, formWindow->project()->language() );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView();
@@ -1153,7 +1153,7 @@ void FormDefinitionView::showRMBMenu( QListViewItem *i, const QPoint &pos )
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
} else {
- QListViewItem *p = i->parent();
+ TQListViewItem *p = i->parent();
delete i;
save( p, 0 );
}
@@ -1174,7 +1174,7 @@ void FormDefinitionView::showRMBMenu( QListViewItem *i, const QPoint &pos )
}
}
-void FormDefinitionView::renamed( QListViewItem *i )
+void FormDefinitionView::renamed( TQListViewItem *i )
{
if ( newItem == i )
newItem = 0;
@@ -1184,7 +1184,7 @@ void FormDefinitionView::renamed( QListViewItem *i )
}
-void FormDefinitionView::save( QListViewItem *p, QListViewItem *i )
+void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i )
{
if ( i && i->text( 0 ).isEmpty() ) {
delete i;
@@ -1193,12 +1193,12 @@ void FormDefinitionView::save( QListViewItem *p, QListViewItem *i )
if ( i && i->rtti() == HierarchyItem::Variable ) {
i->setRenameEnabled( 0, FALSE );
- QString varName = i->text( 0 );
+ TQString varName = i->text( 0 );
varName = varName.simplifyWhiteSpace();
if ( varName[(int)varName.length() - 1] != ';' )
varName += ";";
if ( MetaDataBase::hasVariable( formWindow, varName ) ) {
- QMessageBox::information( this, i18n( "Edit Variables" ),
+ TQMessageBox::information( this, i18n( "Edit Variables" ),
i18n( "This variable has already been declared." ) );
} else {
if ( p->rtti() == HierarchyItem::VarPublic )
@@ -1212,7 +1212,7 @@ void FormDefinitionView::save( QListViewItem *p, QListViewItem *i )
LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() );
if ( !lIface )
return;
- QStringList lst;
+ TQStringList lst;
i = p->firstChild();
while ( i ) {
lst << i->text( 0 );
@@ -1225,7 +1225,7 @@ void FormDefinitionView::save( QListViewItem *p, QListViewItem *i )
}
}
-void FormDefinitionView::addVariable( const QString &varName, const QString &access )
+void FormDefinitionView::addVariable( const TQString &varName, const TQString &access )
{
Command *cmd = new AddVariableCommand( i18n( "Add Variable" ), formWindow,
varName, access );
@@ -1235,8 +1235,8 @@ void FormDefinitionView::addVariable( const QString &varName, const QString &acc
// ------------------------------------------------------------
-HierarchyView::HierarchyView( QWidget *parent )
- : QTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+HierarchyView::HierarchyView( TQWidget *parent )
+ : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
{
formwindow = 0;
@@ -1255,20 +1255,20 @@ HierarchyView::HierarchyView( QWidget *parent )
if ( !classBrowserInterfaceManager ) {
classBrowserInterfaceManager =
- new QPluginManager<ClassBrowserInterface>( IID_ClassBrowser, QApplication::libraryPaths(),
+ new QPluginManager<ClassBrowserInterface>( IID_ClassBrowser, TQApplication::libraryPaths(),
MainWindow::self->pluginDirectory() );
}
- classBrowsers = new QMap<QString, ClassBrowser>();
- QStringList langs = MetaDataBase::languages();
- for ( QStringList::Iterator it = langs.begin(); it != langs.end(); ++it ) {
+ classBrowsers = new TQMap<TQString, ClassBrowser>();
+ TQStringList langs = MetaDataBase::languages();
+ for ( TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it ) {
QInterfacePtr<ClassBrowserInterface> ciface = 0;
classBrowserInterfaceManager->queryInterface( *it, &ciface );
if ( ciface ) {
ClassBrowser cb( ciface->createClassBrowser( this ), ciface );
addTab( cb.lv, i18n( "Class Declarations" ) );
setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) );
- ciface->onClick( this, SLOT( jumpTo( const QString &, const QString &, int ) ) );
+ ciface->onClick( this, TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) );
classBrowsers->insert( *it, cb );
setTabEnabled( cb.lv, FALSE );
}
@@ -1283,13 +1283,13 @@ void HierarchyView::clear()
{
listview->clear();
fView->clear();
- for ( QMap<QString, ClassBrowser>::Iterator it = classBrowsers->begin();
+ for ( TQMap<TQString, ClassBrowser>::Iterator it = classBrowsers->begin();
it != classBrowsers->end(); ++it ) {
(*it).iface->clear();
}
}
-void HierarchyView::setFormWindow( FormWindow *fw, QObject *o )
+void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
{
bool fake = fw && qstrcmp( fw->name(), "qt_fakewindow" ) == 0;
if ( fw == 0 || o == 0 ) {
@@ -1307,7 +1307,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, QObject *o )
if ( fw == formwindow ) {
if ( fw ) {
if ( !fake )
- listview->setCurrent( (QWidget*)o );
+ listview->setCurrent( (TQWidget*)o );
else
listview->clear();
if ( MainWindow::self->qWorkspace()->activeWindow() == fw )
@@ -1330,11 +1330,11 @@ void HierarchyView::setFormWindow( FormWindow *fw, QObject *o )
fView->setFormWindow( fw );
if ( !fake ) {
listview->setup();
- listview->setCurrent( (QWidget*)o );
+ listview->setCurrent( (TQWidget*)o );
}
fView->setup();
- for ( QMap<QString, ClassBrowser>::Iterator it = classBrowsers->begin();
+ for ( TQMap<TQString, ClassBrowser>::Iterator it = classBrowsers->begin();
it != classBrowsers->end(); ++it ) {
(*it).iface->clear();
setTabEnabled( (*it).lv, fw && !fw->project()->isCpp() );
@@ -1356,7 +1356,7 @@ void HierarchyView::showClasses( SourceEditor *se )
return;
lastSourceEditor = se;
- QTimer::singleShot( 100, this, SLOT( showClassesTimeout() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( showClassesTimeout() ) );
}
void HierarchyView::showClassesTimeout()
@@ -1385,7 +1385,7 @@ void HierarchyView::showClassesTimeout()
MainWindow::self->propertyeditor()->setWidget( 0, 0 );
editor = se;
- for ( QMap<QString, ClassBrowser>::Iterator it = classBrowsers->begin();
+ for ( TQMap<TQString, ClassBrowser>::Iterator it = classBrowsers->begin();
it != classBrowsers->end(); ++it ) {
if ( it.key() == se->project()->language() ) {
(*it).iface->update( se->text() );
@@ -1402,7 +1402,7 @@ void HierarchyView::updateClassBrowsers()
{
if ( !editor )
return;
- for ( QMap<QString, ClassBrowser>::Iterator it = classBrowsers->begin();
+ for ( TQMap<TQString, ClassBrowser>::Iterator it = classBrowsers->begin();
it != classBrowsers->end(); ++it ) {
if ( it.key() == editor->project()->language() )
(*it).iface->update( editor->text() );
@@ -1416,56 +1416,56 @@ FormWindow *HierarchyView::formWindow() const
return formwindow;
}
-void HierarchyView::closeEvent( QCloseEvent *e )
+void HierarchyView::closeEvent( TQCloseEvent *e )
{
emit hidden();
e->accept();
}
-void HierarchyView::widgetInserted( QWidget * )
+void HierarchyView::widgetInserted( TQWidget * )
{
listview->setup();
}
-void HierarchyView::widgetRemoved( QWidget * )
+void HierarchyView::widgetRemoved( TQWidget * )
{
listview->setup();
}
-void HierarchyView::widgetsInserted( const QWidgetList & )
+void HierarchyView::widgetsInserted( const TQWidgetList & )
{
listview->setup();
}
-void HierarchyView::widgetsRemoved( const QWidgetList & )
+void HierarchyView::widgetsRemoved( const TQWidgetList & )
{
listview->setup();
}
-void HierarchyView::namePropertyChanged( QWidget *w, const QVariant & )
+void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & )
{
- QWidget *w2 = w;
- if ( ::qt_cast<QMainWindow*>(w) )
- w2 = ( (QMainWindow*)w )->centralWidget();
+ TQWidget *w2 = w;
+ if ( ::qt_cast<TQMainWindow*>(w) )
+ w2 = ( (TQMainWindow*)w )->centralWidget();
listview->changeNameOf( w2, w->name() );
}
-void HierarchyView::databasePropertyChanged( QWidget *w, const QStringList& info )
+void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& info )
{
#ifndef QT_NO_SQL
- QString i = info.join( "." );
+ TQString i = info.join( "." );
listview->changeDatabaseOf( w, i );
#endif
}
-void HierarchyView::tabsChanged( QTabWidget * )
+void HierarchyView::tabsChanged( TQTabWidget * )
{
listview->setup();
}
-void HierarchyView::pagesChanged( QWizard * )
+void HierarchyView::pagesChanged( TQWizard * )
{
listview->setup();
}
@@ -1488,7 +1488,7 @@ void HierarchyView::updateFormDefinitionView()
fView->setup();
}
-void HierarchyView::jumpTo( const QString &func, const QString &clss, int type )
+void HierarchyView::jumpTo( const TQString &func, const TQString &clss, int type )
{
if ( !editor )
return;
@@ -1498,7 +1498,7 @@ void HierarchyView::jumpTo( const QString &func, const QString &clss, int type )
editor->setFunction( func, clss );
}
-HierarchyView::ClassBrowser::ClassBrowser( QListView *l, ClassBrowserInterface *i )
+HierarchyView::ClassBrowser::ClassBrowser( TQListView *l, ClassBrowserInterface *i )
: lv( l ), iface( i )
{
}
diff --git a/kdevdesigner/designer/hierarchyview.h b/kdevdesigner/designer/hierarchyview.h
index ffd269b7..cb75178e 100644
--- a/kdevdesigner/designer/hierarchyview.h
+++ b/kdevdesigner/designer/hierarchyview.h
@@ -27,10 +27,10 @@
#ifndef HIRARCHYVIEW_H
#define HIRARCHYVIEW_H
-#include <qvariant.h>
-#include <qlistview.h>
-#include <qtabwidget.h>
-#include <qguardedptr.h>
+#include <tqvariant.h>
+#include <tqlistview.h>
+#include <tqtabwidget.h>
+#include <tqguardedptr.h>
#include <private/qcom_p.h>
#include "../interfaces/classbrowserinterface.h"
@@ -68,18 +68,18 @@ public:
Variable
};
- HierarchyItem( Type type, QListViewItem *parent, QListViewItem *after,
- const QString &txt1, const QString &txt2, const QString &txt3 );
- HierarchyItem( Type type, QListView *parent, QListViewItem *after,
- const QString &txt1, const QString &txt2, const QString &txt3 );
+ HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after,
+ const TQString &txt1, const TQString &txt2, const TQString &txt3 );
+ HierarchyItem( Type type, TQListView *parent, TQListViewItem *after,
+ const TQString &txt1, const TQString &txt2, const TQString &txt3 );
- void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
+ void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
void updateBackColor();
- void setObject( QObject *o );
- QObject *object() const;
+ void setObject( TQObject *o );
+ TQObject *object() const;
- void setText( int col, const QString &txt ) { if ( !txt.isEmpty() ) QListViewItem::setText( col, txt ); }
+ void setText( int col, const TQString &txt ) { if ( !txt.isEmpty() ) TQListViewItem::setText( col, txt ); }
int rtti() const { return (int)typ; }
@@ -88,9 +88,9 @@ private:
void cancelRename( int col );
private:
- QColor backgroundColor();
- QColor backColor;
- QObject *obj;
+ TQColor backgroundColor();
+ TQColor backColor;
+ TQObject *obj;
Type typ;
};
@@ -100,55 +100,55 @@ class HierarchyList : public QListView
Q_OBJECT
public:
- HierarchyList( QWidget *parent, FormWindow *fw, bool doConnects = TRUE );
+ HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = TRUE );
virtual void setup();
- virtual void setCurrent( QObject *o );
- void setOpen( QListViewItem *i, bool b );
- void changeNameOf( QObject *o, const QString &name );
- void changeDatabaseOf( QObject *o, const QString &info );
+ virtual void setCurrent( TQObject *o );
+ void setOpen( TQListViewItem *i, bool b );
+ void changeNameOf( TQObject *o, const TQString &name );
+ void changeDatabaseOf( TQObject *o, const TQString &info );
void setFormWindow( FormWindow *fw ) { formWindow = fw; }
- void drawContentsOffset( QPainter *p, int ox, int oy,
+ void drawContentsOffset( TQPainter *p, int ox, int oy,
int cx, int cy, int cw, int ch ) {
setUpdatesEnabled( FALSE );
triggerUpdate();
setUpdatesEnabled( TRUE );
- QListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch );
+ TQListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch );
}
- void insertEntry( QListViewItem *i, const QPixmap &pix = QPixmap(), const QString &s = QString::null );
+ void insertEntry( TQListViewItem *i, const TQPixmap &pix = TQPixmap(), const TQString &s = TQString::null );
protected:
- void keyPressEvent( QKeyEvent *e );
- void keyReleaseEvent( QKeyEvent *e );
- void viewportMousePressEvent( QMouseEvent *e );
- void viewportMouseReleaseEvent( QMouseEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
+ void keyReleaseEvent( TQKeyEvent *e );
+ void viewportMousePressEvent( TQMouseEvent *e );
+ void viewportMouseReleaseEvent( TQMouseEvent *e );
public slots:
void addTabPage();
void removeTabPage();
private:
- void insertObject( QObject *o, QListViewItem *parent );
- QObject *findObject( QListViewItem *i );
- QListViewItem *findItem( QObject *o );
- QObject *current() const;
- QObject *handleObjectClick( QListViewItem *i );
+ void insertObject( TQObject *o, TQListViewItem *parent );
+ TQObject *findObject( TQListViewItem *i );
+ TQListViewItem *findItem( TQObject *o );
+ TQObject *current() const;
+ TQObject *handleObjectClick( TQListViewItem *i );
private slots:
- virtual void objectClicked( QListViewItem *i );
- virtual void objectDoubleClicked( QListViewItem *i );
- virtual void showRMBMenu( QListViewItem *, const QPoint & );
+ virtual void objectClicked( TQListViewItem *i );
+ virtual void objectDoubleClicked( TQListViewItem *i );
+ virtual void showRMBMenu( TQListViewItem *, const TQPoint & );
protected:
FormWindow *formWindow;
- QPopupMenu *normalMenu, *tabWidgetMenu;
+ TQPopupMenu *normalMenu, *tabWidgetMenu;
bool deselect;
- QPixmap DesignerFormPix;
- QPixmap DesignerLayoutPix;
- QPixmap DesignerFolderPix;
- QPixmap DesignerEditSlotsPix;
+ TQPixmap DesignerFormPix;
+ TQPixmap DesignerLayoutPix;
+ TQPixmap DesignerFolderPix;
+ TQPixmap DesignerEditSlotsPix;
};
@@ -157,25 +157,25 @@ class FormDefinitionView : public HierarchyList
Q_OBJECT
public:
- FormDefinitionView( QWidget *parent, FormWindow *fw );
+ FormDefinitionView( TQWidget *parent, FormWindow *fw );
void setup();
void setupVariables();
void refresh();
- void setCurrent( QWidget *w );
+ void setCurrent( TQWidget *w );
protected:
- void contentsMouseDoubleClickEvent( QMouseEvent *e );
+ void contentsMouseDoubleClickEvent( TQMouseEvent *e );
private:
- void save( QListViewItem *p, QListViewItem *i );
- void execFunctionDialog( const QString &access, const QString &type, bool addFunc );
- void addVariable( const QString &varName, const QString &access );
+ void save( TQListViewItem *p, TQListViewItem *i );
+ void execFunctionDialog( const TQString &access, const TQString &type, bool addFunc );
+ void addVariable( const TQString &varName, const TQString &access );
private slots:
- void objectClicked( QListViewItem *i );
- void showRMBMenu( QListViewItem *, const QPoint & );
- void renamed( QListViewItem *i );
+ void objectClicked( TQListViewItem *i );
+ void showRMBMenu( TQListViewItem *, const TQPoint & );
+ void renamed( TQListViewItem *i );
private:
bool popupOpen;
@@ -190,10 +190,10 @@ class HierarchyView : public QTabWidget
Q_OBJECT
public:
- HierarchyView( QWidget *parent );
+ HierarchyView( TQWidget *parent );
~HierarchyView();
- void setFormWindow( FormWindow *fw, QObject *o );
+ void setFormWindow( FormWindow *fw, TQObject *o );
FormWindow *formWindow() const;
SourceEditor *sourceEditor() const { return editor; }
void clear();
@@ -201,14 +201,14 @@ public:
void showClasses( SourceEditor *se );
void updateClassBrowsers();
- void widgetInserted( QWidget *w );
- void widgetRemoved( QWidget *w );
- void widgetsInserted( const QWidgetList &l );
- void widgetsRemoved( const QWidgetList &l );
- void namePropertyChanged( QWidget *w, const QVariant &old );
- void databasePropertyChanged( QWidget *w, const QStringList& info );
- void tabsChanged( QTabWidget *w );
- void pagesChanged( QWizard *w );
+ void widgetInserted( TQWidget *w );
+ void widgetRemoved( TQWidget *w );
+ void widgetsInserted( const TQWidgetList &l );
+ void widgetsRemoved( const TQWidgetList &l );
+ void namePropertyChanged( TQWidget *w, const TQVariant &old );
+ void databasePropertyChanged( TQWidget *w, const TQStringList& info );
+ void tabsChanged( TQTabWidget *w );
+ void pagesChanged( TQWizard *w );
void rebuild();
void closed( FormWindow *fw );
void updateFormDefinitionView();
@@ -217,11 +217,11 @@ public:
HierarchyList *hierarchyList() const { return listview; }
protected slots:
- void jumpTo( const QString &func, const QString &clss,int type );
+ void jumpTo( const TQString &func, const TQString &clss,int type );
void showClassesTimeout();
protected:
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
signals:
void hidden();
@@ -229,9 +229,9 @@ signals:
private:
struct ClassBrowser
{
- ClassBrowser( QListView * = 0, ClassBrowserInterface * = 0 );
+ ClassBrowser( TQListView * = 0, ClassBrowserInterface * = 0 );
~ClassBrowser();
- QListView *lv;
+ TQListView *lv;
QInterfacePtr<ClassBrowserInterface> iface;
Q_DUMMY_COMPARISON_OPERATOR( ClassBrowser )
@@ -240,8 +240,8 @@ private:
HierarchyList *listview;
FormDefinitionView *fView;
SourceEditor *editor;
- QMap<QString, ClassBrowser> *classBrowsers;
- QGuardedPtr<SourceEditor> lastSourceEditor;
+ TQMap<TQString, ClassBrowser> *classBrowsers;
+ TQGuardedPtr<SourceEditor> lastSourceEditor;
};
diff --git a/kdevdesigner/designer/iconvieweditorimpl.cpp b/kdevdesigner/designer/iconvieweditorimpl.cpp
index 10e2fb7d..a4c3064c 100644
--- a/kdevdesigner/designer/iconvieweditorimpl.cpp
+++ b/kdevdesigner/designer/iconvieweditorimpl.cpp
@@ -29,19 +29,19 @@
#include "mainwindow.h"
#include "pixmapchooser.h"
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qiconview.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqiconview.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-IconViewEditor::IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw )
+IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
: IconViewEditorBase( parent, 0, TRUE ), formwindow( fw )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
- iconview = (QIconView*)editWidget;
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ iconview = (TQIconView*)editWidget;
itemText->setText( "" );
itemText->setEnabled( FALSE );
@@ -49,9 +49,9 @@ IconViewEditor::IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
- QIconViewItem *i = 0;
+ TQIconViewItem *i = 0;
for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
- (void)new QIconViewItem( preview, i->text(), *i->pixmap() );
+ (void)new TQIconViewItem( preview, i->text(), *i->pixmap() );
}
if ( preview->firstItem() )
@@ -60,7 +60,7 @@ IconViewEditor::IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow
void IconViewEditor::insertNewItem()
{
- QIconViewItem *i = new QIconViewItem( preview, i18n( "New Item" ) );
+ TQIconViewItem *i = new TQIconViewItem( preview, i18n( "New Item" ) );
preview->setCurrentItem( i );
preview->setSelected( i, TRUE );
itemText->setFocus();
@@ -74,7 +74,7 @@ void IconViewEditor::deleteCurrentItem()
preview->setSelected( preview->currentItem(), TRUE );
}
-void IconViewEditor::currentItemChanged( QIconViewItem *i )
+void IconViewEditor::currentItemChanged( TQIconViewItem *i )
{
itemText->blockSignals( TRUE );
itemText->setText( "" );
@@ -98,7 +98,7 @@ void IconViewEditor::currentItemChanged( QIconViewItem *i )
itemText->blockSignals( FALSE );
}
-void IconViewEditor::currentTextChanged( const QString &txt )
+void IconViewEditor::currentTextChanged( const TQString &txt )
{
if ( !preview->currentItem() )
return;
@@ -119,8 +119,8 @@ void IconViewEditor::cancelClicked()
void IconViewEditor::applyClicked()
{
- QIconViewItem *i = 0;
- QValueList<PopulateIconViewCommand::Item> items;
+ TQIconViewItem *i = 0;
+ TQValueList<PopulateIconViewCommand::Item> items;
for ( i = preview->firstItem(); i; i = i->nextItem() ) {
PopulateIconViewCommand::Item item;
if ( i->pixmap() )
@@ -140,11 +140,11 @@ void IconViewEditor::choosePixmap()
if ( !preview->currentItem() )
return;
- QPixmap pix;
+ TQPixmap pix;
if ( preview->currentItem()->pixmap() )
pix = qChoosePixmap( this, formwindow, *preview->currentItem()->pixmap() );
else
- pix = qChoosePixmap( this, formwindow, QPixmap() );
+ pix = qChoosePixmap( this, formwindow, TQPixmap() );
if ( pix.isNull() )
return;
@@ -159,7 +159,7 @@ void IconViewEditor::deletePixmap()
if ( !preview->currentItem() )
return;
- preview->currentItem()->setPixmap( QPixmap() );
+ preview->currentItem()->setPixmap( TQPixmap() );
itemPixmap->setText( "" );
itemDeletePixmap->setEnabled( FALSE );
}
diff --git a/kdevdesigner/designer/iconvieweditorimpl.h b/kdevdesigner/designer/iconvieweditorimpl.h
index 49e17570..a29276e8 100644
--- a/kdevdesigner/designer/iconvieweditorimpl.h
+++ b/kdevdesigner/designer/iconvieweditorimpl.h
@@ -36,13 +36,13 @@ class IconViewEditor : public IconViewEditorBase
Q_OBJECT
public:
- IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw );
+ IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
protected slots:
void insertNewItem();
void deleteCurrentItem();
- void currentItemChanged( QIconViewItem * );
- void currentTextChanged( const QString & );
+ void currentItemChanged( TQIconViewItem * );
+ void currentTextChanged( const TQString & );
void okClicked();
void cancelClicked();
void applyClicked();
@@ -50,7 +50,7 @@ protected slots:
void deletePixmap();
private:
- QIconView *iconview;
+ TQIconView *iconview;
FormWindow *formwindow;
};
diff --git a/kdevdesigner/designer/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp
index 56ea2d07..135751e8 100644
--- a/kdevdesigner/designer/kdevdesigner_part.cpp
+++ b/kdevdesigner/designer/kdevdesigner_part.cpp
@@ -29,26 +29,26 @@
#include <klocale.h>
#include <kiconloader.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtoolbar.h>
-#include <qmenubar.h>
-#include <qptrlist.h>
-#include <qstatusbar.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtoolbar.h>
+#include <tqmenubar.h>
+#include <tqptrlist.h>
+#include <tqstatusbar.h>
#include "mainwindow.h"
#include "designeraction.h"
#include "formwindow.h"
-KDevDesignerPart::KDevDesignerPart( QWidget *parentWidget, const char *// widgetName
+KDevDesignerPart::KDevDesignerPart( TQWidget *parentWidget, const char *// widgetName
,
- QObject *parent, const char *name, const QStringList &args )
+ TQObject *parent, const char *name, const TQStringList &args )
: KInterfaceDesigner::Designer(parent, name)
{
setInstance( KDevDesignerPartFactory::instance() );
m_widget = new MainWindow( this, true );
- m_widget->reparent(parentWidget, QPoint(0,0));
+ m_widget->reparent(parentWidget, TQPoint(0,0));
setupDesignerWindow();
setWidget(m_widget);
@@ -62,7 +62,7 @@ KDevDesignerPart::KDevDesignerPart( QWidget *parentWidget, const char *// widget
setReadWrite(true);
setModified(false);
- connect(m_widget, SIGNAL(formModified(bool )), this, SLOT(formModified(bool)));
+ connect(m_widget, TQT_SIGNAL(formModified(bool )), this, TQT_SLOT(formModified(bool)));
}
void KDevDesignerPart::setupDesignerWindow()
@@ -74,61 +74,61 @@ void KDevDesignerPart::setupDesignerWindow()
m_widget->statusBar()->hide();
}
-static QIconSet createPartIconSet( const QString &name )
+static TQIconSet createPartIconSet( const TQString &name )
{
- QIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) );
- QString prefix = "designer_";
+ TQIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) );
+ TQString prefix = "designer_";
int right = name.length() - prefix.length();
ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), KDevDesignerPartFactory::instance() ),
- QIconSet::Small, QIconSet::Disabled );
+ TQIconSet::Small, TQIconSet::Disabled );
return ic;
}
void KDevDesignerPart::setupActions( )
{
KAction *action;
- action = KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
- action = KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- action = KStdAction::close(this, SLOT(fileClose()), actionCollection());
+ action = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ action = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection());
stateSync(action, m_widget->actionFileClose);
- action = KStdAction::save(this, SLOT(save()), actionCollection());
+ action = KStdAction::save(this, TQT_SLOT(save()), actionCollection());
stateSync(action, m_widget->actionFileSave);
- action = KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
+ action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
stateSync(action, m_widget->actionFileSaveAs);
- action = new KAction(i18n("Save Al&l"), 0, this, SLOT(fileSaveAs()), actionCollection(), "file_saveall");
+ action = new KAction(i18n("Save Al&l"), 0, this, TQT_SLOT(fileSaveAs()), actionCollection(), "file_saveall");
stateSync(action, m_widget->actionFileSaveAll);
- new KAction(i18n("Create &Template..."), 0, this, SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate");
+ new KAction(i18n("Create &Template..."), 0, this, TQT_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate");
- action = KStdAction::undo(this, SLOT(editUndo()), actionCollection());
+ action = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
stateSync(action, m_widget->actionEditUndo);
- action = KStdAction::redo(this, SLOT(editRedo()), actionCollection());
+ action = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
stateSync(action, m_widget->actionEditRedo);
- action = KStdAction::cut(this, SLOT(editCut()), actionCollection());
+ action = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection());
stateSync(action, m_widget->actionEditCut);
- action = KStdAction::copy(this, SLOT(editCopy()), actionCollection());
+ action = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
stateSync(action, m_widget->actionEditCopy);
- action = KStdAction::paste(this, SLOT(editPaste()), actionCollection());
+ action = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection());
stateSync(action, m_widget->actionEditPaste);
- action = new KAction(i18n("&Delete"), Key_Delete, this, SLOT(editDelete()), actionCollection(), "edit_delete");
+ action = new KAction(i18n("&Delete"), Key_Delete, this, TQT_SLOT(editDelete()), actionCollection(), "edit_delete");
stateSync(action, m_widget->actionEditDelete);
- action = KStdAction::selectAll(this, SLOT(editSelectAll()), actionCollection());
+ action = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection());
stateSync(action, m_widget->actionEditSelectAll);
- action = new KAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, SLOT(editAccels()), actionCollection(), "edit_accels");
+ action = new KAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()), actionCollection(), "edit_accels");
stateSync(action, m_widget->actionEditAccels);
- action = new KAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, SLOT(editFunctions()), actionCollection(), "edit_functions");
+ action = new KAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQT_SLOT(editFunctions()), actionCollection(), "edit_functions");
stateSync(action, m_widget->actionEditFunctions);
- action = new KAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, SLOT(editConnections()), actionCollection(), "edit_connections");
+ action = new KAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQT_SLOT(editConnections()), actionCollection(), "edit_connections");
stateSync(action, m_widget->actionEditConnections);
- action = new KAction(i18n("&Form Settings..."), 0, this, SLOT(editFormSettings()), actionCollection(), "edit_formsettings");
+ action = new KAction(i18n("&Form Settings..."), 0, this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_formsettings");
stateSync(action, m_widget->actionEditFormSettings);
- action = new KAction(i18n("&Add File..."), 0, this, SLOT(projectAddFile()), actionCollection(), "project_addfile");
+ action = new KAction(i18n("&Add File..."), 0, this, TQT_SLOT(projectAddFile()), actionCollection(), "project_addfile");
stateSync(action, m_widget->actionProjectAddFile);
- action = new KAction(i18n("&Image Collection..."), 0, this, SLOT(projectImageCollection()), actionCollection(), "project_imagecollection");
+ action = new KAction(i18n("&Image Collection..."), 0, this, TQT_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection");
stateSync(action, m_widget->actionEditPixmapCollection);
- action = new KAction(i18n("&Database Connections..."), 0, this, SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections");
+ action = new KAction(i18n("&Database Connections..."), 0, this, TQT_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections");
stateSync(action, m_widget->actionEditDatabaseConnections);
- action = new KAction(i18n("&Designer Project Settings..."), 0, this, SLOT(projectSettings()), actionCollection(), "project_settings");
+ action = new KAction(i18n("&Designer Project Settings..."), 0, this, TQT_SLOT(projectSettings()), actionCollection(), "project_settings");
stateSync(action, m_widget->actionEditProjectSettings);
KRadioAction *toggle;
@@ -141,34 +141,34 @@ void KDevDesignerPart::setupActions( )
setupToolsAction(toggle, m_widget->actionOrderTool);
toggle = new KRadioAction(i18n("Set &Buddy"), createPartIconSet("designer_setbuddy.png"), Key_F12, actionCollection(), "tools_setbuddy");
setupToolsAction(toggle, m_widget->actionBuddyTool);
- new KAction(i18n("Configure Toolbox..."), 0, this, SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox");
- new KAction(i18n("Edit &Custom Widgets..."), 0, this, SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets");
+ new KAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox");
+ new KAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets");
- action = new KAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize");
+ action = new KAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize");
stateSync(action, m_widget->actionEditAdjustSize);
- action = new KAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, SLOT(layoutHLayout()), actionCollection(), "layout_h");
+ action = new KAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h");
stateSync(action, m_widget->actionEditHLayout);
- action = new KAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, SLOT(layoutVLayout()), actionCollection(), "layout_v");
+ action = new KAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v");
stateSync(action, m_widget->actionEditVLayout);
- action = new KAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, SLOT(layoutGridLayout()), actionCollection(), "layout_grid");
+ action = new KAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid");
stateSync(action, m_widget->actionEditGridLayout);
- action = new KAction(i18n("Lay Out Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith");
+ action = new KAction(i18n("Lay Out Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith");
stateSync(action, m_widget->actionEditSplitHorizontal);
- action = new KAction(i18n("Lay Out Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv");
+ action = new KAction(i18n("Lay Out Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv");
stateSync(action, m_widget->actionEditSplitVertical);
- action = new KAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, SLOT(layoutBreak()), actionCollection(), "layout_break");
+ action = new KAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break");
stateSync(action, m_widget->actionEditBreakLayout);
toggle = new KRadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer");
setupToolsAction(toggle, m_widget->actionInsertSpacer);
- action = new KAction(i18n("Preview &Form"), CTRL + Key_T, this, SLOT(windowPreview()), actionCollection(), "window_preview");
+ action = new KAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview");
stateSync(action, m_widget->actionPreview);
- action = new KAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, SLOT(windowNext()), actionCollection(), "window_next");
+ action = new KAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQT_SLOT(windowNext()), actionCollection(), "window_next");
stateSync(action, m_widget->actionWindowNext);
- action = new KAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, SLOT(windowPrev()), actionCollection(), "window_prev");
+ action = new KAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQT_SLOT(windowPrev()), actionCollection(), "window_prev");
stateSync(action, m_widget->actionWindowPrevious);
- action = KStdAction::preferences(this, SLOT(editPreferences()), actionCollection());
+ action = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection());
action->setText(i18n("Configure &KDevDesigner..."));
stateSync(action, m_widget->actionEditPreferences);
}
@@ -209,7 +209,7 @@ bool KDevDesignerPart::saveFile()
return true;
}
-void KDevDesignerPart::stateSync( KAction * kaction, QAction * qaction )
+void KDevDesignerPart::stateSync( KAction * kaction, TQAction * qaction )
{
if (!qaction)
return;
@@ -217,18 +217,18 @@ void KDevDesignerPart::stateSync( KAction * kaction, QAction * qaction )
DesignerAction *ac = dynamic_cast<DesignerAction*>(qaction);
if (!ac)
return;
- connect(ac, SIGNAL(actionEnabled(bool )), kaction, SLOT(setEnabled(bool )));
+ connect(ac, TQT_SIGNAL(actionEnabled(bool )), kaction, TQT_SLOT(setEnabled(bool )));
}
-void KDevDesignerPart::setupToolsAction( KRadioAction * toggle, QAction * action )
+void KDevDesignerPart::setupToolsAction( KRadioAction * toggle, TQAction * action )
{
if (!action)
return;
toggle->setGroup("tools");
toggle->setExclusiveGroup("tools");
- connect(action, SIGNAL(toggled(bool )), this, SLOT(setToggleActionChecked(bool )));
- connect(toggle, SIGNAL(toggled(bool)), this, SLOT(setToggleActionOn(bool)));
+ connect(action, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
+ connect(toggle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToggleActionOn(bool)));
toggle->setChecked(action->isOn());
m_actionMap[action] = toggle;
m_actionMap2[toggle] = action;
@@ -256,15 +256,15 @@ KDevDesignerPartFactory::~KDevDesignerPartFactory()
s_instance = 0L;
}
-KParts::Part* KDevDesignerPartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args )
+KParts::Part* KDevDesignerPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args )
{
// Create an instance of our Part
KDevDesignerPart* obj = new KDevDesignerPart( parentWidget, widgetName, parent, name, args );
// See if we are to be read-write or not
- if (QCString(classname) == "KParts::ReadOnlyPart")
+ if (TQCString(classname) == "KParts::ReadOnlyPart")
obj->setReadWrite(false);
return obj;
@@ -457,7 +457,7 @@ void KDevDesignerPart::windowPrev( )
m_widget->actionWindowPrevious->activate();
}
-void KDevDesignerPart::statusMessage( const QString & msg )
+void KDevDesignerPart::statusMessage( const TQString & msg )
{
emit setStatusBarText(msg);
}
@@ -466,7 +466,7 @@ void KDevDesignerPart::setToggleActionChecked( bool b)
{
if (!sender())
return;
- const QAction *action = dynamic_cast<const QAction*>(sender());
+ const TQAction *action = dynamic_cast<const TQAction*>(sender());
if (!action)
return;
if (b)
@@ -491,16 +491,16 @@ void KDevDesignerPart::setToggleActionOn( bool b )
const KRadioAction *action = dynamic_cast<const KRadioAction *>(sender());
if (!action)
return;
-// kdDebug() << (b?QString("toggle"):QString("untoggle")) << " action: " << action->text() << endl;
- QAction *qaction = m_actionMap2[action];
+// kdDebug() << (b?TQString("toggle"):TQString("untoggle")) << " action: " << action->text() << endl;
+ TQAction *qaction = m_actionMap2[action];
if (!qaction)
return;
- disconnect(qaction, SIGNAL(toggled(bool )), this, SLOT(setToggleActionChecked(bool )));
+ disconnect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
qaction->setOn(b);
- connect(qaction, SIGNAL(toggled(bool )), this, SLOT(setToggleActionChecked(bool )));
+ connect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
}
-void KDevDesignerPart::openProject( const QString & // projectFile
+void KDevDesignerPart::openProject( const TQString & // projectFile
)
{
//TODO: implement
@@ -512,19 +512,19 @@ KInterfaceDesigner::DesignerType KDevDesignerPart::designerType( )
return KInterfaceDesigner::QtDesigner;
}
-void KDevDesignerPart::emitAddedFunction( const QString & form, KInterfaceDesigner::Function func )
+void KDevDesignerPart::emitAddedFunction( const TQString & form, KInterfaceDesigner::Function func )
{
kdDebug() << "KDevDesignerPart::emitAddedFunction: form " << form << ", function: " << func.function << endl;
emit addedFunction(designerType(), form, func);
}
-void KDevDesignerPart::emitRemovedFunction( const QString & form, KInterfaceDesigner::Function func )
+void KDevDesignerPart::emitRemovedFunction( const TQString & form, KInterfaceDesigner::Function func )
{
kdDebug() << "KDevDesignerPart::emitRemovedFunction: form " << form << ", function: " << func.function << endl;
emit removedFunction(designerType(), form, func);
}
-void KDevDesignerPart::emitEditedFunction( const QString & form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func )
+void KDevDesignerPart::emitEditedFunction( const TQString & form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func )
{
kdDebug() << "KDevDesignerPart::emitEditedFunction: form " << form
<< ", old function: " << oldFunc.function
@@ -534,7 +534,7 @@ void KDevDesignerPart::emitEditedFunction( const QString & form, KInterfaceDesig
emit editedFunction(designerType(), form, oldFunc, func);
}
-void KDevDesignerPart::emitEditFunction(const QString &formName, const QString &functionName)
+void KDevDesignerPart::emitEditFunction(const TQString &formName, const TQString &functionName)
{
kdDebug() << "KDevDesignerPart::emitEditedFunction: form " << formName
<< ", function: " << functionName << endl;
@@ -547,12 +547,12 @@ void KDevDesignerPart::formModified(bool b)
setModified(b);
}
-void KDevDesignerPart::emitEditSource(const QString &formName)
+void KDevDesignerPart::emitEditSource(const TQString &formName)
{
emit editSource(designerType(), formName);
}
-void KDevDesignerPart::emitNewStatus(const QString &formName, int status)
+void KDevDesignerPart::emitNewStatus(const TQString &formName, int status)
{
emit newStatus(formName, status);
}
diff --git a/kdevdesigner/designer/kdevdesigner_part.h b/kdevdesigner/designer/kdevdesigner_part.h
index cb2fa79f..b85f0b0b 100644
--- a/kdevdesigner/designer/kdevdesigner_part.h
+++ b/kdevdesigner/designer/kdevdesigner_part.h
@@ -21,7 +21,7 @@
#ifndef _KDEVDESIGNERPART_H_
#define _KDEVDESIGNERPART_H_
-#include <qmap.h>
+#include <tqmap.h>
#include <kparts/part.h>
#include <kparts/factory.h>
@@ -40,27 +40,27 @@ class KDevDesignerPart : public KInterfaceDesigner::Designer
{
Q_OBJECT
public:
- KDevDesignerPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &args);
+ KDevDesignerPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &args);
virtual ~KDevDesignerPart();
virtual void setReadWrite(bool rw);
virtual void setModified(bool modified);
- void statusMessage(const QString &msg);
+ void statusMessage(const TQString &msg);
//KInterfaceDesigner::Designer methods
- virtual void openProject(const QString &projectFile);
+ virtual void openProject(const TQString &projectFile);
virtual KInterfaceDesigner::DesignerType designerType();
- void emitAddedFunction(const QString &form, KInterfaceDesigner::Function func);
- void emitEditedFunction(const QString &form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func);
- void emitRemovedFunction(const QString &form, KInterfaceDesigner::Function func);
+ void emitAddedFunction(const TQString &form, KInterfaceDesigner::Function func);
+ void emitEditedFunction(const TQString &form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func);
+ void emitRemovedFunction(const TQString &form, KInterfaceDesigner::Function func);
- void emitEditFunction(const QString &formName, const QString &functionName);
- void emitEditSource(const QString &formName);
+ void emitEditFunction(const TQString &formName, const TQString &functionName);
+ void emitEditSource(const TQString &formName);
- void emitNewStatus(const QString &formName, int status);
+ void emitNewStatus(const TQString &formName, int status);
protected:
virtual bool openFile();
@@ -69,8 +69,8 @@ protected:
void setupDesignerWindow();
void setupActions();
- void stateSync(KAction *kaction, QAction *qaction);
- void setupToolsAction(KRadioAction *toggle, QAction *action);
+ void stateSync(KAction *kaction, TQAction *qaction);
+ void setupToolsAction(KRadioAction *toggle, TQAction *action);
protected slots:
void setToggleActionChecked(bool b);
@@ -119,8 +119,8 @@ protected slots:
private:
MainWindow *m_widget;
- QMap<const QAction*, KRadioAction*> m_actionMap;
- QMap<const KRadioAction*, QAction*> m_actionMap2;
+ TQMap<const TQAction*, KRadioAction*> m_actionMap;
+ TQMap<const KRadioAction*, TQAction*> m_actionMap2;
KRadioAction* pointerAction;
};
@@ -133,9 +133,9 @@ class KDevDesignerPartFactory : public KParts::Factory
public:
KDevDesignerPartFactory();
virtual ~KDevDesignerPartFactory();
- virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args );
+ virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args );
static KInstance* instance();
private:
diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp
index 2926b4f6..1f37ea64 100644
--- a/kdevdesigner/designer/layout.cpp
+++ b/kdevdesigner/designer/layout.cpp
@@ -29,16 +29,16 @@
#include <widgetdatabase.h>
#include "widgetfactory.h"
-#include <qlayout.h>
-#include <qevent.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qbitmap.h>
-#include <qsplitter.h>
-#include <qvaluevector.h>
-#include <qmainwindow.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqbitmap.h>
+#include <tqsplitter.h>
+#include <tqvaluevector.h>
+#include <tqmainwindow.h>
-bool operator<( const QGuardedPtr<QWidget> &p1, const QGuardedPtr<QWidget> &p2 )
+bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> &p2 )
{
return p1.operator->() < p2.operator->();
}
@@ -61,7 +61,7 @@ bool operator<( const QGuardedPtr<QWidget> &p1, const QGuardedPtr<QWidget> &p2 )
widget is found later by Layout.)
*/
-Layout::Layout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter )
+Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter )
: widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter )
{
widgets.setAutoDelete( FALSE );
@@ -78,11 +78,11 @@ Layout::Layout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb,
void Layout::setup()
{
- startPoint = QPoint( 32767, 32767 );
- QValueList<QWidgetList> lists;
- QWidget *lastParent = 0;
- QWidgetList *lastList = 0;
- QWidget *w = 0;
+ startPoint = TQPoint( 32767, 32767 );
+ TQValueList<TQWidgetList> lists;
+ TQWidget *lastParent = 0;
+ TQWidgetList *lastList = 0;
+ TQWidget *w = 0;
// Go through all widgets of the list we got. As we can only
// layout widgets which have the same parent, we first do some
@@ -96,13 +96,13 @@ void Layout::setup()
if ( lastParent != w->parentWidget() ) {
lastList = 0;
lastParent = w->parentWidget();
- QValueList<QWidgetList>::Iterator it = lists.begin();
+ TQValueList<TQWidgetList>::Iterator it = lists.begin();
for ( ; it != lists.end(); ++it ) {
if ( ( *it ).first()->parentWidget() == w->parentWidget() )
lastList = &( *it );
}
if ( !lastList ) {
- QWidgetList l;
+ TQWidgetList l;
l.setAutoDelete( FALSE );
lists.append( l );
lastList = &lists.last();
@@ -113,7 +113,7 @@ void Layout::setup()
// So, now find the list with the most entries
lastList = 0;
- QValueList<QWidgetList>::Iterator it = lists.begin();
+ TQValueList<TQWidgetList>::Iterator it = lists.begin();
for ( ; it != lists.end(); ++it ) {
if ( !lastList || ( *it ).count() > lastList->count() )
lastList = &( *it );
@@ -128,7 +128,7 @@ void Layout::setup()
layoutBase != formWindow->mainContainer() ) )
) ) {
widgets.clear();
- startPoint = QPoint( 0, 0 );
+ startPoint = TQPoint( 0, 0 );
return;
}
@@ -142,11 +142,11 @@ void Layout::setup()
// widgets to get informed if one gets deleted to be able to
// handle that and do not crash in this case
for ( w = widgets.first(); w; w = widgets.next() ) {
- connect( w, SIGNAL( destroyed() ),
- this, SLOT( widgetDestroyed() ) );
- startPoint = QPoint( QMIN( startPoint.x(), w->x() ),
+ connect( w, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( widgetDestroyed() ) );
+ startPoint = TQPoint( QMIN( startPoint.x(), w->x() ),
QMIN( startPoint.y(), w->y() ) );
- geometries.insert( w, QRect( w->pos(), w->size() ) );
+ geometries.insert( w, TQRect( w->pos(), w->size() ) );
// Change the Z-order, as saving/loading uses the Z-order for
// writing/creating widgets and this has to be the same as in
// the layout. Else saving + loading will give different results
@@ -157,23 +157,23 @@ void Layout::setup()
void Layout::widgetDestroyed()
{
if ( sender() && sender()->isWidgetType() )
- widgets.removeRef( (QWidget*)sender() );
+ widgets.removeRef( (TQWidget*)sender() );
}
bool Layout::prepareLayout( bool &needMove, bool &needReparent )
{
if ( !widgets.count() )
return FALSE;
- for ( QWidget *w = widgets.first(); w; w = widgets.next() )
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->raise();
needMove = !layoutBase;
- needReparent = needMove || ::qt_cast<QLayoutWidget*>(layoutBase) || ::qt_cast<QSplitter*>(layoutBase);
+ needReparent = needMove || ::qt_cast<QLayoutWidget*>(layoutBase) || ::qt_cast<TQSplitter*>(layoutBase);
if ( !layoutBase ) {
if ( !useSplitter )
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "QLayoutWidget" ),
WidgetFactory::containerOfWidget( parent ) );
else
- layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "QSplitter" ),
+ layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQSplitter" ),
WidgetFactory::containerOfWidget( parent ) );
} else {
WidgetFactory::deleteLayout( layoutBase );
@@ -182,11 +182,11 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent )
return TRUE;
}
-void Layout::finishLayout( bool needMove, QLayout *layout )
+void Layout::finishLayout( bool needMove, TQLayout *layout )
{
if ( needMove )
layoutBase->move( startPoint );
- QRect g( QRect( layoutBase->pos(), layoutBase->size() ) );
+ TQRect g( TQRect( layoutBase->pos(), layoutBase->size() ) );
if ( WidgetFactory::layoutType( layoutBase->parentWidget() ) == WidgetFactory::NoLayout && !isBreak )
layoutBase->adjustSize();
else if ( isBreak )
@@ -196,9 +196,9 @@ void Layout::finishLayout( bool needMove, QLayout *layout )
layout->activate();
formWindow->insertWidget( layoutBase );
formWindow->selectWidget( layoutBase );
- QString n = layoutBase->name();
+ TQString n = layoutBase->name();
if ( n.find( "qt_dead_widget_" ) != -1 ) {
- n.remove( 0, QString( "qt_dead_widget_" ).length() );
+ n.remove( 0, TQString( "qt_dead_widget_" ).length() );
layoutBase->setName( n );
}
}
@@ -207,7 +207,7 @@ void Layout::undoLayout()
{
if ( !widgets.count() )
return;
- QMap<QGuardedPtr<QWidget>, QRect>::Iterator it = geometries.begin();
+ TQMap<TQGuardedPtr<TQWidget>, TQRect>::Iterator it = geometries.begin();
for ( ; it != geometries.end(); ++it ) {
if ( !it.key() )
continue;
@@ -216,9 +216,9 @@ void Layout::undoLayout()
}
formWindow->selectWidget( layoutBase, FALSE );
WidgetFactory::deleteLayout( layoutBase );
- if ( parent != layoutBase && !::qt_cast<QMainWindow*>(layoutBase) ) {
+ if ( parent != layoutBase && !::qt_cast<TQMainWindow*>(layoutBase) ) {
layoutBase->hide();
- QString n = layoutBase->name();
+ TQString n = layoutBase->name();
n.prepend( "qt_dead_widget_" );
layoutBase->setName( n );
} else {
@@ -232,35 +232,35 @@ void Layout::undoLayout()
void Layout::breakLayout()
{
- QMap<QWidget*, QRect> rects;
+ TQMap<TQWidget*, TQRect> rects;
if ( !widgets.isEmpty() ) {
- QWidget *w;
+ TQWidget *w;
for ( w = widgets.first(); w; w = widgets.next() )
rects.insert( w, w->geometry() );
}
WidgetFactory::deleteLayout( layoutBase );
bool needReparent = qstrcmp( layoutBase->className(), "QLayoutWidget" ) == 0 ||
- qstrcmp( layoutBase->className(), "QSplitter" ) == 0 ||
+ qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 ||
( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
layoutBase != formWindow->mainContainer() );
- bool needResize = qstrcmp( layoutBase->className(), "QSplitter" ) == 0;
+ bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0;
bool add = geometries.isEmpty();
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent )
w->reparent( layoutBase->parentWidget(), 0,
layoutBase->pos() + w->pos(), TRUE );
if ( needResize ) {
- QMap<QWidget*, QRect>::Iterator it = rects.find( w );
+ TQMap<TQWidget*, TQRect>::Iterator it = rects.find( w );
if ( it != rects.end() )
- w->setGeometry( QRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) );
+ w->setGeometry( TQRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) );
}
if ( add )
- geometries.insert( w, QRect( w->pos(), w->size() ) );
+ geometries.insert( w, TQRect( w->pos(), w->size() ) );
}
if ( needReparent ) {
layoutBase->hide();
parent = layoutBase->parentWidget();
- QString n = layoutBase->name();
+ TQString n = layoutBase->name();
n.prepend( "qt_dead_widget_" );
layoutBase->setName( n );
} else {
@@ -275,12 +275,12 @@ void Layout::breakLayout()
class HorizontalLayoutList : public QWidgetList
{
public:
- HorizontalLayoutList( const QWidgetList &l )
- : QWidgetList( l ) {}
+ HorizontalLayoutList( const TQWidgetList &l )
+ : TQWidgetList( l ) {}
- int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) {
- QWidget *w1 = (QWidget*)item1;
- QWidget *w2 = (QWidget*)item2;
+ int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) {
+ TQWidget *w1 = (TQWidget*)item1;
+ TQWidget *w2 = (TQWidget*)item2;
if ( w1->x() == w2->x() )
return 0;
if ( w1->x() > w2->x() )
@@ -290,7 +290,7 @@ public:
};
-HorizontalLayout::HorizontalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter )
+HorizontalLayout::HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter )
: Layout( wl, p, fw, lb, doSetup, splitter )
{
if ( doSetup )
@@ -311,11 +311,11 @@ void HorizontalLayout::doLayout()
if ( !prepareLayout( needMove, needReparent ) )
return;
- QHBoxLayout *layout = (QHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
+ TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, QPoint( 0, 0 ), FALSE );
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
@@ -327,8 +327,8 @@ void HorizontalLayout::doLayout()
w->show();
}
- if ( ::qt_cast<QSplitter*>(layoutBase) )
- ( (QSplitter*)layoutBase )->setOrientation( Qt::Horizontal );
+ if ( ::qt_cast<TQSplitter*>(layoutBase) )
+ ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal );
finishLayout( needMove, layout );
}
@@ -339,12 +339,12 @@ void HorizontalLayout::doLayout()
class VerticalLayoutList : public QWidgetList
{
public:
- VerticalLayoutList( const QWidgetList &l )
- : QWidgetList( l ) {}
+ VerticalLayoutList( const TQWidgetList &l )
+ : TQWidgetList( l ) {}
- int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) {
- QWidget *w1 = (QWidget*)item1;
- QWidget *w2 = (QWidget*)item2;
+ int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) {
+ TQWidget *w1 = (TQWidget*)item1;
+ TQWidget *w2 = (TQWidget*)item2;
if ( w1->y() == w2->y() )
return 0;
if ( w1->y() > w2->y() )
@@ -354,7 +354,7 @@ public:
};
-VerticalLayout::VerticalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter )
+VerticalLayout::VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter )
: Layout( wl, p, fw, lb, doSetup, splitter )
{
if ( doSetup )
@@ -375,11 +375,11 @@ void VerticalLayout::doLayout()
if ( !prepareLayout( needMove, needReparent ) )
return;
- QVBoxLayout *layout = (QVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
+ TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, QPoint( 0, 0 ), FALSE );
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
@@ -391,8 +391,8 @@ void VerticalLayout::doLayout()
w->show();
}
- if ( ::qt_cast<QSplitter*>(layoutBase) )
- ( (QSplitter*)layoutBase )->setOrientation( Qt::Vertical );
+ if ( ::qt_cast<TQSplitter*>(layoutBase) )
+ ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical );
finishLayout( needMove, layout );
}
@@ -407,9 +407,9 @@ public:
Grid( int rows, int cols );
~Grid();
- QWidget* cell( int row, int col ) const { return cells[ row * ncols + col]; }
- void setCell( int row, int col, QWidget* w ) { cells[ row*ncols + col] = w; }
- void setCells( QRect c, QWidget* w ) {
+ TQWidget* cell( int row, int col ) const { return cells[ row * ncols + col]; }
+ void setCell( int row, int col, TQWidget* w ) { cells[ row*ncols + col] = w; }
+ void setCells( TQRect c, TQWidget* w ) {
for ( int rows = c.bottom()-c.top(); rows >= 0; rows--)
for ( int cols = c.right()-c.left(); cols >= 0; cols--) {
setCell(c.top()+rows, c.left()+cols, w);
@@ -419,14 +419,14 @@ public:
int numCols() const { return ncols; }
void simplify();
- bool locateWidget( QWidget* w, int& row, int& col, int& rowspan, int& colspan );
+ bool locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int& colspan );
private:
void merge();
int countRow( int r, int c ) const;
int countCol( int r, int c ) const;
- void setRow( int r, int c, QWidget* w, int count );
- void setCol( int r, int c, QWidget* w, int count );
+ void setRow( int r, int c, TQWidget* w, int count );
+ void setCol( int r, int c, TQWidget* w, int count );
bool isWidgetStartCol( int c ) const;
bool isWidgetEndCol( int c ) const;
bool isWidgetStartRow( int r ) const;
@@ -436,7 +436,7 @@ private:
void extendRight();
void extendUp();
void extendDown();
- QWidget** cells;
+ TQWidget** cells;
bool* cols;
bool* rows;
int nrows, ncols;
@@ -446,7 +446,7 @@ private:
Grid::Grid( int r, int c )
: nrows( r ), ncols( c )
{
- cells = new QWidget*[ r * c ];
+ cells = new TQWidget*[ r * c ];
memset( cells, 0, sizeof( cells ) * r * c );
rows = new bool[ r ];
cols = new bool[ c ];
@@ -462,7 +462,7 @@ Grid::~Grid()
int Grid::countRow( int r, int c ) const
{
- QWidget* w = cell( r, c );
+ TQWidget* w = cell( r, c );
int i = c + 1;
while ( i < ncols && cell( r, i ) == w )
i++;
@@ -471,20 +471,20 @@ int Grid::countRow( int r, int c ) const
int Grid::countCol( int r, int c ) const
{
- QWidget* w = cell( r, c );
+ TQWidget* w = cell( r, c );
int i = r + 1;
while ( i < nrows && cell( i, c ) == w )
i++;
return i - r;
}
-void Grid::setCol( int r, int c, QWidget* w, int count )
+void Grid::setCol( int r, int c, TQWidget* w, int count )
{
for (int i = 0; i < count; i++ )
setCell( r + i, c, w );
}
-void Grid::setRow( int r, int c, QWidget* w, int count )
+void Grid::setRow( int r, int c, TQWidget* w, int count )
{
for (int i = 0; i < count; i++ )
setCell( r, c + i, w );
@@ -534,7 +534,7 @@ bool Grid::isWidgetEndRow( int r ) const
bool Grid::isWidgetTopLeft( int r, int c ) const
{
- QWidget* w = cell( r, c );
+ TQWidget* w = cell( r, c );
if ( !w )
return FALSE;
return ( !r || cell( r-1, c) != w ) && (!c || cell( r, c-1) != w);
@@ -545,7 +545,7 @@ void Grid::extendLeft()
int r,c,i;
for ( c = 1; c < ncols; c++ ) {
for ( r = 0; r < nrows; r++ ) {
- QWidget* w = cell( r, c );
+ TQWidget* w = cell( r, c );
if ( !w )
continue;
int cc = countCol( r, c);
@@ -576,7 +576,7 @@ void Grid::extendRight()
int r,c,i;
for ( c = ncols - 2; c >= 0; c-- ) {
for ( r = 0; r < nrows; r++ ) {
- QWidget* w = cell( r, c );
+ TQWidget* w = cell( r, c );
if ( !w )
continue;
int cc = countCol( r, c);
@@ -607,7 +607,7 @@ void Grid::extendUp()
int r,c,i;
for ( r = 1; r < nrows; r++ ) {
for ( c = 0; c < ncols; c++ ) {
- QWidget* w = cell( r, c );
+ TQWidget* w = cell( r, c );
if ( !w )
continue;
int cr = countRow( r, c);
@@ -637,7 +637,7 @@ void Grid::extendDown()
int r,c,i;
for ( r = nrows - 2; r >= 0; r-- ) {
for ( c = 0; c < ncols; c++ ) {
- QWidget* w = cell( r, c );
+ TQWidget* w = cell( r, c );
if ( !w )
continue;
int cr = countRow( r, c);
@@ -692,7 +692,7 @@ void Grid::merge()
}
}
-bool Grid::locateWidget( QWidget* w, int& row, int& col, int& rowspan, int & colspan )
+bool Grid::locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int & colspan )
{
int r,c, r2, c2;
for ( c = 0; c < ncols; c++ ) {
@@ -728,7 +728,7 @@ bool Grid::locateWidget( QWidget* w, int& row, int& col, int& rowspan, int & col
-GridLayout::GridLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, const QSize &res, bool doSetup )
+GridLayout::GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup )
: Layout( wl, p, fw, lb, doSetup ), resolution( res )
{
grid = 0;
@@ -752,12 +752,12 @@ void GridLayout::doLayout()
if ( !grid )
buildGrid();
- QWidget* w;
+ TQWidget* w;
int r, c, rs, cs;
for ( w = widgets.first(); w; w = widgets.next() ) {
if ( grid->locateWidget( w, r, c, rs, cs) ) {
if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, QPoint( 0, 0 ), FALSE );
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( rs * cs == 1 ) {
layout->addWidget( w, r, c, ::qt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
} else {
@@ -791,14 +791,14 @@ void GridLayout::buildGrid()
// -----------------------------------------------------------------
// We need a list of both start and stop values for x- & y-axis
- QValueVector<int> x( widgets.count()*2 );
- QValueVector<int> y( widgets.count()*2 );
+ TQValueVector<int> x( widgets.count()*2 );
+ TQValueVector<int> y( widgets.count()*2 );
// Using push_back would look nicer, but operator[] is much faster
int index = 0;
- QWidget* w = 0;
+ TQWidget* w = 0;
for ( w = widgets.first(); w; w = widgets.next() ) {
- QRect widgetPos = w->geometry();
+ TQRect widgetPos = w->geometry();
x[index] = widgetPos.left();
x[index+1] = widgetPos.right();
y[index] = widgetPos.top();
@@ -811,7 +811,7 @@ void GridLayout::buildGrid()
// Remove duplicate x enteries (Remove next, if equal to current)
if ( !x.empty() ) {
- for (QValueVector<int>::iterator current = x.begin() ;
+ for (TQValueVector<int>::iterator current = x.begin() ;
(current != x.end()) && ((current+1) != x.end()) ; )
if ( (*current == *(current+1)) )
x.erase(current+1);
@@ -821,7 +821,7 @@ void GridLayout::buildGrid()
// Remove duplicate y enteries (Remove next, if equal to current)
if ( !y.empty() ) {
- for (QValueVector<int>::iterator current = y.begin() ;
+ for (TQValueVector<int>::iterator current = y.begin() ;
(current != y.end()) && ((current+1) != y.end()) ; )
if ( (*current == *(current+1)) )
y.erase(current+1);
@@ -837,7 +837,7 @@ void GridLayout::buildGrid()
// Mark the cells in the grid that contains a widget
for ( w = widgets.first(); w; w = widgets.next() ) {
- QRect c(0,0,0,0), widgetPos = w->geometry();
+ TQRect c(0,0,0,0), widgetPos = w->geometry();
// From left til right (not including)
for (uint cw=0; cw<x.size(); cw++) {
if ( x[cw] == widgetPos.left() )
@@ -863,17 +863,17 @@ void GridLayout::buildGrid()
-Spacer::Spacer( QWidget *parent, const char *name )
- : QWidget( parent, name, WMouseNoMask ),
- orient( Vertical ), interactive(TRUE), sh( QSize(20,20) )
+Spacer::Spacer( TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WMouseNoMask ),
+ orient( Vertical ), interactive(TRUE), sh( TQSize(20,20) )
{
setSizeType( Expanding );
setAutoMask( TRUE );
}
-void Spacer::paintEvent( QPaintEvent * )
+void Spacer::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
+ TQPainter p( this );
p.setPen( Qt::blue );
if ( orient == Horizontal ) {
@@ -905,37 +905,37 @@ void Spacer::paintEvent( QPaintEvent * )
}
}
-void Spacer::resizeEvent( QResizeEvent* e)
+void Spacer::resizeEvent( TQResizeEvent* e)
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
sh = size();
}
void Spacer::updateMask()
{
- QRegion r( rect() );
+ TQRegion r( rect() );
if ( orient == Horizontal ) {
const int amplitude = QMIN( 3, height() / 3 );
const int base = height() / 2;
- r = r.subtract( QRect(1, 0, width() - 2, base - amplitude ) );
- r = r.subtract( QRect(1, base + amplitude, width() - 2, height() - base - amplitude ) );
+ r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) );
+ r = r.subtract( TQRect(1, base + amplitude, width() - 2, height() - base - amplitude ) );
} else {
const int amplitude = QMIN( 3, width() / 3 );
const int base = width() / 2;
- r = r.subtract( QRect(0, 1, base - amplitude, height() - 2 ) );
- r = r.subtract( QRect( base + amplitude, 1, width() - base - amplitude, height() - 2 ) );
+ r = r.subtract( TQRect(0, 1, base - amplitude, height() - 2 ) );
+ r = r.subtract( TQRect( base + amplitude, 1, width() - base - amplitude, height() - 2 ) );
}
setMask( r );
}
void Spacer::setSizeType( SizeType t )
{
- QSizePolicy sizeP;
+ TQSizePolicy sizeP;
if ( orient == Vertical )
- sizeP = QSizePolicy( QSizePolicy::Minimum, (QSizePolicy::SizeType)t );
+ sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t );
else
- sizeP = QSizePolicy( (QSizePolicy::SizeType)t, QSizePolicy::Minimum );
+ sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum );
setSizePolicy( sizeP );
}
@@ -954,9 +954,9 @@ int Spacer::alignment() const
return AlignVCenter;
}
-QSize Spacer::minimumSize() const
+TQSize Spacer::minimumSize() const
{
- QSize s = QSize( 20,20 );
+ TQSize s = TQSize( 20,20 );
if ( sizeType() == Expanding )
if ( orient == Vertical )
s.rheight() = 0;
@@ -965,13 +965,13 @@ QSize Spacer::minimumSize() const
return s;
}
-QSize Spacer::sizeHint() const
+TQSize Spacer::sizeHint() const
{
return sh;
}
-void Spacer::setSizeHint( const QSize &s )
+void Spacer::setSizeHint( const TQSize &s )
{
sh = s;
if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
@@ -993,7 +993,7 @@ void Spacer::setOrientation( Qt::Orientation o )
orient = o;
setSizeType( st );
if ( interactive ) {
- sh = QSize( sh.height(), sh.width() );
+ sh = TQSize( sh.height(), sh.width() );
if (!parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
resize( height(), width() );
}
@@ -1003,15 +1003,15 @@ void Spacer::setOrientation( Qt::Orientation o )
}
-void QDesignerGridLayout::addWidget( QWidget *w, int row, int col, int align_ )
+void QDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ )
{
items.insert( w, Item(row, col, 1, 1) );
- QGridLayout::addWidget( w, row, col, align_ );
+ TQGridLayout::addWidget( w, row, col, align_ );
}
-void QDesignerGridLayout::addMultiCellWidget( QWidget *w, int fromRow, int toRow,
+void QDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow,
int fromCol, int toCol, int align_ )
{
items.insert( w, Item(fromRow, fromCol, toRow - fromRow + 1, toCol - fromCol +1) );
- QGridLayout::addMultiCellWidget( w, fromRow, toRow, fromCol, toCol, align_ );
+ TQGridLayout::addMultiCellWidget( w, fromRow, toRow, fromCol, toCol, align_ );
}
diff --git a/kdevdesigner/designer/layout.h b/kdevdesigner/designer/layout.h
index 2ead5d0d..138c4421 100644
--- a/kdevdesigner/designer/layout.h
+++ b/kdevdesigner/designer/layout.h
@@ -27,13 +27,13 @@
#ifndef LAYOUT_H
#define LAYOUT_H
-#include <qwidget.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qwidgetlist.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqwidgetlist.h>
class FormWindow;
class QPaintEvent;
@@ -43,23 +43,23 @@ class Layout : public QObject
Q_OBJECT
public:
- Layout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
+ Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
virtual ~Layout() {}
virtual void doLayout() = 0;
virtual void undoLayout();
virtual void breakLayout();
virtual bool prepareLayout( bool &needMove, bool &needReparent );
- virtual void finishLayout( bool needMove, QLayout *layout );
+ virtual void finishLayout( bool needMove, TQLayout *layout );
protected:
- QWidgetList widgets;
- QWidget *parent;
- QPoint startPoint;
- QMap<QGuardedPtr<QWidget>, QRect> geometries;
- QWidget *layoutBase;
+ TQWidgetList widgets;
+ TQWidget *parent;
+ TQPoint startPoint;
+ TQMap<TQGuardedPtr<TQWidget>, TQRect> geometries;
+ TQWidget *layoutBase;
FormWindow *formWindow;
- QRect oldGeometry;
+ TQRect oldGeometry;
bool isBreak;
bool useSplitter;
@@ -74,7 +74,7 @@ protected slots:
class HorizontalLayout : public Layout
{
public:
- HorizontalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
+ HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
void doLayout();
@@ -86,7 +86,7 @@ protected:
class VerticalLayout : public Layout
{
public:
- VerticalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
+ VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
void doLayout();
@@ -100,7 +100,7 @@ class Grid;
class GridLayout : public Layout
{
public:
- GridLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, const QSize &res, bool doSetup = TRUE );
+ GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = TRUE );
~GridLayout();
void doLayout();
@@ -110,7 +110,7 @@ protected:
protected:
void buildGrid();
- QSize resolution;
+ TQSize resolution;
Grid* grid;
};
@@ -119,12 +119,12 @@ class Spacer : public QWidget
{
Q_OBJECT
- Q_OVERRIDE( QCString name )
+ Q_OVERRIDE( TQCString name )
Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
Q_ENUMS( SizeType )
Q_PROPERTY( SizeType sizeType READ sizeType WRITE setSizeType )
- Q_PROPERTY( QSize sizeHint READ sizeHint WRITE setSizeHint DESIGNABLE true STORED true )
- Q_OVERRIDE( QRect geometry DESIGNABLE false )
+ Q_PROPERTY( TQSize sizeHint READ sizeHint WRITE setSizeHint DESIGNABLE true STORED true )
+ Q_OVERRIDE( TQRect geometry DESIGNABLE false )
private:
enum { HSize = 6, HMask = 0x3f, VMask = HMask << HSize,
@@ -138,36 +138,36 @@ public:
MinimumExpanding = Minimum|ExpMask,
Expanding = MinimumExpanding|MayShrink };
- Spacer( QWidget *parent, const char *name );
+ Spacer( TQWidget *parent, const char *name );
- QSize minimumSize() const;
- QSize sizeHint() const;
+ TQSize minimumSize() const;
+ TQSize sizeHint() const;
void setSizeType( SizeType t );
SizeType sizeType() const;
int alignment() const;
Orientation orientation() const;
void setOrientation( Orientation o );
void setInteraciveMode( bool b ) { interactive = b; };
- void setSizeHint( const QSize &s );
+ void setSizeHint( const TQSize &s );
protected:
- void paintEvent( QPaintEvent *e );
- void resizeEvent( QResizeEvent* e );
+ void paintEvent( TQPaintEvent *e );
+ void resizeEvent( TQResizeEvent* e );
void updateMask();
Qt::Orientation orient;
bool interactive;
- QSize sh;
+ TQSize sh;
};
class QDesignerGridLayout : public QGridLayout
{
Q_OBJECT
public:
- QDesignerGridLayout( QWidget *parent ) : QGridLayout( parent ){};
- QDesignerGridLayout( QLayout *parentLayout ) : QGridLayout( parentLayout ){};
+ QDesignerGridLayout( TQWidget *parent ) : TQGridLayout( parent ){};
+ QDesignerGridLayout( TQLayout *parentLayout ) : TQGridLayout( parentLayout ){};
- void addWidget( QWidget *, int row, int col, int align = 0 );
- void addMultiCellWidget( QWidget *, int fromRow, int toRow,
+ void addWidget( TQWidget *, int row, int col, int align = 0 );
+ void addMultiCellWidget( TQWidget *, int fromRow, int toRow,
int fromCol, int toCol, int align = 0 );
struct Item
@@ -181,7 +181,7 @@ public:
Q_DUMMY_COMPARISON_OPERATOR( Item )
};
- QMap<QWidget*, Item> items;
+ TQMap<TQWidget*, Item> items;
};
diff --git a/kdevdesigner/designer/listboxdnd.cpp b/kdevdesigner/designer/listboxdnd.cpp
index a83ace44..8ed979f2 100644
--- a/kdevdesigner/designer/listboxdnd.cpp
+++ b/kdevdesigner/designer/listboxdnd.cpp
@@ -25,33 +25,33 @@
**********************************************************************/
#include "listboxdnd.h"
-#include <qwidget.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qdragobject.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqdragobject.h>
+#include <tqvaluelist.h>
// The Dragobject Declaration ---------------------------------------
class ListBoxItemDrag : public QStoredDrag
{
public:
- ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = FALSE, QListBox * parent = 0, const char * name = 0 );
+ ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = FALSE, TQListBox * parent = 0, const char * name = 0 );
~ListBoxItemDrag() {};
- static bool canDecode( QDragMoveEvent * event );
- static bool decode( QDropEvent * event, QListBox * parent, QListBoxItem * insertPoint );
+ static bool canDecode( TQDragMoveEvent * event );
+ static bool decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * insertPoint );
enum ItemType { ListBoxText = 1, ListBoxPixmap = 2 };
};
// ------------------------------------------------------------------
-ListBoxDnd::ListBoxDnd( QListBox * eventSource, const char * name )
+ListBoxDnd::ListBoxDnd( TQListBox * eventSource, const char * name )
: ListDnd( eventSource, name ) { }
-void ListBoxDnd::confirmDrop( QListBoxItem * )
+void ListBoxDnd::confirmDrop( TQListBoxItem * )
{
dropConfirmed = TRUE;
}
-bool ListBoxDnd::dropEvent( QDropEvent * event )
+bool ListBoxDnd::dropEvent( TQDropEvent * event )
{
if ( dragInside ) {
@@ -61,13 +61,13 @@ bool ListBoxDnd::dropEvent( QDropEvent * event )
return TRUE;
}
- QPoint pos = event->pos();
- QListBoxItem * after = itemAt( pos );
+ TQPoint pos = event->pos();
+ TQListBoxItem * after = itemAt( pos );
- if ( ListBoxItemDrag::decode( event, (QListBox *) src, after ) ) {
+ if ( ListBoxItemDrag::decode( event, (TQListBox *) src, after ) ) {
event->accept();
- QListBox * src = (QListBox *) this->src;
- QListBoxItem * item = ( after ? after->next() : src->firstItem() );
+ TQListBox * src = (TQListBox *) this->src;
+ TQListBoxItem * item = ( after ? after->next() : src->firstItem() );
src->setCurrentItem( item );
emit dropped( item ); // ###FIX: Supports only one item!
}
@@ -79,17 +79,17 @@ bool ListBoxDnd::dropEvent( QDropEvent * event )
return TRUE;
}
-bool ListBoxDnd::mouseMoveEvent( QMouseEvent * event )
+bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event )
{
if ( event->state() & LeftButton ) {
if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) {
ListBoxItemList list;
buildList( list );
- ListBoxItemDrag * dragobject = new ListBoxItemDrag( list, (dMode & Internal), (QListBox *) src );
+ ListBoxItemDrag * dragobject = new ListBoxItemDrag( list, (dMode & Internal), (TQListBox *) src );
// Emit signal for all dragged items
- QListBoxItem * i = list.first();
+ TQListBoxItem * i = list.first();
while ( i ) {
emit dragged( i );
i = list.next();
@@ -117,10 +117,10 @@ bool ListBoxDnd::mouseMoveEvent( QMouseEvent * event )
int ListBoxDnd::buildList( ListBoxItemList & list )
{
- QListBoxItem * i = ((QListBox *)src)->firstItem();
+ TQListBoxItem * i = ((TQListBox *)src)->firstItem();
while ( i ) {
if ( i->isSelected() ) {
- ((QListBox *)src)->setSelected( i, FALSE );
+ ((TQListBox *)src)->setSelected( i, FALSE );
list.append( i );
}
i = i->next();
@@ -130,40 +130,40 @@ int ListBoxDnd::buildList( ListBoxItemList & list )
void ListBoxDnd::insertList( ListBoxItemList & list )
{
- QListBoxItem * i = list.first();
+ TQListBoxItem * i = list.first();
while ( i ) {
- ((QListBox *)src)->insertItem( i, i->prev() );
+ ((TQListBox *)src)->insertItem( i, i->prev() );
i = list.next();
}
}
void ListBoxDnd::removeList( ListBoxItemList & list )
{
- QListBoxItem * i = list.first();
+ TQListBoxItem * i = list.first();
while ( i ) {
- ((QListBox *)src)->takeItem( i ); // remove item from QListBox
+ ((TQListBox *)src)->takeItem( i ); // remove item from QListBox
i = list.next();
}
}
-void ListBoxDnd::updateLine( const QPoint & dragPos )
+void ListBoxDnd::updateLine( const TQPoint & dragPos )
{
- QListBox * src = (QListBox *) this->src;
- QListBoxItem *item = itemAt( dragPos );
+ TQListBox * src = (TQListBox *) this->src;
+ TQListBoxItem *item = itemAt( dragPos );
int ypos = item ?
( src->itemRect( item ).bottom() - ( line->height() / 2 ) ) :
- ( src->itemRect( ((QListBox *)src)->firstItem() ).top() );
+ ( src->itemRect( ((TQListBox *)src)->firstItem() ).top() );
line->resize( src->viewport()->width(), line->height() );
line->move( 0, ypos );
}
-QListBoxItem * ListBoxDnd::itemAt( QPoint pos )
+TQListBoxItem * ListBoxDnd::itemAt( TQPoint pos )
{
- QListBox * src = (QListBox *) this->src;
- QListBoxItem * result = src->itemAt( pos );
- QListBoxItem * last = src->item( src->count() - 1 );
+ TQListBox * src = (TQListBox *) this->src;
+ TQListBoxItem * result = src->itemAt( pos );
+ TQListBoxItem * last = src->item( src->count() - 1 );
int i = src->index( result );
if ( result && ( pos.y() < (src->itemRect(result).top() + src->itemHeight(i)/2) ) )
@@ -174,7 +174,7 @@ QListBoxItem * ListBoxDnd::itemAt( QPoint pos )
return result;
}
-bool ListBoxDnd::canDecode( QDragEnterEvent * event )
+bool ListBoxDnd::canDecode( TQDragEnterEvent * event )
{
return ListBoxItemDrag::canDecode( event );
}
@@ -184,17 +184,17 @@ bool ListBoxDnd::canDecode( QDragEnterEvent * event )
// The Dragobject Implementation ------------------------------------
// ------------------------------------------------------------------
-ListBoxItemDrag::ListBoxItemDrag( ListBoxItemList & items, bool sendPtr, QListBox * parent, const char * name )
- : QStoredDrag( "qt/listboxitem", parent, name )
+ListBoxItemDrag::ListBoxItemDrag( ListBoxItemList & items, bool sendPtr, TQListBox * parent, const char * name )
+ : TQStoredDrag( "qt/listboxitem", parent, name )
{
// ### FIX!
- QByteArray data( sizeof( Q_INT32 ) + sizeof( QListBoxItem ) * items.count() );
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data( sizeof( Q_INT32 ) + sizeof( TQListBoxItem ) * items.count() );
+ TQDataStream stream( data, IO_WriteOnly );
stream << items.count();
stream << (Q_UINT8) sendPtr; // just transfer item pointer; omit data
- QListBoxItem * i = items.first();
+ TQListBoxItem * i = items.first();
if ( sendPtr ) {
@@ -211,7 +211,7 @@ ListBoxItemDrag::ListBoxItemDrag( ListBoxItemList & items, bool sendPtr, QListBo
Q_UINT8 b = 0;
- b = (Q_UINT8) ( i->text() != QString::null ); // does item have text ?
+ b = (Q_UINT8) ( i->text() != TQString::null ); // does item have text ?
stream << b;
if ( b ) {
stream << i->text();
@@ -233,18 +233,18 @@ ListBoxItemDrag::ListBoxItemDrag( ListBoxItemList & items, bool sendPtr, QListBo
setEncodedData( data );
}
-bool ListBoxItemDrag::canDecode( QDragMoveEvent * event )
+bool ListBoxItemDrag::canDecode( TQDragMoveEvent * event )
{
return event->provides( "qt/listboxitem" );
}
-bool ListBoxItemDrag::decode( QDropEvent * event, QListBox * parent, QListBoxItem * after )
+bool ListBoxItemDrag::decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * after )
{
- QByteArray data = event->encodedData( "qt/listboxitem" );
+ TQByteArray data = event->encodedData( "qt/listboxitem" );
if ( data.size() ) {
event->accept();
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
int count = 0;
stream >> count;
@@ -252,7 +252,7 @@ bool ListBoxItemDrag::decode( QDropEvent * event, QListBox * parent, QListBoxIte
Q_UINT8 recievePtr = 0; // data contains just item pointers; no data
stream >> recievePtr;
- QListBoxItem * item = 0;
+ TQListBoxItem * item = 0;
if ( recievePtr ) {
@@ -260,7 +260,7 @@ bool ListBoxItemDrag::decode( QDropEvent * event, QListBox * parent, QListBoxIte
Q_ULONG p = 0; //###FIX: demands sizeof(ulong) >= sizeof(void*)
stream >> p;
- item = (QListBoxItem *) p;
+ item = (TQListBoxItem *) p;
parent->insertItem( item, after );
@@ -271,14 +271,14 @@ bool ListBoxItemDrag::decode( QDropEvent * event, QListBox * parent, QListBoxIte
for ( int i = 0; i < count; i++ ) {
Q_UINT8 hasText = 0;
- QString text;
+ TQString text;
stream >> hasText;
if ( hasText ) {
stream >> text;
}
Q_UINT8 hasPixmap = 0;
- QPixmap pixmap;
+ TQPixmap pixmap;
stream >> hasPixmap;
if ( hasPixmap ) {
stream >> pixmap;
@@ -288,9 +288,9 @@ bool ListBoxItemDrag::decode( QDropEvent * event, QListBox * parent, QListBoxIte
stream >> isSelectable;
if ( hasPixmap ) {
- item = new QListBoxPixmap( parent, pixmap, text, after );
+ item = new TQListBoxPixmap( parent, pixmap, text, after );
} else {
- item = new QListBoxText( parent, text, after );
+ item = new TQListBoxText( parent, text, after );
}
item->setSelectable( isSelectable );
diff --git a/kdevdesigner/designer/listboxdnd.h b/kdevdesigner/designer/listboxdnd.h
index c0f91845..3885dce2 100644
--- a/kdevdesigner/designer/listboxdnd.h
+++ b/kdevdesigner/designer/listboxdnd.h
@@ -27,34 +27,34 @@
#ifndef LISTBOXDND_H
#define LISTBOXDND_H
-#include <qptrlist.h>
-#include <qlistbox.h>
+#include <tqptrlist.h>
+#include <tqlistbox.h>
#include "listdnd.h"
-typedef QPtrList<QListBoxItem> ListBoxItemList;
+typedef TQPtrList<TQListBoxItem> ListBoxItemList;
class ListBoxDnd : public ListDnd
{
Q_OBJECT
public:
// dragModes are enumerated in ListDnd
- ListBoxDnd( QListBox * eventSource, const char * name = 0 );
+ ListBoxDnd( TQListBox * eventSource, const char * name = 0 );
signals:
- void dropped( QListBoxItem * );
- void dragged( QListBoxItem * );
+ void dropped( TQListBoxItem * );
+ void dragged( TQListBoxItem * );
public slots:
- void confirmDrop( QListBoxItem * );
+ void confirmDrop( TQListBoxItem * );
protected:
- virtual bool dropEvent( QDropEvent * event );
- virtual bool mouseMoveEvent( QMouseEvent * event );
- virtual void updateLine( const QPoint & pos );
- virtual bool canDecode( QDragEnterEvent * event );
+ virtual bool dropEvent( TQDropEvent * event );
+ virtual bool mouseMoveEvent( TQMouseEvent * event );
+ virtual void updateLine( const TQPoint & pos );
+ virtual bool canDecode( TQDragEnterEvent * event );
private:
- QListBoxItem * itemAt( QPoint pos );
+ TQListBoxItem * itemAt( TQPoint pos );
int buildList( ListBoxItemList & list );
void insertList( ListBoxItemList & list );
void removeList( ListBoxItemList & list );
diff --git a/kdevdesigner/designer/listboxeditorimpl.cpp b/kdevdesigner/designer/listboxeditorimpl.cpp
index d19f22b2..40a6439c 100644
--- a/kdevdesigner/designer/listboxeditorimpl.cpp
+++ b/kdevdesigner/designer/listboxeditorimpl.cpp
@@ -33,18 +33,18 @@
#include "listboxrename.h"
#include <klineedit.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-ListBoxEditor::ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw )
+ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
: ListBoxEditorBase( parent, 0, TRUE ), formwindow( fw )
{
- connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
- listbox = (QListBox*)editWidget;
+ connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ listbox = (TQListBox*)editWidget;
itemText->setText( "" );
itemText->setEnabled( FALSE );
@@ -52,12 +52,12 @@ ListBoxEditor::ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
- QListBoxItem *i = 0;
+ TQListBoxItem *i = 0;
for ( i = listbox->firstItem(); i; i = i->next() ) {
if ( i->pixmap() )
- (void)new QListBoxPixmap( preview, *i->pixmap(), i->text() );
+ (void)new TQListBoxPixmap( preview, *i->pixmap(), i->text() );
else
- (void)new QListBoxText( preview, i->text() );
+ (void)new TQListBoxText( preview, i->text() );
}
if ( preview->firstItem() )
@@ -65,20 +65,20 @@ ListBoxEditor::ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *
ListBoxDnd *editorDnd = new ListBoxDnd( preview );
editorDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move );
- QObject::connect( editorDnd, SIGNAL( dropped( QListBoxItem * ) ),
- editorDnd, SLOT( confirmDrop( QListBoxItem * ) ) );
+ TQObject::connect( editorDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
+ editorDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) );
ListBoxRename *editorRename = new ListBoxRename( preview );
- QObjectList *l = parent->queryList( "QLineEdit", "itemText" );
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" );
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
- QObject::connect( editorRename,
- SIGNAL( itemTextChanged( const QString & ) ),
+ TQObject::connect( editorRename,
+ TQT_SIGNAL( itemTextChanged( const TQString & ) ),
obj,
- SLOT( setText( const QString & ) ) );
+ TQT_SLOT( setText( const TQString & ) ) );
}
delete l;
@@ -86,7 +86,7 @@ ListBoxEditor::ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *
void ListBoxEditor::insertNewItem()
{
- QListBoxItem *i = new QListBoxText( preview, i18n("New Item") );
+ TQListBoxItem *i = new TQListBoxText( preview, i18n("New Item") );
preview->setCurrentItem( i );
preview->setSelected( i, TRUE );
itemText->setFocus();
@@ -100,7 +100,7 @@ void ListBoxEditor::deleteCurrentItem()
preview->setSelected( preview->currentItem(), TRUE );
}
-void ListBoxEditor::currentItemChanged( QListBoxItem *i )
+void ListBoxEditor::currentItemChanged( TQListBoxItem *i )
{
itemText->blockSignals( TRUE );
itemText->setText( "" );
@@ -125,7 +125,7 @@ void ListBoxEditor::currentItemChanged( QListBoxItem *i )
itemText->blockSignals( FALSE );
}
-void ListBoxEditor::currentTextChanged( const QString &txt )
+void ListBoxEditor::currentTextChanged( const TQString &txt )
{
if ( preview->currentItem() == -1 )
return;
@@ -151,8 +151,8 @@ void ListBoxEditor::cancelClicked()
void ListBoxEditor::applyClicked()
{
- QListBoxItem *i = 0;
- QValueList<PopulateListBoxCommand::Item> items;
+ TQListBoxItem *i = 0;
+ TQValueList<PopulateListBoxCommand::Item> items;
for ( i = preview->firstItem(); i; i = i->next() ) {
PopulateListBoxCommand::Item item;
if ( i->pixmap() )
@@ -172,16 +172,16 @@ void ListBoxEditor::choosePixmap()
if ( preview->currentItem() == -1 )
return;
- QPixmap pix;
+ TQPixmap pix;
if ( preview->item( preview->currentItem() )->pixmap() )
pix = qChoosePixmap( this, formwindow, *preview->item( preview->currentItem() )->pixmap() );
else
- pix = qChoosePixmap( this, formwindow, QPixmap() );
+ pix = qChoosePixmap( this, formwindow, TQPixmap() );
if ( pix.isNull() )
return;
- QString txt = preview->item( preview->currentItem() )->text();
+ TQString txt = preview->item( preview->currentItem() )->text();
preview->changeItem( pix, txt, preview->currentItem() );
itemDeletePixmap->setEnabled( TRUE );
}
@@ -191,14 +191,14 @@ void ListBoxEditor::moveItemUp()
if ( preview->currentItem() < 1 )
return;
- QListBoxItem *i = preview->item( preview->currentItem() );
+ TQListBoxItem *i = preview->item( preview->currentItem() );
bool hasPix = (i->pixmap() != 0);
- QPixmap pix;
+ TQPixmap pix;
if ( hasPix )
pix = *i->pixmap();
- QString txt = i->text();
+ TQString txt = i->text();
- QListBoxItem *p = i->prev();
+ TQListBoxItem *p = i->prev();
if ( p->pixmap() )
preview->changeItem( *p->pixmap(), p->text(), preview->currentItem() );
else
@@ -215,14 +215,14 @@ void ListBoxEditor::moveItemDown()
if ( preview->currentItem() == -1 || preview->currentItem() > (int)preview->count() - 2 )
return;
- QListBoxItem *i = preview->item( preview->currentItem() );
+ TQListBoxItem *i = preview->item( preview->currentItem() );
bool hasPix = (i->pixmap() != 0);
- QPixmap pix;
+ TQPixmap pix;
if ( hasPix )
pix = *i->pixmap();
- QString txt = i->text();
+ TQString txt = i->text();
- QListBoxItem *n = i->next();
+ TQListBoxItem *n = i->next();
if ( n->pixmap() )
preview->changeItem( *n->pixmap(), n->text(), preview->currentItem() );
else
@@ -239,7 +239,7 @@ void ListBoxEditor::deletePixmap()
if ( preview->currentItem() == -1 )
return;
- QListBoxItem *i = preview->item( preview->currentItem() );
+ TQListBoxItem *i = preview->item( preview->currentItem() );
preview->changeItem( i->text(), preview->currentItem() );
itemDeletePixmap->setEnabled( FALSE );
}
diff --git a/kdevdesigner/designer/listboxeditorimpl.h b/kdevdesigner/designer/listboxeditorimpl.h
index 3719bc59..22ae5d5c 100644
--- a/kdevdesigner/designer/listboxeditorimpl.h
+++ b/kdevdesigner/designer/listboxeditorimpl.h
@@ -37,13 +37,13 @@ class ListBoxEditor : public ListBoxEditorBase
Q_OBJECT
public:
- ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw );
+ ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
protected slots:
void insertNewItem();
void deleteCurrentItem();
- void currentItemChanged( QListBoxItem * );
- void currentTextChanged( const QString & );
+ void currentItemChanged( TQListBoxItem * );
+ void currentTextChanged( const TQString & );
void okClicked();
void cancelClicked();
void applyClicked();
@@ -53,7 +53,7 @@ protected slots:
void deletePixmap();
private:
- QListBox *listbox;
+ TQListBox *listbox;
FormWindow *formwindow;
};
diff --git a/kdevdesigner/designer/listboxrename.cpp b/kdevdesigner/designer/listboxrename.cpp
index 464ef412..d51381dd 100644
--- a/kdevdesigner/designer/listboxrename.cpp
+++ b/kdevdesigner/designer/listboxrename.cpp
@@ -24,46 +24,46 @@
**
**********************************************************************/
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qtimer.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqtimer.h>
#include "listboxrename.h"
class EditableListBoxItem : public QListBoxItem
{
public:
- void setText( const QString & text )
+ void setText( const TQString & text )
{
- QListBoxItem::setText( text );
+ TQListBoxItem::setText( text );
}
};
-ListBoxRename::ListBoxRename( QListBox * eventSource, const char * name )
- : QObject( eventSource, name ),
+ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name )
+ : TQObject( eventSource, name ),
clickedItem( 0 ), activity( FALSE )
{
src = eventSource;
src->installEventFilter( this );
- ed = new QLineEdit( src->viewport() );
+ ed = new TQLineEdit( src->viewport() );
ed->hide();
ed->setFrame( FALSE );
- QObject::connect( ed, SIGNAL( returnPressed() ),
- this, SLOT( renameClickedItem() ) );
+ TQObject::connect( ed, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( renameClickedItem() ) );
}
-bool ListBoxRename::eventFilter( QObject *, QEvent * event )
+bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
{
switch ( event->type() ) {
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
- QPoint pos = ((QMouseEvent *) event)->pos();
+ TQPoint pos = ((TQMouseEvent *) event)->pos();
if ( clickedItem &&
clickedItem->isSelected() &&
(clickedItem == src->itemAt( pos )) ) {
- QTimer::singleShot( 500, this, SLOT( showLineEdit() ) );
+ TQTimer::singleShot( 500, this, TQT_SLOT( showLineEdit() ) );
activity = FALSE; // no drags or clicks for 500 ms before we start the renaming
} else { // new item clicked
activity = TRUE;
@@ -73,16 +73,16 @@ bool ListBoxRename::eventFilter( QObject *, QEvent * event )
}
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
- if ( ((QMouseEvent *) event)->state() & Qt::LeftButton ) {
+ if ( ((TQMouseEvent *) event)->state() & Qt::LeftButton ) {
activity = TRUE; // drag
}
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
- switch ( ((QKeyEvent *) event)->key() ) {
+ switch ( ((TQKeyEvent *) event)->key() ) {
case Qt::Key_F2:
@@ -110,10 +110,10 @@ bool ListBoxRename::eventFilter( QObject *, QEvent * event )
}
break;
- case QEvent::Resize:
+ case TQEvent::Resize:
if ( clickedItem && ed && !ed->isHidden() ) {
- QRect rect = src->itemRect( clickedItem );
+ TQRect rect = src->itemRect( clickedItem );
ed->resize( rect.right() - rect.left() - 1,
rect.bottom() - rect.top() - 1 );
}
@@ -130,7 +130,7 @@ void ListBoxRename::showLineEdit()
{
if ( !clickedItem || activity )
return;
- QRect rect = src->itemRect( clickedItem );
+ TQRect rect = src->itemRect( clickedItem );
ed->resize( rect.right() - rect.left() - 1,
rect.bottom() - rect.top() - 1 );
ed->move( rect.left() + 1, rect.top() + 1 );
diff --git a/kdevdesigner/designer/listboxrename.h b/kdevdesigner/designer/listboxrename.h
index cdb6d67b..995389e5 100644
--- a/kdevdesigner/designer/listboxrename.h
+++ b/kdevdesigner/designer/listboxrename.h
@@ -27,8 +27,8 @@
#ifndef LISTBOXRENAME_H
#define LISTBOXRENAME_H
-#include <qobject.h>
-#include <qlistbox.h>
+#include <tqobject.h>
+#include <tqlistbox.h>
class QLineEdit;
@@ -36,11 +36,11 @@ class ListBoxRename : public QObject
{
Q_OBJECT
public:
- ListBoxRename( QListBox * eventSource, const char * name = 0 );
- bool eventFilter( QObject *, QEvent * event );
+ ListBoxRename( TQListBox * eventSource, const char * name = 0 );
+ bool eventFilter( TQObject *, TQEvent * event );
signals:
- void itemTextChanged( const QString & );
+ void itemTextChanged( const TQString & );
public slots:
void showLineEdit();
@@ -48,9 +48,9 @@ public slots:
void renameClickedItem();
private:
- QListBoxItem * clickedItem;
- QListBox * src;
- QLineEdit * ed;
+ TQListBoxItem * clickedItem;
+ TQListBox * src;
+ TQLineEdit * ed;
bool activity;
};
diff --git a/kdevdesigner/designer/listdnd.cpp b/kdevdesigner/designer/listdnd.cpp
index 34562e6f..7df65cbd 100644
--- a/kdevdesigner/designer/listdnd.cpp
+++ b/kdevdesigner/designer/listdnd.cpp
@@ -25,11 +25,11 @@
**********************************************************************/
#include "listdnd.h"
-#include <qwidget.h>
-#include <qpainter.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
-ListDnd::ListDnd( QScrollView * eventSource, const char * name )
- : QObject( eventSource, name ),
+ListDnd::ListDnd( TQScrollView * eventSource, const char * name )
+ : TQObject( eventSource, name ),
dragInside( FALSE ), dragDelete( TRUE ), dropConfirmed( FALSE ), dMode( Both )
{
src = eventSource;
@@ -37,7 +37,7 @@ ListDnd::ListDnd( QScrollView * eventSource, const char * name )
src->installEventFilter( this );
src->viewport()->installEventFilter( this );
- line = new QWidget( src->viewport(), 0, Qt::WStyle_NoBorder | WStyle_StaysOnTop );
+ line = new TQWidget( src->viewport(), 0, Qt::WStyle_NoBorder | WStyle_StaysOnTop );
line->setBackgroundColor( Qt::black );
line->resize( src->viewport()->width(), 2 );
line->hide();
@@ -53,21 +53,21 @@ int ListDnd::dragMode() const
return dMode;
}
-bool ListDnd::eventFilter( QObject *, QEvent * event )
+bool ListDnd::eventFilter( TQObject *, TQEvent * event )
{
switch ( event->type() ) {
- case QEvent::DragEnter:
- return dragEnterEvent( (QDragEnterEvent *) event );
- case QEvent::DragLeave:
- return dragLeaveEvent( (QDragLeaveEvent *) event );
- case QEvent::DragMove:
- return dragMoveEvent( (QDragMoveEvent *) event );
- case QEvent::Drop:
- return dropEvent( (QDropEvent *) event );
- case QEvent::MouseButtonPress:
- return mousePressEvent( (QMouseEvent *) event );
- case QEvent::MouseMove:
- return mouseMoveEvent( (QMouseEvent *) event );
+ case TQEvent::DragEnter:
+ return dragEnterEvent( (TQDragEnterEvent *) event );
+ case TQEvent::DragLeave:
+ return dragLeaveEvent( (TQDragLeaveEvent *) event );
+ case TQEvent::DragMove:
+ return dragMoveEvent( (TQDragMoveEvent *) event );
+ case TQEvent::Drop:
+ return dropEvent( (TQDropEvent *) event );
+ case TQEvent::MouseButtonPress:
+ return mousePressEvent( (TQMouseEvent *) event );
+ case TQEvent::MouseMove:
+ return mouseMoveEvent( (TQMouseEvent *) event );
default:
break;
}
@@ -75,7 +75,7 @@ bool ListDnd::eventFilter( QObject *, QEvent * event )
}
-bool ListDnd::dragEnterEvent( QDragEnterEvent * event )
+bool ListDnd::dragEnterEvent( TQDragEnterEvent * event )
{
if ( dMode == None ) {
return TRUE;
@@ -96,14 +96,14 @@ bool ListDnd::dragEnterEvent( QDragEnterEvent * event )
return TRUE;
}
-bool ListDnd::dragLeaveEvent( QDragLeaveEvent * )
+bool ListDnd::dragLeaveEvent( TQDragLeaveEvent * )
{
dragInside = FALSE;
line->hide();
return TRUE;
}
-bool ListDnd::dragMoveEvent( QDragMoveEvent * event )
+bool ListDnd::dragMoveEvent( TQDragMoveEvent * event )
{
if ( dragInside && dMode && !( dMode & NullDrop ) ) {
updateLine( event->pos() );
@@ -111,31 +111,31 @@ bool ListDnd::dragMoveEvent( QDragMoveEvent * event )
return TRUE;
}
-bool ListDnd::dropEvent( QDropEvent * )
+bool ListDnd::dropEvent( TQDropEvent * )
{
// do nothing
return FALSE;
}
-bool ListDnd::mousePressEvent( QMouseEvent * event )
+bool ListDnd::mousePressEvent( TQMouseEvent * event )
{
if ( event->button() == LeftButton )
mousePressPos = event->pos();
return FALSE;
}
-bool ListDnd::mouseMoveEvent( QMouseEvent * )
+bool ListDnd::mouseMoveEvent( TQMouseEvent * )
{
// do nothing
return FALSE;
}
-void ListDnd::updateLine( const QPoint & )
+void ListDnd::updateLine( const TQPoint & )
{
// do nothing
}
-bool ListDnd::canDecode( QDragEnterEvent * )
+bool ListDnd::canDecode( TQDragEnterEvent * )
{
// do nothing
return FALSE;
diff --git a/kdevdesigner/designer/listdnd.h b/kdevdesigner/designer/listdnd.h
index 9e3e6351..8594085b 100644
--- a/kdevdesigner/designer/listdnd.h
+++ b/kdevdesigner/designer/listdnd.h
@@ -27,33 +27,33 @@
#ifndef LISTDND_H
#define LISTDND_H
-#include <qobject.h>
-#include <qscrollview.h>
+#include <tqobject.h>
+#include <tqscrollview.h>
class ListDnd : public QObject
{
Q_OBJECT
public:
enum DragMode { None = 0, External = 1, Internal = 2, Both = 3, Move = 4, NullDrop = 8 };
- ListDnd( QScrollView * eventSource, const char * name = 0 );
+ ListDnd( TQScrollView * eventSource, const char * name = 0 );
void setDragMode( int mode );
int dragMode() const;
- bool eventFilter( QObject *, QEvent * event );
+ bool eventFilter( TQObject *, TQEvent * event );
protected:
- virtual bool dragEnterEvent( QDragEnterEvent * event );
- virtual bool dragLeaveEvent( QDragLeaveEvent * );
- virtual bool dragMoveEvent( QDragMoveEvent * event );
- virtual bool dropEvent( QDropEvent * event );
- virtual bool mousePressEvent( QMouseEvent * event );
- virtual bool mouseMoveEvent( QMouseEvent * event );
- virtual void updateLine( const QPoint & dragPos );
- virtual bool canDecode( QDragEnterEvent * event );
+ virtual bool dragEnterEvent( TQDragEnterEvent * event );
+ virtual bool dragLeaveEvent( TQDragLeaveEvent * );
+ virtual bool dragMoveEvent( TQDragMoveEvent * event );
+ virtual bool dropEvent( TQDropEvent * event );
+ virtual bool mousePressEvent( TQMouseEvent * event );
+ virtual bool mouseMoveEvent( TQMouseEvent * event );
+ virtual void updateLine( const TQPoint & dragPos );
+ virtual bool canDecode( TQDragEnterEvent * event );
- QScrollView * src;
- QWidget * line;
- QPoint mousePressPos;
- QPoint dragPos;
+ TQScrollView * src;
+ TQWidget * line;
+ TQPoint mousePressPos;
+ TQPoint dragPos;
bool dragInside;
bool dragDelete;
bool dropConfirmed;
diff --git a/kdevdesigner/designer/listeditor.ui.h b/kdevdesigner/designer/listeditor.ui.h
index bba06104..cd0aa7f0 100644
--- a/kdevdesigner/designer/listeditor.ui.h
+++ b/kdevdesigner/designer/listeditor.ui.h
@@ -6,21 +6,21 @@
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
-#include <qheader.h>
-#include <qapplication.h>
+#include <tqheader.h>
+#include <tqapplication.h>
void ListEditor::init()
{
listview->header()->hide();
listview->setSorting( -1 );
- listview->setDefaultRenameAction( QListView::Accept );
+ listview->setDefaultRenameAction( TQListView::Accept );
}
-void ListEditor::setList( const QStringList &l )
+void ListEditor::setList( const TQStringList &l )
{
- QListViewItem *i = 0;
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
- i = new QListViewItem( listview, i );
+ TQListViewItem *i = 0;
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ i = new TQListViewItem( listview, i );
i->setText( 0, *it );
i->setRenameEnabled( 0, TRUE );
}
@@ -28,13 +28,13 @@ void ListEditor::setList( const QStringList &l )
void ListEditor::addItem()
{
- QListViewItem *i = new QListViewItem( listview, listview->lastItem() );
+ TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() );
i->setRenameEnabled( 0, TRUE );
qApp->processEvents();
i->startRename( 0 );
}
-void ListEditor::renamed( QListViewItem *i )
+void ListEditor::renamed( TQListViewItem *i )
{
if ( i && i->text( 0 ).isEmpty() )
i->startRename( 0 );
@@ -42,8 +42,8 @@ void ListEditor::renamed( QListViewItem *i )
void ListEditor::removeItems()
{
- QListViewItemIterator it( listview );
- QListViewItem *i = 0;
+ TQListViewItemIterator it( listview );
+ TQListViewItem *i = 0;
while ( ( i = it.current() ) ) {
++it;
if ( i->isSelected() )
@@ -51,11 +51,11 @@ void ListEditor::removeItems()
}
}
-QStringList ListEditor::items()
+TQStringList ListEditor::items()
{
- QStringList l;
- QListViewItemIterator it( listview );
- QListViewItem *i = 0;
+ TQStringList l;
+ TQListViewItemIterator it( listview );
+ TQListViewItem *i = 0;
while ( ( i = it.current() ) ) {
++it;
if ( !i->text( 0 ).isEmpty() )
@@ -66,7 +66,7 @@ QStringList ListEditor::items()
void ListEditor::renameItem()
{
- QListViewItem *i = listview->currentItem();
+ TQListViewItem *i = listview->currentItem();
if ( i )
i->startRename( 0 );
}
diff --git a/kdevdesigner/designer/listviewdnd.cpp b/kdevdesigner/designer/listviewdnd.cpp
index b4098237..a4abae07 100644
--- a/kdevdesigner/designer/listviewdnd.cpp
+++ b/kdevdesigner/designer/listviewdnd.cpp
@@ -25,33 +25,33 @@
**********************************************************************/
#include "listviewdnd.h"
-#include <qwidget.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qdragobject.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqdragobject.h>
+#include <tqvaluelist.h>
// The Dragobject Declaration ---------------------------------------
class ListViewItemDrag : public QStoredDrag
{
public:
enum DropRelation { Sibling, Child };
- ListViewItemDrag( ListViewItemList & items, QWidget * parent = 0, const char * name = 0 );
+ ListViewItemDrag( ListViewItemList & items, TQWidget * parent = 0, const char * name = 0 );
~ListViewItemDrag() {};
- static bool canDecode( QDragMoveEvent * event );
- static bool decode( QDropEvent * event, QListView * parent, QListViewItem * insertPoint, DropRelation dr );
+ static bool canDecode( TQDragMoveEvent * event );
+ static bool decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr );
};
// ------------------------------------------------------------------
-ListViewDnd::ListViewDnd( QListView * eventSource, const char * name )
+ListViewDnd::ListViewDnd( TQListView * eventSource, const char * name )
: ListDnd( eventSource, name ) { }
-void ListViewDnd::confirmDrop( QListViewItem * )
+void ListViewDnd::confirmDrop( TQListViewItem * )
{
dropConfirmed = TRUE;
}
-bool ListViewDnd::dropEvent( QDropEvent * event )
+bool ListViewDnd::dropEvent( TQDropEvent * event )
{
if ( dragInside ) {
@@ -61,10 +61,10 @@ bool ListViewDnd::dropEvent( QDropEvent * event )
return TRUE;
}
- QPoint pos = event->pos();
+ TQPoint pos = event->pos();
ListViewItemDrag::DropRelation dr = ListViewItemDrag::Sibling;
- QListViewItem *item = itemAt( pos );
+ TQListViewItem *item = itemAt( pos );
int dpos = dropDepth( item, pos );
if ( item ) {
@@ -78,7 +78,7 @@ bool ListViewDnd::dropEvent( QDropEvent * event )
}
}
- if ( ListViewItemDrag::decode( event, (QListView *) src, item, dr ) ) {
+ if ( ListViewItemDrag::decode( event, (TQListView *) src, item, dr ) ) {
event->accept();
emit dropped( 0 ); // Use ID instead of item?
}
@@ -90,7 +90,7 @@ bool ListViewDnd::dropEvent( QDropEvent * event )
return TRUE;
}
-bool ListViewDnd::mouseMoveEvent( QMouseEvent * event )
+bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
{
if ( event->state() & LeftButton ) {
if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) {
@@ -101,7 +101,7 @@ bool ListViewDnd::mouseMoveEvent( QMouseEvent * event )
else
buildTreeList( list );
- ListViewItemDrag * dragobject = new ListViewItemDrag( list, (QListView *) src );
+ ListViewItemDrag * dragobject = new ListViewItemDrag( list, (TQListView *) src );
if ( dMode & Move ) {
disabledItems = list;
@@ -132,9 +132,9 @@ bool ListViewDnd::mouseMoveEvent( QMouseEvent * event )
int ListViewDnd::buildFlatList( ListViewItemList & list )
{
bool addKids = FALSE;
- QListViewItem *nextSibling = 0;
- QListViewItem *nextParent = 0;
- QListViewItemIterator it = ((QListView *)src)->firstChild();
+ TQListViewItem *nextSibling = 0;
+ TQListViewItem *nextParent = 0;
+ TQListViewItemIterator it = ((TQListView *)src)->firstChild();
for ( ; *it; it++ ) {
// Hit the nextSibling, turn of child processing
if ( (*it) == nextSibling )
@@ -166,7 +166,7 @@ int ListViewDnd::buildFlatList( ListViewItemList & list )
int ListViewDnd::buildTreeList( ListViewItemList & list )
{
- QListViewItemIterator it = ((QListView *)src)->firstChild();
+ TQListViewItemIterator it = ((TQListView *)src)->firstChild();
for ( ; *it; it++ ) {
if ( (*it)->isSelected() )
list.append( *it );
@@ -185,10 +185,10 @@ void ListViewDnd::setVisibleItems( bool b )
} while ( disabledItems.next() );
}
-void ListViewDnd::updateLine( const QPoint & dragPos )
+void ListViewDnd::updateLine( const TQPoint & dragPos )
{
- QListViewItem * item = itemAt(dragPos);
- QListView * src = (QListView *) this->src;
+ TQListViewItem * item = itemAt(dragPos);
+ TQListView * src = (TQListView *) this->src;
int ypos = item ?
( src->itemRect( item ).bottom() - ( line->height() / 2 ) ) :
@@ -199,12 +199,12 @@ void ListViewDnd::updateLine( const QPoint & dragPos )
line->move( xpos, ypos );
}
-QListViewItem * ListViewDnd::itemAt( QPoint pos )
+TQListViewItem * ListViewDnd::itemAt( TQPoint pos )
{
- QListView * src = (QListView *) this->src;
+ TQListView * src = (TQListView *) this->src;
int headerHeight = (int)(src->header()->height());
pos.ry() -= headerHeight;
- QListViewItem * result = src->itemAt( pos );
+ TQListViewItem * result = src->itemAt( pos );
if ( result && ( pos.ry() < (src->itemPos(result) + result->height()/2) ) )
result = result->itemAbove();
@@ -227,14 +227,14 @@ QListViewItem * ListViewDnd::itemAt( QPoint pos )
return result;
}
-int ListViewDnd::dropDepth( QListViewItem * item, QPoint pos )
+int ListViewDnd::dropDepth( TQListViewItem * item, TQPoint pos )
{
if ( !item || (dMode & Flat) )
return 0;
int result = 0;
int itemDepth = item->depth();
- int indentSize = ((QListView *)src)->treeStepSize();
+ int indentSize = ((TQListView *)src)->treeStepSize();
int itemLeft = indentSize * itemDepth;
int childMargin = indentSize*2;
if ( pos.x() > itemLeft + childMargin ) {
@@ -247,7 +247,7 @@ int ListViewDnd::dropDepth( QListViewItem * item, QPoint pos )
return result;
}
-bool ListViewDnd::canDecode( QDragEnterEvent * event )
+bool ListViewDnd::canDecode( TQDragEnterEvent * event )
{
return ListViewItemDrag::canDecode( event );
}
@@ -256,19 +256,19 @@ bool ListViewDnd::canDecode( QDragEnterEvent * event )
// The Dragobject Implementation ------------------------------------
// ------------------------------------------------------------------
-QDataStream & operator<< ( QDataStream & stream, const QListViewItem & item );
-QDataStream & operator>> ( QDataStream & stream, QListViewItem & item );
+TQDataStream & operator<< ( TQDataStream & stream, const TQListViewItem & item );
+TQDataStream & operator>> ( TQDataStream & stream, TQListViewItem & item );
-ListViewItemDrag::ListViewItemDrag( ListViewItemList & items, QWidget * parent, const char * name )
- : QStoredDrag( "qt/listviewitem", parent, name )
+ListViewItemDrag::ListViewItemDrag( ListViewItemList & items, TQWidget * parent, const char * name )
+ : TQStoredDrag( "qt/listviewitem", parent, name )
{
// ### FIX!
- QByteArray data( sizeof( Q_INT32 ) + sizeof( QListViewItem ) * items.count() );
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data( sizeof( Q_INT32 ) + sizeof( TQListViewItem ) * items.count() );
+ TQDataStream stream( data, IO_WriteOnly );
stream << items.count();
- QListViewItem *i = items.first();
+ TQListViewItem *i = items.first();
while ( i ) {
stream << *i;
i = items.next();
@@ -277,15 +277,15 @@ ListViewItemDrag::ListViewItemDrag( ListViewItemList & items, QWidget * parent,
setEncodedData( data );
}
-bool ListViewItemDrag::canDecode( QDragMoveEvent * event )
+bool ListViewItemDrag::canDecode( TQDragMoveEvent * event )
{
return event->provides( "qt/listviewitem" );
}
-bool ListViewItemDrag::decode( QDropEvent * event, QListView * parent, QListViewItem * insertPoint, DropRelation dr )
+bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr )
{
- QByteArray data = event->encodedData( "qt/listviewitem" );
- QListViewItem* itemParent = insertPoint ? insertPoint->parent() : 0;
+ TQByteArray data = event->encodedData( "qt/listviewitem" );
+ TQListViewItem* itemParent = insertPoint ? insertPoint->parent() : 0;
// Change from sibling (default) to child creation
if ( insertPoint && dr == Child ) {
@@ -295,17 +295,17 @@ bool ListViewItemDrag::decode( QDropEvent * event, QListView * parent, QListView
if ( data.size() ) {
event->accept();
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
int count = 0;
stream >> count;
for( int i = 0; i < count; i++ ) {
if ( itemParent ) {
- insertPoint = new QListViewItem( itemParent, insertPoint );
+ insertPoint = new TQListViewItem( itemParent, insertPoint );
itemParent->setOpen( TRUE );
} else { // No parent for insertPoint, use QListView
- insertPoint = new QListViewItem( parent, insertPoint );
+ insertPoint = new TQListViewItem( parent, insertPoint );
}
stream >> *insertPoint;
}
@@ -315,7 +315,7 @@ bool ListViewItemDrag::decode( QDropEvent * event, QListView * parent, QListView
}
-QDataStream & operator<< ( QDataStream & stream, const QListViewItem & item )
+TQDataStream & operator<< ( TQDataStream & stream, const TQListViewItem & item )
{
int columns = item.listView()->columns();
stream << columns;
@@ -324,7 +324,7 @@ QDataStream & operator<< ( QDataStream & stream, const QListViewItem & item )
int i;
for ( i = 0; i < columns; i++ ) {
- b = (Q_UINT8) ( item.text( i ) != QString::null ); // does column i have a string ?
+ b = (Q_UINT8) ( item.text( i ) != TQString::null ); // does column i have a string ?
stream << b;
if ( b ) {
stream << item.text( i );
@@ -354,7 +354,7 @@ QDataStream & operator<< ( QDataStream & stream, const QListViewItem & item )
stream << item.childCount();
if ( item.childCount() > 0 ) {
- QListViewItem * child = item.firstChild();
+ TQListViewItem * child = item.firstChild();
while ( child ) {
stream << ( *child ); // recursive call
child = child->nextSibling();
@@ -364,14 +364,14 @@ QDataStream & operator<< ( QDataStream & stream, const QListViewItem & item )
return stream;
}
-QDataStream & operator>> ( QDataStream & stream, QListViewItem & item )
+TQDataStream & operator>> ( TQDataStream & stream, TQListViewItem & item )
{
Q_INT32 columns;
stream >> columns;
Q_UINT8 b = 0;
- QString text;
+ TQString text;
int i;
for ( i = 0; i < columns; i++ ) {
stream >> b;
@@ -381,7 +381,7 @@ QDataStream & operator>> ( QDataStream & stream, QListViewItem & item )
}
}
- QPixmap pixmap;
+ TQPixmap pixmap;
for ( i = 0; i < columns; i++ ) {
stream >> b; // column i has pixmap ?
if ( b ) {
@@ -419,10 +419,10 @@ QDataStream & operator>> ( QDataStream & stream, QListViewItem & item )
int childCount;
stream >> childCount;
- QListViewItem *child = 0;
- QListViewItem *prevchild = 0;
+ TQListViewItem *child = 0;
+ TQListViewItem *prevchild = 0;
for ( i = 0; i < childCount; i++ ) {
- child = new QListViewItem( &item, prevchild );
+ child = new TQListViewItem( &item, prevchild );
stream >> ( *child );
item.insertItem( child );
prevchild = child;
diff --git a/kdevdesigner/designer/listviewdnd.h b/kdevdesigner/designer/listviewdnd.h
index 52b18091..9de07af9 100644
--- a/kdevdesigner/designer/listviewdnd.h
+++ b/kdevdesigner/designer/listviewdnd.h
@@ -27,13 +27,13 @@
#ifndef LISTVIEWDND_H
#define LISTVIEWDND_H
-#include <qptrlist.h>
-#include <qlistview.h>
+#include <tqptrlist.h>
+#include <tqlistview.h>
#include "listdnd.h"
class QWidget;
class QListView;
-typedef QPtrList<QListViewItem> ListViewItemList;
+typedef TQPtrList<TQListViewItem> ListViewItemList;
class ListViewDnd : public ListDnd
{
@@ -41,22 +41,22 @@ class ListViewDnd : public ListDnd
public:
enum DragMode { Flat = 16 }; // see ListDnd::DragMode
- ListViewDnd( QListView * eventSource, const char * name = 0 );
+ ListViewDnd( TQListView * eventSource, const char * name = 0 );
signals:
- void dropped( QListViewItem * );
+ void dropped( TQListViewItem * );
public slots:
- void confirmDrop( QListViewItem * );
+ void confirmDrop( TQListViewItem * );
protected:
- virtual bool dropEvent( QDropEvent * event );
- virtual bool mouseMoveEvent( QMouseEvent * event );
- virtual void updateLine( const QPoint & pos );
- virtual bool canDecode( QDragEnterEvent * event );
+ virtual bool dropEvent( TQDropEvent * event );
+ virtual bool mouseMoveEvent( TQMouseEvent * event );
+ virtual void updateLine( const TQPoint & pos );
+ virtual bool canDecode( TQDragEnterEvent * event );
private:
- QListViewItem * itemAt( QPoint pos );
- int dropDepth( QListViewItem * item, QPoint pos );
+ TQListViewItem * itemAt( TQPoint pos );
+ int dropDepth( TQListViewItem * item, TQPoint pos );
int buildFlatList( ListViewItemList & list );
int buildTreeList( ListViewItemList & list );
void setVisibleItems( bool b );
diff --git a/kdevdesigner/designer/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp
index 78055f92..60e7e155 100644
--- a/kdevdesigner/designer/listvieweditorimpl.cpp
+++ b/kdevdesigner/designer/listvieweditorimpl.cpp
@@ -33,23 +33,23 @@
#include "listboxdnd.h"
#include "listboxrename.h"
-#include <qlistview.h>
-#include <qheader.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qtabwidget.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qptrstack.h>
+#include <tqlistview.h>
+#include <tqheader.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqtabwidget.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqptrstack.h>
#include <klocale.h>
-ListViewEditor::ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw )
+ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw )
: ListViewEditorBase( parent, 0, TRUE ), listview( lv ), formwindow( fw )
{
- connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
itemText->setEnabled( FALSE );
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
@@ -71,55 +71,55 @@ ListViewEditor::ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw )
// Clamp on drag and drop to QListView
ListViewDnd *itemsDnd = new ListViewDnd( itemsPreview );
itemsDnd->setDragMode( ListViewDnd::Internal | ListViewDnd::Move );
- QObject::connect( itemsDnd, SIGNAL( dropped( QListViewItem * ) ),
- itemsDnd, SLOT( confirmDrop( QListViewItem * ) ) );
+ TQObject::connect( itemsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ),
+ itemsDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) );
// Enable rename for all QListViewItems
- QListViewItemIterator it = ((QListView *)itemsPreview)->firstChild();
+ TQListViewItemIterator it = ((TQListView *)itemsPreview)->firstChild();
for ( ; *it; it++ )
(*it)->setRenameEnabled( 0, TRUE );
// Connect listview signal to signal-relay
- QObject::connect( itemsPreview,
- SIGNAL( itemRenamed( QListViewItem*, int, const QString & ) ),
+ TQObject::connect( itemsPreview,
+ TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ),
this,
- SLOT( emitItemRenamed(QListViewItem*, int, const QString&) ) );
+ TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) );
- // Connect signal-relay to QLineEdit "itemText"
- QObjectList *l = parent->queryList( "QLineEdit", "itemText" );
- QObject *obj;
- QObjectListIt itemsLineEditIt( *l );
+ // Connect signal-relay to TQLineEdit "itemText"
+ TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" );
+ TQObject *obj;
+ TQObjectListIt itemsLineEditIt( *l );
while ( (obj = itemsLineEditIt.current()) != 0 ) {
++itemsLineEditIt;
- QObject::connect( this,
- SIGNAL( itemRenamed( const QString & ) ),
+ TQObject::connect( this,
+ TQT_SIGNAL( itemRenamed( const TQString & ) ),
obj,
- SLOT( setText( const QString & ) ) );
+ TQT_SLOT( setText( const TQString & ) ) );
}
delete l;
// Clamp on drag and drop to QListBox
ListBoxDnd *columnsDnd = new ListBoxDnd( colPreview );
columnsDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move );
- QObject::connect( columnsDnd, SIGNAL( dropped( QListBoxItem * ) ),
- columnsDnd, SLOT( confirmDrop( QListBoxItem * ) ) );
+ TQObject::connect( columnsDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
+ columnsDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) );
// Clamp on rename to QListBox
ListBoxRename *columnsRename = new ListBoxRename( colPreview );
- QObject::connect( columnsRename,
- SIGNAL( itemTextChanged( const QString & ) ),
+ TQObject::connect( columnsRename,
+ TQT_SIGNAL( itemTextChanged( const TQString & ) ),
this,
- SLOT( columnTextChanged( const QString & ) ) );
+ TQT_SLOT( columnTextChanged( const TQString & ) ) );
- // Find QLineEdit "colText" and connect
- l = parent->queryList( "QLineEdit", "colText" );
- QObjectListIt columnsLineEditIt( *l );
+ // Find TQLineEdit "colText" and connect
+ l = parent->queryList( "TQLineEdit", "colText" );
+ TQObjectListIt columnsLineEditIt( *l );
while ( (obj = columnsLineEditIt.current()) != 0 ) {
++columnsLineEditIt;
- QObject::connect( columnsRename,
- SIGNAL( itemTextChanged( const QString & ) ),
+ TQObject::connect( columnsRename,
+ TQT_SIGNAL( itemTextChanged( const TQString & ) ),
obj,
- SLOT( setText( const QString & ) ) );
+ TQT_SLOT( setText( const TQString & ) ) );
}
delete l;
}
@@ -154,8 +154,8 @@ void ListViewEditor::columnDownClicked()
return;
colPreview->clearSelection();
- QListBoxItem *i = colPreview->item( colPreview->currentItem() );
- QListBoxItem *below = i->next();
+ TQListBoxItem *i = colPreview->item( colPreview->currentItem() );
+ TQListBoxItem *below = i->next();
colPreview->takeItem( i );
colPreview->insertItem( i, below );
@@ -170,11 +170,11 @@ void ListViewEditor::columnPixmapChosen()
if ( !c )
return;
- QPixmap pix;
+ TQPixmap pix;
if ( colPixmap->pixmap() )
pix = qChoosePixmap( this, formwindow, *colPixmap->pixmap() );
else
- pix = qChoosePixmap( this, formwindow, QPixmap() );
+ pix = qChoosePixmap( this, formwindow, TQPixmap() );
if ( pix.isNull() )
return;
@@ -197,7 +197,7 @@ void ListViewEditor::columnPixmapDeleted()
if ( !c )
return;
- c->pixmap = QPixmap();
+ c->pixmap = TQPixmap();
colPreview->blockSignals( TRUE );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
@@ -217,7 +217,7 @@ void ListViewEditor::columnResizable( bool b )
c->resizable = b;
}
-void ListViewEditor::columnTextChanged( const QString &txt )
+void ListViewEditor::columnTextChanged( const TQString &txt )
{
Column *c = findColumn( colPreview->item( colPreview->currentItem() ) );
if ( !c )
@@ -239,8 +239,8 @@ void ListViewEditor::columnUpClicked()
return;
colPreview->clearSelection();
- QListBoxItem *i = colPreview->item( colPreview->currentItem() );
- QListBoxItem *above = i->prev();
+ TQListBoxItem *i = colPreview->item( colPreview->currentItem() );
+ TQListBoxItem *above = i->prev();
colPreview->takeItem( above );
colPreview->insertItem( above, i );
@@ -249,7 +249,7 @@ void ListViewEditor::columnUpClicked()
colPreview->setSelected( i, TRUE );
}
-void ListViewEditor::currentColumnChanged( QListBoxItem *i )
+void ListViewEditor::currentColumnChanged( TQListBoxItem *i )
{
Column *c = findColumn( i );
if ( !i || !c ) {
@@ -285,13 +285,13 @@ void ListViewEditor::newColumnClicked()
{
Column col;
col.text = i18n( "New Column" );
- col.pixmap = QPixmap();
+ col.pixmap = TQPixmap();
col.clickable = TRUE;
col.resizable = TRUE;
if ( !col.pixmap.isNull() )
- col.item = new QListBoxPixmap( colPreview, col.pixmap, col.text );
+ col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text );
else
- col.item = new QListBoxText( colPreview, col.text );
+ col.item = new TQListBoxText( colPreview, col.text );
columns.append( col );
colPreview->setCurrentItem( col.item );
colPreview->setSelected( col.item, TRUE );
@@ -299,11 +299,11 @@ void ListViewEditor::newColumnClicked()
void ListViewEditor::deleteColumnClicked()
{
- QListBoxItem *i = colPreview->item( colPreview->currentItem() );
+ TQListBoxItem *i = colPreview->item( colPreview->currentItem() );
if ( !i )
return;
- for ( QValueList<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
+ for ( TQValueList<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
if ( ( *it ).item == i ) {
delete (*it).item;
columns.remove( it );
@@ -315,7 +315,7 @@ void ListViewEditor::deleteColumnClicked()
colPreview->setSelected( colPreview->currentItem(), TRUE );
}
-void ListViewEditor::currentItemChanged( QListViewItem *i )
+void ListViewEditor::currentItemChanged( TQListViewItem *i )
{
if ( !i ) {
itemText->setEnabled( FALSE );
@@ -334,7 +334,7 @@ void ListViewEditor::currentItemChanged( QListViewItem *i )
displayItem( i, itemColumn->value() );
}
-void ListViewEditor::displayItem( QListViewItem *i, int col )
+void ListViewEditor::displayItem( TQListViewItem *i, int col )
{
itemText->blockSignals( TRUE );
itemText->setText( i->text( col ) );
@@ -350,7 +350,7 @@ void ListViewEditor::displayItem( QListViewItem *i, int col )
void ListViewEditor::itemColChanged( int col )
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
@@ -360,7 +360,7 @@ void ListViewEditor::itemColChanged( int col )
void ListViewEditor::itemDeleteClicked()
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
@@ -373,12 +373,12 @@ void ListViewEditor::itemDeleteClicked()
void ListViewEditor::itemDownClicked()
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
- QListViewItemIterator it( i );
- QListViewItem *parent = i->parent();
+ TQListViewItemIterator it( i );
+ TQListViewItem *parent = i->parent();
it++;
while ( it.current() ) {
if ( it.current()->parent() == parent )
@@ -388,14 +388,14 @@ void ListViewEditor::itemDownClicked()
if ( !it.current() )
return;
- QListViewItem *other = it.current();
+ TQListViewItem *other = it.current();
i->moveItem( other );
}
void ListViewEditor::itemNewClicked()
{
- QListViewItem *item = new QListViewItem( itemsPreview );
+ TQListViewItem *item = new TQListViewItem( itemsPreview );
item->setText( 0, i18n( "Item" ) );
item->setRenameEnabled( 0, TRUE );
itemsPreview->setCurrentItem( item );
@@ -406,13 +406,13 @@ void ListViewEditor::itemNewClicked()
void ListViewEditor::itemNewSubClicked()
{
- QListViewItem *parent = itemsPreview->currentItem();
- QListViewItem *item = 0;
+ TQListViewItem *parent = itemsPreview->currentItem();
+ TQListViewItem *item = 0;
if ( parent ) {
- item = new QListViewItem( parent );
+ item = new TQListViewItem( parent );
parent->setOpen( TRUE );
} else {
- item = new QListViewItem( itemsPreview );
+ item = new TQListViewItem( itemsPreview );
}
item->setText( 0, i18n( "Subitem" ) );
item->setRenameEnabled( 0, TRUE );
@@ -422,38 +422,38 @@ void ListViewEditor::itemNewSubClicked()
void ListViewEditor::itemPixmapChoosen()
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
- QPixmap pix;
+ TQPixmap pix;
if ( itemPixmap->pixmap() )
pix = qChoosePixmap( this, formwindow, *itemPixmap->pixmap() );
else
- pix = qChoosePixmap( this, formwindow, QPixmap() );
+ pix = qChoosePixmap( this, formwindow, TQPixmap() );
if ( pix.isNull() )
return;
- i->setPixmap( itemColumn->value(), QPixmap( pix ) );
+ i->setPixmap( itemColumn->value(), TQPixmap( pix ) );
itemPixmap->setPixmap( pix );
itemDeletePixmap->setEnabled( TRUE );
}
void ListViewEditor::itemPixmapDeleted()
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
- i->setPixmap( itemColumn->value(), QPixmap() );
+ i->setPixmap( itemColumn->value(), TQPixmap() );
itemPixmap->setText( "" );
itemDeletePixmap->setEnabled( FALSE );
}
-void ListViewEditor::itemTextChanged( const QString &txt )
+void ListViewEditor::itemTextChanged( const TQString &txt )
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
i->setText( itemColumn->value(), txt );
@@ -461,12 +461,12 @@ void ListViewEditor::itemTextChanged( const QString &txt )
void ListViewEditor::itemUpClicked()
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
- QListViewItemIterator it( i );
- QListViewItem *parent = i->parent();
+ TQListViewItemIterator it( i );
+ TQListViewItem *parent = i->parent();
--it;
while ( it.current() ) {
if ( it.current()->parent() == parent )
@@ -476,19 +476,19 @@ void ListViewEditor::itemUpClicked()
if ( !it.current() )
return;
- QListViewItem *other = it.current();
+ TQListViewItem *other = it.current();
other->moveItem( i );
}
void ListViewEditor::itemRightClicked()
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
- QListViewItemIterator it( i );
- QListViewItem *parent = i->parent();
+ TQListViewItemIterator it( i );
+ TQListViewItem *parent = i->parent();
parent = parent ? parent->firstChild() : itemsPreview->firstChild();
if ( !parent )
return;
@@ -501,19 +501,19 @@ void ListViewEditor::itemRightClicked()
if ( !it.current() )
return;
- QListViewItem *other = it.current();
+ TQListViewItem *other = it.current();
for ( int c = 0; c < itemsPreview->columns(); ++c ) {
- QString s = i->text( c );
+ TQString s = i->text( c );
i->setText( c, other->text( c ) );
other->setText( c, s );
- QPixmap pix;
+ TQPixmap pix;
if ( i->pixmap( c ) )
pix = *i->pixmap( c );
if ( other->pixmap( c ) )
i->setPixmap( c, *other->pixmap( c ) );
else
- i->setPixmap( c, QPixmap() );
+ i->setPixmap( c, TQPixmap() );
other->setPixmap( c, pix );
}
@@ -523,12 +523,12 @@ void ListViewEditor::itemRightClicked()
void ListViewEditor::itemLeftClicked()
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
- QListViewItemIterator it( i );
- QListViewItem *parent = i->parent();
+ TQListViewItemIterator it( i );
+ TQListViewItem *parent = i->parent();
if ( !parent )
return;
parent = parent->parent();
@@ -541,19 +541,19 @@ void ListViewEditor::itemLeftClicked()
if ( !it.current() )
return;
- QListViewItem *other = it.current();
+ TQListViewItem *other = it.current();
for ( int c = 0; c < itemsPreview->columns(); ++c ) {
- QString s = i->text( c );
+ TQString s = i->text( c );
i->setText( c, other->text( c ) );
other->setText( c, s );
- QPixmap pix;
+ TQPixmap pix;
if ( i->pixmap( c ) )
pix = *i->pixmap( c );
if ( other->pixmap( c ) )
i->setPixmap( c, *other->pixmap( c ) );
else
- i->setPixmap( c, QPixmap() );
+ i->setPixmap( c, TQPixmap() );
other->setPixmap( c, pix );
}
@@ -563,19 +563,19 @@ void ListViewEditor::itemLeftClicked()
void ListViewEditor::setupColumns()
{
- QHeader *h = listview->header();
+ TQHeader *h = listview->header();
for ( int i = 0; i < (int)h->count(); ++i ) {
Column col;
col.text = h->label( i );
- col.pixmap = QPixmap();
+ col.pixmap = TQPixmap();
if ( h->iconSet( i ) )
col.pixmap = h->iconSet( i )->pixmap();
col.clickable = h->isClickEnabled( i );
col.resizable = h->isResizeEnabled( i );
if ( !col.pixmap.isNull() )
- col.item = new QListBoxPixmap( colPreview, col.pixmap, col.text );
+ col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text );
else
- col.item = new QListBoxText( colPreview, col.text );
+ col.item = new TQListBoxText( colPreview, col.text );
columns.append( col );
}
@@ -594,8 +594,8 @@ void ListViewEditor::setupItems()
itemColumn->setMinValue( 0 );
itemColumn->setMaxValue( QMAX( numColumns - 1, 0 ) );
int i = 0;
- QHeader *header = itemsPreview->header();
- for ( QListBoxItem *item = colPreview->firstItem(); item; item = item->next() ) {
+ TQHeader *header = itemsPreview->header();
+ for ( TQListBoxItem *item = colPreview->firstItem(); item; item = item->next() ) {
Column *col = findColumn( item );
if ( !col )
continue;
@@ -612,12 +612,12 @@ void ListViewEditor::setupItems()
itemColumn->setValue( QMIN( numColumns - 1, itemColumn->value() ) );
}
-ListViewEditor::Column *ListViewEditor::findColumn( QListBoxItem *i )
+ListViewEditor::Column *ListViewEditor::findColumn( TQListBoxItem *i )
{
if ( !i )
return 0;
- for ( QValueList<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
+ for ( TQValueList<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
if ( ( *it ).item == i )
return &( *it );
}
@@ -625,7 +625,7 @@ ListViewEditor::Column *ListViewEditor::findColumn( QListBoxItem *i )
return 0;
}
-void ListViewEditor::initTabPage( const QString &page )
+void ListViewEditor::initTabPage( const TQString &page )
{
numColumns = colPreview->count();
if ( page == i18n( "&Items" ) ) {
@@ -644,7 +644,7 @@ void ListViewEditor::initTabPage( const QString &page )
}
}
-void ListViewEditor::emitItemRenamed( QListViewItem *, int, const QString & text )
+void ListViewEditor::emitItemRenamed( TQListViewItem *, int, const TQString & text )
{
- emit itemRenamed( text ); // Relay signal ( to QLineEdit )
+ emit itemRenamed( text ); // Relay signal ( to TQLineEdit )
}
diff --git a/kdevdesigner/designer/listvieweditorimpl.h b/kdevdesigner/designer/listvieweditorimpl.h
index 476e47ca..cdeeabe6 100644
--- a/kdevdesigner/designer/listvieweditorimpl.h
+++ b/kdevdesigner/designer/listvieweditorimpl.h
@@ -29,9 +29,9 @@
#include "listvieweditor.h"
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
class FormWindow;
@@ -40,10 +40,10 @@ class ListViewEditor : public ListViewEditorBase
Q_OBJECT
public:
- ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw );
+ ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw );
signals:
- void itemRenamed(const QString &);
+ void itemRenamed(const TQString &);
protected slots:
void applyClicked();
@@ -52,10 +52,10 @@ protected slots:
void columnPixmapChosen();
void columnPixmapDeleted();
void columnResizable(bool);
- void columnTextChanged(const QString &);
+ void columnTextChanged(const TQString &);
void columnUpClicked();
- void currentColumnChanged(QListBoxItem*);
- void currentItemChanged(QListViewItem*);
+ void currentColumnChanged(TQListBoxItem*);
+ void currentItemChanged(TQListViewItem*);
void deleteColumnClicked();
void itemColChanged(int);
void itemDeleteClicked();
@@ -64,21 +64,21 @@ protected slots:
void itemNewSubClicked();
void itemPixmapChoosen();
void itemPixmapDeleted();
- void itemTextChanged(const QString &);
+ void itemTextChanged(const TQString &);
void itemUpClicked();
void itemLeftClicked();
void itemRightClicked();
void newColumnClicked();
void okClicked();
- void initTabPage(const QString &page);
- void emitItemRenamed(QListViewItem*, int, const QString&); // signal relay
+ void initTabPage(const TQString &page);
+ void emitItemRenamed(TQListViewItem*, int, const TQString&); // signal relay
private:
struct Column
{
- QListBoxItem *item;
- QString text;
- QPixmap pixmap;
+ TQListBoxItem *item;
+ TQString text;
+ TQPixmap pixmap;
bool clickable, resizable;
Q_DUMMY_COMPARISON_OPERATOR( Column )
};
@@ -86,13 +86,13 @@ private:
private:
void setupColumns();
void setupItems();
- Column *findColumn( QListBoxItem *i );
- void transferItems( QListView *from, QListView *to );
- void displayItem( QListViewItem *i, int col );
+ Column *findColumn( TQListBoxItem *i );
+ void transferItems( TQListView *from, TQListView *to );
+ void displayItem( TQListViewItem *i, int col );
private:
- QListView *listview;
- QValueList<Column> columns;
+ TQListView *listview;
+ TQValueList<Column> columns;
int numColumns;
FormWindow *formwindow;
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);
}
diff --git a/kdevdesigner/designer/mainwindow.h b/kdevdesigner/designer/mainwindow.h
index 43a4974a..1720229e 100644
--- a/kdevdesigner/designer/mainwindow.h
+++ b/kdevdesigner/designer/mainwindow.h
@@ -39,12 +39,12 @@
#include "../interfaces/sourcetemplateiface.h"
#include "sourceeditor.h"
-#include <qaction.h>
-#include <qmainwindow.h>
-#include <qmap.h>
-#include <qguardedptr.h>
+#include <tqaction.h>
+#include <tqmainwindow.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
#include <private/qpluginmanager_p.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
class QToolBox;
class PropertyEditor;
@@ -69,7 +69,7 @@ class QAssistantClient;
class DesignerAction;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
-#include <qtoolbar.h>
+#include <tqtoolbar.h>
#else
class QToolBar;
#endif
@@ -84,7 +84,7 @@ class MainWindow : public QMainWindow
public:
enum LineMode { Error, Step, StackFrame };
- MainWindow( KDevDesignerPart *part, bool asClient, bool single = FALSE, const QString &plgDir = "/designer" );
+ MainWindow( KDevDesignerPart *part, bool asClient, bool single = FALSE, const TQString &plgDir = "/designer" );
~MainWindow();
HierarchyView *objectHierarchy() const;
@@ -99,35 +99,35 @@ public:
bool unregisterClient( FormWindow *w );
void editorClosed( SourceEditor *e );
- QWidget *isAFormWindowChild( QObject *o ) const;
- QWidget *isAToolBarChild( QObject *o ) const;
+ TQWidget *isAFormWindowChild( TQObject *o ) const;
+ TQWidget *isAToolBarChild( TQObject *o ) const;
void insertFormWindow( FormWindow *fw );
- QWorkspace *qWorkspace() const;
+ TQWorkspace *qWorkspace() const;
- void popupFormWindowMenu( const QPoint &gp, FormWindow *fw );
- void popupWidgetMenu( const QPoint &gp, FormWindow *fw, QWidget *w );
+ void popupFormWindowMenu( const TQPoint &gp, FormWindow *fw );
+ void popupWidgetMenu( const TQPoint &gp, FormWindow *fw, TQWidget *w );
- QPopupMenu *setupNormalHierarchyMenu( QWidget *parent );
- QPopupMenu *setupTabWidgetHierarchyMenu( QWidget *parent, const char *addSlot, const char *removeSlot );
+ TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent );
+ TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot );
- FormWindow *openFormWindow( const QString &fn, bool validFileName = TRUE, FormFile *ff = 0 );
+ FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 );
bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w );
- void setGrid( const QPoint &p );
+ void setGrid( const TQPoint &p );
void setShowGrid( bool b );
void setSnapGrid( bool b );
- QPoint grid() const { return grd; }
+ TQPoint grid() const { return grd; }
bool showGrid() const { return sGrid; }
bool snapGrid() const { return snGrid && sGrid; }
- QString documentationPath() const;
+ TQString documentationPath() const;
static MainWindow *self;
- QString templatePath() const { return templPath; }
+ TQString templatePath() const { return templPath; }
- void editFunction( const QString &func, bool rereadSource = FALSE );
+ void editFunction( const TQString &func, bool rereadSource = FALSE );
bool isPreviewing() const { return previewing; }
@@ -135,25 +135,25 @@ public:
FormWindow *activeForm() const { return lastActiveFormWindow; }
- TemplateWizardInterface* templateWizardInterface( const QString& className );
- QStringList sourceTemplates() const;
- SourceTemplateInterface* sourceTemplateInterface( const QString& templ );
+ TemplateWizardInterface* templateWizardInterface( const TQString& className );
+ TQStringList sourceTemplates() const;
+ SourceTemplateInterface* sourceTemplateInterface( const TQString& templ );
QUnknownInterface* designerInterface() const { return desInterface; }
- QPtrList<DesignerProject> projectList() const;
- QStringList projectNames() const;
- QStringList projectFileNames() const;
- Project *findProject( const QString &projectName ) const;
+ TQPtrList<DesignerProject> projectList() const;
+ TQStringList projectNames() const;
+ TQStringList projectFileNames() const;
+ Project *findProject( const TQString &projectName ) const;
void setCurrentProject( Project *pro );
- void setCurrentProjectByFilename( const QString& proFilename );
+ void setCurrentProjectByFilename( const TQString& proFilename );
OutputWindow *outputWindow() const { return oWindow; }
- void addPreferencesTab( QWidget *tab, const QString &title, QObject *receiver, const char *init_slot, const char *accept_slot );
- void addProjectTab( QWidget *tab, const QString &title, QObject *receiver, const char *init_slot, const char *accept_slot );
- void setModified( bool b, QWidget *window );
+ void addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot );
+ void addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot );
+ void setModified( bool b, TQWidget *window );
void functionsChanged();
void updateFunctionList();
void updateWorkspace();
void runProjectPrecondition();
- void runProjectPostcondition( QObjectList *l );
+ void runProjectPostcondition( TQObjectList *l );
void formNameChanged( FormWindow *fw );
@@ -164,15 +164,15 @@ public:
void resetBreakPoints();
SourceFile *sourceFile();
- void createNewProject( const QString &lang );
+ void createNewProject( const TQString &lang );
- void popupProjectMenu( const QPoint &pos );
- QObject *findRealObject( QObject *o );
+ void popupProjectMenu( const TQPoint &pos );
+ TQObject *findRealObject( TQObject *o );
void setSingleProject( Project *pro );
bool singleProjectMode() const { return singleProject; }
- void showSourceLine( QObject *o, int line, LineMode lm );
+ void showSourceLine( TQObject *o, int line, LineMode lm );
void shuttingDown();
void showGUIStuff( bool b );
@@ -182,26 +182,26 @@ public:
bool showSignalHandlers() const { return sSignalHandlers; }
void writeConfig();
- void openProject( const QString &fn );
- void setPluginDirectory( const QString &pd );
- QString pluginDirectory() const { return pluginDir; }
+ void openProject( const TQString &fn );
+ void setPluginDirectory( const TQString &pd );
+ TQString pluginDirectory() const { return pluginDir; }
QAssistantClient* assistantClient() const { return assistant; }
- void addRecentlyOpenedFile( const QString &fn ) { addRecentlyOpened( fn, recentlyFiles ); }
+ void addRecentlyOpenedFile( const TQString &fn ) { addRecentlyOpened( fn, recentlyFiles ); }
- void statusMessage(const QString &msg);
+ void statusMessage(const TQString &msg);
//integration
KDevDesignerPart *part() const { return m_part; }
public slots:
- void showProperties( QObject *w );
- void updateProperties( QObject *w );
+ void showProperties( TQObject *w );
+ void updateProperties( TQObject *w );
void showDialogHelp();
- void showDebugStep( QObject *o, int line );
- void showStackFrame( QObject *o, int line );
- void showErrorMessage( QObject *o, int line, const QString &errorMessage );
+ void showDebugStep( TQObject *o, int line );
+ void showStackFrame( TQObject *o, int line );
+ void showErrorMessage( TQObject *o, int line, const TQString &errorMessage );
void finishedRun();
void breakPointsChanged();
@@ -218,8 +218,8 @@ signals:
void editorChanged();
protected:
- bool eventFilter( QObject *o, QEvent *e );
- void closeEvent( QCloseEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
+ void closeEvent( TQCloseEvent *e );
public slots:
void fileNew();
@@ -229,7 +229,7 @@ public slots:
void fileQuit();
void fileCloseProject(); // not visible in menu, called from fileClose
void fileOpen();
- void fileOpen( const QString &filter, const QString &extension, const QString &filename = "" , bool inProject = TRUE );
+ void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = TRUE );
bool fileSave();
bool fileSaveForm(); // not visible in menu, called from fileSave
bool fileSaveProject(); // not visible in menu, called from fileSaveProject
@@ -263,9 +263,9 @@ public slots:
SourceEditor *editSource();
SourceEditor *editSource( SourceFile *f );
SourceEditor *openSourceEditor();
- SourceEditor *createSourceEditor( QObject *object, Project *project,
- const QString &lang = QString::null,
- const QString &func = QString::null,
+ SourceEditor *createSourceEditor( TQObject *object, Project *project,
+ const TQString &lang = TQString::null,
+ const TQString &func = TQString::null,
bool rereadSource = FALSE );
void editFormSettings();
void editProjectSettings();
@@ -283,7 +283,7 @@ public slots:
void searchGotoLine();
void previewForm();
- void previewForm( const QString& );
+ void previewForm( const TQString& );
void toolsCustomWidget();
void toolsConfigure();
@@ -295,11 +295,11 @@ public slots:
void helpRegister();
private slots:
- void activeWindowChanged( QWidget *w );
- void updateUndoRedo( bool, bool, const QString &, const QString & );
+ void activeWindowChanged( TQWidget *w );
+ void updateUndoRedo( bool, bool, const TQString &, const TQString & );
void updateEditorUndoRedo();
- void toolSelected( QAction* );
+ void toolSelected( TQAction* );
void clipboardChanged();
void selectionChanged();
@@ -308,7 +308,7 @@ private slots:
void setupWindowActions();
void createNewTemplate();
- void projectSelected( QAction *a );
+ void projectSelected( TQAction *a );
void setupRecentlyFilesMenu();
void setupRecentlyProjectsMenu();
@@ -344,24 +344,24 @@ private:
void enableAll( bool enable );
- QWidget* previewFormInternal( QStyle* style = 0, QPalette* pal = 0 );
+ TQWidget* previewFormInternal( TQStyle* style = 0, TQPalette* pal = 0 );
void readConfig();
- void setupRMBProperties( QValueList<uint> &ids, QMap<QString, int> &props, QWidget *w );
- void handleRMBProperties( int id, QMap<QString, int> &props, QWidget *w );
- void setupRMBSpecialCommands( QValueList<uint> &ids, QMap<QString, int> &commands, QWidget *w );
- void handleRMBSpecialCommands( int id, QMap<QString, int> &commands, QWidget *w );
- void setupRMBSpecialCommands( QValueList<uint> &ids, QMap<QString, int> &commands, FormWindow *w );
- void handleRMBSpecialCommands( int id, QMap<QString, int> &commands, FormWindow *w );
- bool openEditor( QWidget *w, FormWindow *fw );
+ void setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w );
+ void handleRMBProperties( int id, TQMap<TQString, int> &props, TQWidget *w );
+ void setupRMBSpecialCommands( TQValueList<uint> &ids, TQMap<TQString, int> &commands, TQWidget *w );
+ void handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w );
+ void setupRMBSpecialCommands( TQValueList<uint> &ids, TQMap<TQString, int> &commands, FormWindow *w );
+ void handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *w );
+ bool openEditor( TQWidget *w, FormWindow *fw );
void rebuildCustomWidgetGUI();
void rebuildCommonWidgetsToolBoxPage();
void checkTempFiles();
- void addRecentlyOpened( const QString &fn, QStringList &lst );
+ void addRecentlyOpened( const TQString &fn, TQStringList &lst );
- QString whatsThisFrom( const QString &key );
+ TQString whatsThisFrom( const TQString &key );
private slots:
void doFunctionsChanged();
@@ -370,9 +370,9 @@ private slots:
private:
struct Tab
{
- QWidget *w;
- QString title;
- QObject *receiver;
+ TQWidget *w;
+ TQString title;
+ TQObject *receiver;
const char *init_slot, *accept_slot;
Q_DUMMY_COMPARISON_OPERATOR( Tab )
};
@@ -381,19 +381,19 @@ private:
PropertyEditor *propertyEditor;
HierarchyView *hierarchyView;
Workspace *wspace;
- QWidget *lastPressWidget;
- QWorkspace *qworkspace;
- QMenuBar *menubar;
- QGuardedPtr<FormWindow> lastActiveFormWindow;
+ TQWidget *lastPressWidget;
+ TQWorkspace *qworkspace;
+ TQMenuBar *menubar;
+ TQGuardedPtr<FormWindow> lastActiveFormWindow;
bool breakLayout, layoutChilds, layoutSelected;
- QPoint grd;
+ TQPoint grd;
bool sGrid, snGrid;
bool restoreConfig;
bool backPix;
bool splashScreen;
- QString fileFilter;
+ TQString fileFilter;
- QMap<QAction*, Project*> projects;
+ TQMap<TQAction*, Project*> projects;
DesignerAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy,
*actionEditPaste, *actionEditDelete,
*actionEditAdjustSize,
@@ -401,10 +401,10 @@ private:
*actionEditSplitHorizontal, *actionEditSplitVertical,
*actionEditSelectAll, *actionEditBreakLayout, *actionEditFunctions, *actionEditConnections,
*actionEditLower, *actionEditRaise;
- QAction *actionInsertSpacer;
- QActionGroup *actionGroupTools, *actionGroupProjects;
- QAction* actionPointerTool, *actionConnectTool, *actionOrderTool, *actionBuddyTool;
- QAction* actionCurrentTool;
+ TQAction *actionInsertSpacer;
+ TQActionGroup *actionGroupTools, *actionGroupProjects;
+ TQAction* actionPointerTool, *actionConnectTool, *actionOrderTool, *actionBuddyTool;
+ TQAction* actionCurrentTool;
DesignerAction *actionHelpContents, *actionHelpAbout, *actionHelpAboutQt, *actionHelpWhatsThis;
DesignerAction *actionHelpManual;
#if defined(QT_NON_COMMERCIAL)
@@ -419,20 +419,20 @@ private:
DesignerAction *actionSearchFind, *actionSearchIncremetal, *actionSearchReplace, *actionSearchGotoLine;
DesignerAction *actionProjectAddFile, *actionEditPixmapCollection, *actionEditDatabaseConnections,
*actionEditProjectSettings, *actionPreview;
- QActionGroup *actionGroupNew;
+ TQActionGroup *actionGroupNew;
- QPopupMenu *rmbWidgets;
- QPopupMenu *rmbFormWindow;
- QPopupMenu *customWidgetMenu, *windowMenu, *fileMenu, *recentlyFilesMenu, *recentlyProjectsMenu;
- QPopupMenu *toolsMenu, *layoutMenu, *previewMenu;
- QToolBar *customWidgetToolBar, *layoutToolBar, *projectToolBar, *customWidgetToolBar2, *toolsToolBar;
- QToolBar *commonWidgetsToolBar;
- QPtrList<QToolBar> widgetToolBars;
+ TQPopupMenu *rmbWidgets;
+ TQPopupMenu *rmbFormWindow;
+ TQPopupMenu *customWidgetMenu, *windowMenu, *fileMenu, *recentlyFilesMenu, *recentlyProjectsMenu;
+ TQPopupMenu *toolsMenu, *layoutMenu, *previewMenu;
+ TQToolBar *customWidgetToolBar, *layoutToolBar, *projectToolBar, *customWidgetToolBar2, *toolsToolBar;
+ TQToolBar *commonWidgetsToolBar;
+ TQPtrList<TQToolBar> widgetToolBars;
Preferences *prefDia;
- QMap<QString,QString> propertyDocumentation;
+ TQMap<TQString,TQString> propertyDocumentation;
bool client;
- QString templPath;
+ TQString templPath;
ActionEditor *actionEditor;
Project *currentProject;
QPluginManager<ActionInterface> *actionPluginManager;
@@ -442,47 +442,47 @@ private:
QPluginManager<PreferenceInterface> *preferencePluginManager;
QPluginManager<ProjectSettingsInterface> *projectSettingsPluginManager;
QPluginManager<SourceTemplateInterface> *sourceTemplatePluginManager;
- QPtrList<SourceEditor> sourceEditors;
+ TQPtrList<SourceEditor> sourceEditors;
bool previewing;
QUnknownInterface *desInterface;
- QStringList recentlyFiles;
- QStringList recentlyProjects;
+ TQStringList recentlyFiles;
+ TQStringList recentlyProjects;
OutputWindow *oWindow;
- QValueList<Tab> preferenceTabs;
- QValueList<Tab> projectTabs;
+ TQValueList<Tab> preferenceTabs;
+ TQValueList<Tab> projectTabs;
bool databaseAutoEdit;
- QTimer *updateFunctionsTimer;
- QTimer *autoSaveTimer;
+ TQTimer *updateFunctionsTimer;
+ TQTimer *autoSaveTimer;
bool autoSaveEnabled;
int autoSaveInterval;
- QLineEdit *incrementalSearch;
- QGuardedPtr<FindDialog> findDialog;
- QGuardedPtr<ReplaceDialog> replaceDialog;
- QGuardedPtr<GotoLineDialog> gotoLineDialog;
+ TQLineEdit *incrementalSearch;
+ TQGuardedPtr<FindDialog> findDialog;
+ TQGuardedPtr<ReplaceDialog> replaceDialog;
+ TQGuardedPtr<GotoLineDialog> gotoLineDialog;
Project *eProject;
bool inDebugMode;
- QObjectList debuggingForms;
- QString lastOpenFilter;
- QGuardedPtr<QWidget> previewedForm;
- QPopupMenu *projectMenu;
- QString menuHelpFile;
+ TQObjectList debuggingForms;
+ TQString lastOpenFilter;
+ TQGuardedPtr<TQWidget> previewedForm;
+ TQPopupMenu *projectMenu;
+ TQString menuHelpFile;
bool singleProject;
- QToolBox *toolBox;
+ TQToolBox *toolBox;
int toolsMenuId, toolsMenuIndex;
uint guiStuffVisible : 1;
uint editorsReadOnly : 1;
uint savePluginPaths : 1;
QAssistantClient *assistant;
bool shStartDialog;
- QString pluginDir;
+ TQString pluginDir;
bool sSignalHandlers;
KDevDesignerPart *m_part;
public:
- QString lastSaveFilter;
- QPtrList<QAction> toolActions;
- QPtrList<QAction> commonWidgetsPage;
+ TQString lastSaveFilter;
+ TQPtrList<TQAction> toolActions;
+ TQPtrList<TQAction> commonWidgetsPage;
friend class KDevDesignerPart;
};
diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp
index d6ed0982..ebbccdad 100644
--- a/kdevdesigner/designer/mainwindowactions.cpp
+++ b/kdevdesigner/designer/mainwindowactions.cpp
@@ -32,24 +32,24 @@
#include <klineedit.h>
#include <stdlib.h>
-#include <qaction.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qsignalmapper.h>
-#include <qstylefactory.h>
-#include <qworkspace.h>
-#include <qmessagebox.h>
-#include <qstatusbar.h>
-#include <qlistbox.h>
-#include <qclipboard.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qinputdialog.h>
-#include <qdatetimeedit.h>
-#include <qtextedit.h>
+#include <tqaction.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqsignalmapper.h>
+#include <tqstylefactory.h>
+#include <tqworkspace.h>
+#include <tqmessagebox.h>
+#include <tqstatusbar.h>
+#include <tqlistbox.h>
+#include <tqclipboard.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqinputdialog.h>
+#include <tqdatetimeedit.h>
+#include <tqtextedit.h>
#include "defs.h"
#include "project.h"
@@ -76,7 +76,7 @@
#include "dbconnectionimpl.h"
#endif
#include "widgetaction.h"
-#include <qtoolbox.h>
+#include <tqtoolbox.h>
#include "startdialogimpl.h"
#include "designerappiface.h"
#include "connectiondialog.h"
@@ -107,18 +107,18 @@ static const char * whatsthis_image[] = {
" ooo ",
" ooo "};
-const QString toolbarHelp = "<p>Toolbars contain a number of buttons to "
+const TQString toolbarHelp = "<p>Toolbars contain a number of buttons to "
"provide quick access to often used functions.%1"
"<br>Click on the toolbar handle to hide the toolbar, "
"or drag and place the toolbar to a different location.</p>";
-static QIconSet createIconSet( const QString &name )
+static TQIconSet createIconSet( const TQString &name )
{
- QIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) );
- QString prefix = "designer_";
+ TQIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) );
+ TQString prefix = "designer_";
int right = name.length() - prefix.length();
ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), KDevDesignerPartFactory::instance() ),
- QIconSet::Small, QIconSet::Disabled );
+ TQIconSet::Small, TQIconSet::Disabled );
return ic;
}
@@ -127,105 +127,105 @@ void MainWindow::setupEditActions()
actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, this, 0 );
actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) );
actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) );
- connect( actionEditUndo, SIGNAL( activated() ), this, SLOT( editUndo() ) );
+ connect( actionEditUndo, TQT_SIGNAL( activated() ), this, TQT_SLOT( editUndo() ) );
actionEditUndo->setEnabled( FALSE );
actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 );
actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") );
actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) );
- connect( actionEditRedo, SIGNAL( activated() ), this, SLOT( editRedo() ) );
+ connect( actionEditRedo, TQT_SIGNAL( activated() ), this, TQT_SLOT( editRedo() ) );
actionEditRedo->setEnabled( FALSE );
actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, this, 0 );
actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) );
actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) );
- connect( actionEditCut, SIGNAL( activated() ), this, SLOT( editCut() ) );
+ connect( actionEditCut, TQT_SIGNAL( activated() ), this, TQT_SLOT( editCut() ) );
actionEditCut->setEnabled( FALSE );
actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, this, 0 );
actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) );
actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) );
- connect( actionEditCopy, SIGNAL( activated() ), this, SLOT( editCopy() ) );
+ connect( actionEditCopy, TQT_SIGNAL( activated() ), this, TQT_SLOT( editCopy() ) );
actionEditCopy->setEnabled( FALSE );
actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, this, 0 );
actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) );
actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) );
- connect( actionEditPaste, SIGNAL( activated() ), this, SLOT( editPaste() ) );
+ connect( actionEditPaste, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPaste() ) );
actionEditPaste->setEnabled( FALSE );
- actionEditDelete = new DesignerAction( i18n( "Delete" ), QPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 );
+ actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 );
actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) );
actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) );
- connect( actionEditDelete, SIGNAL( activated() ), this, SLOT( editDelete() ) );
+ connect( actionEditDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) );
actionEditDelete->setEnabled( FALSE );
#ifdef Q_WS_MAC
- QAction *macDelete = new DesignerAction( i18n( "Delete" ), QPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 );
- connect( macDelete, SIGNAL( activated() ), this, SLOT( editDelete() ) );
+ TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 );
+ connect( macDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) );
#endif
- actionEditSelectAll = new DesignerAction( i18n( "Select All" ), QPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 );
+ actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 );
actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) );
actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) );
- connect( actionEditSelectAll, SIGNAL( activated() ), this, SLOT( editSelectAll() ) );
+ connect( actionEditSelectAll, TQT_SIGNAL( activated() ), this, TQT_SLOT( editSelectAll() ) );
actionEditSelectAll->setEnabled( TRUE );
actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, this, 0 );
actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) );
actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) );
- connect( actionEditRaise, SIGNAL( activated() ), this, SLOT( editRaise() ) );
+ connect( actionEditRaise, TQT_SIGNAL( activated() ), this, TQT_SLOT( editRaise() ) );
actionEditRaise->setEnabled( FALSE );
actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, this, 0 );
actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) );
actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) );
- connect( actionEditLower, SIGNAL( activated() ), this, SLOT( editLower() ) );
+ connect( actionEditLower, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLower() ) );
actionEditLower->setEnabled( FALSE );
- actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), QPixmap(),
+ actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(),
i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 );
actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") );
actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) );
- connect( actionEditAccels, SIGNAL( activated() ), this, SLOT( editAccels() ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditAccels, SLOT( setEnabled(bool) ) );
+ connect( actionEditAccels, TQT_SIGNAL( activated() ), this, TQT_SLOT( editAccels() ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"),
i18n( "S&lots..." ), 0, this, 0 );
actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") );
actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) );
- connect( actionEditFunctions, SIGNAL( activated() ), this, SLOT( editFunctions() ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditFunctions, SLOT( setEnabled(bool) ) );
+ connect( actionEditFunctions, TQT_SIGNAL( activated() ), this, TQT_SLOT( editFunctions() ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"),
i18n( "Co&nnections..." ), 0, this, 0 );
actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") );
actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) );
- connect( actionEditConnections, SIGNAL( activated() ), this, SLOT( editConnections() ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditConnections, SLOT( setEnabled(bool) ) );
+ connect( actionEditConnections, TQT_SIGNAL( activated() ), this, TQT_SLOT( editConnections() ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
- actionEditSource = new DesignerAction( i18n( "Source" ), QIconSet(),
+ actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(),
i18n( "&Source..." ), CTRL + Key_E, this, 0 );
actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") );
actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) );
- connect( actionEditSource, SIGNAL( activated() ), this, SLOT( editSource() ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditSource, SLOT( setEnabled(bool) ) );
+ connect( actionEditSource, TQT_SIGNAL( activated() ), this, TQT_SLOT( editSource() ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
- actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), QPixmap(),
+ actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(),
i18n( "&Form Settings..." ), 0, this, 0 );
actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") );
actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) );
- connect( actionEditFormSettings, SIGNAL( activated() ), this, SLOT( editFormSettings() ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, SLOT( setEnabled(bool) ) );
+ connect( actionEditFormSettings, TQT_SIGNAL( activated() ), this, TQT_SLOT( editFormSettings() ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
- actionEditPreferences = new DesignerAction( i18n( "Preferences" ), QPixmap(),
+ actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(),
i18n( "Preferences..." ), 0, this, 0 );
actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") );
actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) );
- connect( actionEditPreferences, SIGNAL( activated() ), this, SLOT( editPreferences() ) );
+ connect( actionEditPreferences, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPreferences() ) );
-/* QToolBar *tb = new QToolBar( this, "Edit" );
- tb->setCloseMode( QDockWindow::Undocked );
- QWhatsThis::add( tb, i18n( "<b>The Edit toolbar</b>%1").arg(i18n(toolbarHelp).arg("")) );
+/* TQToolBar *tb = new TQToolBar( this, "Edit" );
+ tb->setCloseMode( TQDockWindow::Undocked );
+ TQWhatsThis::add( tb, i18n( "<b>The Edit toolbar</b>%1").arg(i18n(toolbarHelp).arg("")) );
addToolBar( tb, i18n( "Edit" ) );
actionEditUndo->addTo( tb );
actionEditRedo->addTo( tb );
@@ -239,8 +239,8 @@ void MainWindow::setupEditActions()
actionEditRaise->addTo( tb );
#endif
- QPopupMenu *menu = new QPopupMenu( this, "Edit" );
- connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateEditorUndoRedo() ) );
+ TQPopupMenu *menu = new TQPopupMenu( this, "Edit" );
+ connect( menu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( updateEditorUndoRedo() ) );
menubar->insertItem( i18n( "&Edit" ), menu );
actionEditUndo->addTo( menu );
actionEditRedo->addTo( menu );
@@ -270,43 +270,43 @@ void MainWindow::setupSearchActions()
{
actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ),
i18n( "&Find..." ), CTRL + Key_F, this, 0 );
- connect( actionSearchFind, SIGNAL( activated() ), this, SLOT( searchFind() ) );
+ connect( actionSearchFind, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchFind() ) );
actionSearchFind->setEnabled( FALSE );
actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) );
- actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), QIconSet(),
+ actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(),
i18n( "Find &Incremental" ), ALT + Key_I, this, 0 );
- connect( actionSearchIncremetal, SIGNAL( activated() ), this, SLOT( searchIncremetalFindMenu() ) );
+ connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchIncremetalFindMenu() ) );
actionSearchIncremetal->setEnabled( FALSE );
actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) );
- actionSearchReplace = new DesignerAction( i18n( "Replace" ), QIconSet(),
+ actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(),
i18n( "&Replace..." ), CTRL + Key_R, this, 0 );
- connect( actionSearchReplace, SIGNAL( activated() ), this, SLOT( searchReplace() ) );
+ connect( actionSearchReplace, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchReplace() ) );
actionSearchReplace->setEnabled( FALSE );
actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) );
- actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), QIconSet(),
+ actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(),
i18n( "&Goto Line..." ), ALT + Key_G, this, 0 );
- connect( actionSearchGotoLine, SIGNAL( activated() ), this, SLOT( searchGotoLine() ) );
+ connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchGotoLine() ) );
actionSearchGotoLine->setEnabled( FALSE );
actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) );
-/* QToolBar *tb = new QToolBar( this, "Search" );
- tb->setCloseMode( QDockWindow::Undocked );
+/* TQToolBar *tb = new TQToolBar( this, "Search" );
+ tb->setCloseMode( TQDockWindow::Undocked );
addToolBar( tb, i18n( "Search" ) );
actionSearchFind->addTo( tb );*/
- incrementalSearch = new QLineEdit( 0 );
+ incrementalSearch = new TQLineEdit( 0 );
incrementalSearch->hide();
- QToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) );
- connect( incrementalSearch, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( searchIncremetalFind() ) );
- connect( incrementalSearch, SIGNAL( returnPressed() ),
- this, SLOT( searchIncremetalFindNext() ) );
+ TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) );
+ connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( searchIncremetalFind() ) );
+ connect( incrementalSearch, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( searchIncremetalFindNext() ) );
incrementalSearch->setEnabled( FALSE );
- QPopupMenu *menu = new QPopupMenu( this, "Search" );
+ TQPopupMenu *menu = new TQPopupMenu( this, "Search" );
menubar->insertItem( i18n( "&Search" ), menu );
actionSearchFind->addTo( menu );
actionSearchIncremetal->addTo( menu );
@@ -318,62 +318,62 @@ void MainWindow::setupSearchActions()
void MainWindow::setupLayoutActions()
{
if ( !actionGroupTools ) {
- actionGroupTools = new QActionGroup( this );
+ actionGroupTools = new TQActionGroup( this );
actionGroupTools->setExclusive( TRUE );
- connect( actionGroupTools, SIGNAL( selected(QAction*) ), this, SLOT( toolSelected(QAction*) ) );
+ connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), this, TQT_SLOT( toolSelected(TQAction*) ) );
}
actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"),
i18n( "Adjust &Size" ), CTRL + Key_J, this, 0 );
actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") );
actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) );
- connect( actionEditAdjustSize, SIGNAL( activated() ), this, SLOT( editAdjustSize() ) );
+ connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), this, TQT_SLOT( editAdjustSize() ) );
actionEditAdjustSize->setEnabled( FALSE );
actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"),
i18n( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 );
actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") );
actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) );
- connect( actionEditHLayout, SIGNAL( activated() ), this, SLOT( editLayoutHorizontal() ) );
+ connect( actionEditHLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutHorizontal() ) );
actionEditHLayout->setEnabled( FALSE );
actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"),
i18n( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 );
actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") );
actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) );
- connect( actionEditVLayout, SIGNAL( activated() ), this, SLOT( editLayoutVertical() ) );
+ connect( actionEditVLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutVertical() ) );
actionEditVLayout->setEnabled( FALSE );
actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"),
i18n( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 );
actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") );
actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) );
- connect( actionEditGridLayout, SIGNAL( activated() ), this, SLOT( editLayoutGrid() ) );
+ connect( actionEditGridLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutGrid() ) );
actionEditGridLayout->setEnabled( FALSE );
actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"),
i18n( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 );
actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") );
actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) );
- connect( actionEditSplitHorizontal, SIGNAL( activated() ), this, SLOT( editLayoutHorizontalSplit() ) );
+ connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutHorizontalSplit() ) );
actionEditSplitHorizontal->setEnabled( FALSE );
actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"),
i18n( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 );
actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") );
actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) );
- connect( actionEditSplitVertical, SIGNAL( activated() ), this, SLOT( editLayoutVerticalSplit() ) );
+ connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutVerticalSplit() ) );
actionEditSplitVertical->setEnabled( FALSE );
actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"),
i18n( "&Break Layout" ), CTRL + Key_B, this, 0 );
actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") );
actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) );
- connect( actionEditBreakLayout, SIGNAL( activated() ), this, SLOT( editBreakLayout() ) );
+ connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editBreakLayout() ) );
actionEditBreakLayout->setEnabled( FALSE );
int id = WidgetDatabase::idFromClassName( "Spacer" );
- actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, QString::number( id ).latin1() );
+ actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() );
actionInsertSpacer->setToggleAction( TRUE );
actionInsertSpacer->setText( WidgetDatabase::className( id ) );
actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) );
@@ -389,10 +389,10 @@ void MainWindow::setupLayoutActions()
actionInsertSpacer->addTo( commonWidgetsToolBar );
commonWidgetsPage.append( actionInsertSpacer );
- QWidget *w;
- commonWidgetsToolBar->setStretchableWidget( ( w = new QWidget( commonWidgetsToolBar ) ) );
+ TQWidget *w;
+ commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) );
w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() );
- QWhatsThis::add( layoutToolBar, i18n( "<b>The Layout toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) );
+ TQWhatsThis::add( layoutToolBar, i18n( "<b>The Layout toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) );
actionEditAdjustSize->addTo( layoutToolBar );
layoutToolBar->addSeparator();
actionEditHLayout->addTo( layoutToolBar );
@@ -404,7 +404,7 @@ void MainWindow::setupLayoutActions()
layoutToolBar->addSeparator();
actionInsertSpacer->addTo( layoutToolBar );
- QPopupMenu *menu = new QPopupMenu( this, "Layout" );
+ TQPopupMenu *menu = new TQPopupMenu( this, "Layout" );
layoutMenu = menu;
menubar->insertItem( i18n( "&Layout" ), menu, toolsMenuId + 1 );
actionEditAdjustSize->addTo( menu );
@@ -422,16 +422,16 @@ void MainWindow::setupLayoutActions()
void MainWindow::setupToolActions()
{
if ( !actionGroupTools ) {
- actionGroupTools = new QActionGroup( this );
+ actionGroupTools = new TQActionGroup( this );
actionGroupTools->setExclusive( TRUE );
- connect( actionGroupTools, SIGNAL( selected(QAction*) ),
- this, SLOT( toolSelected(QAction*) ) );
+ connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ),
+ this, TQT_SLOT( toolSelected(TQAction*) ) );
}
actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"),
i18n("&Pointer"), Key_F2,
actionGroupTools,
- QString::number(POINTER_TOOL).latin1(), TRUE );
+ TQString::number(POINTER_TOOL).latin1(), TRUE );
actionPointerTool->setStatusTip( i18n("Selects the pointer tool") );
actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) );
@@ -440,37 +440,37 @@ void MainWindow::setupToolActions()
i18n("&Connect Signal/Slots"),
singleProjectMode() ? 0 : Key_F3,
actionGroupTools,
- QString::number(CONNECT_TOOL).latin1(), TRUE );
+ TQString::number(CONNECT_TOOL).latin1(), TRUE );
actionConnectTool->setStatusTip( i18n("Selects the connection tool") );
actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) );
actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"),
i18n("Tab &Order"), Key_F4,
actionGroupTools,
- QString::number(ORDER_TOOL).latin1(), TRUE );
+ TQString::number(ORDER_TOOL).latin1(), TRUE );
actionOrderTool->setStatusTip( i18n("Selects the tab order tool") );
actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) );
actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ),
i18n( "Set &Buddy" ), Key_F12,
- actionGroupTools, QString::number( BUDDY_TOOL ).latin1(),
+ actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(),
TRUE );
actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) );
actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) );
- QToolBar *tb = new QToolBar( this, "Tools" );
- tb->setCloseMode( QDockWindow::Undocked );
+ TQToolBar *tb = new TQToolBar( this, "Tools" );
+ tb->setCloseMode( TQDockWindow::Undocked );
toolsToolBar = tb;
- QWhatsThis::add( tb, i18n( "<b>The Tools toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) );
+ TQWhatsThis::add( tb, i18n( "<b>The Tools toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) );
- addToolBar( tb, i18n( "Tools" ), QMainWindow::DockTop, FALSE );
+ addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE );
actionPointerTool->addTo( tb );
if ( !singleProjectMode() )
actionConnectTool->addTo( tb );
actionOrderTool->addTo( tb );
actionBuddyTool->addTo( tb );
- QPopupMenu *mmenu = new QPopupMenu( this, "Tools" );
+ TQPopupMenu *mmenu = new TQPopupMenu( this, "Tools" );
toolsMenu = mmenu;
toolsMenuId = 100;
menubar->insertItem( i18n( "&Tools" ), mmenu, toolsMenuId );
@@ -492,34 +492,34 @@ void MainWindow::setupToolActions()
"custom widgets") );
actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom"
"Widgets" ) );
- connect( actionToolsCustomWidget, SIGNAL( activated() ),
- this, SLOT( toolsCustomWidget() ) );
+ connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ),
+ this, TQT_SLOT( toolsCustomWidget() ) );
for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) {
- QString grp = WidgetDatabase::widgetGroup( j );
+ TQString grp = WidgetDatabase::widgetGroup( j );
if ( !WidgetDatabase::isGroupVisible( grp ) ||
WidgetDatabase::isGroupEmpty( grp ) )
continue;
- QToolBar *tb = new QToolBar( this, grp.latin1() );
- tb->setCloseMode( QDockWindow::Undocked );
+ TQToolBar *tb = new TQToolBar( this, grp.latin1() );
+ tb->setCloseMode( TQDockWindow::Undocked );
widgetToolBars.append( tb );
bool plural = grp[(int)grp.length()-1] == 's';
if ( plural ) {
- QWhatsThis::add( tb, i18n( "<b>The %1</b>%2" ).arg(grp).arg(i18n(toolbarHelp).
+ TQWhatsThis::add( tb, i18n( "<b>The %1</b>%2" ).arg(grp).arg(i18n(toolbarHelp).
arg( i18n(" Click on a button to insert a single widget, "
"or double click to insert multiple %1.") ).arg(grp)) );
} else {
- QWhatsThis::add( tb, i18n( "<b>The %1 Widgets</b>%2" ).arg(grp).arg(i18n(toolbarHelp).
+ TQWhatsThis::add( tb, i18n( "<b>The %1 Widgets</b>%2" ).arg(grp).arg(i18n(toolbarHelp).
arg( i18n(" Click on a button to insert a single %1 widget, "
"or double click to insert multiple widgets.") ).arg(grp)) );
}
addToolBar( tb, grp );
tb->hide();
- QPopupMenu *menu = new QPopupMenu( this, grp.latin1() );
+ TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() );
mmenu->insertItem( grp, menu );
- QToolBar *tb2 = new QToolBar( grp, 0, toolBox, FALSE, grp.latin1() );
- tb2->setFrameStyle( QFrame::NoFrame );
+ TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() );
+ tb2->setFrameStyle( TQFrame::NoFrame );
tb2->setOrientation( Qt::Vertical );
tb2->setBackgroundMode( PaletteBase );
toolBox->addItem( tb2, grp );
@@ -537,9 +537,9 @@ void MainWindow::setupToolActions()
if ( WidgetDatabase::group( i ) != grp )
continue; // only widgets, i.e. not forms and temp stuff
WidgetAction* a =
- new WidgetAction( grp, actionGroupTools, QString::number( i ).latin1() );
+ new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() );
a->setToggleAction( TRUE );
- QString atext = WidgetDatabase::className( i );
+ TQString atext = WidgetDatabase::className( i );
if ( atext[0] == 'Q' )
atext = atext.mid(1);
while ( atext.length() && atext[0] >= 'a' && atext[0] <= 'z' )
@@ -547,16 +547,16 @@ void MainWindow::setupToolActions()
if ( atext.isEmpty() )
atext = WidgetDatabase::className( i );
a->setText( atext );
- QString ttip = WidgetDatabase::toolTip( i );
+ TQString ttip = WidgetDatabase::toolTip( i );
a->setIconSet( WidgetDatabase::iconSet( i ) );
a->setToolTip( ttip );
if ( !WidgetDatabase::isWhatsThisLoaded() )
WidgetDatabase::loadWhatsThis( documentationPath() );
a->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::className( i )) );
- QString whats = i18n("<b>A %1</b>").arg( WidgetDatabase::className( i ) );
+ TQString whats = i18n("<b>A %1</b>").arg( WidgetDatabase::className( i ) );
if ( !WidgetDatabase::whatsThis( i ).isEmpty() )
- whats += QString("<p>%1</p>").arg(WidgetDatabase::whatsThis( i ));
+ whats += TQString("<p>%1</p>").arg(WidgetDatabase::whatsThis( i ));
a->setWhatsThis( whats+ i18n("<p>Double click on this tool to keep it selected.</p>") );
if ( grp != "KDE" )
@@ -568,15 +568,15 @@ void MainWindow::setupToolActions()
commonWidgetsPage.append( a );
}
}
- QWidget *w;
- tb2->setStretchableWidget( ( w = new QWidget( tb2 ) ) );
+ TQWidget *w;
+ tb2->setStretchableWidget( ( w = new TQWidget( tb2 ) ) );
w->setBackgroundMode( tb2->backgroundMode() );
}
if ( !customWidgetToolBar ) {
- QToolBar *tb = new QToolBar( this, "Custom Widgets" );
- tb->setCloseMode( QDockWindow::Undocked );
- QWhatsThis::add( tb, i18n( "<b>The Custom Widgets toolbar</b>%1"
+ TQToolBar *tb = new TQToolBar( this, "Custom Widgets" );
+ tb->setCloseMode( TQDockWindow::Undocked );
+ TQWhatsThis::add( tb, i18n( "<b>The Custom Widgets toolbar</b>%1"
"<p>Click <b>Edit Custom Widgets...</b>"
"in the <b>Tools|Custom</b> menu to "
"add and change custom widgets</p>" ).
@@ -587,25 +587,25 @@ void MainWindow::setupToolActions()
tb->hide();
widgetToolBars.append( tb );
customWidgetToolBar = tb;
- QPopupMenu *menu = new QPopupMenu( this, "Custom Widgets" );
+ TQPopupMenu *menu = new TQPopupMenu( this, "Custom Widgets" );
mmenu->insertItem( "Custom", menu );
customWidgetMenu = menu;
customWidgetToolBar->hide();
actionToolsCustomWidget->addTo( customWidgetMenu );
customWidgetMenu->insertSeparator();
- QToolBar *tb2 = new QToolBar( "Custom Widgets", 0,
+ TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0,
toolBox, FALSE, "Custom Widgets" );
tb2->setBackgroundMode(PaletteBase);
tb2->setOrientation( Qt::Vertical );
- tb2->setFrameStyle( QFrame::NoFrame );
+ tb2->setFrameStyle( TQFrame::NoFrame );
toolBox->addItem( tb2, "Custom Widgets" );
customWidgetToolBar2 = tb2;
}
- QAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this );
+ TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this );
a->setStatusTip( i18n( "Opens a dialog to configure the common "
"widgets page of the toolbox") );
- connect( a, SIGNAL( activated() ), this, SLOT( toolsConfigure() ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( toolsConfigure() ) );
mmenu->insertSeparator();
a->addTo( mmenu );
resetTool();
@@ -613,13 +613,13 @@ void MainWindow::setupToolActions()
void MainWindow::setupFileActions()
{
- QToolBar* tb = new QToolBar( this, "File" );
- tb->setCloseMode( QDockWindow::Undocked );
+ TQToolBar* tb = new TQToolBar( this, "File" );
+ tb->setCloseMode( TQDockWindow::Undocked );
projectToolBar = tb;
- QWhatsThis::add( tb, i18n( "<b>The File toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) );
+ TQWhatsThis::add( tb, i18n( "<b>The File toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) );
addToolBar( tb, i18n( "File" ) );
- fileMenu = new QPopupMenu( this, "File" );
+ fileMenu = new TQPopupMenu( this, "File" );
menubar->insertItem( i18n( "&File" ), fileMenu );
DesignerAction *a = 0;
@@ -633,27 +633,27 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_N );
a->setStatusTip( i18n( "Creates a new project, form or source file." ) );
a->setWhatsThis( whatsThisFrom( "File|New" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNew() ) );
a->addTo( tb );
a->addTo( fileMenu );
actionNewFile = a;
} else {
- actionGroupNew = new QActionGroup( this, 0, FALSE );
- QActionGroup* a = actionGroupNew;
- ( (QActionGroup*)a )->setUsesDropDown( TRUE );
+ actionGroupNew = new TQActionGroup( this, 0, FALSE );
+ TQActionGroup* a = actionGroupNew;
+ ( (TQActionGroup*)a )->setUsesDropDown( TRUE );
a->setText( i18n( "New" ) );
a->setMenuText( i18n( "&New..." ) );
a->setIconSet( createIconSet("designer_form.png") );
a->setStatusTip( i18n( "Creates a new dialog or file" ) );
a->setWhatsThis( whatsThisFrom( "File|New" ) );
- QAction *newForm = new DesignerAction( a, 0 );
+ TQAction *newForm = new DesignerAction( a, 0 );
newForm->setText( i18n( "New Dialog" ) );
newForm->setMenuText( i18n( "&Dialog..." ) );
newForm->setIconSet( createIconSet("designer_form.png") );
newForm->setAccel( CTRL + Key_N );
newForm->setStatusTip( i18n( "Creates a new dialog." ) );
- connect( newForm, SIGNAL( activated() ), this, SLOT( fileNewDialog() ) );
+ connect( newForm, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNewDialog() ) );
DesignerAction *newFile = new DesignerAction( a, 0 );
newFile->setText( i18n( "New File" ) );
@@ -661,7 +661,7 @@ void MainWindow::setupFileActions()
newFile->setIconSet( createIconSet("designer_filenew.png") );
newFile->setAccel( ALT + Key_N );
newFile->setStatusTip( i18n( "Creates a new file." ) );
- connect( newFile, SIGNAL( activated() ), this, SLOT( fileNewFile() ) );
+ connect( newFile, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNewFile() ) );
actionNewFile = newFile;
a->addTo( tb );
@@ -677,7 +677,7 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_O );
a->setStatusTip( i18n( "Opens an existing project, form or source file ") );
a->setWhatsThis( whatsThisFrom( "File|Open" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileOpen() ) );
if ( !singleProject ) {
a->addTo( tb );
a->addTo( fileMenu );
@@ -691,8 +691,8 @@ void MainWindow::setupFileActions()
a->setMenuText( i18n( "&Close" ) );
a->setStatusTip( i18n( "Closes the current project or document" ) );
a->setWhatsThis(whatsThisFrom( "File|Close" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( fileClose() ) );
- connect( this, SIGNAL( hasActiveWindowOrProject(bool) ), a, SLOT( setEnabled(bool) ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileClose() ) );
+ connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject ) {
a->addTo( fileMenu );
fileMenu->insertSeparator();
@@ -706,8 +706,8 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_S );
a->setStatusTip( i18n( "Saves the current project or document" ) );
a->setWhatsThis(whatsThisFrom( "File|Save" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( fileSave() ) );
- connect( this, SIGNAL( hasActiveWindowOrProject(bool) ), a, SLOT( setEnabled(bool) ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSave() ) );
+ connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
a->addTo( tb );
a->addTo( fileMenu );
@@ -717,8 +717,8 @@ void MainWindow::setupFileActions()
a->setMenuText( i18n( "Save &As..." ) );
a->setStatusTip( i18n( "Saves the current form with a new filename" ) );
a->setWhatsThis( whatsThisFrom( "File|Save As" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( fileSaveAs() ) );
- connect( this, SIGNAL( hasActiveWindow(bool) ), a, SLOT( setEnabled(bool) ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSaveAs() ) );
+ connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject )
a->addTo( fileMenu );
@@ -728,8 +728,8 @@ void MainWindow::setupFileActions()
a->setMenuText( i18n( "Sa&ve All" ) );
a->setStatusTip( i18n( "Saves all open documents" ) );
a->setWhatsThis( whatsThisFrom( "File|Save All" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( fileSaveAll() ) );
- connect( this, SIGNAL( hasActiveWindowOrProject(bool) ), a, SLOT( setEnabled(bool) ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSaveAll() ) );
+ connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject ) {
a->addTo( fileMenu );
fileMenu->insertSeparator();
@@ -740,29 +740,29 @@ void MainWindow::setupFileActions()
a->setMenuText( i18n( "Create &Template..." ) );
a->setStatusTip( i18n( "Creates a new template" ) );
a->setWhatsThis( whatsThisFrom( "File|Create Template" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( fileCreateTemplate() ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileCreateTemplate() ) );
if ( !singleProject )
a->addTo( fileMenu );
if ( !singleProject )
fileMenu->insertSeparator();
- recentlyFilesMenu = new QPopupMenu( this );
- recentlyProjectsMenu = new QPopupMenu( this );
+ recentlyFilesMenu = new TQPopupMenu( this );
+ recentlyProjectsMenu = new TQPopupMenu( this );
if ( !singleProject ) {
fileMenu->insertItem( i18n( "Recently Opened Files " ), recentlyFilesMenu );
fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu );
}
- connect( recentlyFilesMenu, SIGNAL( aboutToShow() ),
- this, SLOT( setupRecentlyFilesMenu() ) );
- connect( recentlyProjectsMenu, SIGNAL( aboutToShow() ),
- this, SLOT( setupRecentlyProjectsMenu() ) );
- connect( recentlyFilesMenu, SIGNAL( activated( int ) ),
- this, SLOT( recentlyFilesMenuActivated( int ) ) );
- connect( recentlyProjectsMenu, SIGNAL( activated( int ) ),
- this, SLOT( recentlyProjectsMenuActivated( int ) ) );
+ connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( setupRecentlyFilesMenu() ) );
+ connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( setupRecentlyProjectsMenu() ) );
+ connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) );
+ connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) );
if ( !singleProject )
fileMenu->insertSeparator();
@@ -778,22 +778,22 @@ void MainWindow::setupFileActions()
a->setText( i18n( "Close" ) );
a->setMenuText( i18n( "&Close" ) );
}
- connect( a, SIGNAL( activated() ), this, SLOT( fileQuit() ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileQuit() ) );
a->addTo( fileMenu );
}
void MainWindow::setupProjectActions()
{
- projectMenu = new QPopupMenu( this, "Project" );
+ projectMenu = new TQPopupMenu( this, "Project" );
menubar->insertItem( i18n( "Pr&oject" ), projectMenu );
- QActionGroup *ag = new QActionGroup( this, 0 );
+ TQActionGroup *ag = new TQActionGroup( this, 0 );
ag->setText( i18n( "Active Project" ) );
ag->setMenuText( i18n( "Active Project" ) );
ag->setExclusive( TRUE );
ag->setUsesDropDown( TRUE );
- connect( ag, SIGNAL( selected( QAction * ) ), this, SLOT( projectSelected( QAction * ) ) );
- connect( ag, SIGNAL( selected( QAction * ) ), this, SIGNAL( projectChanged() ) );
+ connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SLOT( projectSelected( TQAction * ) ) );
+ connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SIGNAL( projectChanged() ) );
DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE );
eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE );
projects.insert( a, eProject );
@@ -805,44 +805,44 @@ void MainWindow::setupProjectActions()
if ( !singleProject )
projectMenu->insertSeparator();
- a = new DesignerAction( i18n( "Add File" ), QPixmap(), i18n( "&Add File..." ), 0, this, 0 );
+ a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, this, 0 );
actionProjectAddFile = a;
a->setStatusTip( i18n("Adds a file to the current project") );
a->setWhatsThis( whatsThisFrom( "Project|Add File" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( projectInsertFile() ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( projectInsertFile() ) );
a->setEnabled( FALSE );
- connect( this, SIGNAL( hasNonDummyProject(bool) ), a, SLOT( setEnabled(bool) ) );
+ connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject )
a->addTo( projectMenu );
- actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), QPixmap(),
+ actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(),
i18n( "&Image Collection..." ), 0, this, 0 );
actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") );
actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) );
- connect( actionEditPixmapCollection, SIGNAL( activated() ), this, SLOT( editPixmapCollection() ) );
+ connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPixmapCollection() ) );
actionEditPixmapCollection->setEnabled( FALSE );
- connect( this, SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, SLOT( setEnabled(bool) ) );
+ connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) );
actionEditPixmapCollection->addTo( projectMenu );
#ifndef QT_NO_SQL
- actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), QPixmap(),
+ actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(),
i18n( "&Database Connections..." ), 0, this, 0 );
actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") );
actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) );
- connect( actionEditDatabaseConnections, SIGNAL( activated() ), this, SLOT( editDatabaseConnections() ) );
+ connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDatabaseConnections() ) );
//actionEditDatabaseConnections->setEnabled( FALSE );
- //connect( this, SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, SLOT( setEnabled(bool) ) );
+ //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject )
actionEditDatabaseConnections->addTo( projectMenu );
#endif
- actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), QPixmap(),
+ actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(),
i18n( "&Project Settings..." ), 0, this, 0 );
actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") );
actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) );
- connect( actionEditProjectSettings, SIGNAL( activated() ), this, SLOT( editProjectSettings() ) );
+ connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), this, TQT_SLOT( editProjectSettings() ) );
actionEditProjectSettings->setEnabled( FALSE );
- connect( this, SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, SLOT( setEnabled(bool) ) );
+ connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) );
actionEditProjectSettings->addTo( projectMenu );
}
@@ -850,26 +850,26 @@ void MainWindow::setupProjectActions()
void MainWindow::setupPreviewActions()
{
DesignerAction* a = 0;
- QPopupMenu *menu = new QPopupMenu( this, "Preview" );
+ TQPopupMenu *menu = new TQPopupMenu( this, "Preview" );
layoutMenu = menu;
menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 );
- a = new DesignerAction( i18n( "Preview Form" ), QPixmap(), i18n( "Preview &Form" ), 0, this, 0 );
+ a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, this, 0 );
actionPreview = a;
a->setAccel( CTRL + Key_T );
a->setStatusTip( i18n("Opens a preview") );
a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) );
- connect( a, SIGNAL( activated() ), this, SLOT( previewForm() ) );
- connect( this, SIGNAL( hasActiveForm(bool) ), a, SLOT( setEnabled(bool) ) );
+ connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( previewForm() ) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
a->addTo( menu );
menu->insertSeparator();
- QSignalMapper *mapper = new QSignalMapper( this );
- connect( mapper, SIGNAL(mapped(const QString&)), this, SLOT(previewForm(const QString&)) );
- QStringList styles = QStyleFactory::keys();
- for ( QStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
- QString info;
+ TQSignalMapper *mapper = new TQSignalMapper( this );
+ connect( mapper, TQT_SIGNAL(mapped(const TQString&)), this, TQT_SLOT(previewForm(const TQString&)) );
+ TQStringList styles = TQStyleFactory::keys();
+ for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
+ TQString info;
if ( *it == "Motif" )
info = i18n( "The preview will use the Motif look and feel which is used as the default style on most UNIX systems." );
else if ( *it == "Windows" )
@@ -883,15 +883,15 @@ void MainWindow::setupPreviewActions()
else if ( *it == "MotifPlus" )
info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." );
- a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), QPixmap(),
+ a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(),
i18n( "... in %1 Style" ).arg( *it ), 0, this, 0 );
a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) );
a->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>"
"<p>Use the preview to test the design and "
"signal-slot connections of the current form. %2</p>").arg( *it ).arg( info ) );
mapper->setMapping( a, *it );
- connect( a, SIGNAL(activated()), mapper, SLOT(map()) );
- connect( this, SIGNAL( hasActiveForm(bool) ), a, SLOT( setEnabled(bool) ) );
+ connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) );
+ connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
a->addTo( menu );
}
}
@@ -905,38 +905,38 @@ void MainWindow::setupWindowActions()
actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, this );
actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") );
actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) );
- connect( actionWindowTile, SIGNAL( activated() ), qworkspace, SLOT( tile() ) );
+ connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) );
actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, this );
actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") );
actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) );
- connect( actionWindowCascade, SIGNAL( activated() ), qworkspace, SLOT( cascade() ) );
+ connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) );
actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, this );
actionWindowClose->setStatusTip( i18n( "Closes the active window") );
actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) );
- connect( actionWindowClose, SIGNAL( activated() ), qworkspace, SLOT( closeActiveWindow() ) );
+ connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) );
actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, this );
actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") );
actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) );
- connect( actionWindowCloseAll, SIGNAL( activated() ), qworkspace, SLOT( closeAllWindows() ) );
+ connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) );
actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, this );
actionWindowNext->setStatusTip( i18n( "Activates the next window" ) );
actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) );
- connect( actionWindowNext, SIGNAL( activated() ), qworkspace, SLOT( activateNextWindow() ) );
+ connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) );
actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, this );
actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) );
actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) );
- connect( actionWindowPrevious, SIGNAL( activated() ), qworkspace, SLOT( activatePreviousWindow() ) );
+ connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) );
// }
if ( !windowMenu ) {
- windowMenu = new QPopupMenu( this, "Window" );
+ windowMenu = new TQPopupMenu( this, "Window" );
menubar->insertItem( i18n( "&Window" ), windowMenu );
- connect( windowMenu, SIGNAL( aboutToShow() ),
- this, SLOT( setupWindowActions() ) );
+ connect( windowMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( setupWindowActions() ) );
} else {
windowMenu->clear();
}
@@ -952,26 +952,26 @@ void MainWindow::setupWindowActions()
windowMenu->insertSeparator();
windowMenu->insertItem( i18n( "Vie&ws" ), createDockWindowMenu( NoToolBars ) );
windowMenu->insertItem( i18n( "Tool&bars" ), createDockWindowMenu( OnlyToolBars ) );
- QWidgetList windows = qworkspace->windowList();
+ TQWidgetList windows = qworkspace->windowList();
if ( windows.count() && formWindow() )
windowMenu->insertSeparator();
int j = 0;
for ( int i = 0; i < int( windows.count() ); ++i ) {
- QWidget *w = windows.at( i );
+ TQWidget *w = windows.at( i );
if ( !::qt_cast<FormWindow*>(w) && !::qt_cast<SourceEditor*>(w) )
continue;
if ( ::qt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) )
continue;
j++;
- QString itemText;
+ TQString itemText;
if ( j < 10 )
- itemText = QString("&%1 ").arg( j );
+ itemText = TQString("&%1 ").arg( j );
if ( ::qt_cast<FormWindow*>(w) )
itemText += w->name();
else
itemText += w->caption();
- int id = windowMenu->insertItem( itemText, this, SLOT( windowsMenuActivated( int ) ) );
+ int id = windowMenu->insertItem( itemText, this, TQT_SLOT( windowsMenuActivated( int ) ) );
windowMenu->setItemParameter( id, i );
windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) );
}
@@ -982,44 +982,44 @@ void MainWindow::setupHelpActions()
actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, this, 0 );
actionHelpContents->setStatusTip( i18n("Opens the online help") );
actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) );
- connect( actionHelpContents, SIGNAL( activated() ), this, SLOT( helpContents() ) );
+ connect( actionHelpContents, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpContents() ) );
actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, this, 0 );
actionHelpManual->setStatusTip( i18n("Opens the Qt Designer manual") );
actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) );
- connect( actionHelpManual, SIGNAL( activated() ), this, SLOT( helpManual() ) );
+ connect( actionHelpManual, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpManual() ) );
- actionHelpAbout = new DesignerAction( i18n("About"), QPixmap(), i18n("&About"), 0, this, 0 );
+ actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, this, 0 );
actionHelpAbout->setStatusTip( i18n("Displays information about Qt Designer") );
actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) );
- connect( actionHelpAbout, SIGNAL( activated() ), this, SLOT( helpAbout() ) );
+ connect( actionHelpAbout, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpAbout() ) );
- actionHelpAboutQt = new DesignerAction( i18n("About Qt"), QPixmap(), i18n("About &Qt"), 0, this, 0 );
+ actionHelpAboutQt = new DesignerAction( i18n("About Qt"), TQPixmap(), i18n("About &Qt"), 0, this, 0 );
actionHelpAboutQt->setStatusTip( i18n("Displays information about the Qt Toolkit") );
actionHelpAboutQt->setWhatsThis( whatsThisFrom( "Help|About Qt" ) );
- connect( actionHelpAboutQt, SIGNAL( activated() ), this, SLOT( helpAboutQt() ) );
+ connect( actionHelpAboutQt, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpAboutQt() ) );
#if 0 //defined(QT_NON_COMMERCIAL)
// ### not used anymore -- should be deleted?
- actionHelpRegister = new DesignerAction( i18n("Register Qt"), QPixmap(), i18n("&Register Qt..."), 0, this, 0 );
+ actionHelpRegister = new DesignerAction( i18n("Register Qt"), TQPixmap(), i18n("&Register Qt..."), 0, this, 0 );
actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") );
actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") );
- connect( actionHelpRegister, SIGNAL( activated() ), this, SLOT( helpRegister() ) );
+ connect( actionHelpRegister, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpRegister() ) );
#endif
- actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), QIconSet( whatsthis_image, whatsthis_image ),
+ actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ),
i18n("What's This?"), SHIFT + Key_F1, this, 0 );
actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") );
actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) );
- connect( actionHelpWhatsThis, SIGNAL( activated() ), this, SLOT( whatsThis() ) );
+ connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), this, TQT_SLOT( whatsThis() ) );
-/* QToolBar *tb = new QToolBar( this, "Help" );
- tb->setCloseMode( QDockWindow::Undocked );
- QWhatsThis::add( tb, i18n( "<b>The Help toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("") ));
+/* TQToolBar *tb = new TQToolBar( this, "Help" );
+ tb->setCloseMode( TQDockWindow::Undocked );
+ TQWhatsThis::add( tb, i18n( "<b>The Help toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("") ));
addToolBar( tb, i18n( "Help" ) );
actionHelpWhatsThis->addTo( tb );*/
- QPopupMenu *menu = new QPopupMenu( this, "Help" );
+ TQPopupMenu *menu = new TQPopupMenu( this, "Help" );
menubar->insertSeparator();
menubar->insertItem( i18n( "&Help" ), menu );
actionHelpContents->addTo( menu );
@@ -1047,9 +1047,9 @@ void MainWindow::fileNew()
void MainWindow::fileNewDialog()
{
static int forms = 0;
- QString n = "Dialog" + QString::number( ++forms );
+ TQString n = "Dialog" + TQString::number( ++forms );
while ( currentProject->findFormFile( n + ".ui" ) )
- n = "Dialog" + QString::number( ++forms );
+ n = "Dialog" + TQString::number( ++forms );
FormWindow *fw = 0;
FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject );
fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
@@ -1058,7 +1058,7 @@ void MainWindow::fileNewDialog()
workspace()->update();
fw->setProject( currentProject );
MetaDataBase::addEntry( fw );
- QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QDialog" ), fw, n.latin1() );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() );
fw->setMainContainer( w );
fw->setCaption( n );
fw->resize( 600, 480 );
@@ -1072,7 +1072,7 @@ void MainWindow::fileNewDialog()
void MainWindow::fileNewFile()
{
- QString name = QInputDialog::getText( i18n( "Name of File" ), i18n( "Enter the name of the new source file:" ) );
+ TQString name = QInputDialog::getText( i18n( "Name of File" ), i18n( "Enter the name of the new source file:" ) );
if ( name.isEmpty() )
return;
if ( name.right( 3 ) != ".qs" )
@@ -1096,7 +1096,7 @@ void MainWindow::fileClose()
if ( !currentProject->isDummy() ) {
fileCloseProject();
} else {
- QWidget *w = qworkspace->activeWindow();
+ TQWidget *w = qworkspace->activeWindow();
if ( w ) {
if ( ::qt_cast<FormWindow*>(w) )
( (FormWindow*)w )->formFile()->close();
@@ -1112,9 +1112,9 @@ void MainWindow::fileCloseProject()
if ( currentProject->isDummy() )
return;
Project *pro = currentProject;
- QAction* a = 0;
- QAction* lastValid = 0;
- for ( QMap<QAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it ) {
+ TQAction* a = 0;
+ TQAction* lastValid = 0;
+ for ( TQMap<TQAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it ) {
if ( it.data() == pro ) {
a = it.key();
if ( lastValid )
@@ -1124,7 +1124,7 @@ void MainWindow::fileCloseProject()
}
if ( a ) {
if ( pro->isModified() ) {
- switch ( QMessageBox::warning( this, i18n( "Save Project Settings" ),
+ switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ),
i18n( "Save changes to '%1'?" ).arg( pro->fileName() ),
i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) {
case 0: // save
@@ -1139,11 +1139,11 @@ void MainWindow::fileCloseProject()
}
}
- QWidgetList windows = qWorkspace()->windowList();
+ TQWidgetList windows = qWorkspace()->windowList();
qWorkspace()->blockSignals( TRUE );
- QWidgetListIt wit( windows );
+ TQWidgetListIt wit( windows );
while ( wit.current() ) {
- QWidget *w = wit.current();
+ TQWidget *w = wit.current();
++wit;
if ( ::qt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->project() == pro ) {
@@ -1169,7 +1169,7 @@ void MainWindow::fileCloseProject()
statusMessage( i18n( "Selected project '%1'" ).arg( currentProject->projectName() ) );
}
if ( !windows.isEmpty() ) {
- for ( QWidget *w = windows.first(); w; w = windows.next() ) {
+ for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( !::qt_cast<FormWindow*>(w) )
continue;
w->setFocus();
@@ -1179,7 +1179,7 @@ void MainWindow::fileCloseProject()
} else {
emit hasActiveWindow( FALSE );
emit hasActiveForm( FALSE );
- updateUndoRedo( FALSE, FALSE, QString::null, QString::null );
+ updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null );
}
}
}
@@ -1194,26 +1194,26 @@ void MainWindow::projectInsertFile()
fileOpen( "", "" );
}
-void MainWindow::fileOpen( const QString &filter, const QString &extension, const QString &fn, bool inProject )
+void MainWindow::fileOpen( const TQString &filter, const TQString &extension, const TQString &fn, bool inProject )
{
statusMessage( i18n( "Open a file...") );
- QPluginManager<ImportFilterInterface> manager( IID_ImportFilter, QApplication::libraryPaths(), pluginDirectory() );
+ QPluginManager<ImportFilterInterface> manager( IID_ImportFilter, TQApplication::libraryPaths(), pluginDirectory() );
Project* project = inProject ? currentProject : eProject;
- QStringList additionalSources;
+ TQStringList additionalSources;
{
- QStringList filterlist;
+ TQStringList filterlist;
if ( filter.isEmpty() ) {
if ( !inProject )
filterlist << i18n( "*.ui *.pro|Designer Files" );
filterlist << i18n( "*.ui|Qt User-Interface Files" );
if ( !inProject )
filterlist << i18n( "*.pro|QMAKE Project Files" );
- QStringList list = manager.featureList();
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list = manager.featureList();
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
filterlist << *it;
LanguageInterface *iface = MetaDataBase::languageInterface( project->language() );
if ( iface ) {
@@ -1225,26 +1225,26 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons
filterlist << filter;
}
- QString filters = filterlist.join( "\n" );
+ TQString filters = filterlist.join( "\n" );
- QStringList filenames;
+ TQStringList filenames;
if ( fn.isEmpty() ) {
if ( !inProject ) {
- QString f = KFileDialog::getOpenFileName( QString::null, filters, this, /*0,*/
+ TQString f = KFileDialog::getOpenFileName( TQString::null, filters, this, /*0,*/
i18n("Open" )/*, &lastOpenFilter */);
filenames << f;
} else {
- filenames = KFileDialog::getOpenFileNames( QString::null, filters, this, /*0,*/
+ filenames = KFileDialog::getOpenFileNames( TQString::null, filters, this, /*0,*/
i18n("Add")/*, &lastOpenFilter */);
}
} else {
filenames << fn;
}
- for ( QStringList::Iterator fit = filenames.begin(); fit != filenames.end(); ++fit ) {
- QString filename = *fit;
+ for ( TQStringList::Iterator fit = filenames.begin(); fit != filenames.end(); ++fit ) {
+ TQString filename = *fit;
if ( !filename.isEmpty() ) {
- QFileInfo fi( filename );
+ TQFileInfo fi( filename );
if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) {
addRecentlyOpened( filename, recentlyProjects );
@@ -1261,8 +1261,8 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons
sf = new SourceFile( project->makeRelative( filename ), FALSE, project );
editSource( sf );
} else if ( extension.isEmpty() ) {
- QString filter;
- for ( QStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) {
+ TQString filter;
+ for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) {
if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) {
filter = *it2;
break;
@@ -1277,7 +1277,7 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons
return;
}
statusMessage( i18n( "Importing '%1' using import filter ...").arg( filename ) );
- QStringList list = iface->import( filter, filename );
+ TQStringList list = iface->import( filter, filename );
iface->release();
if ( list.isEmpty() ) {
statusMessage( i18n( "Nothing to load in '%1'").arg( filename )/*, 3000*/ );
@@ -1286,9 +1286,9 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons
if ( !inProject )
setCurrentProject( eProject );
addRecentlyOpened( filename, recentlyFiles );
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
openFormWindow( *it, FALSE );
- QFile::remove( *it );
+ TQFile::remove( *it );
}
statusBar()->clear();
}
@@ -1297,19 +1297,19 @@ void MainWindow::fileOpen( const QString &filter, const QString &extension, cons
}
}
-FormWindow *MainWindow::openFormWindow( const QString &filename, bool validFileName, FormFile *ff )
+FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFileName, FormFile *ff )
{
if ( filename.isEmpty() )
return 0;
bool makeNew = FALSE;
- if ( !QFile::exists( filename ) ) {
+ if ( !TQFile::exists( filename ) ) {
makeNew = TRUE;
} else {
- QFile f( filename );
+ TQFile f( filename );
f.open( IO_ReadOnly );
- QTextStream ts( &f );
+ TQTextStream ts( &f );
makeNew = ts.read().length() < 2;
}
if ( makeNew ) {
@@ -1328,20 +1328,20 @@ FormWindow *MainWindow::openFormWindow( const QString &filename, bool validFileN
if ( ff2 )
ff = ff2;
- QApplication::setOverrideCursor( WaitCursor );
+ TQApplication::setOverrideCursor( WaitCursor );
Resource resource( this );
if ( !ff )
ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject );
bool b = resource.load( ff ) && (FormWindow*)resource.widget();
if ( !validFileName && resource.widget() )
- ( (FormWindow*)resource.widget() )->setFileName( QString::null );
- QApplication::restoreOverrideCursor();
+ ( (FormWindow*)resource.widget() )->setFileName( TQString::null );
+ TQApplication::restoreOverrideCursor();
if ( b ) {
rebuildCustomWidgetGUI();
statusMessage( i18n( "Loaded file '%1'").arg( filename )/*, 3000 */);
} else {
statusMessage( i18n( "Failed to load file '%1'").arg( filename )/*, 5000 */);
- QMessageBox::information( this, i18n("Load File"), i18n("Could not load file '%1'.").arg( filename ) );
+ TQMessageBox::information( this, i18n("Load File"), i18n("Could not load file '%1'.").arg( filename ) );
delete ff;
}
return (FormWindow*)resource.widget();
@@ -1365,7 +1365,7 @@ bool MainWindow::fileSaveForm()
FormWindow *fw = 0;
- QWidget *w = qWorkspace()->activeWindow();
+ TQWidget *w = qWorkspace()->activeWindow();
if ( w ) {
if ( ::qt_cast<SourceEditor*>(w) ) {
SourceEditor *se = (SourceEditor*)w;
@@ -1382,7 +1382,7 @@ bool MainWindow::fileSaveForm()
fw = formWindow();
if ( !fw || !fw->formFile()->save() )
return FALSE;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return TRUE;
}
@@ -1397,7 +1397,7 @@ bool MainWindow::fileSaveAs()
{
statusMessage( i18n( "Enter a filename..." ) );
- QWidget *w = qworkspace->activeWindow();
+ TQWidget *w = qworkspace->activeWindow();
if ( !w )
return TRUE;
if ( ::qt_cast<FormWindow*>(w) )
@@ -1409,7 +1409,7 @@ bool MainWindow::fileSaveAs()
void MainWindow::fileSaveAll()
{
- for ( QMap<QAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it )
+ for ( TQMap<TQAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it )
(*it)->save();
}
@@ -1425,54 +1425,54 @@ void MainWindow::fileCreateTemplate()
}
for ( i = 0; i < WidgetDatabase::count(); ++i ) {
if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) &&
- WidgetDatabase::className( i ) != "QTabWidget" && WidgetDatabase::group( i ) != "Temp" ) {
+ WidgetDatabase::className( i ) != "TQTabWidget" && WidgetDatabase::group( i ) != "Temp" ) {
dia.listClass->insertItem( WidgetDatabase::className( i ) );
}
}
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
if ( w->isContainer )
dia.listClass->insertItem( w->className );
}
dia.editName->setText( i18n( "NewTemplate" ) );
- connect( dia.buttonCreate, SIGNAL( clicked() ),
- this, SLOT( createNewTemplate() ) );
+ connect( dia.buttonCreate, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( createNewTemplate() ) );
dia.exec();
}
void MainWindow::createNewTemplate()
{
CreateTemplate *dia = (CreateTemplate*)sender()->parent();
- QString fn = dia->editName->text();
- QString cn = dia->listClass->currentText();
+ TQString fn = dia->editName->text();
+ TQString cn = dia->listClass->currentText();
if ( fn.isEmpty() || cn.isEmpty() ) {
- QMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) );
+ TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) );
return;
}
- QStringList templRoots;
+ TQStringList templRoots;
const char *qtdir = getenv( "QTDIR" );
if(qtdir)
templRoots << qtdir;
templRoots << qInstallPathData();
if(qtdir) //try the tools/designer directory last!
- templRoots << (QString(qtdir) + "/tools/designer");
- QFile f;
- for ( QStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) {
- if ( QFile::exists( (*it) + "/templates/" )) {
- QString tmpfn = (*it) + "/templates/" + fn + ".ui";
+ templRoots << (TQString(qtdir) + "/tools/designer");
+ TQFile f;
+ for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) {
+ if ( TQFile::exists( (*it) + "/templates/" )) {
+ TQString tmpfn = (*it) + "/templates/" + fn + ".ui";
f.setName(tmpfn);
if(f.open(IO_WriteOnly))
break;
}
}
if ( !f.isOpen() ) {
- QMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) );
+ TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) );
return;
}
- QTextStream ts( &f );
+ TQTextStream ts( &f );
ts << "<!DOCTYPE UI><UI>" << endl;
ts << "<widget>" << endl;
@@ -1550,8 +1550,8 @@ void MainWindow::editPaste()
if ( !formWindow() )
return;
- QWidget *w = formWindow()->mainContainer();
- QWidgetList l( formWindow()->selectedWidgets() );
+ TQWidget *w = formWindow()->mainContainer();
+ TQWidgetList l( formWindow()->selectedWidgets() );
if ( l.count() == 1 ) {
w = l.first();
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ||
@@ -1565,7 +1565,7 @@ void MainWindow::editPaste()
hierarchyView->widgetInserted( 0 );
formWindow()->commandHistory()->setModified( TRUE );
} else {
- QMessageBox::information( this, i18n( "Paste Error" ),
+ TQMessageBox::information( this, i18n( "Paste Error" ),
i18n( "Cannot paste widgets. Designer could not find a container\n"
"to paste into which does not contain a layout. Break the layout\n"
"of the container you want to paste into and select this container\n"
@@ -1653,8 +1653,8 @@ void MainWindow::editLayoutContainerVertical()
{
if ( !formWindow() )
return;
- QWidget *w = formWindow()->mainContainer();
- QWidgetList l( formWindow()->selectedWidgets() );
+ TQWidget *w = formWindow()->mainContainer();
+ TQWidgetList l( formWindow()->selectedWidgets() );
if ( l.count() == 1 )
w = l.first();
if ( w )
@@ -1665,8 +1665,8 @@ void MainWindow::editLayoutContainerHorizontal()
{
if ( !formWindow() )
return;
- QWidget *w = formWindow()->mainContainer();
- QWidgetList l( formWindow()->selectedWidgets() );
+ TQWidget *w = formWindow()->mainContainer();
+ TQWidgetList l( formWindow()->selectedWidgets() );
if ( l.count() == 1 )
w = l.first();
if ( w )
@@ -1677,8 +1677,8 @@ void MainWindow::editLayoutContainerGrid()
{
if ( !formWindow() )
return;
- QWidget *w = formWindow()->mainContainer();
- QWidgetList l( formWindow()->selectedWidgets() );
+ TQWidget *w = formWindow()->mainContainer();
+ TQWidgetList l( formWindow()->selectedWidgets() );
if ( l.count() == 1 )
w = l.first();
if ( w )
@@ -1689,7 +1689,7 @@ void MainWindow::editBreakLayout()
{
if ( !formWindow() || !breakLayout )
return;
- QWidget *w = formWindow()->mainContainer();
+ TQWidget *w = formWindow()->mainContainer();
if ( formWindow()->currentWidget() )
w = formWindow()->currentWidget();
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ||
@@ -1697,7 +1697,7 @@ void MainWindow::editBreakLayout()
formWindow()->breakLayout( w );
return;
} else {
- QWidgetList widgets = formWindow()->selectedWidgets();
+ TQWidgetList widgets = formWindow()->selectedWidgets();
for ( w = widgets.first(); w; w = widgets.next() ) {
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ||
w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout )
@@ -1757,9 +1757,9 @@ SourceEditor *MainWindow::openSourceEditor()
if ( !formWindow() )
return 0;
- QString lang = currentProject->language();
+ TQString lang = currentProject->language();
if ( !MetaDataBase::hasEditor( lang ) ) {
- QMessageBox::information( this, i18n( "Edit Source" ),
+ TQMessageBox::information( this, i18n( "Edit Source" ),
i18n( "There is no plugin for editing %1 code installed.\n"
"Note: Plugins are not available in static Qt configurations." ).arg( lang ) );
return 0;
@@ -1780,9 +1780,9 @@ SourceEditor *MainWindow::openSourceEditor()
SourceEditor *MainWindow::editSource( SourceFile *f )
{
- QString lang = currentProject->language();
+ TQString lang = currentProject->language();
if ( !MetaDataBase::hasEditor( lang ) ) {
- QMessageBox::information( this, i18n( "Edit Source" ),
+ TQMessageBox::information( this, i18n( "Edit Source" ),
i18n( "There is no plugin for editing %1 code installed.\n"
"Note: Plugins are not available in static Qt configurations." ).arg( lang ) );
return 0;
@@ -1798,8 +1798,8 @@ SourceEditor *MainWindow::editSource( SourceFile *f )
return editor;
}
-SourceEditor *MainWindow::createSourceEditor( QObject *object, Project *project,
- const QString &lang, const QString &func,
+SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project,
+ const TQString &lang, const TQString &func,
bool rereadSource )
{
SourceEditor *editor = 0;
@@ -1810,14 +1810,14 @@ SourceEditor *MainWindow::createSourceEditor( QObject *object, Project *project,
LanguageInterface *lIface = MetaDataBase::languageInterface( lang );
if ( !lIface )
return 0;
- QApplication::setOverrideCursor( WaitCursor );
+ TQApplication::setOverrideCursor( WaitCursor );
editor = new SourceEditor( qWorkspace(), eIface, lIface );
eIface->release();
lIface->release();
editor->setLanguage( lang );
sourceEditors.append( editor );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( editor->object() != object )
editor->setObject( object, project );
@@ -1870,7 +1870,7 @@ void MainWindow::editPreferences()
statusMessage( i18n( "Edit preferences..." ) );
Preferences *dia = new Preferences( this, 0, TRUE );
prefDia = dia;
- connect( dia->helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
dia->buttonColor->setEditor( StyledButton::ColorEditor );
dia->buttonPixmap->setEditor( StyledButton::PixmapEditor );
dia->groupBoxGrid->setChecked( sGrid );
@@ -1880,7 +1880,7 @@ void MainWindow::editPreferences()
dia->checkBoxWorkspace->setChecked( restoreConfig );
dia->checkBoxTextLabels->setChecked( usesTextLabel() );
dia->buttonColor->setColor( qworkspace->backgroundColor() );
- QString pluginPaths = QApplication::libraryPaths().join("\n");
+ TQString pluginPaths = TQApplication::libraryPaths().join("\n");
dia->textEditPluginPaths->setText(pluginPaths);
if ( qworkspace->backgroundPixmap() )
dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() );
@@ -1895,33 +1895,33 @@ void MainWindow::editPreferences()
int h = autoSaveInterval / 3600;
int m = ( autoSaveInterval - h * 3600 ) / 60;
int s = autoSaveInterval - ( h * 3600 + m * 60 );
- QTime t( h, m, s );
+ TQTime t( h, m, s );
dia->timeEditAutoSave->setTime( t );
SenderObject *senderObject = new SenderObject( designerInterface() );
- QValueList<Tab>::Iterator it;
+ TQValueList<Tab>::Iterator it;
for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) {
Tab t = *it;
dia->tabWidget->addTab( t.w, t.title );
if ( t.receiver ) {
- connect( dia->buttonOk, SIGNAL( clicked() ), senderObject, SLOT( emitAcceptSignal() ) );
- connect( senderObject, SIGNAL( acceptSignal( QUnknownInterface * ) ), t.receiver, t.accept_slot );
- connect( senderObject, SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot );
+ connect( dia->buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) );
+ connect( senderObject, TQT_SIGNAL( acceptSignal( QUnknownInterface * ) ), t.receiver, t.accept_slot );
+ connect( senderObject, TQT_SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot );
senderObject->emitInitSignal();
- disconnect( senderObject, SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot );
+ disconnect( senderObject, TQT_SIGNAL( initSignal( QUnknownInterface * ) ), t.receiver, t.init_slot );
}
}
- if ( dia->exec() == QDialog::Accepted ) {
+ if ( dia->exec() == TQDialog::Accepted ) {
setSnapGrid( dia->checkBoxSnapGrid->isChecked() );
setShowGrid( dia->groupBoxGrid->isChecked() );
- setGrid( QPoint( dia->spinGridX->value(),
+ setGrid( TQPoint( dia->spinGridX->value(),
dia->spinGridY->value() ) );
restoreConfig = dia->checkBoxWorkspace->isChecked();
setUsesTextLabel( dia->checkBoxTextLabels->isChecked() );
if (dia->textEditPluginPaths->isModified()) {
pluginPaths = dia->textEditPluginPaths->text();
- QApplication::setLibraryPaths(QStringList::split("\n", pluginPaths));
+ TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths));
savePluginPaths = TRUE;
}
@@ -1936,7 +1936,7 @@ void MainWindow::editPreferences()
databaseAutoEdit = !dia->checkAutoEdit->isChecked();
shStartDialog = dia->checkBoxStartDialog->isChecked();
autoSaveEnabled = dia->checkBoxAutoSave->isChecked();
- QTime time = dia->timeEditAutoSave->time();
+ TQTime time = dia->timeEditAutoSave->time();
autoSaveInterval = time.hour() * 3600 + time.minute() * 60 + time.second();
if ( autoSaveEnabled )
autoSaveTimer->start( autoSaveInterval * 1000 );
@@ -1947,7 +1947,7 @@ void MainWindow::editPreferences()
for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) {
Tab t = *it;
dia->tabWidget->removePage( t.w );
- t.w->reparent( 0, QPoint(0,0), FALSE );
+ t.w->reparent( 0, TQPoint(0,0), FALSE );
}
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
@@ -2045,7 +2045,7 @@ void MainWindow::toolsCustomWidget()
void MainWindow::toolsConfigure()
{
ConfigToolboxDialog dlg( this );
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return;
rebuildCommonWidgetsToolBoxPage();
}
@@ -2055,7 +2055,7 @@ void MainWindow::showStartDialog()
if ( singleProjectMode() )
return;
for ( int i = 1; i < qApp->argc(); ++i ) {
- QString arg = qApp->argv()[i];
+ TQString arg = qApp->argv()[i];
if ( arg[0] != '-' )
return;
}
diff --git a/kdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp
index 33cf923e..0c123886 100644
--- a/kdevdesigner/designer/menubareditor.cpp
+++ b/kdevdesigner/designer/menubareditor.cpp
@@ -24,14 +24,14 @@
**
**********************************************************************/
-#include <qaction.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qdragobject.h>
-#include <qlineedit.h>
-#include <qmainwindow.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqaction.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqdragobject.h>
+#include <tqlineedit.h>
+#include <tqmainwindow.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
#include "command.h"
#include "formwindow.h"
#include "menubareditor.h"
@@ -39,7 +39,7 @@
#include <klocale.h>
-extern void find_accel( const QString &txt, QMap<QChar, QWidgetList > &accels, QWidget *w );
+extern void find_accel( const TQString &txt, TQMap<TQChar, TQWidgetList > &accels, TQWidget *w );
// Drag Object Declaration -------------------------------------------
@@ -47,35 +47,35 @@ class MenuBarEditorItemPtrDrag : public QStoredDrag
{
public:
MenuBarEditorItemPtrDrag( MenuBarEditorItem * item,
- QWidget * parent = 0,
+ TQWidget * parent = 0,
const char * name = 0 );
~MenuBarEditorItemPtrDrag() {};
- static bool canDecode( QDragMoveEvent * e );
- static bool decode( QDropEvent * e, MenuBarEditorItem ** i );
+ static bool canDecode( TQDragMoveEvent * e );
+ static bool decode( TQDropEvent * e, MenuBarEditorItem ** i );
};
// Drag Object Implementation ---------------------------------------
MenuBarEditorItemPtrDrag::MenuBarEditorItemPtrDrag( MenuBarEditorItem * item,
- QWidget * parent,
+ TQWidget * parent,
const char * name )
- : QStoredDrag( "qt/menubareditoritemptr", parent, name )
+ : TQStoredDrag( "qt/menubareditoritemptr", parent, name )
{
- QByteArray data( sizeof( Q_LONG ) );
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data( sizeof( Q_LONG ) );
+ TQDataStream stream( data, IO_WriteOnly );
stream << ( Q_LONG ) item;
setEncodedData( data );
}
-bool MenuBarEditorItemPtrDrag::canDecode( QDragMoveEvent * e )
+bool MenuBarEditorItemPtrDrag::canDecode( TQDragMoveEvent * e )
{
return e->provides( "qt/menubareditoritemptr" );
}
-bool MenuBarEditorItemPtrDrag::decode( QDropEvent * e, MenuBarEditorItem ** i )
+bool MenuBarEditorItemPtrDrag::decode( TQDropEvent * e, MenuBarEditorItem ** i )
{
- QByteArray data = e->encodedData( "qt/menubareditoritemptr" );
- QDataStream stream( data, IO_ReadOnly );
+ TQByteArray data = e->encodedData( "qt/menubareditoritemptr" );
+ TQDataStream stream( data, IO_ReadOnly );
if ( !data.size() )
return FALSE;
@@ -89,8 +89,8 @@ bool MenuBarEditorItemPtrDrag::decode( QDropEvent * e, MenuBarEditorItem ** i )
// MenuBarEditorItem ---------------------------------------------------
-MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, QObject * parent, const char * name )
- : QObject( parent, name ),
+MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, TQObject * parent, const char * name )
+ : TQObject( parent, name ),
menuBar( bar ),
popupMenu( 0 ),
visible( TRUE ),
@@ -99,8 +99,8 @@ MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, QObject * parent, con
{ }
MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar,
- QObject * parent, const char * name )
- : QObject( parent, name ),
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ),
menuBar( bar ),
popupMenu( menu ),
visible( TRUE ),
@@ -110,9 +110,9 @@ MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * ba
text = menu->name();
}
-MenuBarEditorItem::MenuBarEditorItem( QActionGroup * actionGroup, MenuBarEditor * bar,
- QObject * parent, const char * name )
- : QObject( parent, name ),
+MenuBarEditorItem::MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor * bar,
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ),
menuBar( bar ),
popupMenu( 0 ),
visible( TRUE ),
@@ -124,8 +124,8 @@ MenuBarEditorItem::MenuBarEditorItem( QActionGroup * actionGroup, MenuBarEditor
popupMenu->insert( actionGroup );
}
-MenuBarEditorItem::MenuBarEditorItem( MenuBarEditorItem * item, QObject * parent, const char * name )
- : QObject( parent, name ),
+MenuBarEditorItem::MenuBarEditorItem( MenuBarEditorItem * item, TQObject * parent, const char * name )
+ : TQObject( parent, name ),
menuBar( item->menuBar ),
popupMenu( 0 ),
text( item->text ),
@@ -141,8 +141,8 @@ MenuBarEditorItem::MenuBarEditorItem( MenuBarEditorItem * item, QObject * parent
int MenuBarEditor::clipboardOperation = 0;
MenuBarEditorItem * MenuBarEditor::clipboardItem = 0;
-MenuBarEditor::MenuBarEditor( FormWindow * fw, QWidget * parent, const char * name )
- : QMenuBar( parent, name ),
+MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * name )
+ : TQMenuBar( parent, name ),
formWnd( fw ),
draggedItem( 0 ),
currentIndex( 0 ),
@@ -157,15 +157,15 @@ MenuBarEditor::MenuBarEditor( FormWindow * fw, QWidget * parent, const char * na
addItem.setMenuText( i18n("new menu") );
addSeparator.setMenuText( i18n("new separator") );
- lineEdit = new QLineEdit( this, "menubar lineedit" );
+ lineEdit = new TQLineEdit( this, "menubar lineedit" );
lineEdit->hide();
- lineEdit->setFrameStyle(QFrame::Plain | QFrame::NoFrame);
+ lineEdit->setFrameStyle(TQFrame::Plain | TQFrame::NoFrame);
lineEdit->polish();
lineEdit->setBackgroundMode(PaletteButton);
lineEdit->setBackgroundOrigin(ParentOrigin);
lineEdit->installEventFilter( this );
- dropLine = new QWidget( this, "menubar dropline", Qt::WStyle_NoBorder | WStyle_StaysOnTop );
+ dropLine = new TQWidget( this, "menubar dropline", Qt::WStyle_NoBorder | WStyle_StaysOnTop );
dropLine->setBackgroundColor( Qt::red );
dropLine->hide();
@@ -185,7 +185,7 @@ FormWindow * MenuBarEditor::formWindow()
MenuBarEditorItem * MenuBarEditor::createItem( int index, bool addToCmdStack )
{
MenuBarEditorItem * i =
- new MenuBarEditorItem( new PopupMenuEditor( formWnd, ( QWidget * ) parent() ), this );
+ new MenuBarEditorItem( new PopupMenuEditor( formWnd, ( TQWidget * ) parent() ), this );
if ( addToCmdStack ) {
AddMenuCommand * cmd = new AddMenuCommand( i18n( "Add Menu" ), formWnd, this, i, index );
formWnd->commandHistory()->addCommand( cmd );
@@ -215,7 +215,7 @@ void MenuBarEditor::insertItem( MenuBarEditorItem * item, int index )
update();
}
-void MenuBarEditor::insertItem( QString text, PopupMenuEditor * menu, int index )
+void MenuBarEditor::insertItem( TQString text, PopupMenuEditor * menu, int index )
{
MenuBarEditorItem * item = new MenuBarEditorItem( menu, this );
if ( !text.isNull() )
@@ -223,7 +223,7 @@ void MenuBarEditor::insertItem( QString text, PopupMenuEditor * menu, int index
insertItem( item, index );
}
-void MenuBarEditor::insertItem( QString text, QActionGroup * group, int index )
+void MenuBarEditor::insertItem( TQString text, TQActionGroup * group, int index )
{
MenuBarEditorItem * item = new MenuBarEditorItem( group, this );
if ( !text.isNull() )
@@ -289,14 +289,14 @@ int MenuBarEditor::findItem( PopupMenuEditor * menu )
return -1;
}
-int MenuBarEditor::findItem( QPoint & pos )
+int MenuBarEditor::findItem( TQPoint & pos )
{
int x = borderSize();
int dx = 0;
int y = 0;
int w = width();
- QSize s;
- QRect r;
+ TQSize s;
+ TQRect r;
MenuBarEditorItem * i = itemList.first();
@@ -312,7 +312,7 @@ int MenuBarEditor::findItem( QPoint & pos )
x = borderSize();
}
- r = QRect( x, y, s.width(), s.height() );
+ r = TQRect( x, y, s.width(), s.height() );
if ( r.contains( pos ) )
return itemList.at();
@@ -332,7 +332,7 @@ int MenuBarEditor::findItem( QPoint & pos )
x = borderSize();
}
- r = QRect( x, y, s.width(), s.height() );
+ r = TQRect( x, y, s.width(), s.height() );
if ( r.contains( pos ) )
return itemList.count();
@@ -437,7 +437,7 @@ void MenuBarEditor::showLineEdit( int index )
// open edit field for item name
lineEdit->setText( i->menuText() );
lineEdit->selectAll();
- QPoint pos = itemPos( index );
+ TQPoint pos = itemPos( index );
lineEdit->move( pos.x() + borderSize(), pos.y() - ( borderSize() / 2 ) );
lineEdit->resize( itemSize( i ) );
lineEdit->show();
@@ -454,7 +454,7 @@ void MenuBarEditor::showItem( int index )
if ( i->isSeparator() || draggedItem )
return;
PopupMenuEditor * m = i->menu();
- QPoint pos = itemPos( index );
+ TQPoint pos = itemPos( index );
m->move( pos.x(), pos.y() + itemHeight - 1 );
m->raise();
m->show();
@@ -502,9 +502,9 @@ void MenuBarEditor::deleteItem( int index )
}
}
-QSize MenuBarEditor::sizeHint() const
+TQSize MenuBarEditor::sizeHint() const
{
- return QSize( parentWidget()->width(), heightForWidth( parentWidget()->width() ) );
+ return TQSize( parentWidget()->width(), heightForWidth( parentWidget()->width() ) );
}
int MenuBarEditor::heightForWidth( int max_width ) const
@@ -513,7 +513,7 @@ int MenuBarEditor::heightForWidth( int max_width ) const
int x = borderSize();
int y = 0;
- QPainter p( this );
+ TQPainter p( this );
that->itemHeight = that->itemSize( &(that->addItem) ).height();
MenuBarEditorItem * i = that->itemList.first();
@@ -531,16 +531,16 @@ int MenuBarEditor::heightForWidth( int max_width ) const
void MenuBarEditor::show()
{
- QWidget::show();
+ TQWidget::show();
resizeInternals();
- QResizeEvent e( parentWidget()->size(), parentWidget()->size() );
- QApplication::sendEvent( parentWidget(), &e );
+ TQResizeEvent e( parentWidget()->size(), parentWidget()->size() );
+ TQApplication::sendEvent( parentWidget(), &e );
}
-void MenuBarEditor::checkAccels( QMap<QChar, QWidgetList > &accels )
+void MenuBarEditor::checkAccels( TQMap<TQChar, TQWidgetList > &accels )
{
- QString t;
+ TQString t;
MenuBarEditorItem * i = itemList.first();
while ( i ) {
t = i->menuText();
@@ -569,28 +569,28 @@ void MenuBarEditor::paste()
// protected
-bool MenuBarEditor::eventFilter( QObject * o, QEvent * e )
+bool MenuBarEditor::eventFilter( TQObject * o, TQEvent * e )
{
- if ( o == lineEdit && e->type() == QEvent::FocusOut ) {
+ if ( o == lineEdit && e->type() == TQEvent::FocusOut ) {
leaveEditMode();
lineEdit->hide();
update();
- } else if ( e->type() == QEvent::LayoutHint ) {
+ } else if ( e->type() == TQEvent::LayoutHint ) {
resize( sizeHint() );
}
- return QMenuBar::eventFilter( o, e );
+ return TQMenuBar::eventFilter( o, e );
}
-void MenuBarEditor::paintEvent( QPaintEvent * )
+void MenuBarEditor::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
- QRect r = rect();
- style().drawPrimitive( QStyle::PE_PanelMenuBar, &p,
+ TQPainter p( this );
+ TQRect r = rect();
+ style().drawPrimitive( TQStyle::PE_PanelMenuBar, &p,
r, colorGroup() );
drawItems( p );
}
-void MenuBarEditor::mousePressEvent( QMouseEvent * e )
+void MenuBarEditor::mousePressEvent( TQMouseEvent * e )
{
mousePressPos = e->pos();
hideItem();
@@ -601,7 +601,7 @@ void MenuBarEditor::mousePressEvent( QMouseEvent * e )
e->accept();
}
-void MenuBarEditor::mouseDoubleClickEvent( QMouseEvent * e )
+void MenuBarEditor::mouseDoubleClickEvent( TQMouseEvent * e )
{
mousePressPos = e->pos();
currentIndex = findItem( mousePressPos );
@@ -614,7 +614,7 @@ void MenuBarEditor::mouseDoubleClickEvent( QMouseEvent * e )
}
}
-void MenuBarEditor::mouseMoveEvent( QMouseEvent * e )
+void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
{
if ( e->state() & Qt::LeftButton ) {
if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) {
@@ -647,7 +647,7 @@ void MenuBarEditor::mouseMoveEvent( QMouseEvent * e )
// we will have two instances of the same pointer
// in the list.
itemList.find( draggedItem );
- QLNode * node = itemList.currentNode();
+ TQLNode * node = itemList.currentNode();
dropConfirmed = FALSE;
d->dragCopy(); // dragevents and stuff happens
if ( draggedItem ) { // item was not dropped
@@ -673,7 +673,7 @@ void MenuBarEditor::mouseMoveEvent( QMouseEvent * e )
}
}
-void MenuBarEditor::dragEnterEvent( QDragEnterEvent * e )
+void MenuBarEditor::dragEnterEvent( TQDragEnterEvent * e )
{
if ( MenuBarEditorItemPtrDrag::canDecode( e ) ) {
e->accept();
@@ -681,15 +681,15 @@ void MenuBarEditor::dragEnterEvent( QDragEnterEvent * e )
}
}
-void MenuBarEditor::dragLeaveEvent( QDragLeaveEvent * )
+void MenuBarEditor::dragLeaveEvent( TQDragLeaveEvent * )
{
dropLine->hide();
}
-void MenuBarEditor::dragMoveEvent( QDragMoveEvent * e )
+void MenuBarEditor::dragMoveEvent( TQDragMoveEvent * e )
{
- QPoint pos = e->pos();
+ TQPoint pos = e->pos();
dropLine->move( snapToItem( pos ) );
int idx = findItem( pos );
@@ -700,7 +700,7 @@ void MenuBarEditor::dragMoveEvent( QDragMoveEvent * e )
}
}
-void MenuBarEditor::dropEvent( QDropEvent * e )
+void MenuBarEditor::dropEvent( TQDropEvent * e )
{
MenuBarEditorItem * i = 0;
@@ -714,7 +714,7 @@ void MenuBarEditor::dropEvent( QDropEvent * e )
dropLine->hide();
}
-void MenuBarEditor::keyPressEvent( QKeyEvent * e )
+void MenuBarEditor::keyPressEvent( TQKeyEvent * e )
{
if ( lineEdit->isHidden() ) { // In navigation mode
switch ( e->key() ) {
@@ -789,7 +789,7 @@ void MenuBarEditor::keyPressEvent( QKeyEvent * e )
default:
if ( e->ascii() >= 32 || e->ascii() == 0 ) {
showLineEdit();
- QApplication::sendEvent( lineEdit, e );
+ TQApplication::sendEvent( lineEdit, e );
e->accept();
} else {
e->ignore();
@@ -815,9 +815,9 @@ void MenuBarEditor::keyPressEvent( QKeyEvent * e )
update();
}
-void MenuBarEditor::focusOutEvent( QFocusEvent * e )
+void MenuBarEditor::focusOutEvent( TQFocusEvent * e )
{
- QWidget * fw = qApp->focusWidget();
+ TQWidget * fw = qApp->focusWidget();
if ( e->lostFocus() && !::qt_cast<PopupMenuEditor*>(fw) )
hideItem();
update();
@@ -829,9 +829,9 @@ void MenuBarEditor::resizeInternals()
updateGeometry();
}
-void MenuBarEditor::drawItems( QPainter & p )
+void MenuBarEditor::drawItems( TQPainter & p )
{
- QPoint pos( borderSize(), 0 );
+ TQPoint pos( borderSize(), 0 );
uint c = 0;
p.setPen( colorGroup().buttonText() );
@@ -849,10 +849,10 @@ void MenuBarEditor::drawItems( QPainter & p )
drawItem( p, &addSeparator, c, pos );
}
-void MenuBarEditor::drawItem( QPainter & p,
+void MenuBarEditor::drawItem( TQPainter & p,
MenuBarEditorItem * i,
int idx,
- QPoint & pos )
+ TQPoint & pos )
{
int w = itemSize( i ).width();
@@ -865,7 +865,7 @@ void MenuBarEditor::drawItem( QPainter & p,
if ( i->isSeparator() ) {
drawSeparator( p, pos );
} else {
- int flags = QPainter::AlignLeft | QPainter::AlignVCenter |
+ int flags = TQPainter::AlignLeft | TQPainter::AlignVCenter |
Qt::ShowPrefix | Qt::SingleLine;
p.drawText( pos.x() + borderSize(), pos.y(), w - borderSize(), itemHeight,
flags, i->menuText() );
@@ -877,7 +877,7 @@ void MenuBarEditor::drawItem( QPainter & p,
pos.rx() += w;
}
-void MenuBarEditor::drawSeparator( QPainter & p, QPoint & pos )
+void MenuBarEditor::drawSeparator( TQPainter & p, TQPoint & pos )
{
p.save();
p.setPen( darkBlue );
@@ -892,17 +892,17 @@ void MenuBarEditor::drawSeparator( QPainter & p, QPoint & pos )
p.fillRect( left, pos.y() + borderSize() * 2,
separatorWidth - 1, itemHeight - borderSize() * 4,
- QBrush( darkBlue, Qt::Dense5Pattern ) );
+ TQBrush( darkBlue, Qt::Dense5Pattern ) );
p.restore();
}
-QSize MenuBarEditor::itemSize( MenuBarEditorItem * i )
+TQSize MenuBarEditor::itemSize( MenuBarEditorItem * i )
{
if ( i->isSeparator() )
- return QSize( separatorWidth, itemHeight );
- QRect r = fontMetrics().boundingRect( i->menuText().remove( "&") );
- return QSize( r.width() + borderSize() * 2, r.height() + borderSize() * 4 );
+ return TQSize( separatorWidth, itemHeight );
+ TQRect r = fontMetrics().boundingRect( i->menuText().remove( "&") );
+ return TQSize( r.width() + borderSize() * 2, r.height() + borderSize() * 4 );
}
void MenuBarEditor::addItemSizeToCoords( MenuBarEditorItem * i, int & x, int & y, int w )
@@ -915,7 +915,7 @@ void MenuBarEditor::addItemSizeToCoords( MenuBarEditorItem * i, int & x, int & y
x += dx;
}
-QPoint MenuBarEditor::itemPos( int index )
+TQPoint MenuBarEditor::itemPos( int index )
{
int x = borderSize();
int y = 0;
@@ -933,7 +933,7 @@ QPoint MenuBarEditor::itemPos( int index )
x = borderSize();
}
if ( c == index )
- return QPoint( x, y );
+ return TQPoint( x, y );
x += dx;
c++;
}
@@ -945,10 +945,10 @@ QPoint MenuBarEditor::itemPos( int index )
x = borderSize();
}
- return QPoint( x, y );
+ return TQPoint( x, y );
}
-QPoint MenuBarEditor::snapToItem( const QPoint & pos )
+TQPoint MenuBarEditor::snapToItem( const TQPoint & pos )
{
int x = borderSize();
int y = 0;
@@ -966,17 +966,17 @@ QPoint MenuBarEditor::snapToItem( const QPoint & pos )
if ( pos.y() > y &&
pos.y() < y + itemHeight &&
pos.x() < x + dx / 2 ) {
- return QPoint( x, y );
+ return TQPoint( x, y );
}
x += dx;
}
n = itemList.next();
}
- return QPoint( x, y );
+ return TQPoint( x, y );
}
-void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const QPoint & pos )
+void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const TQPoint & pos )
{
int x = borderSize();
int y = 0;
@@ -1110,15 +1110,15 @@ void MenuBarEditor::leaveEditMode()
showItem();
}
-QPixmap MenuBarEditor::createTextPixmap( const QString &text )
+TQPixmap MenuBarEditor::createTextPixmap( const TQString &text )
{
- QSize sz( fontMetrics().boundingRect( text ).size() );
- QPixmap pix( sz.width() + 20, sz.height() * 2 );
+ TQSize sz( fontMetrics().boundingRect( text ).size() );
+ TQPixmap pix( sz.width() + 20, sz.height() * 2 );
pix.fill( white );
- QPainter p( &pix, this );
+ TQPainter p( &pix, this );
p.drawText( 2, 0, pix.width(), pix.height(), 0, text );
p.end();
- QBitmap bm( pix.size() );
+ TQBitmap bm( pix.size() );
bm.fill( color0 );
p.begin( &bm );
p.setPen( color1 );
diff --git a/kdevdesigner/designer/menubareditor.h b/kdevdesigner/designer/menubareditor.h
index c8dc2b63..699420c3 100644
--- a/kdevdesigner/designer/menubareditor.h
+++ b/kdevdesigner/designer/menubareditor.h
@@ -27,8 +27,8 @@
#ifndef MENUBAREDITOR_H
#define MENUBAREDITOR_H
-#include <qmenubar.h>
-#include <qptrlist.h>
+#include <tqmenubar.h>
+#include <tqptrlist.h>
class PopupMenuEditor;
class MenuBarEditor;
@@ -40,21 +40,21 @@ class MenuBarEditorItem : public QObject
friend class MenuBarEditor;
- MenuBarEditorItem( MenuBarEditor * bar = 0, QObject * parent = 0, const char * name = 0 );
+ MenuBarEditorItem( MenuBarEditor * bar = 0, TQObject * parent = 0, const char * name = 0 );
public:
MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar,
- QObject * parent = 0, const char * name = 0);
- MenuBarEditorItem( QActionGroup * actionGroup, MenuBarEditor * bar,
- QObject * parent = 0, const char * name = 0);
+ TQObject * parent = 0, const char * name = 0);
+ MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor * bar,
+ TQObject * parent = 0, const char * name = 0);
MenuBarEditorItem( MenuBarEditorItem * item,
- QObject * parent = 0, const char * name = 0);
+ TQObject * parent = 0, const char * name = 0);
~MenuBarEditorItem() { };
PopupMenuEditor * menu() { return popupMenu; }
- void setMenuText( const QString t ) { text = t; };
- QString menuText() { return text; }
+ void setMenuText( const TQString t ) { text = t; };
+ TQString menuText() { return text; }
void setVisible( bool enable ) { visible = enable; }
bool isVisible() { return visible; }
@@ -69,7 +69,7 @@ protected:
private:
MenuBarEditor * menuBar;
PopupMenuEditor * popupMenu;
- QString text;
+ TQString text;
uint visible : 1;
uint separator : 1;
uint removable : 1;
@@ -83,15 +83,15 @@ class MenuBarEditor : public QMenuBar
Q_OBJECT
public:
- MenuBarEditor( FormWindow * fw, QWidget * parent = 0, const char * name = 0 );
+ MenuBarEditor( FormWindow * fw, TQWidget * parent = 0, const char * name = 0 );
~MenuBarEditor();
FormWindow * formWindow();
MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = TRUE );
void insertItem( MenuBarEditorItem * item, int index = -1 );
- void insertItem( QString text, PopupMenuEditor * menu, int index = -1 );
- void insertItem( QString text, QActionGroup * group, int index = -1 );
+ void insertItem( TQString text, PopupMenuEditor * menu, int index = -1 );
+ void insertItem( TQString text, TQActionGroup * group, int index = -1 );
void insertSeparator( int index = -1 );
@@ -100,7 +100,7 @@ public:
int findItem( MenuBarEditorItem * item );
int findItem( PopupMenuEditor * menu );
- int findItem( QPoint & pos );
+ int findItem( TQPoint & pos );
MenuBarEditorItem * item( int index = -1 );
@@ -118,14 +118,14 @@ public:
void focusItem( int index = -1 );
void deleteItem( int index = -1 );
- QSize sizeHint() const;
- QSize minimumSize() const { return sizeHint(); }
- QSize minimumSizeHint() const { return sizeHint(); }
+ TQSize sizeHint() const;
+ TQSize minimumSize() const { return sizeHint(); }
+ TQSize minimumSizeHint() const { return sizeHint(); }
int heightForWidth( int max_width ) const;
void show();
- void checkAccels( QMap<QChar, QWidgetList > &accels );
+ void checkAccels( TQMap<TQChar, TQWidgetList > &accels );
public slots:
void cut();
@@ -133,31 +133,31 @@ public slots:
void paste();
protected:
- bool eventFilter( QObject * o, QEvent * e );
- void paintEvent( QPaintEvent * e );
- void mousePressEvent( QMouseEvent * e );
- void mouseDoubleClickEvent( QMouseEvent * e );
- void mouseMoveEvent( QMouseEvent * e );
- void dragEnterEvent( QDragEnterEvent * e );
- void dragLeaveEvent( QDragLeaveEvent * e );
- void dragMoveEvent( QDragMoveEvent * e );
- void dropEvent( QDropEvent * e );
- void keyPressEvent( QKeyEvent * e );
- void focusOutEvent( QFocusEvent * e );
- void resizeEvent( QResizeEvent * e ) { QFrame::resizeEvent( e ); }
+ bool eventFilter( TQObject * o, TQEvent * e );
+ void paintEvent( TQPaintEvent * e );
+ void mousePressEvent( TQMouseEvent * e );
+ void mouseDoubleClickEvent( TQMouseEvent * e );
+ void mouseMoveEvent( TQMouseEvent * e );
+ void dragEnterEvent( TQDragEnterEvent * e );
+ void dragLeaveEvent( TQDragLeaveEvent * e );
+ void dragMoveEvent( TQDragMoveEvent * e );
+ void dropEvent( TQDropEvent * e );
+ void keyPressEvent( TQKeyEvent * e );
+ void focusOutEvent( TQFocusEvent * e );
+ void resizeEvent( TQResizeEvent * e ) { TQFrame::resizeEvent( e ); }
void resizeInternals();
- void drawItems( QPainter & p );
- void drawItem( QPainter & p, MenuBarEditorItem * i, int idx, QPoint & pos );
- void drawSeparator( QPainter & p, QPoint & pos );
+ void drawItems( TQPainter & p );
+ void drawItem( TQPainter & p, MenuBarEditorItem * i, int idx, TQPoint & pos );
+ void drawSeparator( TQPainter & p, TQPoint & pos );
- QSize itemSize( MenuBarEditorItem * i );
+ TQSize itemSize( MenuBarEditorItem * i );
void addItemSizeToCoords( MenuBarEditorItem * i, int & x, int & y, int w );
- QPoint itemPos( int index );
- QPoint snapToItem( const QPoint & pos );
- void dropInPlace( MenuBarEditorItem * i, const QPoint & pos );
+ TQPoint itemPos( int index );
+ TQPoint snapToItem( const TQPoint & pos );
+ void dropInPlace( MenuBarEditorItem * i, const TQPoint & pos );
void safeDec();
void safeInc();
@@ -167,18 +167,18 @@ protected:
void enterEditMode();
void leaveEditMode();
- QPixmap createTextPixmap( const QString &text );
+ TQPixmap createTextPixmap( const TQString &text );
int borderSize() const { return margin() + 4; } // add 4 pixels to the margin
private:
FormWindow * formWnd;
- QLineEdit * lineEdit;
- QWidget * dropLine;
- QPtrList<MenuBarEditorItem> itemList;
+ TQLineEdit * lineEdit;
+ TQWidget * dropLine;
+ TQPtrList<MenuBarEditorItem> itemList;
MenuBarEditorItem addItem;
MenuBarEditorItem addSeparator;
MenuBarEditorItem * draggedItem;
- QPoint mousePressPos;
+ TQPoint mousePressPos;
int currentIndex;
int itemHeight;
int separatorWidth;
diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp
index 3a97b680..5fc1960f 100644
--- a/kdevdesigner/designer/metadatabase.cpp
+++ b/kdevdesigner/designer/metadatabase.cpp
@@ -40,54 +40,54 @@
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qapplication.h>
-#include <qobject.h>
-#include <qlayout.h>
-#include <qptrdict.h>
-#include <qobjectlist.h>
-#include <qstrlist.h>
-#include <qmetaobject.h>
-#include <qwidgetlist.h>
-#include <qmainwindow.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqlayout.h>
+#include <tqptrdict.h>
+#include <tqobjectlist.h>
+#include <tqstrlist.h>
+#include <tqmetaobject.h>
+#include <tqwidgetlist.h>
+#include <tqmainwindow.h>
+#include <tqregexp.h>
#include <private/qpluginmanager_p.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
#include <stdlib.h>
class MetaDataBaseRecord
{
public:
- QObject *object;
- QStringList changedProperties;
- QMap<QString,QVariant> fakeProperties;
- QMap<QString, QString> propertyComments;
+ TQObject *object;
+ TQStringList changedProperties;
+ TQMap<TQString,TQVariant> fakeProperties;
+ TQMap<TQString, TQString> propertyComments;
int spacing, margin;
- QString resizeMode;
- QValueList<MetaDataBase::Connection> connections;
- QValueList<MetaDataBase::Function> functionList;
- QValueList<MetaDataBase::Include> includes;
- QValueList<MetaDataBase::Variable> variables;
- QStringList forwards, sigs;
- QWidgetList tabOrder;
+ TQString resizeMode;
+ TQValueList<MetaDataBase::Connection> connections;
+ TQValueList<MetaDataBase::Function> functionList;
+ TQValueList<MetaDataBase::Include> includes;
+ TQValueList<MetaDataBase::Variable> variables;
+ TQStringList forwards, sigs;
+ TQWidgetList tabOrder;
MetaDataBase::MetaInfo metaInfo;
- QCursor cursor;
- QMap<int, QString> pixmapArguments;
- QMap<int, QString> pixmapKeys;
- QMap<QString, QString> columnFields;
- QValueList<uint> breakPoints;
- QMap<int, QString> breakPointConditions;
- QString exportMacro;
+ TQCursor cursor;
+ TQMap<int, TQString> pixmapArguments;
+ TQMap<int, TQString> pixmapKeys;
+ TQMap<TQString, TQString> columnFields;
+ TQValueList<uint> breakPoints;
+ TQMap<int, TQString> breakPointConditions;
+ TQString exportMacro;
};
-static QPtrDict<MetaDataBaseRecord> *db = 0;
-static QPtrList<MetaDataBase::CustomWidget> *cWidgets = 0;
+static TQPtrDict<MetaDataBaseRecord> *db = 0;
+static TQPtrList<MetaDataBase::CustomWidget> *cWidgets = 0;
static bool doUpdate = TRUE;
-static QStringList langList;
-static QStringList editorLangList;
+static TQStringList langList;
+static TQStringList editorLangList;
static QPluginManager<LanguageInterface> *languageInterfaceManager = 0;
/*!
@@ -106,9 +106,9 @@ MetaDataBase::MetaDataBase()
inline void setupDataBase()
{
if ( !db || !cWidgets ) {
- db = new QPtrDict<MetaDataBaseRecord>( 1481 );
+ db = new TQPtrDict<MetaDataBaseRecord>( 1481 );
db->setAutoDelete( TRUE );
- cWidgets = new QPtrList<MetaDataBase::CustomWidget>;
+ cWidgets = new TQPtrList<MetaDataBase::CustomWidget>;
cWidgets->setAutoDelete( TRUE );
}
}
@@ -121,7 +121,7 @@ void MetaDataBase::clearDataBase()
cWidgets = 0;
}
-void MetaDataBase::addEntry( QObject *o )
+void MetaDataBase::addEntry( TQObject *o )
{
if ( !o )
return;
@@ -136,13 +136,13 @@ void MetaDataBase::addEntry( QObject *o )
WidgetFactory::initChangedProperties( o );
}
-void MetaDataBase::removeEntry( QObject *o )
+void MetaDataBase::removeEntry( TQObject *o )
{
setupDataBase();
db->remove( o );
}
-void MetaDataBase::setPropertyChanged( QObject *o, const QString &property, bool changed )
+void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed )
{
setupDataBase();
if ( o->isA( "PropertyObject" ) ) {
@@ -183,7 +183,7 @@ void MetaDataBase::setPropertyChanged( QObject *o, const QString &property, bool
}
}
-bool MetaDataBase::isPropertyChanged( QObject *o, const QString &property )
+bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property )
{
setupDataBase();
if ( o->isA( "PropertyObject" ) )
@@ -198,21 +198,21 @@ bool MetaDataBase::isPropertyChanged( QObject *o, const QString &property )
return r->changedProperties.findIndex( property ) != -1;
}
-QStringList MetaDataBase::changedProperties( QObject *o )
+TQStringList MetaDataBase::changedProperties( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QStringList();
+ return TQStringList();
}
- QStringList lst( r->changedProperties );
+ TQStringList lst( r->changedProperties );
return lst;
}
-void MetaDataBase::setPropertyComment( QObject *o, const QString &property, const QString &comment )
+void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment )
{
setupDataBase();
if ( o->isA( "PropertyObject" ) ) {
@@ -229,7 +229,7 @@ void MetaDataBase::setPropertyComment( QObject *o, const QString &property, cons
r->propertyComments.insert( property, comment );
}
-QString MetaDataBase::propertyComment( QObject *o, const QString &property )
+TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property )
{
setupDataBase();
if ( o->isA( "PropertyObject" ) )
@@ -238,13 +238,13 @@ QString MetaDataBase::propertyComment( QObject *o, const QString &property )
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QString::null;
+ return TQString::null;
}
return *r->propertyComments.find( property );
}
-void MetaDataBase::setFakeProperty( QObject *o, const QString &property, const QVariant& value )
+void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value )
{
setupDataBase();
if ( o->isA( "PropertyObject" ) ) {
@@ -260,7 +260,7 @@ void MetaDataBase::setFakeProperty( QObject *o, const QString &property, const Q
r->fakeProperties[property] = value;
}
-QVariant MetaDataBase::fakeProperty( QObject * o, const QString &property)
+TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property)
{
setupDataBase();
if ( o->isA( "PropertyObject" ) )
@@ -269,16 +269,16 @@ QVariant MetaDataBase::fakeProperty( QObject * o, const QString &property)
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QVariant();
+ return TQVariant();
}
- QMap<QString, QVariant>::Iterator it = r->fakeProperties.find( property );
+ TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.find( property );
if ( it != r->fakeProperties.end() )
return r->fakeProperties[property];
return WidgetFactory::defaultValue( o, property );
}
-QMap<QString,QVariant>* MetaDataBase::fakeProperties( QObject* o )
+TQMap<TQString,TQVariant>* MetaDataBase::fakeProperties( TQObject* o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -290,7 +290,7 @@ QMap<QString,QVariant>* MetaDataBase::fakeProperties( QObject* o )
return &r->fakeProperties;
}
-void MetaDataBase::setSpacing( QObject *o, int spacing )
+void MetaDataBase::setSpacing( TQObject *o, int spacing )
{
if ( !o )
return;
@@ -303,8 +303,8 @@ void MetaDataBase::setSpacing( QObject *o, int spacing )
}
r->spacing = spacing;
- QLayout * layout = 0;
- WidgetFactory::layoutType( (QWidget*)o, layout );
+ TQLayout * layout = 0;
+ WidgetFactory::layoutType( (TQWidget*)o, layout );
if ( layout ) {
int spadef = 6;
if ( MainWindow::self->formWindow() )
@@ -316,13 +316,13 @@ void MetaDataBase::setSpacing( QObject *o, int spacing )
}
}
-int MetaDataBase::spacing( QObject *o )
+int MetaDataBase::spacing( TQObject *o )
{
if ( !o )
return -1;
setupDataBase();
- if ( ::qt_cast<QMainWindow*>(o) )
- o = ( (QMainWindow*)o )->centralWidget();
+ if ( ::qt_cast<TQMainWindow*>(o) )
+ o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@@ -333,7 +333,7 @@ int MetaDataBase::spacing( QObject *o )
return r->spacing;
}
-void MetaDataBase::setMargin( QObject *o, int margin )
+void MetaDataBase::setMargin( TQObject *o, int margin )
{
if ( !o )
return;
@@ -346,12 +346,12 @@ void MetaDataBase::setMargin( QObject *o, int margin )
}
r->margin = margin;
- QLayout * layout = 0;
- WidgetFactory::layoutType( (QWidget*)o, layout );
+ TQLayout * layout = 0;
+ WidgetFactory::layoutType( (TQWidget*)o, layout );
bool isInnerLayout = TRUE;
- QWidget *widget = (QWidget*)o;
+ TQWidget *widget = (TQWidget*)o;
if ( widget && !::qt_cast<QLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && widget->parentWidget() && ::qt_cast<FormWindow*>(widget->parentWidget()) ) )
@@ -373,13 +373,13 @@ void MetaDataBase::setMargin( QObject *o, int margin )
}
}
-int MetaDataBase::margin( QObject *o )
+int MetaDataBase::margin( TQObject *o )
{
if ( !o )
return -1;
setupDataBase();
- if ( ::qt_cast<QMainWindow*>(o) )
- o = ( (QMainWindow*)o )->centralWidget();
+ if ( ::qt_cast<TQMainWindow*>(o) )
+ o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@@ -389,7 +389,7 @@ int MetaDataBase::margin( QObject *o )
return r->margin;
}
-void MetaDataBase::setResizeMode( QObject *o, const QString &mode )
+void MetaDataBase::setResizeMode( TQObject *o, const TQString &mode )
{
if ( !o )
return;
@@ -404,24 +404,24 @@ void MetaDataBase::setResizeMode( QObject *o, const QString &mode )
r->resizeMode = mode;
}
-QString MetaDataBase::resizeMode( QObject *o )
+TQString MetaDataBase::resizeMode( TQObject *o )
{
if ( !o )
- return QString::null;
+ return TQString::null;
setupDataBase();
- if ( ::qt_cast<QMainWindow*>(o) )
- o = ( (QMainWindow*)o )->centralWidget();
+ if ( ::qt_cast<TQMainWindow*>(o) )
+ o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QString::null;
+ return TQString::null;
}
return r->resizeMode;
}
-void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot, bool addCode )
+void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot, bool addCode )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -439,10 +439,10 @@ void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &s
conn.slot = slot;
r->connections.append( conn );
if ( addCode ) {
- QString rec = receiver->name();
+ TQString rec = receiver->name();
if ( ::qt_cast<FormWindow*>(o) && receiver == ( (FormWindow*)o )->mainContainer() )
rec = "this";
- QString sen = sender->name();
+ TQString sen = sender->name();
if ( ::qt_cast<FormWindow*>(o) && sender == ( (FormWindow*)o )->mainContainer() )
sen = "this";
FormFile *ff = 0;
@@ -454,8 +454,8 @@ void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &s
}
}
-void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot )
+void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -466,7 +466,7 @@ void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString
}
if ( !(sender && receiver) )
return;
- for ( QValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
+ for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
Connection conn = *it;
if ( conn.sender == sender &&
conn.signal == signal &&
@@ -477,14 +477,14 @@ void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString
}
}
if ( ::qt_cast<FormWindow*>(o) ) {
- QString rec = receiver->name();
+ TQString rec = receiver->name();
if ( receiver == ( (FormWindow*)o )->mainContainer() )
rec = "this";
( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot );
}
}
-void MetaDataBase::setupConnections( QObject *o, const QValueList<LanguageInterface::Connection> &conns )
+void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInterface::Connection> &conns )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -501,13 +501,13 @@ void MetaDataBase::setupConnections( QObject *o, const QValueList<LanguageInterf
r->connections.clear();
- for ( QValueList<LanguageInterface::Connection>::ConstIterator cit = conns.begin();
+ for ( TQValueList<LanguageInterface::Connection>::ConstIterator cit = conns.begin();
cit != conns.end(); ++cit ) {
// #### get the correct sender object out of Bla.Blub.sender
- QString senderName = (*cit).sender;
+ TQString senderName = (*cit).sender;
if ( senderName.find( '.' ) != -1 )
senderName = senderName.mid( senderName.findRev( '.' ) + 1 );
- QObject *sender = 0;
+ TQObject *sender = 0;
if ( formfile->formWindow() )
sender = formfile->formWindow()->child( senderName );
if ( !sender && formfile->isFake() )
@@ -519,8 +519,8 @@ void MetaDataBase::setupConnections( QObject *o, const QValueList<LanguageInterf
if ( !sender )
continue;
MetaDataBase::addConnection( formfile->formWindow() ?
- (QObject*)formfile->formWindow() :
- (QObject*)formfile,
+ (TQObject*)formfile->formWindow() :
+ (TQObject*)formfile,
sender,
(*cit).signal.latin1(),
formfile->formWindow() ?
@@ -531,8 +531,8 @@ void MetaDataBase::setupConnections( QObject *o, const QValueList<LanguageInterf
}
}
-bool MetaDataBase::hasConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot )
+bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -542,7 +542,7 @@ bool MetaDataBase::hasConnection( QObject *o, QObject *sender, const QCString &s
return FALSE;
}
- for ( QValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
+ for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
Connection conn = *it;
if ( conn.sender == sender &&
conn.signal == signal &&
@@ -554,31 +554,31 @@ bool MetaDataBase::hasConnection( QObject *o, QObject *sender, const QCString &s
}
-QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o )
+TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QValueList<Connection>();
+ return TQValueList<Connection>();
}
return r->connections;
}
-QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObject *sender,
- QObject *receiver )
+TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQObject *sender,
+ TQObject *receiver )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QValueList<Connection>();
+ return TQValueList<Connection>();
}
- QValueList<Connection>::Iterator it = r->connections.begin();
- QValueList<Connection> ret;
- QValueList<Connection>::Iterator conn;
+ TQValueList<Connection>::Iterator it = r->connections.begin();
+ TQValueList<Connection> ret;
+ TQValueList<Connection>::Iterator conn;
while ( ( conn = it ) != r->connections.end() ) {
++it;
if ( (*conn).sender == sender &&
@@ -589,18 +589,18 @@ QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObj
return ret;
}
-QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObject *object )
+TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQObject *object )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QValueList<Connection>();
+ return TQValueList<Connection>();
}
- QValueList<Connection>::Iterator it = r->connections.begin();
- QValueList<Connection> ret;
- QValueList<Connection>::Iterator conn;
+ TQValueList<Connection>::Iterator it = r->connections.begin();
+ TQValueList<Connection> ret;
+ TQValueList<Connection>::Iterator conn;
while ( ( conn = it ) != r->connections.end() ) {
++it;
if ( (*conn).sender == object ||
@@ -610,7 +610,7 @@ QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObj
return ret;
}
-void MetaDataBase::doConnections( QObject *o )
+void MetaDataBase::doConnections( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -620,9 +620,9 @@ void MetaDataBase::doConnections( QObject *o )
return;
}
- QObject *sender = 0, *receiver = 0;
- QObjectList *l = 0;
- QValueList<Connection>::Iterator it = r->connections.begin();
+ TQObject *sender = 0, *receiver = 0;
+ TQObjectList *l = 0;
+ TQValueList<Connection>::Iterator it = r->connections.begin();
for ( ; it != r->connections.end(); ++it ) {
Connection conn = *it;
if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) {
@@ -647,24 +647,24 @@ void MetaDataBase::doConnections( QObject *o )
receiver = l->first();
delete l;
}
- QString s = "2""%1";
+ TQString s = "2""%1";
s = s.arg( conn.signal );
- QString s2 = "1""%1";
+ TQString s2 = "1""%1";
s2 = s2.arg( conn.slot );
- QStrList signalList = sender->metaObject()->signalNames( TRUE );
- QStrList slotList = receiver->metaObject()->slotNames( TRUE );
+ TQStrList signalList = sender->metaObject()->signalNames( TRUE );
+ TQStrList slotList = receiver->metaObject()->slotNames( TRUE );
// avoid warnings
if ( signalList.find( conn.signal ) == -1 ||
slotList.find( conn.slot ) == -1 )
continue;
- QObject::connect( sender, s, receiver, s2 );
+ TQObject::connect( sender, s, receiver, s2 );
}
}
-bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
+bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -675,7 +675,7 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
}
if ( !onlyCustom ) {
- QStrList slotList = o->metaObject()->slotNames( TRUE );
+ TQStrList slotList = o->metaObject()->slotNames( TRUE );
if ( slotList.find( slot ) != -1 )
return TRUE;
@@ -689,8 +689,8 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
//if ( ::qt_cast<CustomWidget*>(o) ) {
if ( o->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget();
- for ( QValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
- QCString s = (*it).function;
+ for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
+ TQCString s = (*it).function;
if ( !s.data() )
continue;
if ( s == slot )
@@ -699,7 +699,7 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
}
}
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
Function f = *it;
if ( normalizeFunction( f.function ) == normalizeFunction( slot ) && f.type == "slot" )
return TRUE;
@@ -708,7 +708,7 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
return FALSE;
}
-bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot )
+bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -718,8 +718,8 @@ bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot )
return FALSE;
}
- QValueList<Connection> conns = connections( o );
- for ( QValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) {
+ TQValueList<Connection> conns = connections( o );
+ for ( TQValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) {
if ( (*it).slot == slot )
return TRUE;
}
@@ -727,9 +727,9 @@ bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot )
}
-void MetaDataBase::addFunction( QObject *o, const QCString &function, const QString &specifier,
- const QString &access, const QString &type, const QString &language,
- const QString &returnType )
+void MetaDataBase::addFunction( TQObject *o, const TQCString &function, const TQString &specifier,
+ const TQString &access, const TQString &type, const TQString &language,
+ const TQString &returnType )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -746,14 +746,14 @@ void MetaDataBase::addFunction( QObject *o, const QCString &function, const QStr
f.type = type;
f.language = language;
f.returnType = returnType;
- QValueList<MetaDataBase::Function>::Iterator it = r->functionList.find( f );
+ TQValueList<MetaDataBase::Function>::Iterator it = r->functionList.find( f );
if ( it != r->functionList.end() )
r->functionList.remove( it );
r->functionList.append( f );
( (FormWindow*)o )->formFile()->addFunctionCode( f );
}
-void MetaDataBase::setFunctionList( QObject *o, const QValueList<Function> &functionList )
+void MetaDataBase::setFunctionList( TQObject *o, const TQValueList<Function> &functionList )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -765,9 +765,9 @@ void MetaDataBase::setFunctionList( QObject *o, const QValueList<Function> &func
r->functionList = functionList;
}
-void MetaDataBase::removeFunction( QObject *o, const QCString &function, const QString &specifier,
- const QString &access, const QString &type, const QString &language,
- const QString &returnType )
+void MetaDataBase::removeFunction( TQObject *o, const TQCString &function, const TQString &specifier,
+ const TQString &access, const TQString &type, const TQString &language,
+ const TQString &returnType )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -776,7 +776,7 @@ void MetaDataBase::removeFunction( QObject *o, const QCString &function, const Q
o, o->name(), o->className() );
return;
}
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).function ) ==
MetaDataBase::normalizeFunction( function ) &&
(*it).specifier == specifier &&
@@ -791,7 +791,7 @@ void MetaDataBase::removeFunction( QObject *o, const QCString &function, const Q
}
}
-void MetaDataBase::removeFunction( QObject *o, const QString &function )
+void MetaDataBase::removeFunction( TQObject *o, const TQString &function )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -800,7 +800,7 @@ void MetaDataBase::removeFunction( QObject *o, const QString &function )
o, o->name(), o->className() );
return;
}
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
if ( normalizeFunction( (*it).function ) == normalizeFunction( function ) ) {
( (FormWindow*)o )->formFile()->removeFunctionCode( *it );
r->functionList.remove( it );
@@ -809,44 +809,44 @@ void MetaDataBase::removeFunction( QObject *o, const QString &function )
}
}
-QValueList<MetaDataBase::Function> MetaDataBase::functionList( QObject *o, bool onlyFunctions )
+TQValueList<MetaDataBase::Function> MetaDataBase::functionList( TQObject *o, bool onlyFunctions )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QValueList<Function>();
+ return TQValueList<Function>();
}
if ( !onlyFunctions )
return r->functionList;
- QValueList<Function> fList;
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ TQValueList<Function> fList;
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
if ( (*it).type == "function" )
fList.append( *it );
}
return fList;
}
-QValueList<MetaDataBase::Function> MetaDataBase::slotList( QObject *o )
+TQValueList<MetaDataBase::Function> MetaDataBase::slotList( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QValueList<Function>();
+ return TQValueList<Function>();
}
- QValueList<Function> slotList;
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ TQValueList<Function> slotList;
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
if ( (*it).type == "slot" )
slotList.append( *it );
}
return slotList;
}
-void MetaDataBase::changeFunction( QObject *o, const QString &function, const QString &newName,
- const QString &returnType )
+void MetaDataBase::changeFunction( TQObject *o, const TQString &function, const TQString &newName,
+ const TQString &returnType )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -856,7 +856,7 @@ void MetaDataBase::changeFunction( QObject *o, const QString &function, const QS
return;
}
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
Function f = *it;
if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) {
(*it).function = newName;
@@ -867,10 +867,10 @@ void MetaDataBase::changeFunction( QObject *o, const QString &function, const QS
}
}
-void MetaDataBase::changeFunctionAttributes( QObject *o, const QString &oldName, const QString &newName,
- const QString &specifier, const QString &access,
- const QString &type, const QString &language,
- const QString &returnType )
+void MetaDataBase::changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName,
+ const TQString &specifier, const TQString &access,
+ const TQString &type, const TQString &language,
+ const TQString &returnType )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -880,7 +880,7 @@ void MetaDataBase::changeFunctionAttributes( QObject *o, const QString &oldName,
return;
}
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
Function f = *it;
if ( normalizeFunction( f.function ) == normalizeFunction( oldName ) ) {
(*it).function = newName;
@@ -894,7 +894,7 @@ void MetaDataBase::changeFunctionAttributes( QObject *o, const QString &oldName,
}
}
-bool MetaDataBase::hasFunction( QObject *o, const QCString &function, bool onlyCustom )
+bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onlyCustom )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -905,7 +905,7 @@ bool MetaDataBase::hasFunction( QObject *o, const QCString &function, bool onlyC
}
if ( !onlyCustom ) {
- QStrList functionList = o->metaObject()->slotNames( TRUE );
+ TQStrList functionList = o->metaObject()->slotNames( TRUE );
if ( functionList.find( function ) != -1 )
return TRUE;
@@ -919,8 +919,8 @@ bool MetaDataBase::hasFunction( QObject *o, const QCString &function, bool onlyC
//if ( ::qt_cast<CustomWidget*>(o) ) {
if ( o->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget();
- for ( QValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
- QCString s = (*it).function;
+ for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
+ TQCString s = (*it).function;
if ( !s.data() )
continue;
if ( s == function )
@@ -929,7 +929,7 @@ bool MetaDataBase::hasFunction( QObject *o, const QCString &function, bool onlyC
}
}
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
Function f = *it;
if ( normalizeFunction( f.function ) == normalizeFunction( function ) )
return TRUE;
@@ -938,22 +938,22 @@ bool MetaDataBase::hasFunction( QObject *o, const QCString &function, bool onlyC
return FALSE;
}
-QString MetaDataBase::languageOfFunction( QObject *o, const QCString &function )
+TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QString::null;
+ return TQString::null;
}
- QString fu = normalizeFunction( function );
- for ( QValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
+ TQString fu = normalizeFunction( function );
+ for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
if ( fu == normalizeFunction( (*it).function ) )
return (*it).language;
}
- return QString::null;
+ return TQString::null;
}
bool MetaDataBase::addCustomWidget( CustomWidget *wid )
@@ -962,15 +962,15 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid )
for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
if ( *wid == *w ) {
- for ( QValueList<QCString>::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) {
+ for ( TQValueList<TQCString>::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) {
if ( !w->hasSignal( *it ) )
w->lstSignals.append( *it );
}
- for ( QValueList<Function>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) {
+ for ( TQValueList<Function>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) {
if ( !w->hasSlot( MetaDataBase::normalizeFunction( (*it2).function ).latin1() ) )
w->lstSlots.append( *it2 );
}
- for ( QValueList<Property>::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) {
+ for ( TQValueList<Property>::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) {
if ( !w->hasProperty( (*it3).property ) )
w->lstProperties.append( *it3 );
}
@@ -984,7 +984,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid )
r->name = wid->className;
r->group = WidgetDatabase::widgetGroup( "Custom" );
r->toolTip = wid->className;
- r->icon = new QIconSet( *wid->pixmap, *wid->pixmap );
+ r->icon = new TQIconSet( *wid->pixmap, *wid->pixmap );
r->isContainer = wid->isContainer;
wid->id = WidgetDatabase::addCustomWidget( r );
cWidgets->append( wid );
@@ -996,7 +996,7 @@ void MetaDataBase::removeCustomWidget( CustomWidget *w )
cWidgets->removeRef( w );
}
-QPtrList<MetaDataBase::CustomWidget> *MetaDataBase::customWidgets()
+TQPtrList<MetaDataBase::CustomWidget> *MetaDataBase::customWidgets()
{
setupDataBase();
return cWidgets;
@@ -1022,7 +1022,7 @@ bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid )
return FALSE;
}
-bool MetaDataBase::hasCustomWidget( const QString &className )
+bool MetaDataBase::hasCustomWidget( const TQString &className )
{
for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
if ( w->className == className )
@@ -1031,7 +1031,7 @@ bool MetaDataBase::hasCustomWidget( const QString &className )
return FALSE;
}
-void MetaDataBase::setTabOrder( QWidget *w, const QWidgetList &order )
+void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*) w );
@@ -1044,20 +1044,20 @@ void MetaDataBase::setTabOrder( QWidget *w, const QWidgetList &order )
r->tabOrder = order;
}
-QWidgetList MetaDataBase::tabOrder( QWidget *w )
+TQWidgetList MetaDataBase::tabOrder( TQWidget *w )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*) w );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
w, w->name(), w->className() );
- return QWidgetList();
+ return TQWidgetList();
}
return r->tabOrder;
}
-void MetaDataBase::setIncludes( QObject *o, const QValueList<Include> &incs )
+void MetaDataBase::setIncludes( TQObject *o, const TQValueList<Include> &incs )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1070,20 +1070,20 @@ void MetaDataBase::setIncludes( QObject *o, const QValueList<Include> &incs )
r->includes = incs;
}
-QValueList<MetaDataBase::Include> MetaDataBase::includes( QObject *o )
+TQValueList<MetaDataBase::Include> MetaDataBase::includes( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QValueList<Include>();
+ return TQValueList<Include>();
}
return r->includes;
}
-void MetaDataBase::setForwards( QObject *o, const QStringList &fwds )
+void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1096,20 +1096,20 @@ void MetaDataBase::setForwards( QObject *o, const QStringList &fwds )
r->forwards = fwds;
}
-QStringList MetaDataBase::forwards( QObject *o )
+TQStringList MetaDataBase::forwards( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QStringList();
+ return TQStringList();
}
return r->forwards;
}
-void MetaDataBase::setVariables( QObject *o, const QValueList<Variable> &vars )
+void MetaDataBase::setVariables( TQObject *o, const TQValueList<Variable> &vars )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1122,7 +1122,7 @@ void MetaDataBase::setVariables( QObject *o, const QValueList<Variable> &vars )
r->variables = vars;
}
-void MetaDataBase::addVariable( QObject *o, const QString &name, const QString &access )
+void MetaDataBase::addVariable( TQObject *o, const TQString &name, const TQString &access )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1137,7 +1137,7 @@ void MetaDataBase::addVariable( QObject *o, const QString &name, const QString &
r->variables << v;
}
-void MetaDataBase::removeVariable( QObject *o, const QString &name )
+void MetaDataBase::removeVariable( TQObject *o, const TQString &name )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1146,7 +1146,7 @@ void MetaDataBase::removeVariable( QObject *o, const QString &name )
o, o->name(), o->className() );
return;
}
- QValueList<Variable>::Iterator it = r->variables.begin();
+ TQValueList<Variable>::Iterator it = r->variables.begin();
for ( ; it != r->variables.end(); ++it ) {
if ( (*it).varName == name ) {
r->variables.remove( it );
@@ -1155,20 +1155,20 @@ void MetaDataBase::removeVariable( QObject *o, const QString &name )
}
}
-QValueList<MetaDataBase::Variable> MetaDataBase::variables( QObject *o )
+TQValueList<MetaDataBase::Variable> MetaDataBase::variables( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QValueList<MetaDataBase::Variable>();
+ return TQValueList<MetaDataBase::Variable>();
}
return r->variables;
}
-bool MetaDataBase::hasVariable( QObject *o, const QString &name )
+bool MetaDataBase::hasVariable( TQObject *o, const TQString &name )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1178,7 +1178,7 @@ bool MetaDataBase::hasVariable( QObject *o, const QString &name )
return FALSE;
}
- QValueList<Variable>::Iterator it = r->variables.begin();
+ TQValueList<Variable>::Iterator it = r->variables.begin();
for ( ; it != r->variables.end(); ++it ) {
if ( extractVariableName( name ) == extractVariableName( (*it).varName ) )
return TRUE;
@@ -1186,9 +1186,9 @@ bool MetaDataBase::hasVariable( QObject *o, const QString &name )
return FALSE;
}
-QString MetaDataBase::extractVariableName( const QString &name )
+TQString MetaDataBase::extractVariableName( const TQString &name )
{
- QString n = name.right( name.length() - name.findRev( ' ' ) - 1 );
+ TQString n = name.right( name.length() - name.findRev( ' ' ) - 1 );
if ( n[ 0 ] == '*' || n[ 0 ] == '&' )
n[ 0 ] = ' ';
if ( n[ (int)n.length() - 1 ] == ';' )
@@ -1196,7 +1196,7 @@ QString MetaDataBase::extractVariableName( const QString &name )
return n.simplifyWhiteSpace();
}
-void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs )
+void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1208,8 +1208,8 @@ void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs )
r->sigs.clear();
- for ( QStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) {
- QString s = (*it).simplifyWhiteSpace();
+ for ( TQStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) {
+ TQString s = (*it).simplifyWhiteSpace();
bool hasSemicolon = s.endsWith( ";" );
if ( hasSemicolon )
s = s.left( s.length() - 1 );
@@ -1229,20 +1229,20 @@ void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs )
}
}
-QStringList MetaDataBase::signalList( QObject *o )
+TQStringList MetaDataBase::signalList( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QStringList();
+ return TQStringList();
}
return r->sigs;
}
-void MetaDataBase::setMetaInfo( QObject *o, MetaInfo mi )
+void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1255,7 +1255,7 @@ void MetaDataBase::setMetaInfo( QObject *o, MetaInfo mi )
r->metaInfo = mi;
}
-MetaDataBase::MetaInfo MetaDataBase::metaInfo( QObject *o )
+MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -1276,10 +1276,10 @@ MetaDataBase::CustomWidget::CustomWidget()
className = "MyCustomWidget";
includeFile = "mywidget.h";
includePolicy = Local;
- sizeHint = QSize( -1, -1 );
- pixmap = new QPixmap( BarIcon( "designer_customwidget.png", KDevDesignerPartFactory::instance() ) );
+ sizeHint = TQSize( -1, -1 );
+ pixmap = new TQPixmap( BarIcon( "designer_customwidget.png", KDevDesignerPartFactory::instance() ) );
id = -1;
- sizePolicy = QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
+ sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred );
isContainer = FALSE;
}
@@ -1290,14 +1290,14 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
includePolicy = w.includePolicy;
sizeHint = w.sizeHint;
if ( w.pixmap )
- pixmap = new QPixmap( *w.pixmap );
+ pixmap = new TQPixmap( *w.pixmap );
else
pixmap = 0;
id = w.id;
isContainer = w.isContainer;
}
-void MetaDataBase::setCursor( QWidget *w, const QCursor &c )
+void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c )
{
setupDataBase();
if ( w->isA( "PropertyObject" ) ) {
@@ -1314,7 +1314,7 @@ void MetaDataBase::setCursor( QWidget *w, const QCursor &c )
r->cursor = c;
}
-QCursor MetaDataBase::cursor( QWidget *w )
+TQCursor MetaDataBase::cursor( TQWidget *w )
{
setupDataBase();
if ( w->isA( "PropertyObject" ) )
@@ -1341,7 +1341,7 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
includePolicy = w.includePolicy;
sizeHint = w.sizeHint;
if ( w.pixmap )
- pixmap = new QPixmap( *w.pixmap );
+ pixmap = new TQPixmap( *w.pixmap );
else
pixmap = 0;
lstSignals = w.lstSignals;
@@ -1352,45 +1352,45 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
return *this;
}
-bool MetaDataBase::CustomWidget::hasSignal( const QCString &signal ) const
+bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const
{
- QStrList sigList = QWidget::staticMetaObject()->signalNames( TRUE );
+ TQStrList sigList = TQWidget::staticMetaObject()->signalNames( TRUE );
if ( sigList.find( signal ) != -1 )
return TRUE;
- for ( QValueList<QCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) {
+ for ( TQValueList<TQCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) {
if ( normalizeFunction( *it ) == normalizeFunction( signal ) )
return TRUE;
}
return FALSE;
}
-bool MetaDataBase::CustomWidget::hasSlot( const QCString &slot ) const
+bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const
{
- QStrList slotList = QWidget::staticMetaObject()->slotNames( TRUE );
+ TQStrList slotList = TQWidget::staticMetaObject()->slotNames( TRUE );
if ( slotList.find( normalizeFunction( slot ) ) != -1 )
return TRUE;
- for ( QValueList<MetaDataBase::Function>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::Function>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
if ( normalizeFunction( (*it).function ) == normalizeFunction( slot ) )
return TRUE;
}
return FALSE;
}
-bool MetaDataBase::CustomWidget::hasProperty( const QCString &prop ) const
+bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const
{
- QStrList propList = QWidget::staticMetaObject()->propertyNames( TRUE );
+ TQStrList propList = TQWidget::staticMetaObject()->propertyNames( TRUE );
if ( propList.find( prop ) != -1 )
return TRUE;
- for ( QValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
if ( (*it).property == prop )
return TRUE;
}
return FALSE;
}
-void MetaDataBase::setPixmapArgument( QObject *o, int pixmap, const QString &arg )
+void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg )
{
if ( !o )
return;
@@ -1406,22 +1406,22 @@ void MetaDataBase::setPixmapArgument( QObject *o, int pixmap, const QString &arg
r->pixmapArguments.insert( pixmap, arg );
}
-QString MetaDataBase::pixmapArgument( QObject *o, int pixmap )
+TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap )
{
if ( !o )
- return QString::null;
+ return TQString::null;
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QString::null;
+ return TQString::null;
}
return *r->pixmapArguments.find( pixmap );
}
-void MetaDataBase::clearPixmapArguments( QObject *o )
+void MetaDataBase::clearPixmapArguments( TQObject *o )
{
if ( !o )
return;
@@ -1437,7 +1437,7 @@ void MetaDataBase::clearPixmapArguments( QObject *o )
}
-void MetaDataBase::setPixmapKey( QObject *o, int pixmap, const QString &arg )
+void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg )
{
if ( !o )
return;
@@ -1457,10 +1457,10 @@ void MetaDataBase::setPixmapKey( QObject *o, int pixmap, const QString &arg )
r->pixmapKeys.insert( pixmap, arg );
}
-QString MetaDataBase::pixmapKey( QObject *o, int pixmap )
+TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap )
{
if ( !o )
- return QString::null;
+ return TQString::null;
setupDataBase();
if ( o->isA( "PropertyObject" ) )
return ( (PropertyObject*)o )->mdPixmapKey( pixmap );
@@ -1468,21 +1468,21 @@ QString MetaDataBase::pixmapKey( QObject *o, int pixmap )
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QString::null;
+ return TQString::null;
}
- QString s = *r->pixmapKeys.find( pixmap );
+ TQString s = *r->pixmapKeys.find( pixmap );
if ( !s.isNull() )
return s;
if ( !o->isWidgetType() )
return s;
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
if ( w->icon() )
return *r->pixmapKeys.find( w->icon()->serialNumber() );
return s;
}
-void MetaDataBase::clearPixmapKeys( QObject *o )
+void MetaDataBase::clearPixmapKeys( TQObject *o )
{
if ( !o )
return;
@@ -1499,7 +1499,7 @@ void MetaDataBase::clearPixmapKeys( QObject *o )
-void MetaDataBase::setColumnFields( QObject *o, const QMap<QString, QString> &columnFields )
+void MetaDataBase::setColumnFields( TQObject *o, const TQMap<TQString, TQString> &columnFields )
{
if ( !o )
return;
@@ -1514,37 +1514,37 @@ void MetaDataBase::setColumnFields( QObject *o, const QMap<QString, QString> &co
r->columnFields = columnFields;
}
-QMap<QString, QString> MetaDataBase::columnFields( QObject *o )
+TQMap<TQString, TQString> MetaDataBase::columnFields( TQObject *o )
{
if ( !o )
- return QMap<QString, QString>();
+ return TQMap<TQString, TQString>();
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QMap<QString, QString>();
+ return TQMap<TQString, TQString>();
}
return r->columnFields;
}
-void MetaDataBase::setEditor( const QStringList &langs )
+void MetaDataBase::setEditor( const TQStringList &langs )
{
editorLangList = langs;
}
-bool MetaDataBase::hasEditor( const QString &lang )
+bool MetaDataBase::hasEditor( const TQString &lang )
{
return editorLangList.find( lang ) != editorLangList.end();
}
-void MetaDataBase::setupInterfaceManagers( const QString &plugDir )
+void MetaDataBase::setupInterfaceManagers( const TQString &plugDir )
{
if ( !languageInterfaceManager ) {
languageInterfaceManager =
new QPluginManager<LanguageInterface>( IID_Language,
- QApplication::libraryPaths(),
+ TQApplication::libraryPaths(),
// kapp->dirs()->resourceDirs("qtplugins"),
plugDir );
@@ -1554,34 +1554,34 @@ void MetaDataBase::setupInterfaceManagers( const QString &plugDir )
}
}
-QStringList MetaDataBase::languages()
+TQStringList MetaDataBase::languages()
{
return langList;
}
-QString MetaDataBase::normalizeFunction( const QString &f )
+TQString MetaDataBase::normalizeFunction( const TQString &f )
{
return Parser::cleanArgs( f );
}
-LanguageInterface *MetaDataBase::languageInterface( const QString &lang )
+LanguageInterface *MetaDataBase::languageInterface( const TQString &lang )
{
LanguageInterface* iface = 0;
languageInterfaceManager->queryInterface( lang, &iface );
return iface;
}
-void MetaDataBase::clear( QObject *o )
+void MetaDataBase::clear( TQObject *o )
{
if ( !o )
return;
setupDataBase();
db->remove( (void*)o );
- for ( QPtrDictIterator<QWidget> it( *( (FormWindow*)o )->widgets() ); it.current(); ++it )
+ for ( TQPtrDictIterator<TQWidget> it( *( (FormWindow*)o )->widgets() ); it.current(); ++it )
db->remove( (void*)it.current() );
}
-void MetaDataBase::setBreakPoints( QObject *o, const QValueList<uint> &l )
+void MetaDataBase::setBreakPoints( TQObject *o, const TQValueList<uint> &l )
{
if ( !o )
return;
@@ -1595,7 +1595,7 @@ void MetaDataBase::setBreakPoints( QObject *o, const QValueList<uint> &l )
r->breakPoints = l;
- QMap<int, QString>::Iterator it = r->breakPointConditions.begin();
+ TQMap<int, TQString>::Iterator it = r->breakPointConditions.begin();
while ( it != r->breakPointConditions.end() ) {
int line = it.key();
++it;
@@ -1604,22 +1604,22 @@ void MetaDataBase::setBreakPoints( QObject *o, const QValueList<uint> &l )
}
}
-QValueList<uint> MetaDataBase::breakPoints( QObject *o )
+TQValueList<uint> MetaDataBase::breakPoints( TQObject *o )
{
if ( !o )
- return QValueList<uint>();
+ return TQValueList<uint>();
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QValueList<uint>();
+ return TQValueList<uint>();
}
return r->breakPoints;
}
-void MetaDataBase::setBreakPointCondition( QObject *o, int line, const QString &condition )
+void MetaDataBase::setBreakPointCondition( TQObject *o, int line, const TQString &condition )
{
if ( !o )
return;
@@ -1633,24 +1633,24 @@ void MetaDataBase::setBreakPointCondition( QObject *o, int line, const QString &
r->breakPointConditions.replace( line, condition );
}
-QString MetaDataBase::breakPointCondition( QObject *o, int line )
+TQString MetaDataBase::breakPointCondition( TQObject *o, int line )
{
if ( !o )
- return QString::null;
+ return TQString::null;
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QString::null;
+ return TQString::null;
}
- QMap<int, QString>::Iterator it = r->breakPointConditions.find( line );
+ TQMap<int, TQString>::Iterator it = r->breakPointConditions.find( line );
if ( it == r->breakPointConditions.end() )
- return QString::null;
+ return TQString::null;
return *it;
}
-void MetaDataBase::setExportMacro( QObject *o, const QString &macro )
+void MetaDataBase::setExportMacro( TQObject *o, const TQString &macro )
{
if ( !o )
return;
@@ -1669,7 +1669,7 @@ void MetaDataBase::setExportMacro( QObject *o, const QString &macro )
r->exportMacro = macro;
}
-QString MetaDataBase::exportMacro( QObject *o )
+TQString MetaDataBase::exportMacro( TQObject *o )
{
if ( !o )
return "";
@@ -1686,7 +1686,7 @@ QString MetaDataBase::exportMacro( QObject *o )
return r->exportMacro;
}
-bool MetaDataBase::hasObject( QObject *o )
+bool MetaDataBase::hasObject( TQObject *o )
{
return !!db->find( o );
}
diff --git a/kdevdesigner/designer/metadatabase.h b/kdevdesigner/designer/metadatabase.h
index f7ce5088..6ded68d6 100644
--- a/kdevdesigner/designer/metadatabase.h
+++ b/kdevdesigner/designer/metadatabase.h
@@ -27,15 +27,15 @@
#ifndef METADATABASE_H
#define METADATABASE_H
-#include <qvariant.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qsizepolicy.h>
-#include <qsize.h>
-#include <qwidgetlist.h>
-#include <qcursor.h>
+#include <tqvariant.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqsizepolicy.h>
+#include <tqsize.h>
+#include <tqwidgetlist.h>
+#include <tqcursor.h>
#include "pixmapchooser.h"
#include "../interfaces/languageinterface.h"
@@ -49,8 +49,8 @@ class MetaDataBase
public:
struct Connection
{
- QObject *sender, *receiver;
- QCString signal, slot;
+ TQObject *sender, *receiver;
+ TQCString signal, slot;
bool operator==( const Connection &c ) const {
return sender == c.sender && receiver == c.receiver &&
signal == c.signal && slot == c.slot ;
@@ -59,12 +59,12 @@ public:
struct Function
{
- QString returnType;
- QCString function;
- QString specifier;
- QString access;
- QString type;
- QString language;
+ TQString returnType;
+ TQCString function;
+ TQString specifier;
+ TQString access;
+ TQString type;
+ TQString language;
bool operator==( const Function &f ) const {
return ( returnType == f.returnType &&
function == f.function &&
@@ -78,8 +78,8 @@ public:
struct Property
{
- QCString property;
- QString type;
+ TQCString property;
+ TQString type;
bool operator==( const Property &p ) const {
return property == p.property &&
type == p.type;
@@ -94,20 +94,20 @@ public:
bool operator==( const CustomWidget &w ) const;
CustomWidget &operator=( const CustomWidget &w );
- bool hasSignal( const QCString &signal ) const;
- bool hasSlot( const QCString &slot ) const;
- bool hasProperty( const QCString &prop ) const;
+ bool hasSignal( const TQCString &signal ) const;
+ bool hasSlot( const TQCString &slot ) const;
+ bool hasProperty( const TQCString &prop ) const;
enum IncludePolicy { Global, Local };
- QString className;
- QString includeFile;
+ TQString className;
+ TQString includeFile;
IncludePolicy includePolicy;
- QSize sizeHint;
- QSizePolicy sizePolicy;
- QPixmap *pixmap;
- QValueList<QCString> lstSignals;
- QValueList<Function> lstSlots;
- QValueList<Property> lstProperties;
+ TQSize sizeHint;
+ TQSizePolicy sizePolicy;
+ TQPixmap *pixmap;
+ TQValueList<TQCString> lstSignals;
+ TQValueList<Function> lstSlots;
+ TQValueList<Property> lstProperties;
int id;
bool isContainer;
};
@@ -115,18 +115,18 @@ public:
struct Include
{
Include() : header(), location(), implDecl( "in implementation" ) {}
- QString header;
- QString location;
+ TQString header;
+ TQString location;
bool operator==( const Include &i ) const {
return header == i.header && location == i.location;
}
- QString implDecl;
+ TQString implDecl;
};
struct Variable
{
- QString varName;
- QString varAccess;
+ TQString varName;
+ TQString varAccess;
bool operator==( const Variable &v ) const {
return varName == v.varName &&
varAccess == v.varAccess;
@@ -136,133 +136,133 @@ public:
struct MetaInfo
{
MetaInfo() : classNameChanged( FALSE ) { }
- QString className;
+ TQString className;
bool classNameChanged;
- QString comment;
- QString author;
+ TQString comment;
+ TQString author;
};
MetaDataBase();
static void clearDataBase();
- static void addEntry( QObject *o );
- static void removeEntry( QObject *o );
- static void setPropertyChanged( QObject *o, const QString &property, bool changed );
- static bool isPropertyChanged( QObject *o, const QString &property );
- static void setPropertyComment( QObject *o, const QString &property, const QString &comment );
- static QString propertyComment( QObject *o, const QString &property );
- static QStringList changedProperties( QObject *o );
-
- static void setFakeProperty( QObject *o, const QString &property, const QVariant& value );
- static QVariant fakeProperty( QObject * o, const QString &property );
- static QMap<QString,QVariant>* fakeProperties( QObject* o );
-
- static void setSpacing( QObject *o, int spacing );
- static int spacing( QObject *o );
- static void setMargin( QObject *o, int margin );
- static int margin( QObject *o );
-
- static void setResizeMode( QObject *o, const QString &mode );
- static QString resizeMode( QObject *o );
-
- static void addConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot, bool addCode = TRUE );
- static void removeConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot );
- static bool hasConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot );
- static void setupConnections( QObject *o, const QValueList<LanguageInterface::Connection> &conns );
- static QValueList<Connection> connections( QObject *o );
- static QValueList<Connection> connections( QObject *o, QObject *sender, QObject *receiver );
- static QValueList<Connection> connections( QObject *o, QObject *object );
- static void doConnections( QObject *o );
-
- static void addFunction( QObject *o, const QCString &function, const QString &specifier,
- const QString &access, const QString &type, const QString &language,
- const QString &returnType );
- static void removeFunction( QObject *o, const QCString &function, const QString &specifier,
- const QString &access, const QString &type, const QString &language,
- const QString &returnType );
- static void removeFunction( QObject *o, const QString &function );
- static QValueList<Function> functionList( QObject *o, bool onlyFunctions = FALSE );
- static QValueList<Function> slotList( QObject *o );
- static bool isSlotUsed( QObject *o, const QCString &slot );
- static bool hasFunction( QObject *o, const QCString &function, bool onlyCustom = FALSE );
- static bool hasSlot( QObject *o, const QCString &slot, bool onlyCustom = FALSE );
- static void changeFunction( QObject *o, const QString &function, const QString &newName,
- const QString &returnType );
- static void changeFunctionAttributes( QObject *o, const QString &oldName, const QString &newName,
- const QString &specifier, const QString &access,
- const QString &type, const QString &language,
- const QString &returnType );
- static QString languageOfFunction( QObject *o, const QCString &function );
- static void setFunctionList( QObject *o, const QValueList<Function> &functionList );
+ static void addEntry( TQObject *o );
+ static void removeEntry( TQObject *o );
+ static void setPropertyChanged( TQObject *o, const TQString &property, bool changed );
+ static bool isPropertyChanged( TQObject *o, const TQString &property );
+ static void setPropertyComment( TQObject *o, const TQString &property, const TQString &comment );
+ static TQString propertyComment( TQObject *o, const TQString &property );
+ static TQStringList changedProperties( TQObject *o );
+
+ static void setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value );
+ static TQVariant fakeProperty( TQObject * o, const TQString &property );
+ static TQMap<TQString,TQVariant>* fakeProperties( TQObject* o );
+
+ static void setSpacing( TQObject *o, int spacing );
+ static int spacing( TQObject *o );
+ static void setMargin( TQObject *o, int margin );
+ static int margin( TQObject *o );
+
+ static void setResizeMode( TQObject *o, const TQString &mode );
+ static TQString resizeMode( TQObject *o );
+
+ static void addConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot, bool addCode = TRUE );
+ static void removeConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot );
+ static bool hasConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot );
+ static void setupConnections( TQObject *o, const TQValueList<LanguageInterface::Connection> &conns );
+ static TQValueList<Connection> connections( TQObject *o );
+ static TQValueList<Connection> connections( TQObject *o, TQObject *sender, TQObject *receiver );
+ static TQValueList<Connection> connections( TQObject *o, TQObject *object );
+ static void doConnections( TQObject *o );
+
+ static void addFunction( TQObject *o, const TQCString &function, const TQString &specifier,
+ const TQString &access, const TQString &type, const TQString &language,
+ const TQString &returnType );
+ static void removeFunction( TQObject *o, const TQCString &function, const TQString &specifier,
+ const TQString &access, const TQString &type, const TQString &language,
+ const TQString &returnType );
+ static void removeFunction( TQObject *o, const TQString &function );
+ static TQValueList<Function> functionList( TQObject *o, bool onlyFunctions = FALSE );
+ static TQValueList<Function> slotList( TQObject *o );
+ static bool isSlotUsed( TQObject *o, const TQCString &slot );
+ static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = FALSE );
+ static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = FALSE );
+ static void changeFunction( TQObject *o, const TQString &function, const TQString &newName,
+ const TQString &returnType );
+ static void changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName,
+ const TQString &specifier, const TQString &access,
+ const TQString &type, const TQString &language,
+ const TQString &returnType );
+ static TQString languageOfFunction( TQObject *o, const TQCString &function );
+ static void setFunctionList( TQObject *o, const TQValueList<Function> &functionList );
static bool addCustomWidget( CustomWidget *w );
static void removeCustomWidget( CustomWidget *w );
- static QPtrList<CustomWidget> *customWidgets();
+ static TQPtrList<CustomWidget> *customWidgets();
static CustomWidget *customWidget( int id );
static bool isWidgetNameUsed( CustomWidget *w );
- static bool hasCustomWidget( const QString &className );
+ static bool hasCustomWidget( const TQString &className );
- static void setTabOrder( QWidget *w, const QWidgetList &order );
- static QWidgetList tabOrder( QWidget *w );
+ static void setTabOrder( TQWidget *w, const TQWidgetList &order );
+ static TQWidgetList tabOrder( TQWidget *w );
- static void setIncludes( QObject *o, const QValueList<Include> &incs );
- static QValueList<Include> includes( QObject *o );
+ static void setIncludes( TQObject *o, const TQValueList<Include> &incs );
+ static TQValueList<Include> includes( TQObject *o );
- static void setForwards( QObject *o, const QStringList &fwds );
- static QStringList forwards( QObject *o );
+ static void setForwards( TQObject *o, const TQStringList &fwds );
+ static TQStringList forwards( TQObject *o );
- static void setVariables( QObject *o, const QValueList<Variable> &vars );
- static void addVariable( QObject *o, const QString &name, const QString &access );
- static void removeVariable( QObject *o, const QString &name );
- static QValueList<Variable> variables( QObject *o );
- static bool hasVariable( QObject *o, const QString &name );
- static QString extractVariableName( const QString &name );
+ static void setVariables( TQObject *o, const TQValueList<Variable> &vars );
+ static void addVariable( TQObject *o, const TQString &name, const TQString &access );
+ static void removeVariable( TQObject *o, const TQString &name );
+ static TQValueList<Variable> variables( TQObject *o );
+ static bool hasVariable( TQObject *o, const TQString &name );
+ static TQString extractVariableName( const TQString &name );
- static void setSignalList( QObject *o, const QStringList &sigs );
- static QStringList signalList( QObject *o );
+ static void setSignalList( TQObject *o, const TQStringList &sigs );
+ static TQStringList signalList( TQObject *o );
- static void setMetaInfo( QObject *o, MetaInfo mi );
- static MetaInfo metaInfo( QObject *o );
+ static void setMetaInfo( TQObject *o, MetaInfo mi );
+ static MetaInfo metaInfo( TQObject *o );
- static void setCursor( QWidget *w, const QCursor &c );
- static QCursor cursor( QWidget *w );
+ static void setCursor( TQWidget *w, const TQCursor &c );
+ static TQCursor cursor( TQWidget *w );
- static void setPixmapArgument( QObject *o, int pixmap, const QString &arg );
- static QString pixmapArgument( QObject *o, int pixmap );
- static void clearPixmapArguments( QObject *o );
+ static void setPixmapArgument( TQObject *o, int pixmap, const TQString &arg );
+ static TQString pixmapArgument( TQObject *o, int pixmap );
+ static void clearPixmapArguments( TQObject *o );
- static void setPixmapKey( QObject *o, int pixmap, const QString &arg );
- static QString pixmapKey( QObject *o, int pixmap );
- static void clearPixmapKeys( QObject *o );
+ static void setPixmapKey( TQObject *o, int pixmap, const TQString &arg );
+ static TQString pixmapKey( TQObject *o, int pixmap );
+ static void clearPixmapKeys( TQObject *o );
- static void setColumnFields( QObject *o, const QMap<QString, QString> &columnFields );
- static QMap<QString, QString> columnFields( QObject *o );
+ static void setColumnFields( TQObject *o, const TQMap<TQString, TQString> &columnFields );
+ static TQMap<TQString, TQString> columnFields( TQObject *o );
- static void setEditor( const QStringList &langs );
- static bool hasEditor( const QString &lang );
+ static void setEditor( const TQStringList &langs );
+ static bool hasEditor( const TQString &lang );
- static void setupInterfaceManagers( const QString &plugDir );
- static QStringList languages();
+ static void setupInterfaceManagers( const TQString &plugDir );
+ static TQStringList languages();
- static LanguageInterface *languageInterface( const QString &lang );
+ static LanguageInterface *languageInterface( const TQString &lang );
- static QString normalizeFunction( const QString &f );
+ static TQString normalizeFunction( const TQString &f );
- static void clear( QObject *o );
+ static void clear( TQObject *o );
- static void setBreakPoints( QObject *o, const QValueList<uint> &l );
- static void setBreakPointCondition( QObject *o, int line, const QString &condition );
- static QValueList<uint> breakPoints( QObject *o );
- static QString breakPointCondition( QObject *o, int line );
+ static void setBreakPoints( TQObject *o, const TQValueList<uint> &l );
+ static void setBreakPointCondition( TQObject *o, int line, const TQString &condition );
+ static TQValueList<uint> breakPoints( TQObject *o );
+ static TQString breakPointCondition( TQObject *o, int line );
- static void setExportMacro( QObject *o, const QString &macro );
- static QString exportMacro( QObject *o );
+ static void setExportMacro( TQObject *o, const TQString &macro );
+ static TQString exportMacro( TQObject *o );
- static bool hasObject( QObject *o );
+ static bool hasObject( TQObject *o );
};
diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp
index 3d7f5afc..1d859211 100644
--- a/kdevdesigner/designer/multilineeditorimpl.cpp
+++ b/kdevdesigner/designer/multilineeditorimpl.cpp
@@ -35,28 +35,28 @@
#include <kiconloader.h>
#include "kdevdesigner_part.h"
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include <./private/qrichtext_p.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qapplication.h>
-#include <qaction.h>
-#include <qmetaobject.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqapplication.h>
+#include <tqaction.h>
+#include <tqmetaobject.h>
#include <klocale.h>
-ToolBarItem::ToolBarItem( QWidget *parent, QWidget *toolBar,
- const QString &label, const QString &tagstr,
- const QIconSet &icon, const QKeySequence &key )
- : QAction( parent )
+ToolBarItem::ToolBarItem( TQWidget *parent, TQWidget *toolBar,
+ const TQString &label, const TQString &tagstr,
+ const TQIconSet &icon, const TQKeySequence &key )
+ : TQAction( parent )
{
setIconSet( icon );
setText( label );
setAccel( key );
addTo( toolBar );
tag = tagstr;
- connect( this, SIGNAL( activated() ), this, SLOT( wasActivated() ) );
+ connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( wasActivated() ) );
}
ToolBarItem::~ToolBarItem()
@@ -69,21 +69,21 @@ void ToolBarItem::wasActivated()
emit clicked( tag );
}
-TextEdit::TextEdit( QWidget *parent, const char *name )
- : QTextEdit( parent, name )
+TextEdit::TextEdit( TQWidget *parent, const char *name )
+ : TQTextEdit( parent, name )
{
setTextFormat( Qt::PlainText );
}
QTextParagraph* TextEdit::paragraph()
{
- QTextCursor *tc = new QTextCursor( QTextEdit::document() );
+ QTextCursor *tc = new QTextCursor( TQTextEdit::document() );
return tc->paragraph();
}
-MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, QWidget *parent, QWidget *editWidget,
- FormWindow *fw, const QString &text )
+MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget,
+ FormWindow *fw, const TQString &text )
: MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( FALSE )
{
callStatic = call_static;
@@ -95,149 +95,149 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, QWidget *
Layout4->insertWidget( 0, textEdit );
if ( richtextMode ) {
- QPopupMenu *stylesMenu = new QPopupMenu( this );
+ TQPopupMenu *stylesMenu = new TQPopupMenu( this );
menuBar->insertItem( i18n( "&Styles" ), stylesMenu );
- basicToolBar = new QToolBar( i18n( "Basics" ), this, DockTop );
+ basicToolBar = new TQToolBar( i18n( "Basics" ), this, DockTop );
ToolBarItem *it = new ToolBarItem( this, basicToolBar, i18n( "Italic" ),
"i", BarIcon( "designer_textitalic.png", KDevDesignerPartFactory::instance() ), CTRL+Key_I );
it->addTo( stylesMenu );
- connect( it, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( it, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *b = new ToolBarItem( this, basicToolBar, i18n( "Bold" ),
"b", BarIcon( "designer_textbold.png", KDevDesignerPartFactory::instance() ), CTRL+Key_B );
b->addTo( stylesMenu );
- connect( b, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( b, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *ul = new ToolBarItem( this, basicToolBar, i18n( "Underline" ),
"u", BarIcon( "designer_textunderline.png" , KDevDesignerPartFactory::instance()), CTRL+Key_U );
ul->addTo( stylesMenu );
- connect( ul, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( ul, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *tt = new ToolBarItem( this, basicToolBar, i18n( "Typewriter" ),
"tt", BarIcon( "designer_textteletext.png", KDevDesignerPartFactory::instance() ) );
tt->addTo( stylesMenu );
- connect( tt, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( tt, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
basicToolBar->addSeparator();
- QPopupMenu *layoutMenu = new QPopupMenu( this );
+ TQPopupMenu *layoutMenu = new TQPopupMenu( this );
menuBar->insertItem( i18n( "&Layout" ), layoutMenu );
- QAction *brAction = new QAction( this );
+ TQAction *brAction = new TQAction( this );
brAction->setIconSet( BarIcon( "designer_textlinebreak.png", KDevDesignerPartFactory::instance() ) );
brAction->setText( i18n("Break" ) );
brAction->addTo( basicToolBar );
brAction->addTo( layoutMenu );
- connect( brAction, SIGNAL( activated() ) , this, SLOT( insertBR() ) );
+ connect( brAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( insertBR() ) );
ToolBarItem *p = new ToolBarItem( this, basicToolBar, i18n( "Paragraph" ),
"p", BarIcon( "designer_textparagraph.png", KDevDesignerPartFactory::instance() ) );
p->addTo( layoutMenu );
- connect( p, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( p, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
layoutMenu->insertSeparator();
basicToolBar->addSeparator();
ToolBarItem *al = new ToolBarItem( this, basicToolBar, i18n( "Align left" ),
"p align=\"left\"", BarIcon( "designer_textleft.png", KDevDesignerPartFactory::instance() ) );
al->addTo( layoutMenu );
- connect( al, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( al, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *ac = new ToolBarItem( this, basicToolBar, i18n( "Align center" ),
"p align=\"center\"", BarIcon( "designer_textcenter.png", KDevDesignerPartFactory::instance() ) );
ac->addTo( layoutMenu );
- connect( ac, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( ac, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *ar = new ToolBarItem( this, basicToolBar, i18n( "Align right" ),
"p align=\"right\"", BarIcon( "designer_textright.png", KDevDesignerPartFactory::instance() ) );
ar->addTo( layoutMenu );
- connect( ar, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( ar, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *block = new ToolBarItem( this, basicToolBar, i18n( "Blockquote" ),
"blockquote", BarIcon( "designer_textjustify.png", KDevDesignerPartFactory::instance() ) );
block->addTo( layoutMenu );
- connect( block, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( block, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
- QPopupMenu *fontMenu = new QPopupMenu( this );
+ TQPopupMenu *fontMenu = new TQPopupMenu( this );
menuBar->insertItem( i18n( "&Font" ), fontMenu );
- fontToolBar = new QToolBar( "Fonts", this, DockTop );
+ fontToolBar = new TQToolBar( "Fonts", this, DockTop );
- QAction *fontAction = new QAction( this );
+ TQAction *fontAction = new TQAction( this );
fontAction->setIconSet( BarIcon( "designer_textfont.png", KDevDesignerPartFactory::instance() ) );
fontAction->setText( i18n("Font" ) );
fontAction->addTo( fontToolBar );
fontAction->addTo( fontMenu );
- connect( fontAction, SIGNAL( activated() ) , this, SLOT( showFontDialog() ) );
+ connect( fontAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( showFontDialog() ) );
ToolBarItem *fp1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize +1" ),
"font size=\"+1\"", BarIcon( "designer_textlarger.png", KDevDesignerPartFactory::instance() ) );
- connect( fp1, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( fp1, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *fm1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize -1" ),
"font size=\"-1\"", BarIcon( "designer_textsmaller.png", KDevDesignerPartFactory::instance() ) );
- connect( fm1, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( fm1, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *h1 = new ToolBarItem( this, fontToolBar, i18n( "Headline 1" ),
"h1", BarIcon( "designer_texth1.png", KDevDesignerPartFactory::instance() ) );
- connect( h1, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( h1, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *h2 = new ToolBarItem( this, fontToolBar, i18n( "Headline 2" ),
"h2", BarIcon( "designer_texth2.png", KDevDesignerPartFactory::instance() ) );
- connect( h2, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( h2, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
ToolBarItem *h3 = new ToolBarItem( this, fontToolBar, i18n( "Headline 3" ),
"h3", BarIcon( "designer_texth3.png", KDevDesignerPartFactory::instance() ) );
- connect( h3, SIGNAL( clicked( const QString& ) ),
- this, SLOT( insertTags( const QString& )));
+ connect( h3, TQT_SIGNAL( clicked( const TQString& ) ),
+ this, TQT_SLOT( insertTags( const TQString& )));
- QPopupMenu *optionsMenu = new QPopupMenu( this );
+ TQPopupMenu *optionsMenu = new TQPopupMenu( this );
menuBar->insertItem( i18n( "O&ptions" ), optionsMenu );
- optionsToolBar = new QToolBar( "Options", this, DockTop );
- wrapAction = new QAction( this );
+ optionsToolBar = new TQToolBar( "Options", this, DockTop );
+ wrapAction = new TQAction( this );
wrapAction->setToggleAction( TRUE );
wrapAction->setIconSet( BarIcon( "designer_wordwrap.png", KDevDesignerPartFactory::instance() ) );
wrapAction->setText( i18n( "Word Wrapping" ) );
wrapAction->addTo( optionsToolBar );
wrapAction->addTo( optionsMenu );
- connect( wrapAction, SIGNAL( toggled( bool ) ), this, SLOT( changeWrapMode( bool ) ) );
+ connect( wrapAction, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( changeWrapMode( bool ) ) );
oldDoWrap = doWrap;
wrapAction->setOn( doWrap );
- connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
textEdit->document()->setFormatter( new QTextFormatterBreakInWords );
textEdit->document()->setUseFormatCollection( FALSE );
textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML );
- if ( !callStatic && ::qt_cast<QTextEdit*>(editWidget) ) {
- mlined = (QTextEdit*)editWidget;
+ if ( !callStatic && ::qt_cast<TQTextEdit*>(editWidget) ) {
+ mlined = (TQTextEdit*)editWidget;
mlined->setReadOnly( TRUE );
- const QMetaProperty *wordWrap = mlined->metaObject()->property(
+ const TQMetaProperty *wordWrap = mlined->metaObject()->property(
mlined->metaObject()->findProperty( "wordWrap", TRUE ), TRUE );
oldWrapMode = 0;
oldWrapString = "NoWrap";
if ( wordWrap ) {
oldWrapMode = mlined->property( "wordWrap" );
- oldWrapString = QString( wordWrap->valueToKey( oldWrapMode.toInt() ) );
+ oldWrapString = TQString( wordWrap->valueToKey( oldWrapMode.toInt() ) );
if ( oldWrapString != "NoWrap" )
doWrap = TRUE;
}
@@ -282,18 +282,18 @@ void MultiLineEditor::applyClicked()
formwindow->commandHistory()->addCommand( cmd );
if ( oldDoWrap != doWrap ) {
- QString pn( i18n( "Set 'wordWrap' of '%2'" ).arg( mlined->name() ) );
+ TQString pn( i18n( "Set 'wordWrap' of '%2'" ).arg( mlined->name() ) );
SetPropertyCommand *propcmd;
if ( doWrap )
propcmd = new SetPropertyCommand( pn, formwindow,
mlined, MainWindow::self->propertyeditor(),
"wordWrap", WidgetFactory::property( mlined, "wordWrap" ),
- QVariant( 1 ), "WidgetWidth", oldWrapString );
+ TQVariant( 1 ), "WidgetWidth", oldWrapString );
else
propcmd = new SetPropertyCommand( pn, formwindow,
mlined, MainWindow::self->propertyeditor(),
"wordWrap", WidgetFactory::property( mlined, "wordWrap" ),
- QVariant( 0 ), "NoWrap", oldWrapString );
+ TQVariant( 0 ), "NoWrap", oldWrapString );
propcmd->execute();
formwindow->commandHistory()->addCommand( propcmd, TRUE );
@@ -311,21 +311,21 @@ void MultiLineEditor::cancelClicked()
close();
}
-void MultiLineEditor::closeEvent( QCloseEvent *e )
+void MultiLineEditor::closeEvent( TQCloseEvent *e )
{
qApp->exit_loop();
MultiLineEditorBase::closeEvent( e );
}
-void MultiLineEditor::insertTags( const QString &tag )
+void MultiLineEditor::insertTags( const TQString &tag )
{
int pfrom, pto, ifrom, ito;
- QString tagend( tag.simplifyWhiteSpace() );
+ TQString tagend( tag.simplifyWhiteSpace() );
tagend.remove( tagend.find( ' ', 0 ), tagend.length() );
if ( textEdit->hasSelectedText() ) {
textEdit->getSelection( &pfrom, &ifrom, &pto, &ito );
- QString buf = textEdit->selectedText();
- buf = QString( "<%1>%3</%2>" ).arg( tag ).arg( tagend ).arg( buf );
+ TQString buf = textEdit->selectedText();
+ buf = TQString( "<%1>%3</%2>" ).arg( tag ).arg( tagend ).arg( buf );
textEdit->removeSelectedText();
textEdit->insertAt( buf, pfrom, ifrom );
textEdit->setCursorPosition( pto, ito + 2 + tag.length() );
@@ -333,7 +333,7 @@ void MultiLineEditor::insertTags( const QString &tag )
else {
int para, index;
textEdit->getCursorPosition( &para, &index );
- textEdit->insert( QString( "<%1></%2>" ).arg( tag ).arg( tagend ) );
+ textEdit->insert( TQString( "<%1></%2>" ).arg( tag ).arg( tagend ) );
index += 2 + tag.length();
textEdit->setCursorPosition( para, index );
}
@@ -353,16 +353,16 @@ void MultiLineEditor::showFontDialog()
selText = TRUE;
}
RichTextFontDialog *fd = new RichTextFontDialog( this );
- if ( fd->exec() == QDialog::Accepted ) {
- QString size, font;
+ if ( fd->exec() == TQDialog::Accepted ) {
+ TQString size, font;
if ( fd->getSize() != "0" )
size = "size=\"" + fd->getSize() + "\"";
- QString color;
+ TQString color;
if ( !fd->getColor().isEmpty() && fd->getColor() != "#000000" )
color = "color=\"" + fd->getColor() + "\"";
if ( fd->getFont() != "default" )
font = "face=\"" + fd->getFont() + "\"";
- QString tag( QString( "font %1 %2 %3" )
+ TQString tag( TQString( "font %1 %2 %3" )
.arg( color ).arg( size ).arg( font ) );
if ( selText )
@@ -373,21 +373,21 @@ void MultiLineEditor::showFontDialog()
textEdit->setSelection( pfrom, ifrom, pto, ito );
}
-QString MultiLineEditor::getStaticText()
+TQString MultiLineEditor::getStaticText()
{
return staticText.stripWhiteSpace();
}
-QString MultiLineEditor::getText( QWidget *parent, const QString &text, bool richtextMode, bool *useWrap )
+TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap )
{
MultiLineEditor medit( TRUE, richtextMode, parent, 0, 0, text );
if ( richtextMode )
medit.setUseWrapping( *useWrap );
- if ( medit.exec() == QDialog::Accepted ) {
+ if ( medit.exec() == TQDialog::Accepted ) {
*useWrap = medit.useWrapping();
return medit.getStaticText();
}
- return QString::null;
+ return TQString::null;
}
void MultiLineEditor::changeWrapMode( bool b )
@@ -397,9 +397,9 @@ void MultiLineEditor::changeWrapMode( bool b )
if ( oldDoWrap )
textEdit->setProperty( "wordWrap", oldWrapMode );
else
- textEdit->setWordWrap( QTextEdit::WidgetWidth );
+ textEdit->setWordWrap( TQTextEdit::WidgetWidth );
} else {
- textEdit->setWordWrap( QTextEdit::NoWrap );
+ textEdit->setWordWrap( TQTextEdit::NoWrap );
}
}
diff --git a/kdevdesigner/designer/multilineeditorimpl.h b/kdevdesigner/designer/multilineeditorimpl.h
index 5abf5339..89a22db2 100644
--- a/kdevdesigner/designer/multilineeditorimpl.h
+++ b/kdevdesigner/designer/multilineeditorimpl.h
@@ -27,8 +27,8 @@
#ifndef MULTILINEEDITORIMPL_H
#define MULTILINEEDITORIMPL_H
-#include <qaction.h>
-#include <qtextedit.h>
+#include <tqaction.h>
+#include <tqtextedit.h>
#include <private/qrichtext_p.h>
#include "multilineeditor.h"
@@ -41,8 +41,8 @@ class TextEdit : public QTextEdit
Q_OBJECT
public:
- TextEdit( QWidget *parent = 0, const char *name = 0 );
- QTextDocument *document() const { return QTextEdit::document(); }
+ TextEdit( TQWidget *parent = 0, const char *name = 0 );
+ QTextDocument *document() const { return TQTextEdit::document(); }
QTextParagraph *paragraph();
};
@@ -52,17 +52,17 @@ class ToolBarItem : public QAction
Q_OBJECT
public:
- ToolBarItem( QWidget *parent, QWidget *toolBar,
- const QString &label, const QString &tagstr,
- const QIconSet &icon, const QKeySequence &key = 0 );
+ ToolBarItem( TQWidget *parent, TQWidget *toolBar,
+ const TQString &label, const TQString &tagstr,
+ const TQIconSet &icon, const TQKeySequence &key = 0 );
~ToolBarItem();
signals:
- void clicked( const QString &t );
+ void clicked( const TQString &t );
protected slots:
void wasActivated();
private:
- QString tag;
+ TQString tag;
};
@@ -71,39 +71,39 @@ class MultiLineEditor : public MultiLineEditorBase
Q_OBJECT
public:
- MultiLineEditor( bool call_static, bool richtextMode, QWidget *parent, QWidget *editWidget,
- FormWindow *fw, const QString &text = QString::null );
+ MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget,
+ FormWindow *fw, const TQString &text = TQString::null );
bool useWrapping() const;
void setUseWrapping( bool );
- static QString getText( QWidget *parent, const QString &text, bool richtextMode, bool *useWrap );
+ static TQString getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap );
int exec();
protected slots:
void okClicked();
void applyClicked();
void cancelClicked();
- void insertTags( const QString& );
+ void insertTags( const TQString& );
void insertBR();
void showFontDialog();
void changeWrapMode( bool );
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
private:
- QString getStaticText();
+ TQString getStaticText();
TextEdit *textEdit;
- QTextEdit *mlined;
+ TQTextEdit *mlined;
FormWindow *formwindow;
- QToolBar *basicToolBar;
- QToolBar *fontToolBar;
- QToolBar *optionsToolBar;
- QAction *wrapAction;
+ TQToolBar *basicToolBar;
+ TQToolBar *fontToolBar;
+ TQToolBar *optionsToolBar;
+ TQAction *wrapAction;
int res;
- QString staticText;
+ TQString staticText;
bool callStatic;
bool oldDoWrap, doWrap;
- QVariant oldWrapMode;
- QString oldWrapString;
+ TQVariant oldWrapMode;
+ TQString oldWrapString;
};
#endif
diff --git a/kdevdesigner/designer/myiconloader.cpp b/kdevdesigner/designer/myiconloader.cpp
index 8ad6abc8..80bbc5ba 100644
--- a/kdevdesigner/designer/myiconloader.cpp
+++ b/kdevdesigner/designer/myiconloader.cpp
@@ -21,12 +21,12 @@
#include "kdevdesigner_part.h"
#include <kiconloader.h>
-QPixmap BarIcon2( const QString & name )
+TQPixmap BarIcon2( const TQString & name )
{
return BarIcon(name, KDevDesignerPartFactory::instance());
}
-QPixmap SmallIcon2( const QString & name)
+TQPixmap SmallIcon2( const TQString & name)
{
return SmallIcon(name, KDevDesignerPartFactory::instance());
}
diff --git a/kdevdesigner/designer/myiconloader.h b/kdevdesigner/designer/myiconloader.h
index e91208bc..4fcc5ed5 100644
--- a/kdevdesigner/designer/myiconloader.h
+++ b/kdevdesigner/designer/myiconloader.h
@@ -20,13 +20,13 @@
#ifndef MY_ICON_LOADER
#define MY_ICON_LOADER
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
class KInstance;
-QPixmap BarIcon2 (const QString &name);
-QPixmap SmallIcon2 (const QString &name);
+TQPixmap BarIcon2 (const TQString &name);
+TQPixmap SmallIcon2 (const TQString &name);
#endif
diff --git a/kdevdesigner/designer/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp
index 9ff44d01..80bc6463 100644
--- a/kdevdesigner/designer/newformimpl.cpp
+++ b/kdevdesigner/designer/newformimpl.cpp
@@ -41,19 +41,19 @@
#include "kdevdesigner_part.h"
#include <klocale.h>
-#include <qiconview.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qpushbutton.h>
+#include <tqiconview.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
#include <stdlib.h>
-#include <qcombobox.h>
-#include <qworkspace.h>
-#include <qmessagebox.h>
+#include <tqcombobox.h>
+#include <tqworkspace.h>
+#include <tqmessagebox.h>
static int forms = 0;
-ProjectItem::ProjectItem( QIconView *view, const QString &text )
+ProjectItem::ProjectItem( TQIconView *view, const TQString &text )
: NewItem( view, text )
{
}
@@ -65,32 +65,32 @@ void ProjectItem::insert( Project * )
-FormItem::FormItem( QIconView *view, const QString &text )
+FormItem::FormItem( TQIconView *view, const TQString &text )
: NewItem( view, text )
{
}
void FormItem::insert( Project *pro )
{
- QString n = "Form" + QString::number( ++forms );
+ TQString n = "Form" + TQString::number( ++forms );
FormWindow *fw = 0;
FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro );
fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
fw->setProject( pro );
MetaDataBase::addEntry( fw );
if ( fType == Widget ) {
- QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QWidget" ),
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ),
fw, n.latin1() );
fw->setMainContainer( w );
} else if ( fType == Dialog ) {
- QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QDialog" ), fw, n.latin1() );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() );
fw->setMainContainer( w );
} else if ( fType == Wizard ) {
- QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QWizard" ),
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWizard" ),
fw, n.latin1() );
fw->setMainContainer( w );
} else if ( fType == MainWindow ) {
- QWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "QMainWindow" ),
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQMainWindow" ),
fw, n.latin1() );
fw->setMainContainer( w );
}
@@ -123,16 +123,16 @@ void FormItem::insert( Project *pro )
-CustomFormItem::CustomFormItem( QIconView *view, const QString &text )
+CustomFormItem::CustomFormItem( TQIconView *view, const TQString &text )
: NewItem( view, text )
{
}
-static void unifyFormName( FormWindow *fw, QWorkspace *qworkspace )
+static void unifyFormName( FormWindow *fw, TQWorkspace *qworkspace )
{
- QStringList lst;
- QWidgetList windows = qworkspace->windowList();
- for ( QWidget *w =windows.first(); w; w = windows.next() ) {
+ TQStringList lst;
+ TQWidgetList windows = qworkspace->windowList();
+ for ( TQWidget *w =windows.first(); w; w = windows.next() ) {
if ( w == fw )
continue;
lst << w->name();
@@ -140,11 +140,11 @@ static void unifyFormName( FormWindow *fw, QWorkspace *qworkspace )
if ( lst.findIndex( fw->name() ) == -1 )
return;
- QString origName = fw->name();
- QString n = origName;
+ TQString origName = fw->name();
+ TQString n = origName;
int i = 1;
while ( lst.findIndex( n ) != -1 ) {
- n = origName + QString::number( i++ );
+ n = origName + TQString::number( i++ );
}
fw->setName( n );
fw->setCaption( n );
@@ -152,19 +152,19 @@ static void unifyFormName( FormWindow *fw, QWorkspace *qworkspace )
void CustomFormItem::insert( Project *pro )
{
- QString filename = templateFileName();
- if ( !filename.isEmpty() && QFile::exists( filename ) ) {
+ TQString filename = templateFileName();
+ if ( !filename.isEmpty() && TQFile::exists( filename ) ) {
Resource resource( MainWindow::self );
FormFile *ff = new FormFile( filename, TRUE, pro );
if ( !resource.load( ff ) ) {
- QMessageBox::information( MainWindow::self, i18n("Load Template"),
+ TQMessageBox::information( MainWindow::self, i18n("Load Template"),
i18n("Could not load form description from template '%1'" ).arg( filename ) );
delete ff;
return;
}
- ff->setFileName( QString::null );
+ ff->setFileName( TQString::null );
if ( MainWindow::self->formWindow() ) {
- MainWindow::self->formWindow()->setFileName( QString::null );
+ MainWindow::self->formWindow()->setFileName( TQString::null );
unifyFormName( MainWindow::self->formWindow(), MainWindow::self->qWorkspace() );
if ( !pro->isDummy() ) {
MainWindow::self->formWindow()->setSavePixmapInProject( TRUE );
@@ -176,7 +176,7 @@ void CustomFormItem::insert( Project *pro )
-SourceFileItem::SourceFileItem( QIconView *view, const QString &text )
+SourceFileItem::SourceFileItem( TQIconView *view, const TQString &text )
: NewItem( view, text ), visible( TRUE )
{
}
@@ -189,7 +189,7 @@ void SourceFileItem::insert( Project *pro )
void SourceFileItem::setProject( Project *pro )
{
- QIconView *iv = iconView();
+ TQIconView *iv = iconView();
bool v = lang == pro->language();
if ( !iv || v == visible )
return;
@@ -202,7 +202,7 @@ void SourceFileItem::setProject( Project *pro )
-SourceTemplateItem::SourceTemplateItem( QIconView *view, const QString &text )
+SourceTemplateItem::SourceTemplateItem( TQIconView *view, const TQString &text )
: NewItem( view, text ), visible( TRUE )
{
}
@@ -231,7 +231,7 @@ void SourceTemplateItem::insert( Project *pro )
void SourceTemplateItem::setProject( Project *pro )
{
- QIconView *iv = iconView();
+ TQIconView *iv = iconView();
bool v = !pro->isDummy() && lang == pro->language();
if ( !iv || v == visible )
return;
@@ -242,11 +242,11 @@ void SourceTemplateItem::setProject( Project *pro )
iv->insertItem( this );
}
-void NewForm::insertTemplates( QIconView *tView,
- const QString &templatePath )
+void NewForm::insertTemplates( TQIconView *tView,
+ const TQString &templatePath )
{
- QStringList::Iterator it;
- QStringList languages = MetaDataBase::languages();
+ TQStringList::Iterator it;
+ TQStringList languages = MetaDataBase::languages();
if ( !MainWindow::self->singleProjectMode() ) {
for ( it = languages.begin(); it != languages.end(); ++it ) {
ProjectItem *pi = new ProjectItem( tView, i18n("%1 Project" ).arg( *it ) );
@@ -256,7 +256,7 @@ void NewForm::insertTemplates( QIconView *tView,
pi->setDragEnabled( FALSE );
}
}
- QIconViewItem *cur = 0;
+ TQIconViewItem *cur = 0;
FormItem *fi = new FormItem( tView,i18n( "Dialog" ) );
allItems.append( fi );
fi->setFormType( FormItem::Dialog );
@@ -280,32 +280,32 @@ void NewForm::insertTemplates( QIconView *tView,
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
fi->setDragEnabled( FALSE );
- QString templPath = templatePath;
- QStringList templRoots;
+ TQString templPath = templatePath;
+ TQStringList templRoots;
const char *qtdir = getenv( "QTDIR" );
if(qtdir)
templRoots << qtdir;
templRoots << qInstallPathData();
if(qtdir) //try the tools/designer directory last!
- templRoots << (QString(qtdir) + "/tools/designer");
- for ( QStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) {
- QString path = (*it) + "/templates";
- if ( QFile::exists( path )) {
+ templRoots << (TQString(qtdir) + "/tools/designer");
+ for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) {
+ TQString path = (*it) + "/templates";
+ if ( TQFile::exists( path )) {
templPath = path;
break;
}
}
if ( !templPath.isEmpty() ) {
- QDir dir( templPath );
- const QFileInfoList *filist = dir.entryInfoList( QDir::DefaultFilter, QDir::DirsFirst | QDir::Name );
+ TQDir dir( templPath );
+ const QFileInfoList *filist = dir.entryInfoList( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name );
if ( filist ) {
QFileInfoListIterator it( *filist );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( ( fi = it.current() ) != 0 ) {
++it;
if ( !fi->isFile() || fi->extension() != "ui" )
continue;
- QString name = fi->baseName();
+ TQString name = fi->baseName();
name = name.replace( '_', ' ' );
CustomFormItem *ci = new CustomFormItem( tView, name );
allItems.append( ci );
@@ -320,9 +320,9 @@ void NewForm::insertTemplates( QIconView *tView,
for ( it = languages.begin(); it != languages.end(); ++it ) {
LanguageInterface *iface = MetaDataBase::languageInterface( *it );
if ( iface ) {
- QMap<QString, QString> extensionMap;
+ TQMap<TQString, TQString> extensionMap;
iface->preferedExtensions( extensionMap );
- for ( QMap<QString, QString>::Iterator eit = extensionMap.begin();
+ for ( TQMap<TQString, TQString>::Iterator eit = extensionMap.begin();
eit != extensionMap.end(); ++eit ) {
SourceFileItem * si = new SourceFileItem( tView, *eit );
allItems.append( si );
@@ -336,8 +336,8 @@ void NewForm::insertTemplates( QIconView *tView,
}
if ( !MainWindow::self->singleProjectMode() ) {
- QStringList sourceTemplates = MainWindow::self->sourceTemplates();
- for ( QStringList::Iterator sit = sourceTemplates.begin(); sit != sourceTemplates.end(); ++sit ) {
+ TQStringList sourceTemplates = MainWindow::self->sourceTemplates();
+ for ( TQStringList::Iterator sit = sourceTemplates.begin(); sit != sourceTemplates.end(); ++sit ) {
SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( *sit );
if ( !siface )
continue;
@@ -358,17 +358,17 @@ void NewForm::insertTemplates( QIconView *tView,
adjustSize();
}
-NewForm::NewForm( QIconView *templateView, const QString &templatePath )
+NewForm::NewForm( TQIconView *templateView, const TQString &templatePath )
{
insertTemplates( templateView, templatePath );
projectChanged( i18n( "<No Project>" ) );
}
-NewForm::NewForm( QWidget *parent, const QStringList& projects,
- const QString& currentProject, const QString &templatePath )
+NewForm::NewForm( TQWidget *parent, const TQStringList& projects,
+ const TQString& currentProject, const TQString &templatePath )
: NewFormBase( parent, 0, TRUE )
{
- connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
projectCombo->insertStringList( projects );
projectCombo->setCurrentText( currentProject );
@@ -390,25 +390,25 @@ void NewForm::accept()
( (NewItem*)templateView->currentItem() )->insert( pro );
}
-void NewForm::projectChanged( const QString &project )
+void NewForm::projectChanged( const TQString &project )
{
Project *pro = MainWindow::self->findProject( project );
if ( !pro )
return;
- QIconViewItem *i;
+ TQIconViewItem *i;
for ( i = allItems.first(); i; i = allItems.next() )
( (NewItem*)i )->setProject( pro );
templateView->setCurrentItem( templateView->firstItem() );
templateView->arrangeItemsInGrid( TRUE );
}
-void NewForm::itemChanged( QIconViewItem *item )
+void NewForm::itemChanged( TQIconViewItem *item )
{
labelProject->setEnabled( item->rtti() != NewItem::ProjectType );
projectCombo->setEnabled( item->rtti() != NewItem::ProjectType );
}
-QPtrList<QIconViewItem> NewForm::allViewItems()
+TQPtrList<TQIconViewItem> NewForm::allViewItems()
{
return allItems;
}
diff --git a/kdevdesigner/designer/newformimpl.h b/kdevdesigner/designer/newformimpl.h
index acd597bf..b85e36c9 100644
--- a/kdevdesigner/designer/newformimpl.h
+++ b/kdevdesigner/designer/newformimpl.h
@@ -28,7 +28,7 @@
#define NEWFORMIMPL_H
#include "newform.h"
-#include <qiconview.h>
+#include <tqiconview.h>
class Project;
@@ -43,8 +43,8 @@ public:
SourceTemplateType
};
- NewItem( QIconView *view, const QString &text )
- : QIconViewItem( view, text ) {}
+ NewItem( TQIconView *view, const TQString &text )
+ : TQIconViewItem( view, text ) {}
virtual void insert( Project *pro ) = 0;
virtual void setProject( Project * ) {}
@@ -53,15 +53,15 @@ public:
class ProjectItem : public NewItem
{
public:
- ProjectItem( QIconView *view, const QString &text );
+ ProjectItem( TQIconView *view, const TQString &text );
void insert( Project *pro );
int rtti() const { return (int)ProjectType; }
- void setLanguage( const QString &l ) { lang = l; }
- QString language() const { return lang; }
+ void setLanguage( const TQString &l ) { lang = l; }
+ TQString language() const { return lang; }
private:
- QString lang;
+ TQString lang;
};
@@ -75,7 +75,7 @@ public:
MainWindow
};
- FormItem( QIconView *view, const QString &text );
+ FormItem( TQIconView *view, const TQString &text );
void insert( Project *pro );
int rtti() const { return (int)Form; }
@@ -90,33 +90,33 @@ private:
class CustomFormItem : public NewItem
{
public:
- CustomFormItem( QIconView *view, const QString &text );
+ CustomFormItem( TQIconView *view, const TQString &text );
void insert( Project *pro );
int rtti() const { return (int)CustomForm; }
- void setTemplateFile( const QString &tf ) { templFile = tf; }
- QString templateFileName() const { return templFile; }
+ void setTemplateFile( const TQString &tf ) { templFile = tf; }
+ TQString templateFileName() const { return templFile; }
private:
- QString templFile;
+ TQString templFile;
};
class SourceFileItem : public NewItem
{
public:
- SourceFileItem( QIconView *view, const QString &text );
+ SourceFileItem( TQIconView *view, const TQString &text );
void insert( Project *pro );
int rtti() const { return (int)SourceFileType; }
- void setExtension( const QString &e ) { ext = e; }
- QString extension() const { return ext; }
- void setLanguage( const QString &l ) { lang = l; }
+ void setExtension( const TQString &e ) { ext = e; }
+ TQString extension() const { return ext; }
+ void setLanguage( const TQString &l ) { lang = l; }
void setProject( Project *pro );
private:
- QString ext;
- QString lang;
+ TQString ext;
+ TQString lang;
bool visible;
};
@@ -124,18 +124,18 @@ private:
class SourceTemplateItem : public NewItem
{
public:
- SourceTemplateItem( QIconView *view, const QString &text );
+ SourceTemplateItem( TQIconView *view, const TQString &text );
void insert( Project *pro );
int rtti() const { return (int)SourceTemplateType; }
- void setTemplate( const QString &t ) { templ = t; }
- QString tenplate() const { return templ; }
- void setLanguage( const QString &l ) { lang = l; }
+ void setTemplate( const TQString &t ) { templ = t; }
+ TQString tenplate() const { return templ; }
+ void setLanguage( const TQString &l ) { lang = l; }
void setProject( Project *pro );
private:
- QString templ;
- QString lang;
+ TQString templ;
+ TQString lang;
bool visible;
};
@@ -145,19 +145,19 @@ class NewForm : public NewFormBase
Q_OBJECT
public:
- NewForm( QIconView *templateView, const QString &templatePath );
- NewForm( QWidget *parent, const QStringList& projects,
- const QString& currentProject, const QString &templatePath );
- void insertTemplates( QIconView*, const QString& );
+ NewForm( TQIconView *templateView, const TQString &templatePath );
+ NewForm( TQWidget *parent, const TQStringList& projects,
+ const TQString& currentProject, const TQString &templatePath );
+ void insertTemplates( TQIconView*, const TQString& );
void accept();
- QPtrList<QIconViewItem> allViewItems();
+ TQPtrList<TQIconViewItem> allViewItems();
protected slots:
- void projectChanged( const QString &project );
- void itemChanged( QIconViewItem *item );
+ void projectChanged( const TQString &project );
+ void itemChanged( TQIconViewItem *item );
private:
- QPtrList<QIconViewItem> allItems;
+ TQPtrList<TQIconViewItem> allItems;
};
diff --git a/kdevdesigner/designer/orderindicator.cpp b/kdevdesigner/designer/orderindicator.cpp
index 08ed16b8..f3c50feb 100644
--- a/kdevdesigner/designer/orderindicator.cpp
+++ b/kdevdesigner/designer/orderindicator.cpp
@@ -24,17 +24,17 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler need this here
+#include <tqvariant.h> // HP-UX compiler need this here
#include "orderindicator.h"
#include "formwindow.h"
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qapplication.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqapplication.h>
-OrderIndicator::OrderIndicator( int i, QWidget* w, FormWindow *fw )
- : QWidget( fw, "order_indicator", WMouseNoMask ), formWindow( fw )
+OrderIndicator::OrderIndicator( int i, TQWidget* w, FormWindow *fw )
+ : TQWidget( fw, "order_indicator", WMouseNoMask ), formWindow( fw )
{
order = -1;
widget = w;
@@ -49,7 +49,7 @@ OrderIndicator::~OrderIndicator()
}
-void OrderIndicator::setOrder( int i, QWidget* wid )
+void OrderIndicator::setOrder( int i, TQWidget* wid )
{
if ( widget != wid )
return;
@@ -64,9 +64,9 @@ void OrderIndicator::setOrder( int i, QWidget* wid )
return;
}
order = i;
- int w = fontMetrics().width( QString::number( i ) ) + 10;
+ int w = fontMetrics().width( TQString::number( i ) ) + 10;
int h = fontMetrics().lineSpacing() * 3 / 2;
- QFont f( font() );
+ TQFont f( font() );
f.setBold( TRUE );
setFont( f );
resize( QMAX( w, h ), h );
@@ -78,27 +78,27 @@ void OrderIndicator::setOrder( int i, QWidget* wid )
void OrderIndicator::reposition()
{
- QPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) );
- move( p - QPoint( width()/3, height()/3 ) );
+ TQPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) );
+ move( p - TQPoint( width()/3, height()/3 ) );
}
-void OrderIndicator::paintEvent( QPaintEvent * )
+void OrderIndicator::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
+ TQPainter p( this );
p.setPen( white );
p.setBrush( blue );
p.drawEllipse( rect() );
- p.drawText( rect(), AlignCenter, QString::number( order ) );
+ p.drawText( rect(), AlignCenter, TQString::number( order ) );
}
void OrderIndicator::updateMask()
{
- QBitmap bm( size() );
+ TQBitmap bm( size() );
bm.fill( color0 );
{
- QPainter p( &bm, this );
+ TQPainter p( &bm, this );
p.setPen( color1 );
p.setBrush( color1 );
p.drawEllipse( rect() );
@@ -106,7 +106,7 @@ void OrderIndicator::updateMask()
setMask( bm );
}
-void OrderIndicator::mousePressEvent( QMouseEvent *e )
+void OrderIndicator::mousePressEvent( TQMouseEvent *e )
{
- QApplication::sendEvent( widget, e );
+ TQApplication::sendEvent( widget, e );
}
diff --git a/kdevdesigner/designer/orderindicator.h b/kdevdesigner/designer/orderindicator.h
index 35962b7a..5dd0185b 100644
--- a/kdevdesigner/designer/orderindicator.h
+++ b/kdevdesigner/designer/orderindicator.h
@@ -27,7 +27,7 @@
#ifndef ORDERINDICATOR_H
#define ORDERINDICATOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
class FormWindow;
@@ -36,20 +36,20 @@ class OrderIndicator : public QWidget
Q_OBJECT
public:
- OrderIndicator( int i, QWidget* w, FormWindow* fw );
+ OrderIndicator( int i, TQWidget* w, FormWindow* fw );
~OrderIndicator();
- void setOrder( int i, QWidget* w );
+ void setOrder( int i, TQWidget* w );
void reposition();
protected:
- void paintEvent( QPaintEvent * );
- void mousePressEvent( QMouseEvent *e );
+ void paintEvent( TQPaintEvent * );
+ void mousePressEvent( TQMouseEvent *e );
void updateMask();
private:
int order;
- QWidget* widget;
+ TQWidget* widget;
FormWindow *formWindow;
};
diff --git a/kdevdesigner/designer/outputwindow.cpp b/kdevdesigner/designer/outputwindow.cpp
index f51a54a3..17477a95 100644
--- a/kdevdesigner/designer/outputwindow.cpp
+++ b/kdevdesigner/designer/outputwindow.cpp
@@ -29,23 +29,23 @@
#include "metadatabase.h"
#include "mainwindow.h"
-#include <qlistview.h>
-#include <qtextedit.h>
-#include <qapplication.h>
-#include <qheader.h>
+#include <tqlistview.h>
+#include <tqtextedit.h>
+#include <tqapplication.h>
+#include <tqheader.h>
#include <stdlib.h>
#include <stdio.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
-static QTextEdit *debugoutput = 0;
+static TQTextEdit *debugoutput = 0;
bool debugToStderr = FALSE;
QtMsgHandler OutputWindow::oldMsgHandler = 0;
-OutputWindow::OutputWindow( QWidget *parent )
- : QTabWidget( parent, "output_window" ), debugView( 0 ), errorView( 0 )
+OutputWindow::OutputWindow( TQWidget *parent )
+ : TQTabWidget( parent, "output_window" ), debugView( 0 ), errorView( 0 )
{
setupDebug();
setupError();
@@ -69,12 +69,12 @@ void OutputWindow::shuttingDown()
void OutputWindow::setupError()
{
- errorView = new QListView( this, "OutputWindow::errorView" );
+ errorView = new TQListView( this, "OutputWindow::errorView" );
errorView->setSorting( -1 );
- connect( errorView, SIGNAL( currentChanged( QListViewItem* ) ),
- this, SLOT( currentErrorChanged( QListViewItem* ) ) );
- connect( errorView, SIGNAL( clicked( QListViewItem* ) ),
- this, SLOT( currentErrorChanged( QListViewItem* ) ) );
+ connect( errorView, TQT_SIGNAL( currentChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) );
+ connect( errorView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) );
if ( MetaDataBase::languages().count() > 1 )
addTab( errorView, i18n( "Warnings/Errors" ) );
@@ -84,7 +84,7 @@ void OutputWindow::setupError()
errorView->addColumn( i18n( "Message" ) );
errorView->addColumn( i18n( "Line" ) );
errorView->addColumn( i18n( "Location" ) );
- errorView->setResizeMode( QListView::LastColumn );
+ errorView->setResizeMode( TQListView::LastColumn );
errorView->setColumnWidth( 0, errorView->fontMetrics().width( "WARNING1234" ) );
errorView->setColumnWidth( 1, errorView->fontMetrics().width( "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP" ) );
errorView->setColumnWidth( 2, errorView->fontMetrics().width( "9999999" ) );
@@ -94,7 +94,7 @@ void OutputWindow::setupError()
static void debugMessageOutput( QtMsgType type, const char *msg )
{
- QString s( msg );
+ TQString s( msg );
s += "\n";
if ( type != QtFatalMsg ) {
@@ -114,7 +114,7 @@ static void debugMessageOutput( QtMsgType type, const char *msg )
void OutputWindow::setupDebug()
{
- debugoutput = debugView = new QTextEdit( this, "OutputWindow::debugView" );
+ debugoutput = debugView = new TQTextEdit( this, "OutputWindow::debugView" );
//debugView->setReadOnly( TRUE );
addTab( debugView, "Debug Output" );
@@ -122,18 +122,18 @@ void OutputWindow::setupDebug()
oldMsgHandler = qInstallMsgHandler( debugMessageOutput );
}
-void OutputWindow::setErrorMessages( const QStringList &errors, const QValueList<uint> &lines,
- bool clear, const QStringList &locations,
- const QObjectList &locationObjects )
+void OutputWindow::setErrorMessages( const TQStringList &errors, const TQValueList<uint> &lines,
+ bool clear, const TQStringList &locations,
+ const TQObjectList &locationObjects )
{
if ( clear )
errorView->clear();
- QStringList::ConstIterator mit = errors.begin();
- QValueList<uint>::ConstIterator lit = lines.begin();
- QStringList::ConstIterator it = locations.begin();
- QObjectList objects = (QObjectList)locationObjects;
- QObject *o = objects.first();
- QListViewItem *after = 0;
+ TQStringList::ConstIterator mit = errors.begin();
+ TQValueList<uint>::ConstIterator lit = lines.begin();
+ TQStringList::ConstIterator it = locations.begin();
+ TQObjectList objects = (TQObjectList)locationObjects;
+ TQObject *o = objects.first();
+ TQListViewItem *after = 0;
for ( ; lit != lines.end() && mit != errors.end(); ++lit, ++mit, ++it, o = objects.next() )
after = new ErrorItem( errorView, after, *mit, *lit, *it, o );
setCurrentPage( 1 );
@@ -144,7 +144,7 @@ DesignerOutputDock *OutputWindow::iFace()
return iface;
}
-void OutputWindow::appendDebug( const QString &text )
+void OutputWindow::appendDebug( const TQString &text )
{
debugView->append( text + "\n" );
}
@@ -164,7 +164,7 @@ void OutputWindow::showDebugTab()
showPage( debugView );
}
-void OutputWindow::currentErrorChanged( QListViewItem *i )
+void OutputWindow::currentErrorChanged( TQListViewItem *i )
{
if ( !i )
return;
@@ -175,17 +175,17 @@ void OutputWindow::currentErrorChanged( QListViewItem *i )
-ErrorItem::ErrorItem( QListView *parent, QListViewItem *after, const QString &message, int line,
- const QString &locationString, QObject *locationObject )
- : QListViewItem( parent, after )
+ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString &message, int line,
+ const TQString &locationString, TQObject *locationObject )
+ : TQListViewItem( parent, after )
{
setMultiLinesEnabled( TRUE );
- QString m( message );
+ TQString m( message );
type = m.startsWith( "Warning: " ) ? Warning : Error;
m = m.mid( m.find( ':' ) + 1 );
setText( 0, type == Error ? "Error" : "Warning" );
setText( 1, m );
- setText( 2, QString::number( line ) );
+ setText( 2, TQString::number( line ) );
setText( 3, locationString );
object = locationObject;
read = !after;
@@ -195,15 +195,15 @@ ErrorItem::ErrorItem( QListView *parent, QListViewItem *after, const QString &me
}
}
-void ErrorItem::paintCell( QPainter *p, const QColorGroup & cg,
+void ErrorItem::paintCell( TQPainter *p, const TQColorGroup & cg,
int column, int width, int alignment )
{
- QColorGroup g( cg );
- g.setColor( QColorGroup::Text, type == Error ? Qt::red : Qt::darkYellow );
+ TQColorGroup g( cg );
+ g.setColor( TQColorGroup::Text, type == Error ? Qt::red : Qt::darkYellow );
if ( !read ) {
- QFont f( p->font() );
+ TQFont f( p->font() );
f.setBold( TRUE );
p->setFont( f );
}
- QListViewItem::paintCell( p, g, column, width, alignment );
+ TQListViewItem::paintCell( p, g, column, width, alignment );
}
diff --git a/kdevdesigner/designer/outputwindow.h b/kdevdesigner/designer/outputwindow.h
index e61c92c0..c1f196c5 100644
--- a/kdevdesigner/designer/outputwindow.h
+++ b/kdevdesigner/designer/outputwindow.h
@@ -27,10 +27,10 @@
#ifndef OUTPUTWINDOW_H
#define OUTPUTWINDOW_H
-#include <qtabwidget.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qlistview.h>
+#include <tqtabwidget.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqlistview.h>
struct DesignerOutputDock;
class QTextEdit;
@@ -41,19 +41,19 @@ class ErrorItem : public QListViewItem
public:
enum Type { Error, Warning };
- ErrorItem( QListView *parent, QListViewItem *after, const QString &message, int line,
- const QString &locationString, QObject *locationObject );
+ ErrorItem( TQListView *parent, TQListViewItem *after, const TQString &message, int line,
+ const TQString &locationString, TQObject *locationObject );
- void paintCell( QPainter *, const QColorGroup & cg,
+ void paintCell( TQPainter *, const TQColorGroup & cg,
int column, int width, int alignment );
void setRead( bool b ) { read = b; repaint(); }
- QObject *location() const { return object; }
+ TQObject *location() const { return object; }
int line() const { return text( 2 ).toInt(); }
private:
- QObject *object;
+ TQObject *object;
Type type;
bool read;
@@ -64,13 +64,13 @@ class OutputWindow : public QTabWidget
Q_OBJECT
public:
- OutputWindow( QWidget *parent );
+ OutputWindow( TQWidget *parent );
~OutputWindow();
- void setErrorMessages( const QStringList &errors, const QValueList<uint> &lines,
- bool clear, const QStringList &locations,
- const QObjectList &locationObjects );
- void appendDebug( const QString& );
+ void setErrorMessages( const TQStringList &errors, const TQValueList<uint> &lines,
+ bool clear, const TQStringList &locations,
+ const TQObjectList &locationObjects );
+ void appendDebug( const TQString& );
void clearErrorMessages();
void clearDebug();
void showDebugTab();
@@ -82,14 +82,14 @@ public:
static QtMsgHandler oldMsgHandler;
private slots:
- void currentErrorChanged( QListViewItem *i );
+ void currentErrorChanged( TQListViewItem *i );
private:
void setupError();
void setupDebug();
- QTextEdit *debugView;
- QListView *errorView;
+ TQTextEdit *debugView;
+ TQListView *errorView;
DesignerOutputDock *iface;
diff --git a/kdevdesigner/designer/paletteeditoradvancedimpl.cpp b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp
index 8faebba4..86399bdf 100644
--- a/kdevdesigner/designer/paletteeditoradvancedimpl.cpp
+++ b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp
@@ -29,13 +29,13 @@
#include "mainwindow.h"
#include "formwindow.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqgroupbox.h>
/*!
Class used by PaletteEditor for bold combobox items
@@ -44,36 +44,36 @@
class BoldListBoxText : public QListBoxText
{
public:
- BoldListBoxText( QString text, QListBox* lb = 0 );
+ BoldListBoxText( TQString text, TQListBox* lb = 0 );
protected:
- virtual void paint( QPainter* );
+ virtual void paint( TQPainter* );
};
-BoldListBoxText::BoldListBoxText( QString text, QListBox* lb )
- : QListBoxText( lb )
+BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb )
+ : TQListBoxText( lb )
{
setText( text );
}
-void BoldListBoxText::paint( QPainter* painter )
+void BoldListBoxText::paint( TQPainter* painter )
{
- QFont f = painter->font();
+ TQFont f = painter->font();
f.setBold( TRUE );
painter->setFont( f );
- QListBoxText::paint( painter );
+ TQListBoxText::paint( painter );
}
-PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, QWidget * parent,
+PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent,
const char * name, bool modal, WFlags f )
: PaletteEditorAdvancedBase( parent, name, modal, f ), formWindow( fw ), selectedPalette(0)
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
buttonPixmap->setEditor( StyledButton::PixmapEditor );
- editPalette = QApplication::palette();
+ editPalette = TQApplication::palette();
setPreviewPalette( editPalette );
buttonPixmap->setFormWindow( formWindow );
@@ -193,58 +193,58 @@ void PaletteEditorAdvanced::onToggleBuildEffects( bool on )
buildDisabledEffect();
}
-QColorGroup::ColorRole PaletteEditorAdvanced::centralFromItem( int item )
+TQColorGroup::ColorRole PaletteEditorAdvanced::centralFromItem( int item )
{
switch( item ) {
case 0:
- return QColorGroup::Background;
+ return TQColorGroup::Background;
case 1:
- return QColorGroup::Foreground;
+ return TQColorGroup::Foreground;
case 2:
- return QColorGroup::Button;
+ return TQColorGroup::Button;
case 3:
- return QColorGroup::Base;
+ return TQColorGroup::Base;
case 4:
- return QColorGroup::Text;
+ return TQColorGroup::Text;
case 5:
- return QColorGroup::BrightText;
+ return TQColorGroup::BrightText;
case 6:
- return QColorGroup::ButtonText;
+ return TQColorGroup::ButtonText;
case 7:
- return QColorGroup::Highlight;
+ return TQColorGroup::Highlight;
case 8:
- return QColorGroup::HighlightedText;
+ return TQColorGroup::HighlightedText;
case 9:
- return QColorGroup::Link;
+ return TQColorGroup::Link;
case 10:
- return QColorGroup::LinkVisited;
+ return TQColorGroup::LinkVisited;
default:
- return QColorGroup::NColorRoles;
+ return TQColorGroup::NColorRoles;
}
}
-QColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item )
+TQColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item )
{
switch( item ) {
case 0:
- return QColorGroup::Light;
+ return TQColorGroup::Light;
case 1:
- return QColorGroup::Midlight;
+ return TQColorGroup::Midlight;
case 2:
- return QColorGroup::Mid;
+ return TQColorGroup::Mid;
case 3:
- return QColorGroup::Dark;
+ return TQColorGroup::Dark;
case 4:
- return QColorGroup::Shadow;
+ return TQColorGroup::Shadow;
default:
- return QColorGroup::NColorRoles;
+ return TQColorGroup::NColorRoles;
}
}
void PaletteEditorAdvanced::onCentral( int item )
{
- QPixmap* p = 0;
- QColor c;
+ TQPixmap* p = 0;
+ TQColor c;
switch(selectedPalette) {
case 0:
@@ -267,12 +267,12 @@ void PaletteEditorAdvanced::onCentral( int item )
if (p)
buttonPixmap->setPixmap( *p );
else
- buttonPixmap->setPixmap( QPixmap() );
+ buttonPixmap->setPixmap( TQPixmap() );
}
void PaletteEditorAdvanced::onEffect( int item )
{
- QColor c;
+ TQColor c;
switch(selectedPalette) {
case 0:
default:
@@ -288,9 +288,9 @@ void PaletteEditorAdvanced::onEffect( int item )
buttonEffect->setColor(c);
}
-void PaletteEditorAdvanced::mapToActiveCentralRole( const QColor& c )
+void PaletteEditorAdvanced::mapToActiveCentralRole( const TQColor& c )
{
- QColorGroup cg = editPalette.active();
+ TQColorGroup cg = editPalette.active();
cg.setColor( centralFromItem(comboCentral->currentItem()), c );
editPalette.setActive( cg );
@@ -303,9 +303,9 @@ void PaletteEditorAdvanced::mapToActiveCentralRole( const QColor& c )
setPreviewPalette( editPalette );
}
-void PaletteEditorAdvanced::mapToActiveEffectRole( const QColor& c )
+void PaletteEditorAdvanced::mapToActiveEffectRole( const TQColor& c )
{
- QColorGroup cg = editPalette.active();
+ TQColorGroup cg = editPalette.active();
cg.setColor( effectFromItem(comboEffect->currentItem()), c );
editPalette.setActive( cg );
@@ -317,14 +317,14 @@ void PaletteEditorAdvanced::mapToActiveEffectRole( const QColor& c )
setPreviewPalette( editPalette );
}
-void PaletteEditorAdvanced::mapToActivePixmapRole( const QPixmap& pm )
+void PaletteEditorAdvanced::mapToActivePixmapRole( const TQPixmap& pm )
{
- QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
- QColorGroup cg = editPalette.active();
+ TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
+ TQColorGroup cg = editPalette.active();
if ( !pm.isNull() )
- cg.setBrush( role, QBrush( cg.color( role ), pm ) );
+ cg.setBrush( role, TQBrush( cg.color( role ), pm ) );
else
- cg.setBrush( role, QBrush( cg.color( role ) ) );
+ cg.setBrush( role, TQBrush( cg.color( role ) ) );
editPalette.setActive( cg );
@@ -337,9 +337,9 @@ void PaletteEditorAdvanced::mapToActivePixmapRole( const QPixmap& pm )
setPreviewPalette( editPalette );
}
-void PaletteEditorAdvanced::mapToInactiveCentralRole( const QColor& c )
+void PaletteEditorAdvanced::mapToInactiveCentralRole( const TQColor& c )
{
- QColorGroup cg = editPalette.inactive();
+ TQColorGroup cg = editPalette.inactive();
cg.setColor( centralFromItem(comboCentral->currentItem()), c );
editPalette.setInactive( cg );
@@ -348,31 +348,31 @@ void PaletteEditorAdvanced::mapToInactiveCentralRole( const QColor& c )
setPreviewPalette( editPalette );
}
-void PaletteEditorAdvanced::mapToInactiveEffectRole( const QColor& c )
+void PaletteEditorAdvanced::mapToInactiveEffectRole( const TQColor& c )
{
- QColorGroup cg = editPalette.inactive();
+ TQColorGroup cg = editPalette.inactive();
cg.setColor( effectFromItem(comboEffect->currentItem()), c );
editPalette.setInactive( cg );
setPreviewPalette( editPalette );
}
-void PaletteEditorAdvanced::mapToInactivePixmapRole( const QPixmap& pm )
+void PaletteEditorAdvanced::mapToInactivePixmapRole( const TQPixmap& pm )
{
- QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
- QColorGroup cg = editPalette.inactive();
+ TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
+ TQColorGroup cg = editPalette.inactive();
if ( !pm.isNull() )
- cg.setBrush( role, QBrush( cg.color( role ), pm ) );
+ cg.setBrush( role, TQBrush( cg.color( role ), pm ) );
else
- cg.setBrush( role, QBrush( cg.color( role ) ) );
+ cg.setBrush( role, TQBrush( cg.color( role ) ) );
editPalette.setInactive( cg );
setPreviewPalette( editPalette );
}
-void PaletteEditorAdvanced::mapToDisabledCentralRole( const QColor& c )
+void PaletteEditorAdvanced::mapToDisabledCentralRole( const TQColor& c )
{
- QColorGroup cg = editPalette.disabled();
+ TQColorGroup cg = editPalette.disabled();
cg.setColor( centralFromItem(comboCentral->currentItem()), c );
editPalette.setDisabled( cg );
@@ -381,23 +381,23 @@ void PaletteEditorAdvanced::mapToDisabledCentralRole( const QColor& c )
setPreviewPalette( editPalette );
}
-void PaletteEditorAdvanced::mapToDisabledEffectRole( const QColor& c )
+void PaletteEditorAdvanced::mapToDisabledEffectRole( const TQColor& c )
{
- QColorGroup cg = editPalette.disabled();
+ TQColorGroup cg = editPalette.disabled();
cg.setColor( effectFromItem(comboEffect->currentItem()), c );
editPalette.setDisabled( cg );
setPreviewPalette( editPalette );
}
-void PaletteEditorAdvanced::mapToDisabledPixmapRole( const QPixmap& pm )
+void PaletteEditorAdvanced::mapToDisabledPixmapRole( const TQPixmap& pm )
{
- QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
- QColorGroup cg = editPalette.disabled();
+ TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem());
+ TQColorGroup cg = editPalette.disabled();
if ( !pm.isNull() )
- cg.setBrush( role, QBrush( cg.color( role ), pm ) );
+ cg.setBrush( role, TQBrush( cg.color( role ), pm ) );
else
- cg.setBrush( role, QBrush( cg.color( role ) ) );
+ cg.setBrush( role, TQBrush( cg.color( role ) ) );
editPalette.setDisabled( cg );
@@ -406,10 +406,10 @@ void PaletteEditorAdvanced::mapToDisabledPixmapRole( const QPixmap& pm )
void PaletteEditorAdvanced::buildActiveEffect()
{
- QColorGroup cg = editPalette.active();
- QColor btn = cg.color( QColorGroup::Button );
+ TQColorGroup cg = editPalette.active();
+ TQColor btn = cg.color( TQColorGroup::Button );
- QPalette temp( btn, btn );
+ TQPalette temp( btn, btn );
for (int i = 0; i<5; i++)
cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) );
@@ -428,10 +428,10 @@ void PaletteEditorAdvanced::buildInactive()
void PaletteEditorAdvanced::buildInactiveEffect()
{
- QColorGroup cg = editPalette.inactive();
+ TQColorGroup cg = editPalette.inactive();
- QColor light, midlight, mid, dark, shadow;
- QColor btn = cg.color( QColorGroup::Button );
+ TQColor light, midlight, mid, dark, shadow;
+ TQColor btn = cg.color( TQColorGroup::Button );
light = btn.light(150);
midlight = btn.light(115);
@@ -439,11 +439,11 @@ void PaletteEditorAdvanced::buildInactiveEffect()
dark = btn.dark();
shadow = black;
- cg.setColor( QColorGroup::Light, light );
- cg.setColor( QColorGroup::Midlight, midlight );
- cg.setColor( QColorGroup::Mid, mid );
- cg.setColor( QColorGroup::Dark, dark );
- cg.setColor( QColorGroup::Shadow, shadow );
+ cg.setColor( TQColorGroup::Light, light );
+ cg.setColor( TQColorGroup::Midlight, midlight );
+ cg.setColor( TQColorGroup::Mid, mid );
+ cg.setColor( TQColorGroup::Dark, dark );
+ cg.setColor( TQColorGroup::Shadow, shadow );
editPalette.setInactive( cg );
setPreviewPalette( editPalette );
@@ -452,9 +452,9 @@ void PaletteEditorAdvanced::buildInactiveEffect()
void PaletteEditorAdvanced::buildDisabled()
{
- QColorGroup cg = editPalette.active();
- cg.setColor( QColorGroup::ButtonText, darkGray );
- cg.setColor( QColorGroup::Foreground, darkGray );
+ TQColorGroup cg = editPalette.active();
+ cg.setColor( TQColorGroup::ButtonText, darkGray );
+ cg.setColor( TQColorGroup::Foreground, darkGray );
editPalette.setDisabled( cg );
buildDisabledEffect();
@@ -462,10 +462,10 @@ void PaletteEditorAdvanced::buildDisabled()
void PaletteEditorAdvanced::buildDisabledEffect()
{
- QColorGroup cg = editPalette.disabled();
+ TQColorGroup cg = editPalette.disabled();
- QColor light, midlight, mid, dark, shadow;
- QColor btn = cg.color( QColorGroup::Button );
+ TQColor light, midlight, mid, dark, shadow;
+ TQColor btn = cg.color( TQColorGroup::Button );
light = btn.light(150);
midlight = btn.light(115);
@@ -473,20 +473,20 @@ void PaletteEditorAdvanced::buildDisabledEffect()
dark = btn.dark();
shadow = black;
- cg.setColor( QColorGroup::Light, light );
- cg.setColor( QColorGroup::Midlight, midlight );
- cg.setColor( QColorGroup::Mid, mid );
- cg.setColor( QColorGroup::Dark, dark );
- cg.setColor( QColorGroup::Shadow, shadow );
+ cg.setColor( TQColorGroup::Light, light );
+ cg.setColor( TQColorGroup::Midlight, midlight );
+ cg.setColor( TQColorGroup::Mid, mid );
+ cg.setColor( TQColorGroup::Dark, dark );
+ cg.setColor( TQColorGroup::Shadow, shadow );
editPalette.setDisabled( cg );
setPreviewPalette( editPalette );
updateStyledButtons();
}
-void PaletteEditorAdvanced::setPreviewPalette( const QPalette& pal )
+void PaletteEditorAdvanced::setPreviewPalette( const TQPalette& pal )
{
- QColorGroup cg;
+ TQColorGroup cg;
switch (selectedPalette) {
case 0:
@@ -507,8 +507,8 @@ void PaletteEditorAdvanced::setPreviewPalette( const QPalette& pal )
void PaletteEditorAdvanced::updateStyledButtons()
{
- QColor central, effect;
- QPixmap *pm = 0;
+ TQColor central, effect;
+ TQPixmap *pm = 0;
switch (selectedPalette) {
case 0:
default:
@@ -533,17 +533,17 @@ void PaletteEditorAdvanced::updateStyledButtons()
if ( pm && !pm->isNull() )
buttonPixmap->setPixmap( *pm );
else
- buttonPixmap->setPixmap(QPixmap());
+ buttonPixmap->setPixmap(TQPixmap());
}
-void PaletteEditorAdvanced::setPal( const QPalette& pal )
+void PaletteEditorAdvanced::setPal( const TQPalette& pal )
{
editPalette = pal;
setPreviewPalette( pal );
updateStyledButtons();
}
-QPalette PaletteEditorAdvanced::pal() const
+TQPalette PaletteEditorAdvanced::pal() const
{
return editPalette;
}
@@ -605,32 +605,32 @@ void PaletteEditorAdvanced::setupBackgroundMode( BackgroundMode mode )
if (initRole > 8 ) {
comboEffect->setCurrentItem( initRole - 9 );
if ( comboEffect->listBox() ) {
- QString text = comboEffect->currentText();
+ TQString text = comboEffect->currentText();
comboEffect->listBox()->changeItem( new BoldListBoxText( text ), initRole - 9 );
}
}
else {
comboCentral->setCurrentItem( initRole );
if ( comboCentral->listBox() ) {
- QString text = comboCentral->currentText();
+ TQString text = comboCentral->currentText();
comboCentral->listBox()->changeItem( new BoldListBoxText( text ), initRole );
}
}
}
-QPalette PaletteEditorAdvanced::getPalette( bool *ok, const QPalette &init,
- BackgroundMode mode, QWidget* parent,
+TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init,
+ BackgroundMode mode, TQWidget* parent,
const char* name, FormWindow *fw )
{
PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, TRUE );
dlg->setupBackgroundMode( mode );
- if ( init != QPalette() )
+ if ( init != TQPalette() )
dlg->setPal( init );
int resultCode = dlg->exec();
- QPalette result = init;
- if ( resultCode == QDialog::Accepted ) {
+ TQPalette result = init;
+ if ( resultCode == TQDialog::Accepted ) {
if ( ok )
*ok = TRUE;
result = dlg->pal();
diff --git a/kdevdesigner/designer/paletteeditoradvancedimpl.h b/kdevdesigner/designer/paletteeditoradvancedimpl.h
index 4f7076df..1794d91f 100644
--- a/kdevdesigner/designer/paletteeditoradvancedimpl.h
+++ b/kdevdesigner/designer/paletteeditoradvancedimpl.h
@@ -35,12 +35,12 @@ class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
{
Q_OBJECT
public:
- PaletteEditorAdvanced( FormWindow *fw, QWidget * parent=0, const char * name=0,
+ PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0,
bool modal=FALSE, WFlags f=0 );
~PaletteEditorAdvanced();
- static QPalette getPalette( bool *ok, const QPalette &pal, BackgroundMode mode = PaletteBackground,
- QWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+ static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
+ TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
protected slots:
void paletteSelected(int);
@@ -57,15 +57,15 @@ protected slots:
void onToggleBuildDisabled( bool );
protected:
- void mapToActiveCentralRole( const QColor& );
- void mapToActiveEffectRole( const QColor& );
- void mapToActivePixmapRole( const QPixmap& );
- void mapToInactiveCentralRole( const QColor& );
- void mapToInactiveEffectRole( const QColor& );
- void mapToInactivePixmapRole( const QPixmap& );
- void mapToDisabledCentralRole( const QColor& );
- void mapToDisabledEffectRole( const QColor& );
- void mapToDisabledPixmapRole( const QPixmap& );
+ void mapToActiveCentralRole( const TQColor& );
+ void mapToActiveEffectRole( const TQColor& );
+ void mapToActivePixmapRole( const TQPixmap& );
+ void mapToInactiveCentralRole( const TQColor& );
+ void mapToInactiveEffectRole( const TQColor& );
+ void mapToInactivePixmapRole( const TQPixmap& );
+ void mapToDisabledCentralRole( const TQColor& );
+ void mapToDisabledEffectRole( const TQColor& );
+ void mapToDisabledPixmapRole( const TQPixmap& );
void buildPalette();
@@ -76,17 +76,17 @@ protected:
void buildDisabledEffect();
private:
- void setPreviewPalette( const QPalette& );
+ void setPreviewPalette( const TQPalette& );
void updateStyledButtons();
void setupBackgroundMode( BackgroundMode );
- QPalette pal() const;
- void setPal( const QPalette& );
+ TQPalette pal() const;
+ void setPal( const TQPalette& );
- QColorGroup::ColorRole centralFromItem( int );
- QColorGroup::ColorRole effectFromItem( int );
- QPalette editPalette;
- QPalette previewPalette;
+ TQColorGroup::ColorRole centralFromItem( int );
+ TQColorGroup::ColorRole effectFromItem( int );
+ TQPalette editPalette;
+ TQPalette previewPalette;
FormWindow *formWindow;
diff --git a/kdevdesigner/designer/paletteeditorimpl.cpp b/kdevdesigner/designer/paletteeditorimpl.cpp
index 56e6fd2f..a6489370 100644
--- a/kdevdesigner/designer/paletteeditorimpl.cpp
+++ b/kdevdesigner/designer/paletteeditorimpl.cpp
@@ -31,21 +31,21 @@
#include "mainwindow.h"
#include "formwindow.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
-PaletteEditor::PaletteEditor( FormWindow *fw, QWidget * parent, const char * name, bool modal, WFlags f )
+PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f )
: PaletteEditorBase( parent, name, modal, f ), formWindow( fw )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
- editPalette = QApplication::palette();
+ editPalette = TQApplication::palette();
setPreviewPalette( editPalette );
- buttonMainColor->setColor( editPalette.active().color( QColorGroup::Button ) );
- buttonMainColor2->setColor( editPalette.active().color( QColorGroup::Background ) );
+ buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button ) );
+ buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background ) );
}
PaletteEditor::~PaletteEditor()
@@ -55,7 +55,7 @@ PaletteEditor::~PaletteEditor()
void PaletteEditor::onTune()
{
bool ok;
- QPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow);
+ TQPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow);
if (!ok) return;
editPalette = pal;
@@ -77,59 +77,59 @@ void PaletteEditor::paletteSelected(int)
setPreviewPalette(editPalette);
}
-QColorGroup::ColorRole PaletteEditor::centralFromItem( int item )
+TQColorGroup::ColorRole PaletteEditor::centralFromItem( int item )
{
switch( item )
{
case 0:
- return QColorGroup::Background;
+ return TQColorGroup::Background;
case 1:
- return QColorGroup::Foreground;
+ return TQColorGroup::Foreground;
case 2:
- return QColorGroup::Button;
+ return TQColorGroup::Button;
case 3:
- return QColorGroup::Base;
+ return TQColorGroup::Base;
case 4:
- return QColorGroup::Text;
+ return TQColorGroup::Text;
case 5:
- return QColorGroup::BrightText;
+ return TQColorGroup::BrightText;
case 6:
- return QColorGroup::ButtonText;
+ return TQColorGroup::ButtonText;
case 7:
- return QColorGroup::Highlight;
+ return TQColorGroup::Highlight;
case 8:
- return QColorGroup::HighlightedText;
+ return TQColorGroup::HighlightedText;
default:
- return QColorGroup::NColorRoles;
+ return TQColorGroup::NColorRoles;
}
}
-QColorGroup::ColorRole PaletteEditor::effectFromItem( int item )
+TQColorGroup::ColorRole PaletteEditor::effectFromItem( int item )
{
switch( item )
{
case 0:
- return QColorGroup::Light;
+ return TQColorGroup::Light;
case 1:
- return QColorGroup::Midlight;
+ return TQColorGroup::Midlight;
case 2:
- return QColorGroup::Mid;
+ return TQColorGroup::Mid;
case 3:
- return QColorGroup::Dark;
+ return TQColorGroup::Dark;
case 4:
- return QColorGroup::Shadow;
+ return TQColorGroup::Shadow;
default:
- return QColorGroup::NColorRoles;
+ return TQColorGroup::NColorRoles;
}
}
void PaletteEditor::buildPalette()
{
int i;
- QColorGroup cg;
- QColor btn = buttonMainColor->color();
- QColor back = buttonMainColor2->color();
- QPalette automake( btn, back );
+ TQColorGroup cg;
+ TQColor btn = buttonMainColor->color();
+ TQColor back = buttonMainColor2->color();
+ TQPalette automake( btn, back );
for (i = 0; i<9; i++)
cg.setColor( centralFromItem(i), automake.active().color( centralFromItem(i) ) );
@@ -139,8 +139,8 @@ void PaletteEditor::buildPalette()
cg = editPalette.inactive();
- QPalette temp( editPalette.active().color( QColorGroup::Button ),
- editPalette.active().color( QColorGroup::Background ) );
+ TQPalette temp( editPalette.active().color( TQColorGroup::Button ),
+ editPalette.active().color( TQColorGroup::Background ) );
for (i = 0; i<9; i++)
cg.setColor( centralFromItem(i), temp.inactive().color( centralFromItem(i) ) );
@@ -161,10 +161,10 @@ void PaletteEditor::buildPalette()
void PaletteEditor::buildActiveEffect()
{
- QColorGroup cg = editPalette.active();
- QColor btn = cg.color( QColorGroup::Button );
+ TQColorGroup cg = editPalette.active();
+ TQColor btn = cg.color( TQColorGroup::Button );
- QPalette temp( btn, btn );
+ TQPalette temp( btn, btn );
for (int i = 0; i<5; i++)
cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) );
@@ -183,10 +183,10 @@ void PaletteEditor::buildInactive()
void PaletteEditor::buildInactiveEffect()
{
- QColorGroup cg = editPalette.inactive();
+ TQColorGroup cg = editPalette.inactive();
- QColor light, midlight, mid, dark, shadow;
- QColor btn = cg.color( QColorGroup::Button );
+ TQColor light, midlight, mid, dark, shadow;
+ TQColor btn = cg.color( TQColorGroup::Button );
light = btn.light(150);
midlight = btn.light(115);
@@ -194,11 +194,11 @@ void PaletteEditor::buildInactiveEffect()
dark = btn.dark();
shadow = black;
- cg.setColor( QColorGroup::Light, light );
- cg.setColor( QColorGroup::Midlight, midlight );
- cg.setColor( QColorGroup::Mid, mid );
- cg.setColor( QColorGroup::Dark, dark );
- cg.setColor( QColorGroup::Shadow, shadow );
+ cg.setColor( TQColorGroup::Light, light );
+ cg.setColor( TQColorGroup::Midlight, midlight );
+ cg.setColor( TQColorGroup::Mid, mid );
+ cg.setColor( TQColorGroup::Dark, dark );
+ cg.setColor( TQColorGroup::Shadow, shadow );
editPalette.setInactive( cg );
setPreviewPalette( editPalette );
@@ -207,9 +207,9 @@ void PaletteEditor::buildInactiveEffect()
void PaletteEditor::buildDisabled()
{
- QColorGroup cg = editPalette.active();
- cg.setColor( QColorGroup::ButtonText, darkGray );
- cg.setColor( QColorGroup::Foreground, darkGray );
+ TQColorGroup cg = editPalette.active();
+ cg.setColor( TQColorGroup::ButtonText, darkGray );
+ cg.setColor( TQColorGroup::Foreground, darkGray );
editPalette.setDisabled( cg );
buildDisabledEffect();
@@ -217,10 +217,10 @@ void PaletteEditor::buildDisabled()
void PaletteEditor::buildDisabledEffect()
{
- QColorGroup cg = editPalette.disabled();
+ TQColorGroup cg = editPalette.disabled();
- QColor light, midlight, mid, dark, shadow;
- QColor btn = cg.color( QColorGroup::Button );
+ TQColor light, midlight, mid, dark, shadow;
+ TQColor btn = cg.color( TQColorGroup::Button );
light = btn.light(150);
midlight = btn.light(115);
@@ -228,20 +228,20 @@ void PaletteEditor::buildDisabledEffect()
dark = btn.dark();
shadow = black;
- cg.setColor( QColorGroup::Light, light );
- cg.setColor( QColorGroup::Midlight, midlight );
- cg.setColor( QColorGroup::Mid, mid );
- cg.setColor( QColorGroup::Dark, dark );
- cg.setColor( QColorGroup::Shadow, shadow );
+ cg.setColor( TQColorGroup::Light, light );
+ cg.setColor( TQColorGroup::Midlight, midlight );
+ cg.setColor( TQColorGroup::Mid, mid );
+ cg.setColor( TQColorGroup::Dark, dark );
+ cg.setColor( TQColorGroup::Shadow, shadow );
editPalette.setDisabled( cg );
setPreviewPalette( editPalette );
updateStyledButtons();
}
-void PaletteEditor::setPreviewPalette( const QPalette& pal )
+void PaletteEditor::setPreviewPalette( const TQPalette& pal )
{
- QColorGroup cg;
+ TQColorGroup cg;
switch (paletteCombo->currentItem()) {
case 0:
@@ -264,34 +264,34 @@ void PaletteEditor::setPreviewPalette( const QPalette& pal )
void PaletteEditor::updateStyledButtons()
{
- buttonMainColor->setColor( editPalette.active().color( QColorGroup::Button ));
- buttonMainColor2->setColor( editPalette.active().color( QColorGroup::Background ));
+ buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button ));
+ buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background ));
}
-void PaletteEditor::setPal( const QPalette& pal )
+void PaletteEditor::setPal( const TQPalette& pal )
{
editPalette = pal;
setPreviewPalette( pal );
updateStyledButtons();
}
-QPalette PaletteEditor::pal() const
+TQPalette PaletteEditor::pal() const
{
return editPalette;
}
-QPalette PaletteEditor::getPalette( bool *ok, const QPalette &init, BackgroundMode mode,
- QWidget* parent, const char* name, FormWindow *fw )
+TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode,
+ TQWidget* parent, const char* name, FormWindow *fw )
{
PaletteEditor* dlg = new PaletteEditor( fw, parent, name, TRUE );
dlg->setupBackgroundMode( mode );
- if ( init != QPalette() )
+ if ( init != TQPalette() )
dlg->setPal( init );
int resultCode = dlg->exec();
- QPalette result = init;
- if ( resultCode == QDialog::Accepted ) {
+ TQPalette result = init;
+ if ( resultCode == TQDialog::Accepted ) {
if ( ok )
*ok = TRUE;
result = dlg->pal();
diff --git a/kdevdesigner/designer/paletteeditorimpl.h b/kdevdesigner/designer/paletteeditorimpl.h
index fc3ee231..ed911faa 100644
--- a/kdevdesigner/designer/paletteeditorimpl.h
+++ b/kdevdesigner/designer/paletteeditorimpl.h
@@ -36,11 +36,11 @@ class PaletteEditor : public PaletteEditorBase
Q_OBJECT
public:
- PaletteEditor( FormWindow *fw, QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
+ PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
~PaletteEditor();
- static QPalette getPalette( bool *ok, const QPalette &pal, BackgroundMode mode = PaletteBackground,
- QWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+ static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
+ TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
protected slots:
void onChooseMainColor();
@@ -57,17 +57,17 @@ protected:
void buildDisabledEffect();
private:
- void setPreviewPalette( const QPalette& );
+ void setPreviewPalette( const TQPalette& );
void updateStyledButtons();
void setupBackgroundMode( BackgroundMode mode ) { backgroundMode = mode; }
- QPalette pal() const;
- void setPal( const QPalette& );
+ TQPalette pal() const;
+ void setPal( const TQPalette& );
- QColorGroup::ColorRole centralFromItem( int );
- QColorGroup::ColorRole effectFromItem( int );
- QPalette editPalette;
- QPalette previewPalette;
+ TQColorGroup::ColorRole centralFromItem( int );
+ TQColorGroup::ColorRole effectFromItem( int );
+ TQPalette editPalette;
+ TQPalette previewPalette;
FormWindow *formWindow;
BackgroundMode backgroundMode;
diff --git a/kdevdesigner/designer/pixmapchooser.cpp b/kdevdesigner/designer/pixmapchooser.cpp
index aaac22c0..28912c62 100644
--- a/kdevdesigner/designer/pixmapchooser.cpp
+++ b/kdevdesigner/designer/pixmapchooser.cpp
@@ -24,7 +24,7 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include <kiconloader.h>
#include <kimageio.h>
@@ -45,41 +45,41 @@
#include "pixmapcollection.h"
#include "project.h"
-#include <qapplication.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qiconview.h>
+#include <tqapplication.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqiconview.h>
#if defined(DESIGNER)
static ImageIconProvider *imageIconProvider = 0;
#endif
-PixmapView::PixmapView( QWidget *parent )
- : QScrollView( parent )
+PixmapView::PixmapView( TQWidget *parent )
+ : TQScrollView( parent )
{
viewport()->setBackgroundMode( PaletteBase );
}
-void PixmapView::setPixmap( const QPixmap &pix )
+void PixmapView::setPixmap( const TQPixmap &pix )
{
pixmap = pix;
resizeContents( pixmap.size().width(), pixmap.size().height() );
viewport()->repaint( FALSE );
}
-void PixmapView::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
+void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
{
- p->fillRect( cx, cy, cw, ch, colorGroup().brush( QColorGroup::Base ) );
+ p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) );
p->drawPixmap( 0, 0, pixmap );
}
-void PixmapView::previewUrl( const QUrl &u )
+void PixmapView::previewUrl( const TQUrl &u )
{
if ( u.isLocalFile() ) {
- QString path = u.path();
- QPixmap pix( path );
+ TQString path = u.path();
+ TQPixmap pix( path );
if ( !pix.isNull() )
setPixmap( pix );
} else {
@@ -87,12 +87,12 @@ void PixmapView::previewUrl( const QUrl &u )
}
}
-static void buildImageFormatList( QString &filter, QString &all )
+static void buildImageFormatList( TQString &filter, TQString &all )
{
all = qApp->translate( "qChoosePixmap", "All Pixmaps (" );
- for ( uint i = 0; i < QImageIO::outputFormats().count(); i++ ) {
- QString outputFormat = QImageIO::outputFormats().at( i );
- QString outputExtension;
+ for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
+ TQString outputFormat = TQImageIO::outputFormats().at( i );
+ TQString outputExtension;
if ( outputFormat != "JPEG" )
outputExtension = outputFormat.lower();
else
@@ -105,28 +105,28 @@ static void buildImageFormatList( QString &filter, QString &all )
filter += qApp->translate( "qChoosePixmap", "All Files (*)" );
}
-QStringList qChoosePixmaps( QWidget *parent )
+TQStringList qChoosePixmaps( TQWidget *parent )
{
-/* if ( !imageIconProvider && !QFileDialog::iconProvider() )
- QFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) );
+/* if ( !imageIconProvider && !TQFileDialog::iconProvider() )
+ TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) );
- QString filter;
- QString all;
+ TQString filter;
+ TQString all;
buildImageFormatList( filter, all );
- QFileDialog fd( QString::null, filter, parent, 0, TRUE );
- fd.setMode( QFileDialog::ExistingFiles );
+ TQFileDialog fd( TQString::null, filter, parent, 0, TRUE );
+ fd.setMode( TQFileDialog::ExistingFiles );
fd.setContentsPreviewEnabled( TRUE );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
- fd.setViewMode( QFileDialog::List );
- fd.setPreviewMode( QFileDialog::Contents );
+ fd.setViewMode( TQFileDialog::List );
+ fd.setPreviewMode( TQFileDialog::Contents );
fd.setCaption( qApp->translate( "qChoosePixmap", "Choose Images..." ) );
- if ( fd.exec() == QDialog::Accepted )
+ if ( fd.exec() == TQDialog::Accepted )
return fd.selectedFiles();
- return QStringList();*/
- QStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
- KFileDialog dlg(QString::null, mimetypes.join(" "), parent, "filedialog", true);
+ return TQStringList();*/
+ TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
+ KFileDialog dlg(TQString::null, mimetypes.join(" "), parent, "filedialog", true);
dlg.setOperationMode( KFileDialog::Opening );
dlg.setCaption( qApp->translate( "qChoosePixmap", "Choose Images..." ) );
dlg.setMode( KFile::Files );
@@ -134,36 +134,36 @@ QStringList qChoosePixmaps( QWidget *parent )
dlg.setPreviewWidget( ip );
if (dlg.exec())
return dlg.selectedFiles();
- return QStringList();
+ return TQStringList();
}
-QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QString *fn )
+TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, TQString *fn )
{
#if defined(DESIGNER)
if ( !fw || fw->savePixmapInline() ) {
-/* if ( !imageIconProvider && !QFileDialog::iconProvider() )
- QFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) );
+/* if ( !imageIconProvider && !TQFileDialog::iconProvider() )
+ TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) );
- QString filter;
- QString all;
+ TQString filter;
+ TQString all;
buildImageFormatList( filter, all );
- QFileDialog fd( QString::null, filter, parent, 0, TRUE );
+ TQFileDialog fd( TQString::null, filter, parent, 0, TRUE );
fd.setContentsPreviewEnabled( TRUE );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
- fd.setViewMode( QFileDialog::List );
- fd.setPreviewMode( QFileDialog::Contents );
+ fd.setViewMode( TQFileDialog::List );
+ fd.setPreviewMode( TQFileDialog::Contents );
fd.setCaption( qApp->translate( "qChoosePixmap", "Choose Pixmap" ) );
- if ( fd.exec() == QDialog::Accepted ) {
- QPixmap pix( fd.selectedFile() );
+ if ( fd.exec() == TQDialog::Accepted ) {
+ TQPixmap pix( fd.selectedFile() );
if ( fn )
*fn = fd.selectedFile();
MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() );
return pix;
}*/
- QStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
- KFileDialog dlg(QString::null, mimetypes.join(" "), parent, "filedialog", true);
+ TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
+ KFileDialog dlg(TQString::null, mimetypes.join(" "), parent, "filedialog", true);
dlg.setOperationMode( KFileDialog::Opening );
dlg.setCaption( qApp->translate( "qChoosePixmap", "Choose Pixmap" ) );
dlg.setMode( KFile::File );
@@ -171,7 +171,7 @@ QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QStr
dlg.setPreviewWidget( ip );
if (dlg.exec())
{
- QPixmap pix( dlg.selectedURL().path() );
+ TQPixmap pix( dlg.selectedURL().path() );
if ( fn )
*fn = dlg.selectedURL().path();
MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dlg.selectedURL().path() );
@@ -182,19 +182,19 @@ QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QStr
dia.setProject( fw->project() );
dia.setChooserMode( TRUE );
dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
- if ( dia.exec() == QDialog::Accepted ) {
- QPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) );
+ if ( dia.exec() == TQDialog::Accepted ) {
+ TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) );
MetaDataBase::setPixmapKey( fw, pix.serialNumber(), dia.viewPixmaps->currentItem()->text() );
return pix;
}
} else {
PixmapFunction dia( parent, 0, TRUE );
- QObject::connect( dia.helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" );
dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) );
dia.editArguments->setFocus();
- if ( dia.exec() == QDialog::Accepted ) {
- QPixmap pix;
+ if ( dia.exec() == TQDialog::Accepted ) {
+ TQPixmap pix;
// we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that
pix.convertFromImage( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ).convertToImage() );
@@ -207,25 +207,25 @@ QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QStr
Q_UNUSED( fw );
Q_UNUSED( old );
#endif
- return QPixmap();
+ return TQPixmap();
}
-ImageIconProvider::ImageIconProvider( QWidget *parent, const char *name )
- : QFileIconProvider( parent, name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) )
+ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name )
+ : TQFileIconProvider( parent, name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) )
{
- fmts = QImage::inputFormats();
+ fmts = TQImage::inputFormats();
}
ImageIconProvider::~ImageIconProvider()
{
}
-const QPixmap * ImageIconProvider::pixmap( const QFileInfo &fi )
+const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi )
{
- QString ext = fi.extension().upper();
+ TQString ext = fi.extension().upper();
if ( fmts.contains( ext ) ) {
return &imagepm;
} else {
- return QFileIconProvider::pixmap( fi );
+ return TQFileIconProvider::pixmap( fi );
}
}
diff --git a/kdevdesigner/designer/pixmapchooser.h b/kdevdesigner/designer/pixmapchooser.h
index cea45bfd..a03c6878 100644
--- a/kdevdesigner/designer/pixmapchooser.h
+++ b/kdevdesigner/designer/pixmapchooser.h
@@ -27,26 +27,26 @@
#ifndef PIXMAPCHOOSER_H
#define PIXMAPCHOOSER_H
-#include <qfiledialog.h>
-#include <qscrollview.h>
-#include <qpixmap.h>
-#include <qurl.h>
+#include <tqfiledialog.h>
+#include <tqscrollview.h>
+#include <tqpixmap.h>
+#include <tqurl.h>
class FormWindow;
-class PixmapView : public QScrollView,
+class PixmapView : public TQScrollView,
public QFilePreview
{
Q_OBJECT
public:
- PixmapView( QWidget *parent );
- void setPixmap( const QPixmap &pix );
- void drawContents( QPainter *p, int, int, int, int );
- void previewUrl( const QUrl &u );
+ PixmapView( TQWidget *parent );
+ void setPixmap( const TQPixmap &pix );
+ void drawContents( TQPainter *p, int, int, int, int );
+ void previewUrl( const TQUrl &u );
private:
- QPixmap pixmap;
+ TQPixmap pixmap;
};
@@ -55,18 +55,18 @@ class ImageIconProvider : public QFileIconProvider
Q_OBJECT
public:
- ImageIconProvider( QWidget *parent = 0, const char *name = 0 );
+ ImageIconProvider( TQWidget *parent = 0, const char *name = 0 );
~ImageIconProvider();
- const QPixmap *pixmap( const QFileInfo &fi );
+ const TQPixmap *pixmap( const TQFileInfo &fi );
private:
- QStrList fmts;
- QPixmap imagepm;
+ TQStrList fmts;
+ TQPixmap imagepm;
};
-QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw = 0, const QPixmap &old = QPixmap(), QString *fn = 0 );
-QStringList qChoosePixmaps( QWidget *parent );
+TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(), TQString *fn = 0 );
+TQStringList qChoosePixmaps( TQWidget *parent );
#endif
diff --git a/kdevdesigner/designer/pixmapcollection.cpp b/kdevdesigner/designer/pixmapcollection.cpp
index c8b14ffa..d0692de1 100644
--- a/kdevdesigner/designer/pixmapcollection.cpp
+++ b/kdevdesigner/designer/pixmapcollection.cpp
@@ -27,17 +27,17 @@
#include "pixmapcollection.h"
#include "project.h"
#include "mainwindow.h"
-#include <qmime.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qimage.h>
+#include <tqmime.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqimage.h>
PixmapCollection::PixmapCollection( Project *pro )
: project( pro )
{
iface = new DesignerPixmapCollectionImpl( this );
- mimeSourceFactory = new QMimeSourceFactory();
+ mimeSourceFactory = new TQMimeSourceFactory();
}
PixmapCollection::~PixmapCollection()
@@ -52,7 +52,7 @@ bool PixmapCollection::addPixmap( const Pixmap &pix, bool force )
savePixmap( pixmap );
if ( !force ) {
- for ( QValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
+ for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
if ( (*it).name == pixmap.name )
return FALSE;
}
@@ -64,9 +64,9 @@ bool PixmapCollection::addPixmap( const Pixmap &pix, bool force )
return TRUE;
}
-void PixmapCollection::removePixmap( const QString &name )
+void PixmapCollection::removePixmap( const TQString &name )
{
- for ( QValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
+ for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
if ( (*it).name == name ) {
pixList.remove( it );
break;
@@ -75,24 +75,24 @@ void PixmapCollection::removePixmap( const QString &name )
project->setModified( TRUE );
}
-QValueList<PixmapCollection::Pixmap> PixmapCollection::pixmaps() const
+TQValueList<PixmapCollection::Pixmap> PixmapCollection::pixmaps() const
{
return pixList;
}
-QString PixmapCollection::unifyName( const QString &n )
+TQString PixmapCollection::unifyName( const TQString &n )
{
- QString name = n;
+ TQString name = n;
bool restart = FALSE;
int added = 1;
- for ( QValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
+ for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
if ( restart )
it = pixList.begin();
restart = FALSE;
if ( name == (*it).name ) {
name = n;
- name += "_" + QString::number( added );
+ name += "_" + TQString::number( added );
++added;
restart = TRUE;
}
@@ -104,28 +104,28 @@ QString PixmapCollection::unifyName( const QString &n )
void PixmapCollection::setActive( bool b )
{
if ( b )
- QMimeSourceFactory::defaultFactory()->addFactory( mimeSourceFactory );
+ TQMimeSourceFactory::defaultFactory()->addFactory( mimeSourceFactory );
else
- QMimeSourceFactory::defaultFactory()->removeFactory( mimeSourceFactory );
+ TQMimeSourceFactory::defaultFactory()->removeFactory( mimeSourceFactory );
}
-QPixmap PixmapCollection::pixmap( const QString &name )
+TQPixmap PixmapCollection::pixmap( const TQString &name )
{
- for ( QValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
+ for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
if ( (*it).name == name )
return (*it).pix;
}
- return QPixmap();
+ return TQPixmap();
}
void PixmapCollection::savePixmap( Pixmap &pix )
{
if ( pix.absname == imageDir() + "/" + pix.name )
return; // no need to save, it is already there
- QString rel = project->makeRelative( pix.absname );
+ TQString rel = project->makeRelative( pix.absname );
if ( rel[0] == '/' || ( rel[1] == ':' && rel[2] == '/' ) ) { // only save if file is outside the project
mkdir();
- pix.name = unifyName( QFileInfo( pix.absname ).baseName() ) + ".png";
+ pix.name = unifyName( TQFileInfo( pix.absname ).baseName() ) + ".png";
pix.absname = imageDir() + "/" + pix.name;
pix.pix.save( pix.absname, "PNG" );
} else if ( rel.isEmpty() ) {
@@ -136,34 +136,34 @@ void PixmapCollection::savePixmap( Pixmap &pix )
}
}
-QString PixmapCollection::imageDir() const
+TQString PixmapCollection::imageDir() const
{
- return QFileInfo( project->fileName() ).dirPath( TRUE ) + "/images";
+ return TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/images";
}
void PixmapCollection::mkdir()
{
- QString f = project->fileName();
- QDir d( QFileInfo( f ).dirPath( TRUE ) );
+ TQString f = project->fileName();
+ TQDir d( TQFileInfo( f ).dirPath( TRUE ) );
d.mkdir( "images" );
}
-void PixmapCollection::load( const QString& filename )
+void PixmapCollection::load( const TQString& filename )
{
if ( filename.isEmpty() )
return;
- QString absfile;
+ TQString absfile;
if ( filename[0] == '/' )
absfile = filename;
else
- absfile = QFileInfo( project->fileName() ).dirPath( TRUE ) + "/" + filename;
+ absfile = TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/" + filename;
- QPixmap pm( absfile );
+ TQPixmap pm( absfile );
if ( pm.isNull() )
return;
Pixmap pix;
- pix.name = QFileInfo( absfile ).fileName();
+ pix.name = TQFileInfo( absfile ).fileName();
pix.absname = absfile;
pix.pix = pm;
addPixmap( pix, TRUE );
diff --git a/kdevdesigner/designer/pixmapcollection.h b/kdevdesigner/designer/pixmapcollection.h
index ed36ecb8..6993c146 100644
--- a/kdevdesigner/designer/pixmapcollection.h
+++ b/kdevdesigner/designer/pixmapcollection.h
@@ -27,9 +27,9 @@
#ifndef PIXMAPCOLLECTION_H
#define PIXMAPCOLLECTION_H
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
#include "designerappiface.h"
class QMimeSourceFactory;
@@ -40,9 +40,9 @@ class PixmapCollection
public:
struct Pixmap
{
- QPixmap pix;
- QString name;
- QString absname;
+ TQPixmap pix;
+ TQString name;
+ TQString absname;
Q_DUMMY_COMPARISON_OPERATOR( Pixmap )
};
@@ -50,28 +50,28 @@ public:
~PixmapCollection();
bool addPixmap( const Pixmap &pix, bool force = TRUE );
- void removePixmap( const QString &name );
- QPixmap pixmap( const QString &name );
+ void removePixmap( const TQString &name );
+ TQPixmap pixmap( const TQString &name );
- QValueList<Pixmap> pixmaps() const;
+ TQValueList<Pixmap> pixmaps() const;
bool isEmpty() const;
void setActive( bool b );
- void load( const QString& filename );
+ void load( const TQString& filename );
DesignerPixmapCollection *iFace();
private:
- QString unifyName( const QString &n );
+ TQString unifyName( const TQString &n );
void savePixmap( Pixmap &pix );
- QString imageDir() const;
+ TQString imageDir() const;
void mkdir();
private:
- QValueList<Pixmap> pixList;
- QMimeSourceFactory *mimeSourceFactory;
+ TQValueList<Pixmap> pixList;
+ TQMimeSourceFactory *mimeSourceFactory;
Project *project;
DesignerPixmapCollectionImpl *iface;
diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui.h b/kdevdesigner/designer/pixmapcollectioneditor.ui.h
index 4d82f3f3..03cd300c 100644
--- a/kdevdesigner/designer/pixmapcollectioneditor.ui.h
+++ b/kdevdesigner/designer/pixmapcollectioneditor.ui.h
@@ -40,19 +40,19 @@ void PixmapCollectionEditor::addPixmap()
if ( !project )
return;
- QString f;
- QStringList pixmaps = qChoosePixmaps( this );
+ TQString f;
+ TQStringList pixmaps = qChoosePixmaps( this );
if ( pixmaps.isEmpty() )
return;
- QString lastName;
- for ( QStringList::ConstIterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) {
- QPixmap pm( *it );
+ TQString lastName;
+ for ( TQStringList::ConstIterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) {
+ TQPixmap pm( *it );
if ( pm.isNull() )
continue;
PixmapCollection::Pixmap pixmap;
pixmap.pix = pm;
- QFileInfo fi ( *it );
+ TQFileInfo fi ( *it );
pixmap.name = fi.fileName();
pixmap.absname = fi.filePath();
if ( !project->pixmapCollection()->addPixmap( pixmap, FALSE ) )
@@ -61,7 +61,7 @@ void PixmapCollectionEditor::addPixmap()
}
updateView();
- QIconViewItem *item = viewPixmaps->findItem( lastName );
+ TQIconViewItem *item = viewPixmaps->findItem( lastName );
if ( item ) {
viewPixmaps->setCurrentItem( item );
viewPixmaps->ensureItemVisible( item );
@@ -84,10 +84,10 @@ void PixmapCollectionEditor::updateView()
viewPixmaps->clear();
- QValueList<PixmapCollection::Pixmap> pixmaps = project->pixmapCollection()->pixmaps();
- for ( QValueList<PixmapCollection::Pixmap>::Iterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) {
+ TQValueList<PixmapCollection::Pixmap> pixmaps = project->pixmapCollection()->pixmaps();
+ for ( TQValueList<PixmapCollection::Pixmap>::Iterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) {
// #### might need to scale down the pixmap
- QIconViewItem *item = new QIconViewItem( viewPixmaps, (*it).name, scaledPixmap( (*it).pix ) );
+ TQIconViewItem *item = new TQIconViewItem( viewPixmaps, (*it).name, scaledPixmap( (*it).pix ) );
//item->setRenameEnabled( TRUE ); // this will be a bit harder to implement
item->setDragEnabled( FALSE );
item->setDropEnabled( FALSE );
@@ -96,7 +96,7 @@ void PixmapCollectionEditor::updateView()
currentChanged( viewPixmaps->firstItem() );
}
-void PixmapCollectionEditor::currentChanged( QIconViewItem * i )
+void PixmapCollectionEditor::currentChanged( TQIconViewItem * i )
{
buttonOk->setEnabled( !!i );
}
@@ -110,8 +110,8 @@ void PixmapCollectionEditor::setChooserMode( bool c )
buttonCancel->show();
buttonOk->setEnabled( FALSE );
buttonOk->setDefault( TRUE );
- connect( viewPixmaps, SIGNAL( doubleClicked( QIconViewItem * ) ), buttonOk, SIGNAL( clicked() ) );
- connect( viewPixmaps, SIGNAL( returnPressed( QIconViewItem * ) ), buttonOk, SIGNAL( clicked() ) );
+ connect( viewPixmaps, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) );
+ connect( viewPixmaps, TQT_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) );
setCaption( i18n( "Choose Image" ) );
} else {
buttonClose->show();
@@ -122,9 +122,9 @@ void PixmapCollectionEditor::setChooserMode( bool c )
updateView();
}
-void PixmapCollectionEditor::setCurrentItem( const QString & name )
+void PixmapCollectionEditor::setCurrentItem( const TQString & name )
{
- QIconViewItem *i = viewPixmaps->findItem( name );
+ TQIconViewItem *i = viewPixmaps->findItem( name );
if ( i ) {
viewPixmaps->setCurrentItem( i );
currentChanged( i );
@@ -137,12 +137,12 @@ void PixmapCollectionEditor::setProject( Project * pro )
updateView();
}
-QPixmap PixmapCollectionEditor::scaledPixmap( const QPixmap & p )
+TQPixmap PixmapCollectionEditor::scaledPixmap( const TQPixmap & p )
{
- QPixmap pix( p );
+ TQPixmap pix( p );
if ( pix.width() < 50 && pix.height() < 50 )
return pix;
- QImage img;
+ TQImage img;
img = pix;
img = img.smoothScale( 50, 50 );
pix.convertFromImage( img );
diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp
index 198880f9..40d77fd1 100644
--- a/kdevdesigner/designer/popupmenueditor.cpp
+++ b/kdevdesigner/designer/popupmenueditor.cpp
@@ -24,18 +24,18 @@
**
**********************************************************************/
-#include <qapplication.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qdragobject.h>
-#include <qlineedit.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqdragobject.h>
+#include <tqlineedit.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include "actiondnd.h"
#include "actioneditorimpl.h"
#include "command.h"
@@ -54,34 +54,34 @@
class PopupMenuEditorItemPtrDrag : public QStoredDrag
{
public:
- PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item, QWidget * parent = 0,
+ PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item, TQWidget * parent = 0,
const char * name = 0 );
~PopupMenuEditorItemPtrDrag() {};
- static bool canDecode( QDragMoveEvent * e );
- static bool decode( QDropEvent * e, PopupMenuEditorItem ** i );
+ static bool canDecode( TQDragMoveEvent * e );
+ static bool decode( TQDropEvent * e, PopupMenuEditorItem ** i );
};
// Drag Object Implementation ---------------------------------------
PopupMenuEditorItemPtrDrag::PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item,
- QWidget * parent, const char * name )
- : QStoredDrag( "qt/popupmenueditoritemptr", parent, name )
+ TQWidget * parent, const char * name )
+ : TQStoredDrag( "qt/popupmenueditoritemptr", parent, name )
{
- QByteArray data( sizeof( Q_LONG ) );
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data( sizeof( Q_LONG ) );
+ TQDataStream stream( data, IO_WriteOnly );
stream << ( Q_LONG ) item;
setEncodedData( data );
}
-bool PopupMenuEditorItemPtrDrag::canDecode( QDragMoveEvent * e )
+bool PopupMenuEditorItemPtrDrag::canDecode( TQDragMoveEvent * e )
{
return e->provides( "qt/popupmenueditoritemptr" );
}
-bool PopupMenuEditorItemPtrDrag::decode( QDropEvent * e, PopupMenuEditorItem ** i )
+bool PopupMenuEditorItemPtrDrag::decode( TQDropEvent * e, PopupMenuEditorItem ** i )
{
- QByteArray data = e->encodedData( "qt/popupmenueditoritemptr" );
- QDataStream stream( data, IO_ReadOnly );
+ TQByteArray data = e->encodedData( "qt/popupmenueditoritemptr" );
+ TQDataStream stream( data, IO_ReadOnly );
if ( !data.size() )
return FALSE;
@@ -95,8 +95,8 @@ bool PopupMenuEditorItemPtrDrag::decode( QDropEvent * e, PopupMenuEditorItem **
// PopupMenuEditorItem Implementation -----------------------------------
-PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, QObject * parent, const char * name )
- : QObject( parent, name ),
+PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * parent, const char * name )
+ : TQObject( parent, name ),
a( 0 ),
s( 0 ),
m( menu ),
@@ -104,14 +104,14 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, QObject * pare
removable( FALSE )
{
init();
- a = new QAction( this );
- QObject::connect( a, SIGNAL( destroyed() ), this, SLOT( selfDestruct() ) );
+ a = new TQAction( this );
+ TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) );
}
-PopupMenuEditorItem::PopupMenuEditorItem( QAction * action, PopupMenuEditor * menu,
- QObject * parent, const char * name )
- : QObject( parent, name ),
+PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * menu,
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ),
a( action ),
s( 0 ),
m( menu ),
@@ -126,8 +126,8 @@ PopupMenuEditorItem::PopupMenuEditorItem( QAction * action, PopupMenuEditor * me
}
PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuEditor * menu,
- QObject * parent, const char * name )
- : QObject( parent, name ),
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ),
a( item->a ),
s( 0 ),
m( menu ),
@@ -135,7 +135,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuE
removable( item->removable )
{
init();
- if ( ::qt_cast<QActionGroup*>(a) )
+ if ( ::qt_cast<TQActionGroup*>(a) )
a->installEventFilter( this );
}
@@ -147,10 +147,10 @@ PopupMenuEditorItem::~PopupMenuEditorItem()
void PopupMenuEditorItem::init()
{
if ( a ) {
- QObject::connect( a, SIGNAL( destroyed() ), this, SLOT( selfDestruct() ) );
+ TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) );
if ( m && !isSeparator() ) {
s = new PopupMenuEditor( m->formWindow(), m );
- QString n = "PopupMenuEditor";
+ TQString n = "PopupMenuEditor";
m->formWindow()->unify( s, n, TRUE );
s->setName( n );
MetaDataBase::addEntry( s );
@@ -175,7 +175,7 @@ void PopupMenuEditorItem::setVisible( bool enable )
bool PopupMenuEditorItem::isVisible() const
{
- QActionGroup *g = ::qt_cast<QActionGroup*>(a);
+ TQActionGroup *g = ::qt_cast<TQActionGroup*>(a);
if ( g )
return ( g->isVisible() && g->usesDropDown() );
else if ( a )
@@ -212,25 +212,25 @@ int PopupMenuEditorItem::count() const
{
if ( s ) {
return s->count();
- } else if ( ::qt_cast<QActionGroup*>(a) ) {
- const QObjectList * l = a->children();
+ } else if ( ::qt_cast<TQActionGroup*>(a) ) {
+ const TQObjectList * l = a->children();
if ( l )
return l->count();
}
return 0;
}
-bool PopupMenuEditorItem::eventFilter( QObject * o, QEvent * event )
+bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event )
{
- if ( ! ::qt_cast<QActionGroup*>( o ) )
+ if ( ! ::qt_cast<TQActionGroup*>( o ) )
return FALSE;
- if ( event->type() == QEvent::ChildInserted ) {
- QChildEvent * ce = ( QChildEvent * ) event;
- QObject * c = ce->child();
- QAction * action = ::qt_cast<QAction*>( c );
+ if ( event->type() == TQEvent::ChildInserted ) {
+ TQChildEvent * ce = ( TQChildEvent * ) event;
+ TQObject * c = ce->child();
+ TQAction * action = ::qt_cast<TQAction*>( c );
if ( s->find( action ) != -1 ) // avoid duplicates
return FALSE;
- QActionGroup * actionGroup = ::qt_cast<QActionGroup*>( c );
+ TQActionGroup * actionGroup = ::qt_cast<TQActionGroup*>( c );
if ( actionGroup )
s->insert( actionGroup );
else if ( action )
@@ -255,8 +255,8 @@ PopupMenuEditorItem * PopupMenuEditor::draggedItem = 0;
int PopupMenuEditor::clipboardOperation = 0;
PopupMenuEditorItem * PopupMenuEditor::clipboardItem = 0;
-PopupMenuEditor::PopupMenuEditor( FormWindow * fw, QWidget * parent, const char * name )
- : QWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase | WResizeNoErase ),
+PopupMenuEditor::PopupMenuEditor( FormWindow * fw, TQWidget * parent, const char * name )
+ : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase | WResizeNoErase ),
formWnd( fw ),
parentMenu( parent ),
iconWidth( 0 ),
@@ -271,8 +271,8 @@ PopupMenuEditor::PopupMenuEditor( FormWindow * fw, QWidget * parent, const char
}
PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu,
- QWidget * parent, const char * name )
- : QWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase ),
+ TQWidget * parent, const char * name )
+ : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase ),
formWnd( fw ),
parentMenu( parent ),
iconWidth( menu->iconWidth ),
@@ -298,7 +298,7 @@ PopupMenuEditor::~PopupMenuEditor()
void PopupMenuEditor::init()
{
- reparent( ( QMainWindow * ) formWnd->mainContainer(), pos() );
+ reparent( ( TQMainWindow * ) formWnd->mainContainer(), pos() );
addItem.action()->setMenuText( i18n("new item") );
addSeparator.action()->setMenuText( i18n("new separator") );
@@ -306,15 +306,15 @@ void PopupMenuEditor::init()
setAcceptDrops( TRUE );
setFocusPolicy( StrongFocus );
- lineEdit = new QLineEdit( this );
+ lineEdit = new TQLineEdit( this );
lineEdit->hide();
- lineEdit->setFrameStyle(QFrame::Plain | QFrame::NoFrame);
+ lineEdit->setFrameStyle(TQFrame::Plain | TQFrame::NoFrame);
lineEdit->polish();
lineEdit->setBackgroundOrigin(ParentOrigin);
lineEdit->setBackgroundMode(PaletteButton);
lineEdit->installEventFilter( this );
- dropLine = new QWidget( this, 0, Qt::WStyle_NoBorder | WStyle_StaysOnTop );
+ dropLine = new TQWidget( this, 0, Qt::WStyle_NoBorder | WStyle_StaysOnTop );
dropLine->setBackgroundColor( Qt::red );
dropLine->hide();
@@ -342,39 +342,39 @@ void PopupMenuEditor::insert( PopupMenuEditorItem * item, int index )
emit inserted( item->action() );
}
-void PopupMenuEditor::insert( QAction * action, int index )
+void PopupMenuEditor::insert( TQAction * action, int index )
{
if ( !action )
return;
insert( new PopupMenuEditorItem( action, this, 0, action->name() ), index );
}
-void PopupMenuEditor::insert( QActionGroup * actionGroup, int index )
+void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index )
{
if ( !actionGroup )
return;
bool dropdown = actionGroup->usesDropDown();
- PopupMenuEditorItem *i = new PopupMenuEditorItem( (QAction *)actionGroup, this, 0,
- QString( actionGroup->name() ) + "Menu" );
- QActionGroup *g = 0;
- QObjectList *l = actionGroup->queryList( "QAction", 0, FALSE, FALSE );
- QObjectListIterator it( *l );
+ PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0,
+ TQString( actionGroup->name() ) + "Menu" );
+ TQActionGroup *g = 0;
+ TQObjectList *l = actionGroup->queryList( "TQAction", 0, FALSE, FALSE );
+ TQObjectListIterator it( *l );
insert( i, index );
for ( ; it.current(); ++it ) {
- g = ::qt_cast<QActionGroup*>(it.current());
+ g = ::qt_cast<TQActionGroup*>(it.current());
if ( g ) {
if ( dropdown )
i->s->insert( g );
else
insert( g );
} else {
- i->s->insert( (QAction*)it.current() );
+ i->s->insert( (TQAction*)it.current() );
}
}
delete l;
}
-int PopupMenuEditor::find( const QAction * action )
+int PopupMenuEditor::find( const TQAction * action )
{
PopupMenuEditorItem * i = itemList.first();
while ( i ) {
@@ -469,9 +469,9 @@ void PopupMenuEditor::paste( int index )
}
}
-void PopupMenuEditor::insertedActions( QPtrList<QAction> & list )
+void PopupMenuEditor::insertedActions( TQPtrList<TQAction> & list )
{
- QAction * a = 0;
+ TQAction * a = 0;
PopupMenuEditorItem * i = itemList.first();
while ( i ) {
@@ -485,7 +485,7 @@ void PopupMenuEditor::insertedActions( QPtrList<QAction> & list )
void PopupMenuEditor::show()
{
resizeToContents();
- QWidget::show();
+ TQWidget::show();
}
void PopupMenuEditor::choosePixmap( int index )
@@ -493,7 +493,7 @@ void PopupMenuEditor::choosePixmap( int index )
int idx = ( index == -1 ? currentIndex : index );
PopupMenuEditorItem * i = 0;
- QAction * a = 0;
+ TQAction * a = 0;
if ( idx < (int)itemList.count() ) {
i = itemList.at( idx );
@@ -503,7 +503,7 @@ void PopupMenuEditor::choosePixmap( int index )
}
hide(); // qChoosePixmap hides the menu
- QIconSet icons( qChoosePixmap( 0, formWnd, 0, 0 ) );
+ TQIconSet icons( qChoosePixmap( 0, formWnd, 0, 0 ) );
SetActionIconsCommand * cmd =
new SetActionIconsCommand( i18n( "Set Icon" ), formWnd, a, this, icons );
formWnd->commandHistory()->addCommand( cmd );
@@ -557,22 +557,22 @@ void PopupMenuEditor::setAccelerator( int key, Qt::ButtonState state, int index
int alt = ( state & Qt::AltButton ? Qt::ALT : 0 );
int meta = ( state & Qt::MetaButton ? Qt::META : 0 );
- QAction * a = i->action();
- QKeySequence ks = a->accel();
+ TQAction * a = i->action();
+ TQKeySequence ks = a->accel();
int keys[4] = { ks[0], ks[1], ks[2], ks[3] };
int n = 0;
while ( n < 4 && ks[n++] );
n--;
if ( n < 4 )
keys[n] = key | shift | ctrl | alt | meta;
- a->setAccel( QKeySequence( keys[0], keys[1], keys[2], keys[3] ) );
+ a->setAccel( TQKeySequence( keys[0], keys[1], keys[2], keys[3] ) );
MetaDataBase::setPropertyChanged( a, "accel", TRUE );
resizeToContents();
}
void PopupMenuEditor::resizeToContents()
{
- QSize s = contentsSize();
+ TQSize s = contentsSize();
dropLine->resize( s.width(), 2 );
s.rwidth() += borderSize * 2;
s.rheight() += borderSize * 2;
@@ -618,13 +618,13 @@ void PopupMenuEditor::remove( int index )
}
}
-PopupMenuEditorItem * PopupMenuEditor::createItem( QAction * a )
+PopupMenuEditorItem * PopupMenuEditor::createItem( TQAction * a )
{
ActionEditor * ae = (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" );
if ( !a )
a = ae->newActionEx();
PopupMenuEditorItem * i = new PopupMenuEditorItem( a, this );
- QString n = QString( a->name() ) + "Item";
+ TQString n = TQString( a->name() ) + "Item";
formWindow()->unify( i, n, FALSE );
i->setName( n );
AddActionToPopupCommand * cmd =
@@ -677,7 +677,7 @@ PopupMenuEditorItem * PopupMenuEditor::itemAt( int y )
return &addSeparator;
}
-void PopupMenuEditor::setFocusAt( const QPoint & pos )
+void PopupMenuEditor::setFocusAt( const TQPoint & pos )
{
hideSubMenu();
lineEdit->hide();
@@ -712,30 +712,30 @@ void PopupMenuEditor::setFocusAt( const QPoint & pos )
showSubMenu();
}
-bool PopupMenuEditor::eventFilter( QObject * o, QEvent * e )
+bool PopupMenuEditor::eventFilter( TQObject * o, TQEvent * e )
{
- if ( o == lineEdit && e->type() == QEvent::FocusOut ) {
+ if ( o == lineEdit && e->type() == TQEvent::FocusOut ) {
leaveEditMode( 0 );
update();
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
-void PopupMenuEditor::paintEvent( QPaintEvent * )
+void PopupMenuEditor::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
+ TQPainter p( this );
p.save();
- QRegion reg( rect() );
- QRegion mid( borderSize, borderSize,
+ TQRegion reg( rect() );
+ TQRegion mid( borderSize, borderSize,
rect().width() - borderSize * 2, rect().height() - borderSize * 2 );
reg -= mid;
p.setClipRegion( reg );
- style().drawPrimitive( QStyle::PE_PanelPopup, &p, rect(), colorGroup() );
+ style().drawPrimitive( TQStyle::PE_PanelPopup, &p, rect(), colorGroup() );
p.restore();
drawItems( &p );
}
-void PopupMenuEditor::mousePressEvent( QMouseEvent * e )
+void PopupMenuEditor::mousePressEvent( TQMouseEvent * e )
{
mousePressPos = e->pos();
setFocusAt( mousePressPos );
@@ -743,7 +743,7 @@ void PopupMenuEditor::mousePressEvent( QMouseEvent * e )
update();
}
-void PopupMenuEditor::mouseDoubleClickEvent( QMouseEvent * )
+void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * )
{
setFocusAt( mousePressPos );
if ( currentItem() == &addSeparator ) {
@@ -759,7 +759,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( QMouseEvent * )
}
}
-void PopupMenuEditor::mouseMoveEvent( QMouseEvent * e )
+void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
{
if ( e->state() & Qt::LeftButton ) {
if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) {
@@ -787,7 +787,7 @@ void PopupMenuEditor::mouseMoveEvent( QMouseEvent * e )
// we will have two instances of the same pointer
// in the list. We use node instead.
int idx = itemList.find( draggedItem );
- QLNode * node = itemList.currentNode();
+ TQLNode * node = itemList.currentNode();
d->dragCopy(); // dragevents and stuff happens
@@ -810,7 +810,7 @@ void PopupMenuEditor::mouseMoveEvent( QMouseEvent * e )
}
}
-void PopupMenuEditor::dragEnterEvent( QDragEnterEvent * e )
+void PopupMenuEditor::dragEnterEvent( TQDragEnterEvent * e )
{
if ( e->provides( "qt/popupmenueditoritemptr" ) ||
e->provides( "application/x-designer-actions" ) ||
@@ -820,14 +820,14 @@ void PopupMenuEditor::dragEnterEvent( QDragEnterEvent * e )
}
}
-void PopupMenuEditor::dragLeaveEvent( QDragLeaveEvent * )
+void PopupMenuEditor::dragLeaveEvent( TQDragLeaveEvent * )
{
dropLine->hide();
}
-void PopupMenuEditor::dragMoveEvent( QDragMoveEvent * e )
+void PopupMenuEditor::dragMoveEvent( TQDragMoveEvent * e )
{
- QPoint pos = e->pos();
+ TQPoint pos = e->pos();
dropLine->move( borderSize, snapToItem( pos.y() ) );
if ( currentItem() != itemAt( pos.y() ) ) {
@@ -837,7 +837,7 @@ void PopupMenuEditor::dragMoveEvent( QDragMoveEvent * e )
}
}
-void PopupMenuEditor::dropEvent( QDropEvent * e )
+void PopupMenuEditor::dropEvent( TQDropEvent * e )
{
if ( !( e->provides( "qt/popupmenueditoritemptr" ) ||
e->provides( "application/x-designer-actions" ) ||
@@ -847,7 +847,7 @@ void PopupMenuEditor::dropEvent( QDropEvent * e )
// Hide the sub menu of the current item, but do it later
if ( currentIndex < (int)itemList.count() ) {
PopupMenuEditor *s = itemList.at( currentIndex )->s;
- QTimer::singleShot( 0, s, SLOT( hide() ) );
+ TQTimer::singleShot( 0, s, TQT_SLOT( hide() ) );
}
draggedItem = 0;
@@ -857,43 +857,43 @@ void PopupMenuEditor::dropEvent( QDropEvent * e )
PopupMenuEditorItemPtrDrag::decode( e, &i );
} else {
if ( e->provides( "application/x-designer-actiongroup" ) ) {
- QActionGroup * g = ::qt_cast<QDesignerActionGroup*>(ActionDrag::action());
+ TQActionGroup * g = ::qt_cast<QDesignerActionGroup*>(ActionDrag::action());
if ( g->usesDropDown() ) {
i = new PopupMenuEditorItem( g, this );
- QString n = QString( g->name() ) + "Item";
+ TQString n = TQString( g->name() ) + "Item";
formWindow()->unify( i, n, FALSE );
i->setName( n );
- QObjectList *l = g->queryList( "QAction", 0, FALSE, FALSE );
- QObjectListIterator it( *l );
+ TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE );
+ TQObjectListIterator it( *l );
for ( ; it.current(); ++it ) {
- g = ::qt_cast<QActionGroup*>(it.current());
+ g = ::qt_cast<TQActionGroup*>(it.current());
if ( g )
i->s->insert( g );
else
- i->s->insert( (QAction*)it.current() );
+ i->s->insert( (TQAction*)it.current() );
}
delete l;
} else {
dropInPlace( g, e->pos().y() );
}
} else if ( e->provides( "application/x-designer-actions" ) ) {
- QAction *a = ::qt_cast<QDesignerAction*>(ActionDrag::action());
+ TQAction *a = ::qt_cast<QDesignerAction*>(ActionDrag::action());
i = new PopupMenuEditorItem( a, this );
}
}
if ( i ) {
dropInPlace( i, e->pos().y() );
- QTimer::singleShot( 0, this, SLOT( resizeToContents() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( resizeToContents() ) );
}
- QTimer::singleShot( 0, this, SLOT( showSubMenu() ) );
- QTimer::singleShot( 0, this, SLOT( setFocus() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( showSubMenu() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( setFocus() ) );
dropLine->hide();
e->accept();
}
-void PopupMenuEditor::keyPressEvent( QKeyEvent * e )
+void PopupMenuEditor::keyPressEvent( TQKeyEvent * e )
{
if ( lineEdit->isHidden() ) { // In navigation mode
@@ -978,7 +978,7 @@ void PopupMenuEditor::keyPressEvent( QKeyEvent * e )
return;
if ( currentField == 1 ) {
showLineEdit();
- QApplication::sendEvent( lineEdit, e );
+ TQApplication::sendEvent( lineEdit, e );
e->accept();
return;
} else if ( currentField == 2 ) {
@@ -1002,21 +1002,21 @@ void PopupMenuEditor::keyPressEvent( QKeyEvent * e )
update();
}
-void PopupMenuEditor::focusInEvent( QFocusEvent * )
+void PopupMenuEditor::focusInEvent( TQFocusEvent * )
{
showSubMenu();
update();
parentMenu->update();
}
-void PopupMenuEditor::focusOutEvent( QFocusEvent * )
+void PopupMenuEditor::focusOutEvent( TQFocusEvent * )
{
- QWidget * fw = qApp->focusWidget();
+ TQWidget * fw = qApp->focusWidget();
if ( !fw || ( !::qt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) {
hideSubMenu();
if ( fw && ::qt_cast<MenuBarEditor*>(fw) )
return;
- QWidget * w = this;
+ TQWidget * w = this;
while ( w && w != fw && ::qt_cast<PopupMenuEditor*>(w) ) { // hide all popups
w->hide();
w = ((PopupMenuEditor *)w)->parentEditor();
@@ -1024,52 +1024,52 @@ void PopupMenuEditor::focusOutEvent( QFocusEvent * )
}
}
-void PopupMenuEditor::drawItem( QPainter * p, PopupMenuEditorItem * i,
- const QRect & r, int f ) const
+void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i,
+ const TQRect & r, int f ) const
{
int x = r.x();
int y = r.y();
int h = r.height();
- p->fillRect( r, colorGroup().brush( QColorGroup::Background ) );
+ p->fillRect( r, colorGroup().brush( TQColorGroup::Background ) );
if ( i->isSeparator() ) {
- style().drawPrimitive( QStyle::PE_Separator, p,
- QRect( r.x(), r.y() + 2, r.width(), 1 ),
- colorGroup(), QStyle::Style_Sunken | f );
+ style().drawPrimitive( TQStyle::PE_Separator, p,
+ TQRect( r.x(), r.y() + 2, r.width(), 1 ),
+ colorGroup(), TQStyle::Style_Sunken | f );
return;
}
- const QAction * a = i->action();
+ const TQAction * a = i->action();
if ( a->isToggleAction() && a->isOn() ) {
- style().drawPrimitive( QStyle::PE_CheckMark, p,
- QRect( x , y, iconWidth, h ),
+ style().drawPrimitive( TQStyle::PE_CheckMark, p,
+ TQRect( x , y, iconWidth, h ),
colorGroup(), f );
} else {
- QPixmap icon = a->iconSet().pixmap( QIconSet::Automatic, QIconSet::Normal );
+ TQPixmap icon = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal );
p->drawPixmap( x + ( iconWidth - icon.width() ) / 2,
y + ( h - icon.height() ) / 2,
icon );
}
x += iconWidth;
p->drawText( x, y, textWidth, h,
- QPainter::AlignLeft |
- QPainter::AlignVCenter |
+ TQPainter::AlignLeft |
+ TQPainter::AlignVCenter |
Qt::ShowPrefix |
Qt::SingleLine,
a->menuText() );
x += textWidth + borderSize * 3;
p->drawText( x, y, accelWidth, h,
- QPainter::AlignLeft | QPainter::AlignVCenter,
+ TQPainter::AlignLeft | TQPainter::AlignVCenter,
a->accel() );
if ( i->count() ) // Item has submenu
- style().drawPrimitive( QStyle::PE_ArrowRight, p,
- QRect( r.width() - arrowWidth, r.y(), arrowWidth, r.height() ),
+ style().drawPrimitive( TQStyle::PE_ArrowRight, p,
+ TQRect( r.width() - arrowWidth, r.y(), arrowWidth, r.height() ),
colorGroup(), f );
}
-void PopupMenuEditor::drawWinFocusRect( QPainter * p, const QRect & r ) const
+void PopupMenuEditor::drawWinFocusRect( TQPainter * p, const TQRect & r ) const
{
if ( currentIndex < (int)itemList.count() &&
((PopupMenuEditor*)this)->itemList.at( currentIndex )->isSeparator() ) {
@@ -1087,15 +1087,15 @@ void PopupMenuEditor::drawWinFocusRect( QPainter * p, const QRect & r ) const
borderSize * 3, y, accelWidth, h );
}
-void PopupMenuEditor::drawItems( QPainter * p )
+void PopupMenuEditor::drawItems( TQPainter * p )
{
int flags = 0;
int idx = 0;
- QColorGroup enabled = colorGroup();
- QColorGroup disabled = palette().disabled();
- QRect focus;
- QRect rect( borderSize, borderSize, width() - borderSize * 2, 0 );
+ TQColorGroup enabled = colorGroup();
+ TQColorGroup disabled = palette().disabled();
+ TQRect focus;
+ TQRect rect( borderSize, borderSize, width() - borderSize * 2, 0 );
PopupMenuEditorItem * i = itemList.first();
while ( i ) {
@@ -1104,10 +1104,10 @@ void PopupMenuEditor::drawItems( QPainter * p )
if ( idx == currentIndex )
focus = rect;
if ( i->action()->isEnabled() ) {
- flags = QStyle::Style_Enabled;
+ flags = TQStyle::Style_Enabled;
p->setPen( enabled.buttonText() );
} else {
- flags = QStyle::Style_Default;
+ flags = TQStyle::Style_Default;
p->setPen( disabled.buttonText() );
}
drawItem( p, i, rect, flags );
@@ -1122,22 +1122,22 @@ void PopupMenuEditor::drawItems( QPainter * p )
rect.setHeight( itemHeight( &addItem ) );
if ( idx == currentIndex )
focus = rect;
- drawItem( p, &addItem, rect, QStyle::Style_Default );
+ drawItem( p, &addItem, rect, TQStyle::Style_Default );
rect.moveBy( 0, rect.height() );
idx++;
rect.setHeight( itemHeight( &addSeparator ) );
if ( idx == currentIndex )
focus = rect;
- drawItem( p, &addSeparator, rect, QStyle::Style_Default );
+ drawItem( p, &addSeparator, rect, TQStyle::Style_Default );
idx++;
if ( hasFocus() && !draggedItem )
drawWinFocusRect( p, focus );
}
-QSize PopupMenuEditor::contentsSize()
+TQSize PopupMenuEditor::contentsSize()
{
- QRect textRect = fontMetrics().boundingRect( addSeparator.action()->menuText() );
+ TQRect textRect = fontMetrics().boundingRect( addSeparator.action()->menuText() );
textWidth = textRect.width();
accelWidth = textRect.height(); // default size
iconWidth = textRect.height();
@@ -1145,12 +1145,12 @@ QSize PopupMenuEditor::contentsSize()
int w = 0;
int h = itemHeight( &addItem ) + itemHeight( &addSeparator );
PopupMenuEditorItem * i = itemList.first();
- QAction * a = 0;
+ TQAction * a = 0;
while ( i ) {
if ( i->isVisible() ) {
if ( !i->isSeparator() ) {
a = i->action();
- w = a->iconSet().pixmap( QIconSet::Automatic, QIconSet::Normal ).rect().width() +
+ w = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal ).rect().width() +
borderSize; // padding
iconWidth = QMAX( iconWidth, w );
w = fontMetrics().boundingRect( a->menuText() ).width();
@@ -1164,7 +1164,7 @@ QSize PopupMenuEditor::contentsSize()
}
int width = iconWidth + textWidth + borderSize * 3 + accelWidth + arrowWidth;
- return QSize( width, h );
+ return TQSize( width, h );
}
int PopupMenuEditor::itemHeight( const PopupMenuEditorItem * item ) const
@@ -1174,8 +1174,8 @@ int PopupMenuEditor::itemHeight( const PopupMenuEditorItem * item ) const
if ( item->isSeparator() )
return 4; // FIXME: hardcoded ( get from styles )r
int padding = + borderSize * 6;
- QAction * a = item->action();
- int h = a->iconSet().pixmap( QIconSet::Automatic, QIconSet::Normal ).rect().height();
+ TQAction * a = item->action();
+ int h = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal ).rect().height();
h = QMAX( h, fontMetrics().boundingRect( a->menuText() ).height() + padding );
h = QMAX( h, fontMetrics().boundingRect( a->accel() ).height() + padding );
return h;
@@ -1237,14 +1237,14 @@ void PopupMenuEditor::dropInPlace( PopupMenuEditorItem * i, int y )
currentField = 1;
}
-void PopupMenuEditor::dropInPlace( QActionGroup * g, int y )
+void PopupMenuEditor::dropInPlace( TQActionGroup * g, int y )
{
if (!g->children())
return;
- QObjectList l = *g->children();
+ TQObjectList l = *g->children();
for ( int i = 0; i < (int)l.count(); ++i ) {
- QAction *a = ::qt_cast<QAction*>(l.at(i));
- QActionGroup *g = ::qt_cast<QActionGroup*>(l.at(i));
+ TQAction *a = ::qt_cast<TQAction*>(l.at(i));
+ TQActionGroup *g = ::qt_cast<TQActionGroup*>(l.at(i));
if ( g )
dropInPlace( g, y );
else if ( a )
@@ -1283,7 +1283,7 @@ void PopupMenuEditor::clearCurrentField()
if ( i->isSeparator() )
return;
if ( currentField == 0 ) {
- QIconSet icons( 0 );
+ TQIconSet icons( 0 );
SetActionIconsCommand * cmd = new SetActionIconsCommand( i18n( "Remove Icon" ),
formWnd,
i->action(),
@@ -1375,7 +1375,7 @@ void PopupMenuEditor::navigateRight()
}
}
-void PopupMenuEditor::enterEditMode( QKeyEvent * e )
+void PopupMenuEditor::enterEditMode( TQKeyEvent * e )
{
PopupMenuEditorItem * i = currentItem();
@@ -1395,7 +1395,7 @@ void PopupMenuEditor::enterEditMode( QKeyEvent * e )
return;
}
-void PopupMenuEditor::leaveEditMode( QKeyEvent * e )
+void PopupMenuEditor::leaveEditMode( TQKeyEvent * e )
{
setFocus();
lineEdit->hide();
@@ -1408,14 +1408,14 @@ void PopupMenuEditor::leaveEditMode( QKeyEvent * e )
if ( currentIndex >= (int)itemList.count() ) {
// new item was created
- QAction * a = formWnd->mainWindow()->actioneditor()->newActionEx();
- QString actionText = lineEdit->text();
+ TQAction * a = formWnd->mainWindow()->actioneditor()->newActionEx();
+ TQString actionText = lineEdit->text();
actionText.replace("&&", "&");
- QString menuText = lineEdit->text();
+ TQString menuText = lineEdit->text();
a->setText( actionText );
a->setMenuText( menuText );
i = createItem( a );
- QString n = constructName( i );
+ TQString n = constructName( i );
formWindow()->unify( a, n, TRUE );
a->setName( n );
MetaDataBase::addEntry( a );
@@ -1444,22 +1444,22 @@ void PopupMenuEditor::leaveEditMode( QKeyEvent * e )
showSubMenu();
}
-QString PopupMenuEditor::constructName( PopupMenuEditorItem *item )
+TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item )
{
- QString s;
- QString name = item->action()->menuText();
- QWidget *e = parentEditor();
+ TQString s;
+ TQString name = item->action()->menuText();
+ TQWidget *e = parentEditor();
PopupMenuEditor *p = ::qt_cast<PopupMenuEditor*>(e);
if ( p ) {
int idx = p->find( item->m );
PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 );
- s = ( i ? QString( i->action()->name() ).remove( "Action" ) : QString( "" ) );
+ s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) );
} else {
MenuBarEditor *b = ::qt_cast<MenuBarEditor*>(e);
if ( b ) {
int idx = b->findItem( item->m );
MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 );
- s = ( i ? i->menuText().lower() : QString( "" ) );
+ s = ( i ? i->menuText().lower() : TQString( "" ) );
}
}
// replace illegal characters
diff --git a/kdevdesigner/designer/popupmenueditor.h b/kdevdesigner/designer/popupmenueditor.h
index ca14205b..8adc0d68 100644
--- a/kdevdesigner/designer/popupmenueditor.h
+++ b/kdevdesigner/designer/popupmenueditor.h
@@ -27,9 +27,9 @@
#ifndef POPUPMENUEDITOR_H
#define POPUPMENUEDITOR_H
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qaction.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqaction.h>
class PopupMenuEditor;
class QMenuItem;
@@ -40,7 +40,7 @@ class PopupMenuEditorItem : public QObject
friend class PopupMenuEditor;
- PopupMenuEditorItem( PopupMenuEditor * menu = 0, QObject * parent = 0, const char * name = 0 );
+ PopupMenuEditorItem( PopupMenuEditor * menu = 0, TQObject * parent = 0, const char * name = 0 );
public:
enum ItemType {
@@ -49,16 +49,16 @@ public:
Action = 1
};
- PopupMenuEditorItem( QAction * action, PopupMenuEditor * menu,
- QObject * parent = 0, const char * name = 0 );
+ PopupMenuEditorItem( TQAction * action, PopupMenuEditor * menu,
+ TQObject * parent = 0, const char * name = 0 );
PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuEditor * menu,
- QObject * parent = 0, const char * name = 0 );
+ TQObject * parent = 0, const char * name = 0 );
~PopupMenuEditorItem();
void init();
ItemType type() const;
- QAction * action() const { return a; }
+ TQAction * action() const { return a; }
void setVisible( bool enable );
bool isVisible() const;
@@ -76,7 +76,7 @@ public:
int count() const;
- bool eventFilter( QObject *, QEvent * event );
+ bool eventFilter( TQObject *, TQEvent * event );
public slots:
void selfDestruct();
@@ -84,7 +84,7 @@ public slots:
protected:
private:
- QAction * a;
+ TQAction * a;
PopupMenuEditor * s;
PopupMenuEditor * m;
uint separator : 1;
@@ -95,7 +95,7 @@ class FormWindow;
class MainWindow;
class QLineEdit;
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
class PopupMenuEditor : public QWidget
{
@@ -106,27 +106,27 @@ class PopupMenuEditor : public QWidget
friend class Resource;
public:
- PopupMenuEditor( FormWindow * fw, QWidget * parent = 0, const char * name = 0 );
- PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, QWidget * parent, const char * name = 0 );
+ PopupMenuEditor( FormWindow * fw, TQWidget * parent = 0, const char * name = 0 );
+ PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, TQWidget * parent, const char * name = 0 );
~PopupMenuEditor();
void init();
void insert( PopupMenuEditorItem * item, int index = -1 );
- void insert( QAction * action, int index = -1 );
- void insert( QActionGroup * actionGroup, int index = -1 );
- int find( const QAction * action );
+ void insert( TQAction * action, int index = -1 );
+ void insert( TQActionGroup * actionGroup, int index = -1 );
+ int find( const TQAction * action );
int find( PopupMenuEditor * menu );
int count();
PopupMenuEditorItem * at( int index );
- PopupMenuEditorItem * at( QPoint pos ) { return itemAt( pos.y() ); }
+ PopupMenuEditorItem * at( TQPoint pos ) { return itemAt( pos.y() ); }
void exchange( int a, int b );
void cut( int index );
void copy( int index );
void paste( int index );
- void insertedActions( QPtrList<QAction> & list );
+ void insertedActions( TQPtrList<TQAction> & list );
void show();
void choosePixmap( int index = -1 );
@@ -136,13 +136,13 @@ public:
FormWindow * formWindow() { return formWnd; }
bool isCreatingAccelerator() { return ( currentField == 2 ); }
- QPtrList<PopupMenuEditorItem> * items() { return &itemList; }
+ TQPtrList<PopupMenuEditorItem> * items() { return &itemList; }
- QWidget * parentEditor() { return parentMenu; }
+ TQWidget * parentEditor() { return parentMenu; }
signals:
- void inserted( QAction * );
- void removed( QAction * );
+ void inserted( TQAction * );
+ void removed( TQAction * );
public slots:
@@ -151,7 +151,7 @@ public slots:
void paste() { paste( currentIndex ); }
void remove( int index );
- void remove( QAction * a ) { remove( find( a ) ); }
+ void remove( TQAction * a ) { remove( find( a ) ); }
void resizeToContents();
void showSubMenu();
@@ -159,36 +159,36 @@ public slots:
void focusOnSubMenu();
protected:
- PopupMenuEditorItem * createItem( QAction * a = 0 );
+ PopupMenuEditorItem * createItem( TQAction * a = 0 );
void removeItem( int index = -1 );
PopupMenuEditorItem * currentItem();
PopupMenuEditorItem * itemAt( int y );
- void setFocusAt( const QPoint & pos );
-
- bool eventFilter( QObject * o, QEvent * e );
- void paintEvent( QPaintEvent * e );
- void mousePressEvent( QMouseEvent * e );
- void mouseDoubleClickEvent( QMouseEvent * e );
- void mouseMoveEvent( QMouseEvent * e );
- void dragEnterEvent( QDragEnterEvent * e );
- void dragLeaveEvent( QDragLeaveEvent * e );
- void dragMoveEvent( QDragMoveEvent * e );
- void dropEvent( QDropEvent * e );
- void keyPressEvent( QKeyEvent * e );
- void focusInEvent( QFocusEvent * e );
- void focusOutEvent( QFocusEvent * e );
-
- void drawItems( QPainter * p );
- void drawItem( QPainter * p, PopupMenuEditorItem * i, const QRect & r, int f ) const;
- void drawWinFocusRect( QPainter * p, const QRect & r ) const;
-
- QSize contentsSize();
+ void setFocusAt( const TQPoint & pos );
+
+ bool eventFilter( TQObject * o, TQEvent * e );
+ void paintEvent( TQPaintEvent * e );
+ void mousePressEvent( TQMouseEvent * e );
+ void mouseDoubleClickEvent( TQMouseEvent * e );
+ void mouseMoveEvent( TQMouseEvent * e );
+ void dragEnterEvent( TQDragEnterEvent * e );
+ void dragLeaveEvent( TQDragLeaveEvent * e );
+ void dragMoveEvent( TQDragMoveEvent * e );
+ void dropEvent( TQDropEvent * e );
+ void keyPressEvent( TQKeyEvent * e );
+ void focusInEvent( TQFocusEvent * e );
+ void focusOutEvent( TQFocusEvent * e );
+
+ void drawItems( TQPainter * p );
+ void drawItem( TQPainter * p, PopupMenuEditorItem * i, const TQRect & r, int f ) const;
+ void drawWinFocusRect( TQPainter * p, const TQRect & r ) const;
+
+ TQSize contentsSize();
int itemHeight( const PopupMenuEditorItem * item ) const;
int itemPos( const PopupMenuEditorItem * item ) const;
int snapToItem( int y );
void dropInPlace( PopupMenuEditorItem * i, int y );
- void dropInPlace( QActionGroup * g, int y );
+ void dropInPlace( TQActionGroup * g, int y );
void safeDec();
void safeInc();
@@ -198,19 +198,19 @@ protected:
void navigateDown( bool ctrl );
void navigateLeft();
void navigateRight();
- void enterEditMode( QKeyEvent * e );
- void leaveEditMode( QKeyEvent * e );
+ void enterEditMode( TQKeyEvent * e );
+ void leaveEditMode( TQKeyEvent * e );
- QString constructName( PopupMenuEditorItem *item );
+ TQString constructName( PopupMenuEditorItem *item );
private:
FormWindow * formWnd;
- QLineEdit * lineEdit;
- QWidget * dropLine;
- QPtrList<PopupMenuEditorItem> itemList;
+ TQLineEdit * lineEdit;
+ TQWidget * dropLine;
+ TQPtrList<PopupMenuEditorItem> itemList;
PopupMenuEditorItem addItem;
PopupMenuEditorItem addSeparator;
- QWidget * parentMenu;
+ TQWidget * parentMenu;
int iconWidth;
int textWidth;
@@ -220,7 +220,7 @@ private:
int currentField;
int currentIndex;
- QPoint mousePressPos;
+ TQPoint mousePressPos;
static PopupMenuEditorItem * draggedItem;
enum ClipboardOperation {
diff --git a/kdevdesigner/designer/previewframe.cpp b/kdevdesigner/designer/previewframe.cpp
index 2d14fb7b..98c3c9b0 100644
--- a/kdevdesigner/designer/previewframe.cpp
+++ b/kdevdesigner/designer/previewframe.cpp
@@ -24,16 +24,16 @@
**
**********************************************************************/
-#include <qvbox.h>
-#include <qpainter.h>
+#include <tqvbox.h>
+#include <tqpainter.h>
#include "previewframe.h"
-PreviewFrame::PreviewFrame( QWidget *parent, const char *name )
- : QVBox( parent, name )
+PreviewFrame::PreviewFrame( TQWidget *parent, const char *name )
+ : TQVBox( parent, name )
{
setMinimumSize(200, 200);
- setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
setLineWidth(1);
PreviewWorkspace * w = new PreviewWorkspace( this );
@@ -42,15 +42,15 @@ PreviewFrame::PreviewFrame( QWidget *parent, const char *name )
previewWidget->move( 10, 10 );
}
-void PreviewFrame::setPreviewPalette(QPalette pal)
+void PreviewFrame::setPreviewPalette(TQPalette pal)
{
previewWidget->setPalette(pal);
}
-void PreviewWorkspace::paintEvent( QPaintEvent* )
+void PreviewWorkspace::paintEvent( TQPaintEvent* )
{
- QPainter p ( this );
- p.setPen( QPen( white ) );
+ TQPainter p ( this );
+ p.setPen( TQPen( white ) );
p.drawText ( 0, height() / 2, width(), height(), AlignHCenter,
"The moose in the noose\nate the goose who was loose." );
}
diff --git a/kdevdesigner/designer/previewframe.h b/kdevdesigner/designer/previewframe.h
index 632e8b9a..0834c178 100644
--- a/kdevdesigner/designer/previewframe.h
+++ b/kdevdesigner/designer/previewframe.h
@@ -27,8 +27,8 @@
#ifndef PREVIEWFRAME_H
#define PREVIEWFRAME_H
-#include <qvbox.h>
-#include <qworkspace.h>
+#include <tqvbox.h>
+#include <tqworkspace.h>
#include "previewwidgetimpl.h"
@@ -36,12 +36,12 @@ class PreviewWorkspace : public QWorkspace
{
Q_OBJECT
public:
- PreviewWorkspace( QWidget* parent = 0, const char* name = 0 )
- : QWorkspace( parent, name ) {}
+ PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 )
+ : TQWorkspace( parent, name ) {}
~PreviewWorkspace() {}
protected:
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
};
class PreviewFrame : public QVBox
@@ -49,8 +49,8 @@ class PreviewFrame : public QVBox
Q_OBJECT
public:
- PreviewFrame( QWidget *parent = 0, const char *name = 0 );
- void setPreviewPalette(QPalette);
+ PreviewFrame( TQWidget *parent = 0, const char *name = 0 );
+ void setPreviewPalette(TQPalette);
private:
PreviewWidget *previewWidget;
diff --git a/kdevdesigner/designer/previewwidgetimpl.cpp b/kdevdesigner/designer/previewwidgetimpl.cpp
index 2c2c6528..4f79ae57 100644
--- a/kdevdesigner/designer/previewwidgetimpl.cpp
+++ b/kdevdesigner/designer/previewwidgetimpl.cpp
@@ -24,39 +24,39 @@
**
**********************************************************************/
-#include "qobjectlist.h"
+#include "tqobjectlist.h"
#include "previewwidgetimpl.h"
-PreviewWidget::PreviewWidget( QWidget *parent, const char *name )
+PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
: PreviewWidgetBase( parent, name )
{
// install event filter on child widgets
- QObjectList *l = queryList("QWidget");
- QObjectListIt it(*l);
- QObject * obj;
+ TQObjectList *l = queryList("TQWidget");
+ TQObjectListIt it(*l);
+ TQObject * obj;
while ((obj = it.current()) != 0) {
++it;
obj->installEventFilter(this);
- ((QWidget*)obj)->setFocusPolicy(NoFocus);
+ ((TQWidget*)obj)->setFocusPolicy(NoFocus);
}
}
-void PreviewWidget::closeEvent(QCloseEvent *e)
+void PreviewWidget::closeEvent(TQCloseEvent *e)
{
e->ignore();
}
-bool PreviewWidget::eventFilter(QObject *, QEvent *e)
+bool PreviewWidget::eventFilter(TQObject *, TQEvent *e)
{
switch ( e->type() ) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::Enter:
- case QEvent::Leave:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::Enter:
+ case TQEvent::Leave:
return TRUE; // ignore;
default:
break;
diff --git a/kdevdesigner/designer/previewwidgetimpl.h b/kdevdesigner/designer/previewwidgetimpl.h
index 63227cdd..497e2fe0 100644
--- a/kdevdesigner/designer/previewwidgetimpl.h
+++ b/kdevdesigner/designer/previewwidgetimpl.h
@@ -34,10 +34,10 @@ class PreviewWidget : public PreviewWidgetBase
Q_OBJECT
public:
- PreviewWidget( QWidget *parent = 0, const char *name = 0 );
+ PreviewWidget( TQWidget *parent = 0, const char *name = 0 );
- void closeEvent(QCloseEvent *);
- bool eventFilter(QObject *, QEvent *);
+ void closeEvent(TQCloseEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
};
#endif
diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp
index 2a261d20..0ab960ea 100644
--- a/kdevdesigner/designer/project.cpp
+++ b/kdevdesigner/designer/project.cpp
@@ -33,25 +33,25 @@
#include "dbconnectionimpl.h"
#endif
#include "resource.h"
-#include <qwidgetfactory.h>
+#include <tqwidgetfactory.h>
#include "outputwindow.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qurl.h>
-#include <qobjectlist.h>
-#include <qfeatures.h>
-#include <qtextcodec.h>
-#include <qdom.h>
-#include <qmessagebox.h>
-#include <qapplication.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqurl.h>
+#include <tqobjectlist.h>
+#include <tqfeatures.h>
+#include <tqtextcodec.h>
+#include <tqdom.h>
+#include <tqmessagebox.h>
+#include <tqapplication.h>
#include "mainwindow.h"
-#include <qworkspace.h>
+#include <tqworkspace.h>
#ifndef QT_NO_SQL
-#include <qsqldatabase.h>
-#include <qsqlrecord.h>
-#include <qdatatable.h>
+#include <tqsqldatabase.h>
+#include <tqsqlrecord.h>
+#include <tqdatatable.h>
#endif
#include <stdlib.h>
@@ -74,11 +74,11 @@ bool DatabaseConnection::refreshCatalog()
return TRUE;
if ( !open() )
return FALSE;
- tbls = conn->tables( QSql::TableType( QSql::Tables | QSql::Views ) );
+ tbls = conn->tables( TQSql::TableType( TQSql::Tables | TQSql::Views ) );
flds.clear();
- for ( QStringList::Iterator it = tbls.begin(); it != tbls.end(); ++it ) {
- QSqlRecord fil = conn->record( *it );
- QStringList lst;
+ for ( TQStringList::Iterator it = tbls.begin(); it != tbls.end(); ++it ) {
+ TQSqlRecord fil = conn->record( *it );
+ TQStringList lst;
for ( uint j = 0; j < fil.count(); ++j )
lst << fil.field( j )->name();
flds.insert( *it, lst );
@@ -95,9 +95,9 @@ bool DatabaseConnection::refreshCatalog()
void DatabaseConnection::remove()
{
if ( nm == "(default)" )
- QSqlDatabase::removeDatabase( QSqlDatabase::defaultConnection );
+ TQSqlDatabase::removeDatabase( TQSqlDatabase::defaultConnection );
else
- QSqlDatabase::removeDatabase( nm );
+ TQSqlDatabase::removeDatabase( nm );
// the above will effectively delete the current connection
conn = 0;
}
@@ -108,15 +108,15 @@ bool DatabaseConnection::open( bool suppressDialog )
#ifndef QT_NO_SQL
// register our name, if nec
if ( nm == "(default)" ) {
- if ( !QSqlDatabase::contains() ) // default doesn't exists?
- conn = QSqlDatabase::addDatabase( drv );
+ if ( !TQSqlDatabase::contains() ) // default doesn't exists?
+ conn = TQSqlDatabase::addDatabase( drv );
else
- conn = QSqlDatabase::database();
+ conn = TQSqlDatabase::database();
} else {
- if ( !QSqlDatabase::contains( nm ) )
- conn = QSqlDatabase::addDatabase( drv, nm );
+ if ( !TQSqlDatabase::contains( nm ) )
+ conn = TQSqlDatabase::addDatabase( drv, nm );
else
- conn = QSqlDatabase::database( nm );
+ conn = TQSqlDatabase::database( nm );
}
conn->setDatabaseName( dbName );
conn->setUserName( uname );
@@ -129,10 +129,10 @@ bool DatabaseConnection::open( bool suppressDialog )
if ( !success ) {
DatabaseConnectionEditor dia( this, 0 , 0 , TRUE );
switch( dia.exec() ) {
- case QDialog::Accepted:
+ case TQDialog::Accepted:
done = FALSE;
break;
- case QDialog::Rejected:
+ case TQDialog::Rejected:
done = TRUE;
break;
}
@@ -145,14 +145,14 @@ bool DatabaseConnection::open( bool suppressDialog )
conn->setPort( prt );
success = conn->open();
if ( !success ) {
- switch( QMessageBox::warning( project->messageBoxParent(), i18n( "Connection" ),
+ switch( TQMessageBox::warning( project->messageBoxParent(), i18n( "Connection" ),
i18n( "Could not connect to the database.\n"
"Press 'OK' to continue or 'Cancel' to "
"specify different\nconnection information.\n" )
- + QString( "[" + conn->lastError().driverText() + "\n" +
+ + TQString( "[" + conn->lastError().driverText() + "\n" +
conn->lastError().databaseText() + "]\n" ),
i18n( "&OK" ),
- i18n( "&Cancel" ), QString::null, 0, 1 ) ) {
+ i18n( "&Cancel" ), TQString::null, 0, 1 ) ) {
case 0: // OK or Enter
continue;
case 1: // Cancel or Escape
@@ -201,9 +201,9 @@ bool Project::isDummy() const
return isDummyProject;
}
-Project::Project( const QString &fn, const QString &pName,
+Project::Project( const TQString &fn, const TQString &pName,
QPluginManager<ProjectSettingsInterface> *pm, bool isDummy,
- const QString &l )
+ const TQString &l )
: proName( pName ), projectSettingsPluginManager( pm ), isDummyProject( isDummy )
{
modified = TRUE;
@@ -237,7 +237,7 @@ void Project::setModified( bool b )
}
#ifndef QT_NO_SQL
-DatabaseConnection *Project::databaseConnection( const QString &name )
+DatabaseConnection *Project::databaseConnection( const TQString &name )
{
for ( DatabaseConnection *conn = dbConnections.first();
conn;
@@ -249,32 +249,32 @@ DatabaseConnection *Project::databaseConnection( const QString &name )
}
#endif
-void Project::setFileName( const QString &fn, bool doClear )
+void Project::setFileName( const TQString &fn, bool doClear )
{
if ( fn == filename )
return;
if ( singleProjectMode() ) {
- QString qsa = QString( getenv( "HOME" ) ) + QString( "/.qsa" );
- if ( !QFile::exists( qsa ) ) {
- QDir d;
+ TQString qsa = TQString( getenv( "HOME" ) ) + TQString( "/.qsa" );
+ if ( !TQFile::exists( qsa ) ) {
+ TQDir d;
d.mkdir( qsa );
}
if ( fn == singleProFileName )
return;
singleProFileName = fn;
static int counter = 0;
- QString str_counter = QString::number( counter++ );
+ TQString str_counter = TQString::number( counter++ );
str_counter = "/.qsa/" + str_counter;
LanguageInterface *iface = MetaDataBase::languageInterface( language() );
- filename = QString( getenv( "HOME" ) + str_counter + QString( "tmp_" ) +
- QFileInfo( fn ).baseName() + "/" + QFileInfo( fn ).baseName() + ".pro" );
+ filename = TQString( getenv( "HOME" ) + str_counter + TQString( "tmp_" ) +
+ TQFileInfo( fn ).baseName() + "/" + TQFileInfo( fn ).baseName() + ".pro" );
removeTempProject();
if ( iface && iface->supports( LanguageInterface::CompressProject ) ) {
filename = iface->uncompressProject( makeAbsolute( singleProFileName ),
- QString( getenv( "HOME" ) +
- str_counter + QString( "tmp_" ) +
- QFileInfo( fn ).baseName() ) );
+ TQString( getenv( "HOME" ) +
+ str_counter + TQString( "tmp_" ) +
+ TQFileInfo( fn ).baseName() ) );
proName = makeAbsolute( singleProFileName );
}
} else {
@@ -291,34 +291,34 @@ void Project::setFileName( const QString &fn, bool doClear )
if ( !doClear )
return;
clear();
- if ( QFile::exists( filename ) )
+ if ( TQFile::exists( filename ) )
parse();
}
-QString Project::fileName( bool singlePro ) const
+TQString Project::fileName( bool singlePro ) const
{
if ( singlePro )
return singleProFileName;
return filename;
}
-QString Project::databaseDescription() const
+TQString Project::databaseDescription() const
{
return dbFile;
}
-QString Project::projectName() const
+TQString Project::projectName() const
{
return proName;
}
-static QString parse_part( const QString &part )
+static TQString parse_part( const TQString &part )
{
- QString res;
+ TQString res;
bool inName = FALSE;
- QString currName;
+ TQString currName;
for ( int i = 0; i < (int)part.length(); ++i ) {
- QChar c = part[ i ];
+ TQChar c = part[ i ];
if ( !inName ) {
if ( c != ' ' && c != '\t' && c != '\n' && c != '=' && c != '\\' && c != '+' )
inName = TRUE;
@@ -334,16 +334,16 @@ static QString parse_part( const QString &part )
return res;
}
-QStringList parse_multiline_part( const QString &contents, const QString &key, int *start = 0 )
+TQStringList parse_multiline_part( const TQString &contents, const TQString &key, int *start = 0 )
{
if ( start )
*start = -1;
- QString lastWord;
+ TQString lastWord;
// Account for things like win32: SOURCES
int extraWhiteSpaceCount = 0;
int braceCount = 0;
for ( int i = 0; i < (int)contents.length(); ++i ) {
- QChar c( contents[ i ] );
+ TQChar c( contents[ i ] );
switch ( c ) {
case '{':
braceCount++;
@@ -372,9 +372,9 @@ QStringList parse_multiline_part( const QString &contents, const QString &key, i
if ( lastWord == key && braceCount == 0 ) {
if ( start )
*start = i - lastWord.length() - extraWhiteSpaceCount + 1;
- QStringList lst;
+ TQStringList lst;
bool inName = FALSE;
- QString currName;
+ TQString currName;
bool hadEqual = FALSE;
for ( ; i < (int)contents.length(); ++i ) {
c = contents[ i ];
@@ -389,7 +389,7 @@ QStringList parse_multiline_part( const QString &contents, const QString &key, i
c == '$' || c == '-' || c == '(' || c == ')' || c == ':' || c == '+' || c == ',' || c == '~' ) &&
c != ' ' && c != '\t' && c != '\n' ) {
if ( !inName )
- currName = QString::null;
+ currName = TQString::null;
if ( c != '\\' || contents[i+1] != '\n' ) {
currName += c;
inName = TRUE;
@@ -408,27 +408,27 @@ QStringList parse_multiline_part( const QString &contents, const QString &key, i
}
}
- return QStringList();
+ return TQStringList();
}
void Project::parse()
{
- QFile f( filename );
+ TQFile f( filename );
if ( !f.exists() || !f.open( IO_ReadOnly ) )
return;
- QTextStream ts( &f );
- QString contents = ts.read();
+ TQTextStream ts( &f );
+ TQString contents = ts.read();
f.close();
- proName = QFileInfo( filename ).baseName();
+ proName = TQFileInfo( filename ).baseName();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
int i = contents.find( "LANGUAGE" );
if ( i != -1 ) {
lang = "";
is_cpp = FALSE;
- QString part = contents.mid( i + QString( "LANGUAGE" ).length() );
+ TQString part = contents.mid( i + TQString( "LANGUAGE" ).length() );
lang = parse_part( part );
is_cpp = lang == "C++";
}
@@ -436,11 +436,11 @@ void Project::parse()
i = contents.find( "DBFILE" );
if ( i != -1 ) {
dbFile = "";
- QString part = contents.mid( i + QString( "DBFILE" ).length() );
+ TQString part = contents.mid( i + TQString( "DBFILE" ).length() );
dbFile = parse_part( part );
}
- QStringList uifiles = parse_multiline_part( contents, "FORMS" );
+ TQStringList uifiles = parse_multiline_part( contents, "FORMS" );
uifiles += parse_multiline_part( contents, "INTERFACES" ); // compatibility
for ( it = uifiles.begin(); it != uifiles.end(); ++it ) {
if ( (*it).startsWith( "__APPOBJ" ) )
@@ -452,7 +452,7 @@ void Project::parse()
i = contents.find( "TEMPLATE" );
if ( i != -1 ) {
templ = "";
- QString part = contents.mid( i + QString( "TEMPLATE" ).length() );
+ TQString part = contents.mid( i + TQString( "TEMPLATE" ).length() );
templ = parse_part( part );
}
@@ -465,11 +465,11 @@ void Project::parse()
LanguageInterface *iface = MetaDataBase::languageInterface( lang );
if ( iface ) {
- QStringList sourceKeys;
+ TQStringList sourceKeys;
iface->sourceProjectKeys( sourceKeys );
- for ( QStringList::Iterator it = sourceKeys.begin(); it != sourceKeys.end(); ++it ) {
- QStringList lst = parse_multiline_part( contents, *it );
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for ( TQStringList::Iterator it = sourceKeys.begin(); it != sourceKeys.end(); ++it ) {
+ TQStringList lst = parse_multiline_part( contents, *it );
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
(void) new SourceFile( *it, FALSE, this );
}
}
@@ -479,8 +479,8 @@ void Project::parse()
for ( it = csList.begin(); it != csList.end(); ++it ) {
i = contents.find( *it );
if ( i != -1 ) {
- QString val = "";
- QString part = contents.mid( i + QString( *it ).length() );
+ TQString val = "";
+ TQString part = contents.mid( i + TQString( *it ).length() );
val = parse_part( part );
customSettings.replace( *it, val );
}
@@ -488,17 +488,17 @@ void Project::parse()
loadConnections();
- QStringList images = parse_multiline_part( contents, "IMAGES" );
+ TQStringList images = parse_multiline_part( contents, "IMAGES" );
// ### remove that for the final - this is beta-compatibility
- if ( images.isEmpty() && QDir( QFileInfo( filename ).dirPath( TRUE ) + "/images" ).exists() ) {
- images = QDir( QFileInfo( filename ).dirPath( TRUE ) + "/images" ).entryList();
+ if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).exists() ) {
+ images = TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).entryList();
for ( int i = 0; i < (int)images.count(); ++i )
images[ i ].prepend( "images/" );
modified = TRUE;
}
- for ( QStringList::ConstIterator pit = images.begin(); pit != images.end(); ++pit )
+ for ( TQStringList::ConstIterator pit = images.begin(); pit != images.end(); ++pit )
pixCollection->load( *pit );
}
@@ -521,17 +521,17 @@ bool Project::removeSourceFile( SourceFile *sf )
return TRUE;
}
-void Project::setDatabaseDescription( const QString &db )
+void Project::setDatabaseDescription( const TQString &db )
{
dbFile = db;
}
-void Project::setDescription( const QString &s )
+void Project::setDescription( const TQString &s )
{
desc = s;
}
-QString Project::description() const
+TQString Project::description() const
{
return desc;
}
@@ -546,28 +546,28 @@ bool Project::isValid() const
return TRUE;
}
-QString Project::makeAbsolute( const QString &f )
+TQString Project::makeAbsolute( const TQString &f )
{
if ( isDummy() )
return f;
- QString encodedUrl = QFileInfo( filename ).dirPath( TRUE );
- QUrl::encode( encodedUrl );
- QUrl u( encodedUrl, f );
+ TQString encodedUrl = TQFileInfo( filename ).dirPath( TRUE );
+ TQUrl::encode( encodedUrl );
+ TQUrl u( encodedUrl, f );
return u.path();
}
-QString Project::makeRelative( const QString &f )
+TQString Project::makeRelative( const TQString &f )
{
if ( isDummy() )
return f;
- QString p = QFileInfo( filename ).dirPath( TRUE );
- QString f2 = f;
+ TQString p = TQFileInfo( filename ).dirPath( TRUE );
+ TQString f2 = f;
if ( f2.left( p.length() ) == p )
f2.remove( 0, p.length() + 1 );
return f2;
}
-static void remove_contents( QString &contents, const QString &s )
+static void remove_contents( TQString &contents, const TQString &s )
{
int i = contents.find( s );
if ( i != -1 ) {
@@ -579,7 +579,7 @@ static void remove_contents( QString &contents, const QString &s )
}
}
-static void remove_multiline_contents( QString &contents, const QString &s, int *strt = 0 )
+static void remove_multiline_contents( TQString &contents, const TQString &s, int *strt = 0 )
{
int i = contents.find( s );
if ( strt )
@@ -631,13 +631,13 @@ void Project::save( bool onlyProjectFile )
return;
}
- QFile f( filename );
- QString original = "";
+ TQFile f( filename );
+ TQString original = "";
// read the existing file
bool hasPreviousContents = FALSE;
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
original = ts.read();
f.close();
hasPreviousContents = TRUE;
@@ -654,12 +654,12 @@ void Project::save( bool onlyProjectFile )
remove_multiline_contents( original, "FORMS" );
remove_multiline_contents( original, "INTERFACES" ); // compatibility
remove_multiline_contents( original, "IMAGES" );
- for ( QStringList::Iterator it = csList.begin(); it != csList.end(); ++it )
+ for ( TQStringList::Iterator it = csList.begin(); it != csList.end(); ++it )
remove_contents( original, *it );
}
// the contents of the saved file
- QString contents;
+ TQString contents;
// template
contents += "TEMPLATE\t= " + templ + "\n";
@@ -672,9 +672,9 @@ void Project::save( bool onlyProjectFile )
writePlatformSettings( contents, "CONFIG", cfg );
LanguageInterface *iface = MetaDataBase::languageInterface( lang );
if ( iface ) {
- QStringList sourceKeys;
+ TQStringList sourceKeys;
iface->sourceProjectKeys( sourceKeys );
- for ( QStringList::Iterator spit = sourceKeys.begin(); spit != sourceKeys.end(); ++spit )
+ for ( TQStringList::Iterator spit = sourceKeys.begin(); spit != sourceKeys.end(); ++spit )
remove_multiline_contents( contents, *spit );
}
contents += "\n";
@@ -699,19 +699,19 @@ void Project::save( bool onlyProjectFile )
// sources
if ( !sourcefiles.isEmpty() && iface ) {
- QMap<QString, QStringList> sourceToKey;
+ TQMap<TQString, TQStringList> sourceToKey;
for ( SourceFile *f = sourcefiles.first(); f; f = sourcefiles.next() ) {
- QString key = iface->projectKeyForExtension( QFileInfo( f->fileName() ).extension() );
- QStringList lst = sourceToKey[ key ];
+ TQString key = iface->projectKeyForExtension( TQFileInfo( f->fileName() ).extension() );
+ TQStringList lst = sourceToKey[ key ];
lst << makeRelative( f->fileName() );
sourceToKey.replace( key, lst );
}
- for ( QMap<QString, QStringList>::Iterator skit = sourceToKey.begin();
+ for ( TQMap<TQString, TQStringList>::Iterator skit = sourceToKey.begin();
skit != sourceToKey.end(); ++skit ) {
- QString part = skit.key() + "\t+= ";
- QStringList lst = *skit;
- for ( QStringList::Iterator sit = lst.begin(); sit != lst.end(); ++sit ) {
+ TQString part = skit.key() + "\t+= ";
+ TQStringList lst = *skit;
+ for ( TQStringList::Iterator sit = lst.begin(); sit != lst.end(); ++sit ) {
part += *sit;
part += ++sit != lst.end() ? " \\\n\t" : "";
--sit;
@@ -724,7 +724,7 @@ void Project::save( bool onlyProjectFile )
// forms and interfaces
if ( !formfiles.isEmpty() ) {
contents += "FORMS\t= ";
- for ( QPtrListIterator<FormFile> fit = formfiles; fit.current(); ++fit ) {
+ for ( TQPtrListIterator<FormFile> fit = formfiles; fit.current(); ++fit ) {
contents += fit.current()->fileName() +
(fit != formfiles.last() ? " \\\n\t" : "");
}
@@ -734,8 +734,8 @@ void Project::save( bool onlyProjectFile )
// images
if ( !pixCollection->isEmpty() ) {
contents += "IMAGES\t= ";
- QValueList<PixmapCollection::Pixmap> pixmaps = pixCollection->pixmaps();
- for ( QValueList<PixmapCollection::Pixmap>::Iterator it = pixmaps.begin();
+ TQValueList<PixmapCollection::Pixmap> pixmaps = pixCollection->pixmaps();
+ for ( TQValueList<PixmapCollection::Pixmap>::Iterator it = pixmaps.begin();
it != pixmaps.end(); ++it ) {
contents += makeRelative( (*it).absname );
contents += ++it != pixmaps.end() ? " \\\n\t" : "";
@@ -750,19 +750,19 @@ void Project::save( bool onlyProjectFile )
contents += "\n";
// custom settings
- for ( QStringList::Iterator it = csList.begin(); it != csList.end(); ++it ) {
- QString val = *customSettings.find( *it );
+ for ( TQStringList::Iterator it = csList.begin(); it != csList.end(); ++it ) {
+ TQString val = *customSettings.find( *it );
if ( !val.isEmpty() )
contents += *it + "\t= " + val + "\n";
}
if ( !f.open( IO_WriteOnly | IO_Translate ) ) {
- QMessageBox::warning( messageBoxParent(),
+ TQMessageBox::warning( messageBoxParent(),
"Save Project Failed", "Couldn't write project file " + filename );
return;
}
- QTextStream os( &f );
+ TQTextStream os( &f );
os << contents;
if (hasPreviousContents)
os << original;
@@ -779,14 +779,14 @@ void Project::save( bool onlyProjectFile )
}
#ifndef QT_NO_SQL
-QPtrList<DatabaseConnection> Project::databaseConnections() const
+TQPtrList<DatabaseConnection> Project::databaseConnections() const
{
return dbConnections;
}
#endif
#ifndef QT_NO_SQL
-void Project::setDatabaseConnections( const QPtrList<DatabaseConnection> &lst )
+void Project::setDatabaseConnections( const TQPtrList<DatabaseConnection> &lst )
{
dbConnections = lst;
}
@@ -801,7 +801,7 @@ void Project::addDatabaseConnection( DatabaseConnection *conn )
#endif
#ifndef QT_NO_SQL
-void Project::removeDatabaseConnection( const QString &c )
+void Project::removeDatabaseConnection( const TQString &c )
{
for ( DatabaseConnection *conn = dbConnections.first(); conn; conn = dbConnections.next() ) {
if ( conn->name() == c ) {
@@ -815,9 +815,9 @@ void Project::removeDatabaseConnection( const QString &c )
#endif
#ifndef QT_NO_SQL
-QStringList Project::databaseConnectionList()
+TQStringList Project::databaseConnectionList()
{
- QStringList lst;
+ TQStringList lst;
for ( DatabaseConnection *conn = dbConnections.first(); conn; conn = dbConnections.next() )
lst << conn->name();
return lst;
@@ -825,37 +825,37 @@ QStringList Project::databaseConnectionList()
#endif
#ifndef QT_NO_SQL
-QStringList Project::databaseTableList( const QString &connection )
+TQStringList Project::databaseTableList( const TQString &connection )
{
DatabaseConnection *conn = databaseConnection( connection );
if ( !conn ) {
- return QStringList();
+ return TQStringList();
}
return conn->tables();
}
#endif
#ifndef QT_NO_SQL
-QStringList Project::databaseFieldList( const QString &connection, const QString &table )
+TQStringList Project::databaseFieldList( const TQString &connection, const TQString &table )
{
DatabaseConnection *conn = databaseConnection( connection );
if ( !conn )
- return QStringList();
+ return TQStringList();
return conn->fields( table );
}
#endif
#ifndef QT_NO_SQL
-static QString makeIndent( int indent )
+static TQString makeIndent( int indent )
{
- QString s;
+ TQString s;
s.fill( ' ', indent * 4 );
return s;
}
#endif
#ifndef QT_NO_SQL
-static void saveSingleProperty( QTextStream &ts, const QString& name, const QString& value, int indent )
+static void saveSingleProperty( TQTextStream &ts, const TQString& name, const TQString& value, int indent )
{
ts << makeIndent( indent ) << "<property name=\"" << name << "\">" << endl;
++indent;
@@ -869,11 +869,11 @@ void Project::saveConnections()
{
#ifndef QT_NO_SQL
if ( dbFile.isEmpty() ) {
- QFileInfo fi( fileName() );
+ TQFileInfo fi( fileName() );
setDatabaseDescription( fi.baseName() + ".db" );
}
- QFile f( makeAbsolute( dbFile ) );
+ TQFile f( makeAbsolute( dbFile ) );
if ( dbConnections.isEmpty() ) {
if ( f.exists() )
@@ -885,8 +885,8 @@ void Project::saveConnections()
/* .db xml */
if ( f.open( IO_WriteOnly | IO_Translate ) ) {
- QTextStream ts( &f );
- ts.setCodec( QTextCodec::codecForName( "UTF-8" ) );
+ TQTextStream ts( &f );
+ ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) );
ts << "<!DOCTYPE DB><DB version=\"1.0\">" << endl;
/* db connections */
@@ -899,19 +899,19 @@ void Project::saveConnections()
saveSingleProperty( ts, "database", conn->database(), indent );
saveSingleProperty( ts, "username", conn->username(), indent );
saveSingleProperty( ts, "hostname", conn->hostname(), indent );
- saveSingleProperty( ts, "port", QString::number( conn->port() ), indent );
+ saveSingleProperty( ts, "port", TQString::number( conn->port() ), indent );
/* connection tables */
- QStringList tables = conn->tables();
- for ( QStringList::Iterator it = tables.begin();
+ TQStringList tables = conn->tables();
+ for ( TQStringList::Iterator it = tables.begin();
it != tables.end(); ++it ) {
ts << makeIndent( indent ) << "<table>" << endl;
++indent;
saveSingleProperty( ts, "name", (*it), indent );
/* tables fields */
- QStringList fields = conn->fields( *it );
- for ( QStringList::Iterator it2 = fields.begin();
+ TQStringList fields = conn->fields( *it );
+ for ( TQStringList::Iterator it2 = fields.begin();
it2 != fields.end(); ++it2 ) {
ts << makeIndent( indent ) << "<field>" << endl;
++indent;
@@ -935,9 +935,9 @@ void Project::saveConnections()
}
#ifndef QT_NO_SQL
-static QDomElement loadSingleProperty( QDomElement e, const QString& name )
+static TQDomElement loadSingleProperty( TQDomElement e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement();
!n.isNull();
n = n.nextSibling().toElement() ) {
@@ -951,31 +951,31 @@ static QDomElement loadSingleProperty( QDomElement e, const QString& name )
void Project::loadConnections()
{
#ifndef QT_NO_SQL
- if ( dbFile.isEmpty() || !QFile::exists( makeAbsolute( dbFile ) ) )
+ if ( dbFile.isEmpty() || !TQFile::exists( makeAbsolute( dbFile ) ) )
return;
- QFile f( makeAbsolute( dbFile ) );
+ TQFile f( makeAbsolute( dbFile ) );
if ( f.open( IO_ReadOnly ) ) {
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( doc.setContent( &f, &errMsg, &errLine ) ) {
- QDomElement e;
+ TQDomElement e;
e = doc.firstChild().toElement();
/* connections */
- QDomNodeList connections = e.toElement().elementsByTagName( "connection" );
+ TQDomNodeList connections = e.toElement().elementsByTagName( "connection" );
for ( uint i = 0; i < connections.length(); i++ ) {
- QDomElement connection = connections.item(i).toElement();
- QDomElement connectionName = loadSingleProperty( connection, "name" );
- QDomElement connectionDriver = loadSingleProperty( connection, "driver" );
- QDomElement connectionDatabase = loadSingleProperty( connection,
+ TQDomElement connection = connections.item(i).toElement();
+ TQDomElement connectionName = loadSingleProperty( connection, "name" );
+ TQDomElement connectionDriver = loadSingleProperty( connection, "driver" );
+ TQDomElement connectionDatabase = loadSingleProperty( connection,
"database" );
- QDomElement connectionUsername = loadSingleProperty( connection,
+ TQDomElement connectionUsername = loadSingleProperty( connection,
"username" );
- QDomElement connectionHostname = loadSingleProperty( connection,
+ TQDomElement connectionHostname = loadSingleProperty( connection,
"hostname" );
- QDomElement connectionPort = loadSingleProperty( connection,
+ TQDomElement connectionPort = loadSingleProperty( connection,
"port" );
DatabaseConnection *conn = new DatabaseConnection( this );
@@ -984,21 +984,21 @@ void Project::loadConnections()
conn->setDatabase( connectionDatabase.firstChild().firstChild().toText().data() );
conn->setUsername( connectionUsername.firstChild().firstChild().toText().data() );
conn->setHostname( connectionHostname.firstChild().firstChild().toText().data() );
- conn->setPort( QString( connectionPort.firstChild().firstChild().toText().data() ).toInt() );
+ conn->setPort( TQString( connectionPort.firstChild().firstChild().toText().data() ).toInt() );
/* connection tables */
- QDomNodeList tables = connection.toElement().elementsByTagName( "table" );
+ TQDomNodeList tables = connection.toElement().elementsByTagName( "table" );
for ( uint j = 0; j < tables.length(); j++ ) {
- QDomElement table = tables.item(j).toElement();
- QDomElement tableName = loadSingleProperty( table, "name" );
+ TQDomElement table = tables.item(j).toElement();
+ TQDomElement tableName = loadSingleProperty( table, "name" );
conn->addTable( tableName.firstChild().firstChild().toText().data() );
/* table fields */
- QStringList fieldList;
- QDomNodeList fields = table.toElement().elementsByTagName( "field" );
+ TQStringList fieldList;
+ TQDomNodeList fields = table.toElement().elementsByTagName( "field" );
for ( uint k = 0; k < fields.length(); k++ ) {
- QDomElement field = fields.item(k).toElement();
- QDomElement fieldName = loadSingleProperty( field, "name" );
+ TQDomElement field = fields.item(k).toElement();
+ TQDomElement fieldName = loadSingleProperty( field, "name" );
fieldList.append( fieldName.firstChild().firstChild().toText().data() );
}
conn->setFields( tableName.firstChild().firstChild().toText().data(),
@@ -1008,7 +1008,7 @@ void Project::loadConnections()
dbConnections.append( conn );
}
} else {
- qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
}
f.close();
}
@@ -1019,7 +1019,7 @@ void Project::loadConnections()
can be closed again with closeDatabase().
*/
-bool Project::openDatabase( const QString &connection, bool suppressDialog )
+bool Project::openDatabase( const TQString &connection, bool suppressDialog )
{
#ifndef QT_NO_SQL
DatabaseConnection *conn = databaseConnection( connection );
@@ -1038,7 +1038,7 @@ bool Project::openDatabase( const QString &connection, bool suppressDialog )
/*! Closes the database \a connection.
*/
-void Project::closeDatabase( const QString &connection )
+void Project::closeDatabase( const TQString &connection )
{
#ifndef QT_NO_SQL
DatabaseConnection *conn = databaseConnection( connection );
@@ -1057,16 +1057,16 @@ void Project::closeDatabase( const QString &connection )
// formWindows.remove( fw );
// }
-QObjectList *Project::formList( bool resolveFakeObjects ) const
+TQObjectList *Project::formList( bool resolveFakeObjects ) const
{
- QObjectList *l = new QObjectList;
- for ( QPtrListIterator<FormFile> forms(formfiles); forms.current(); ++forms ) {
+ TQObjectList *l = new QObjectList;
+ for ( TQPtrListIterator<FormFile> forms(formfiles); forms.current(); ++forms ) {
FormFile* f = forms.current();
if ( f->formWindow() ) {
if ( resolveFakeObjects && f->formWindow()->isFake() )
l->append( objectForFakeForm( f->formWindow() ) );
else
- l->append( f->formWindow()->child( 0, "QWidget" ) );
+ l->append( f->formWindow()->child( 0, "TQWidget" ) );
} else if ( f->isFake() ) {
l->append( objectForFakeFormFile( f ) );
}
@@ -1081,7 +1081,7 @@ DesignerProject *Project::iFace()
return iface;
}
-void Project::setLanguage( const QString &l )
+void Project::setLanguage( const TQString &l )
{
if ( l == lang )
return;
@@ -1091,19 +1091,19 @@ void Project::setLanguage( const QString &l )
modified = TRUE;
}
-QString Project::language() const
+TQString Project::language() const
{
return lang;
}
-void Project::setCustomSetting( const QString &key, const QString &value )
+void Project::setCustomSetting( const TQString &key, const TQString &value )
{
customSettings.remove( key );
customSettings.insert( key, value );
modified = TRUE;
}
-QString Project::customSetting( const QString &key ) const
+TQString Project::customSetting( const TQString &key ) const
{
return *customSettings.find( key );
}
@@ -1144,9 +1144,9 @@ void Project::addSourceFile( SourceFile *sf )
}
-SourceFile* Project::findSourceFile( const QString& filename, SourceFile *ignore ) const
+SourceFile* Project::findSourceFile( const TQString& filename, SourceFile *ignore ) const
{
- QPtrListIterator<SourceFile> it(sourcefiles);
+ TQPtrListIterator<SourceFile> it(sourcefiles);
while ( it.current() ) {
if ( it.current() != ignore && it.current()->fileName() == filename )
return it.current();
@@ -1155,9 +1155,9 @@ SourceFile* Project::findSourceFile( const QString& filename, SourceFile *ignore
return 0;
}
-FormFile* Project::findFormFile( const QString& filename, FormFile *ignore ) const
+FormFile* Project::findFormFile( const TQString& filename, FormFile *ignore ) const
{
- QPtrListIterator<FormFile> it(formfiles);
+ TQPtrListIterator<FormFile> it(formfiles);
while ( it.current() ) {
if ( it.current() != ignore && it.current()->fileName() == filename )
return it.current();
@@ -1166,7 +1166,7 @@ FormFile* Project::findFormFile( const QString& filename, FormFile *ignore ) con
return 0;
}
-void Project::setIncludePath( const QString &platform, const QString &path )
+void Project::setIncludePath( const TQString &platform, const TQString &path )
{
if ( inclPath[platform] == path )
return;
@@ -1174,98 +1174,98 @@ void Project::setIncludePath( const QString &platform, const QString &path )
modified = TRUE;
}
-void Project::setLibs( const QString &platform, const QString &path )
+void Project::setLibs( const TQString &platform, const TQString &path )
{
lbs.replace( platform, path );
}
-void Project::setDefines( const QString &platform, const QString &path )
+void Project::setDefines( const TQString &platform, const TQString &path )
{
defs.replace( platform, path );
}
-void Project::setConfig( const QString &platform, const QString &config )
+void Project::setConfig( const TQString &platform, const TQString &config )
{
cfg.replace( platform, config );
}
-QString Project::config( const QString &platform ) const
+TQString Project::config( const TQString &platform ) const
{
return cfg[ platform ];
}
-QString Project::libs( const QString &platform ) const
+TQString Project::libs( const TQString &platform ) const
{
return lbs[ platform ];
}
-QString Project::defines( const QString &platform ) const
+TQString Project::defines( const TQString &platform ) const
{
return defs[ platform ];
}
-QString Project::includePath( const QString &platform ) const
+TQString Project::includePath( const TQString &platform ) const
{
return inclPath[ platform ];
}
-QString Project::templte() const
+TQString Project::templte() const
{
return templ;
}
-void Project::setTemplate( const QString &t )
+void Project::setTemplate( const TQString &t )
{
templ = t;
}
-void Project::readPlatformSettings( const QString &contents,
- const QString &setting,
- QMap<QString, QString> &res )
+void Project::readPlatformSettings( const TQString &contents,
+ const TQString &setting,
+ TQMap<TQString, TQString> &res )
{
- const QString platforms[] = { "", "win32", "unix", "mac", QString::null };
- for ( int i = 0; platforms[ i ] != QString::null; ++i ) {
- QString p = platforms[ i ];
+ const TQString platforms[] = { "", "win32", "unix", "mac", TQString::null };
+ for ( int i = 0; platforms[ i ] != TQString::null; ++i ) {
+ TQString p = platforms[ i ];
if ( !p.isEmpty() )
p += ":";
- QStringList lst = parse_multiline_part( contents, p + setting );
- QString s = lst.join( " " );
- QString key = platforms[ i ];
+ TQStringList lst = parse_multiline_part( contents, p + setting );
+ TQString s = lst.join( " " );
+ TQString key = platforms[ i ];
if ( key.isEmpty() )
key = "(all)";
res.replace( key, s );
}
}
-void Project::removePlatformSettings( QString &contents, const QString &setting )
+void Project::removePlatformSettings( TQString &contents, const TQString &setting )
{
- const QString platforms[] = { "win32", "unix", "mac", "", QString::null };
- for ( int i = 0; platforms[ i ] != QString::null; ++i ) {
- QString p = platforms[ i ];
+ const TQString platforms[] = { "win32", "unix", "mac", "", TQString::null };
+ for ( int i = 0; platforms[ i ] != TQString::null; ++i ) {
+ TQString p = platforms[ i ];
if ( !p.isEmpty() )
p += ":";
remove_multiline_contents( contents, p + setting );
}
}
-void Project::writePlatformSettings( QString &contents, const QString &setting,
- const QMap<QString, QString> &input )
+void Project::writePlatformSettings( TQString &contents, const TQString &setting,
+ const TQMap<TQString, TQString> &input )
{
- const QString platforms[] = { "", "win32", "unix", "mac", QString::null };
+ const TQString platforms[] = { "", "win32", "unix", "mac", TQString::null };
int i;
LanguageInterface *iface = MetaDataBase::languageInterface( lang );
if (iface && (setting == "SOURCES" || setting == "HEADERS")) // The (all) part will be saved later on
i = 1;
else
i = 0;
- for (; platforms[ i ] != QString::null; ++i ) {
- QString p = platforms[ i ];
+ for (; platforms[ i ] != TQString::null; ++i ) {
+ TQString p = platforms[ i ];
if ( !p.isEmpty() )
p += ":";
- QString key = platforms[ i ];
+ TQString key = platforms[ i ];
if ( key.isEmpty() )
key = "(all)";
- QMap<QString, QString>::ConstIterator it = input.find( key );
+ TQMap<TQString, TQString>::ConstIterator it = input.find( key );
if ( it == input.end() || (*it).isEmpty() )
continue;
contents += p + setting + "\t+= " + *it + "\n";
@@ -1291,29 +1291,29 @@ bool Project::removeFormFile( FormFile *ff )
return TRUE;
}
-void Project::addObject( QObject *o )
+void Project::addObject( TQObject *o )
{
bool wasModified = modified;
objs.append( o );
FormFile *ff = new FormFile( "", FALSE, this, "qt_fakewindow" );
- ff->setFileName( "__APPOBJ" + QString( o->name() ) + ".ui" );
+ ff->setFileName( "__APPOBJ" + TQString( o->name() ) + ".ui" );
fakeFormFiles.insert( (void*)o, ff );
MetaDataBase::addEntry( o );
if ( hasGUI() ) {
- QWidget *parent = MainWindow::self ? MainWindow::self->qWorkspace() : 0;
+ TQWidget *parent = MainWindow::self ? MainWindow::self->qWorkspace() : 0;
FormWindow *fw = new FormWindow( ff, MainWindow::self, parent, "qt_fakewindow" );
fw->setProject( this );
- if ( QFile::exists( ff->absFileName() ) )
+ if ( TQFile::exists( ff->absFileName() ) )
Resource::loadExtraSource( ff, ff->absFileName(),
MetaDataBase::languageInterface( language() ), FALSE );
if ( MainWindow::self )
fw->setMainWindow( MainWindow::self );
if ( MainWindow::self ) {
- QApplication::sendPostedEvents( MainWindow::self->qWorkspace(), QEvent::ChildInserted );
+ TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), TQEvent::ChildInserted );
connect( fw,
- SIGNAL( undoRedoChanged( bool, bool, const QString &, const QString & ) ),
+ TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
MainWindow::self,
- SLOT( updateUndoRedo( bool, bool, const QString &, const QString & ) )
+ TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) )
);
}
if ( fw->parentWidget() ) {
@@ -1321,7 +1321,7 @@ void Project::addObject( QObject *o )
fw->show();
}
} else {
- if ( QFile::exists( ff->absFileName() ) )
+ if ( TQFile::exists( ff->absFileName() ) )
Resource::loadExtraSource( ff, ff->absFileName(),
MetaDataBase::languageInterface( language() ), FALSE );
}
@@ -1329,13 +1329,13 @@ void Project::addObject( QObject *o )
modified = wasModified;
}
-void Project::setObjects( const QObjectList &ol )
+void Project::setObjects( const TQObjectList &ol )
{
- for ( QObjectListIt it( ol ); it.current(); ++it )
+ for ( TQObjectListIt it( ol ); it.current(); ++it )
addObject( it.current() );
}
-void Project::removeObject( QObject *o )
+void Project::removeObject( TQObject *o )
{
bool wasModified = modified;
objs.removeRef( o );
@@ -1345,31 +1345,31 @@ void Project::removeObject( QObject *o )
modified = wasModified;
}
-QObjectList Project::objects() const
+TQObjectList Project::objects() const
{
return objs;
}
-FormFile *Project::fakeFormFileFor( QObject *o ) const
+FormFile *Project::fakeFormFileFor( TQObject *o ) const
{
return fakeFormFiles.find( (void*)o );
}
-QObject *Project::objectForFakeForm( FormWindow *fw ) const
+TQObject *Project::objectForFakeForm( FormWindow *fw ) const
{
- for ( QPtrDictIterator<FormFile> it( fakeFormFiles ); it.current(); ++it ) {
+ for ( TQPtrDictIterator<FormFile> it( fakeFormFiles ); it.current(); ++it ) {
if ( it.current()->formWindow() == fw ||
it.current() == fw->formFile() )
- return (QObject*)it.currentKey();
+ return (TQObject*)it.currentKey();
}
return 0;
}
-QObject *Project::objectForFakeFormFile( FormFile *ff ) const
+TQObject *Project::objectForFakeFormFile( FormFile *ff ) const
{
- for ( QPtrDictIterator<FormFile> it( fakeFormFiles ); it.current(); ++it ) {
+ for ( TQPtrDictIterator<FormFile> it( fakeFormFiles ); it.current(); ++it ) {
if ( it.current() == ff )
- return (QObject*)it.currentKey();
+ return (TQObject*)it.currentKey();
}
return 0;
}
@@ -1378,45 +1378,45 @@ void Project::removeTempProject()
{
if ( !singleProjectMode() )
return;
- QDir d( QFileInfo( filename ).dirPath() );
- if ( !d.exists( QFileInfo( filename ).dirPath() ) )
+ TQDir d( TQFileInfo( filename ).dirPath() );
+ if ( !d.exists( TQFileInfo( filename ).dirPath() ) )
return;
- QStringList files = d.entryList( QDir::Files );
- QStringList::Iterator it;
+ TQStringList files = d.entryList( TQDir::Files );
+ TQStringList::Iterator it;
for ( it = files.begin(); it != files.end(); ++it ) {
d.remove( *it );
}
- if ( d.exists( QFileInfo( filename ).dirPath() + "/images" ) ) {
- d = QDir( QFileInfo( filename ).dirPath() + "/images" );
- files = d.entryList( QDir::Files );
+ if ( d.exists( TQFileInfo( filename ).dirPath() + "/images" ) ) {
+ d = TQDir( TQFileInfo( filename ).dirPath() + "/images" );
+ files = d.entryList( TQDir::Files );
for ( it = files.begin(); it != files.end(); ++it )
d.remove( *it );
- d = QDir( QFileInfo( filename ).dirPath() );
+ d = TQDir( TQFileInfo( filename ).dirPath() );
d.remove( "images" );
}
- d.remove( QFileInfo( filename ).dirPath() );
+ d.remove( TQFileInfo( filename ).dirPath() );
#if defined(Q_OS_UNIX)
// ##### implement for all platforms, ideally should be in Qt
- ::rmdir( QFile::encodeName( d.absPath() ) );
+ ::rmdir( TQFile::encodeName( d.absPath() ) );
#endif
}
-void Project::addAndEditFunction( const QString &function, const QString &functionBody, bool openDeveloper )
+void Project::addAndEditFunction( const TQString &function, const TQString &functionBody, bool openDeveloper )
{
for ( SourceFile *f = sourcefiles.first(); f; f = sourcefiles.next() ) {
- if ( QFileInfo( f->fileName() ).baseName() == "main" ) {
- QValueList<LanguageInterface::Function> funcs;
+ if ( TQFileInfo( f->fileName() ).baseName() == "main" ) {
+ TQValueList<LanguageInterface::Function> funcs;
LanguageInterface *iface = MetaDataBase::languageInterface( language() );
if ( !iface )
return;
iface->functions( f->text(), &funcs );
- QString func = function;
+ TQString func = function;
int i = func.find( '(' );
if ( i != -1 )
func = func.left( i );
bool found = FALSE;
- for ( QValueList<LanguageInterface::Function>::Iterator it = funcs.begin();
+ for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin();
it != funcs.end(); ++it ) {
if ( (*it).name.left( (*it).name.find( '(' ) ) == func ) {
found = TRUE;
@@ -1425,7 +1425,7 @@ void Project::addAndEditFunction( const QString &function, const QString &functi
}
if ( !found ) {
- QString code = f->text();
+ TQString code = f->text();
if ( functionBody.isEmpty() )
code += "\n\n" + iface->createFunctionStart( "", func, "", "" ) + "()\n{\n\n}\n";
else
@@ -1447,22 +1447,22 @@ void Project::addAndEditFunction( const QString &function, const QString &functi
}
}
-bool Project::hasParentObject( QObject *o )
+bool Project::hasParentObject( TQObject *o )
{
- for ( QObject *p = objs.first(); p; p = objs.next() ) {
- QObject *c = p->child( o->name(), o->className() );
+ for ( TQObject *p = objs.first(); p; p = objs.next() ) {
+ TQObject *c = p->child( o->name(), o->className() );
if ( c )
return TRUE;
}
return FALSE;
}
-QString Project::qualifiedName( QObject *o )
+TQString Project::qualifiedName( TQObject *o )
{
- QString name = o->name();
- QObject *p = o->parent();
+ TQString name = o->name();
+ TQObject *p = o->parent();
while ( p ) {
- name.prepend( QString( p->name() ) + "." );
+ name.prepend( TQString( p->name() ) + "." );
if ( objs.findRef( p ) != -1 )
break;
p = p->parent();
@@ -1475,7 +1475,7 @@ bool Project::singleProjectMode() const
return !MainWindow::self || MainWindow::self->singleProjectMode();
}
-QWidget *Project::messageBoxParent() const
+TQWidget *Project::messageBoxParent() const
{
return MainWindow::self;
}
@@ -1487,13 +1487,13 @@ void Project::designerCreated()
if ( !fw || fw->mainWindow() )
continue;
fw->setMainWindow( MainWindow::self );
- connect( fw, SIGNAL( undoRedoChanged( bool, bool, const QString &,
- const QString & ) ),
- MainWindow::self, SLOT( updateUndoRedo( bool, bool,
- const QString &, const QString & ) ) );
- fw->reparent( MainWindow::self->qWorkspace(), QPoint( 0, 0 ), FALSE );
- QApplication::sendPostedEvents( MainWindow::self->qWorkspace(),
- QEvent::ChildInserted );
+ connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &,
+ const TQString & ) ),
+ MainWindow::self, TQT_SLOT( updateUndoRedo( bool, bool,
+ const TQString &, const TQString & ) ) );
+ fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), FALSE );
+ TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(),
+ TQEvent::ChildInserted );
fw->parentWidget()->setFixedSize( 1, 1 );
fw->show();
}
@@ -1506,26 +1506,26 @@ void Project::formOpened( FormWindow *fw )
emit newFormOpened( fw );
}
-QString Project::locationOfObject( QObject *o )
+TQString Project::locationOfObject( TQObject *o )
{
if ( !o )
- return QString::null;
+ return TQString::null;
if ( MainWindow::self ) {
- QWidgetList windows = MainWindow::self->qWorkspace()->windowList();
- for ( QWidget *w = windows.first(); w; w = windows.next() ) {
+ TQWidgetList windows = MainWindow::self->qWorkspace()->windowList();
+ for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
FormWindow *fw = ::qt_cast<FormWindow*>(w);
SourceEditor *se = ::qt_cast<SourceEditor*>(w);
if ( fw ) {
if ( fw->isFake() )
- return objectForFakeForm( fw )->name() + QString( " [Source]" );
+ return objectForFakeForm( fw )->name() + TQString( " [Source]" );
else
- return fw->name() + QString( " [Source]" );
+ return fw->name() + TQString( " [Source]" );
} else if ( se ) {
if ( !se->object() )
continue;
if ( se->formWindow() )
- return se->formWindow()->name() + QString( " [Source]" );
+ return se->formWindow()->name() + TQString( " [Source]" );
else
return makeRelative( se->sourceFile()->fileName() );
}
@@ -1533,7 +1533,7 @@ QString Project::locationOfObject( QObject *o )
}
if ( ::qt_cast<SourceFile*>(o) ) {
- for ( QPtrListIterator<SourceFile> sources = sourceFiles();
+ for ( TQPtrListIterator<SourceFile> sources = sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
if ( f == o )
@@ -1541,18 +1541,18 @@ QString Project::locationOfObject( QObject *o )
}
}
- extern QMap<QWidget*, QString> *qwf_forms;
+ extern TQMap<TQWidget*, TQString> *qwf_forms;
if ( !qwf_forms ) {
qWarning( "Project::locationOfObject: qwf_forms is NULL!" );
- return QString::null;
+ return TQString::null;
}
- QString s = makeRelative( *qwf_forms->find( (QWidget*)o ) );
+ TQString s = makeRelative( *qwf_forms->find( (TQWidget*)o ) );
s += " [Source]";
return s;
}
bool Project::hasGUI() const
{
- return qApp->type() != QApplication::Tty;
+ return qApp->type() != TQApplication::Tty;
}
diff --git a/kdevdesigner/designer/project.h b/kdevdesigner/designer/project.h
index a2606ffa..fb447218 100644
--- a/kdevdesigner/designer/project.h
+++ b/kdevdesigner/designer/project.h
@@ -27,18 +27,18 @@
#ifndef PROJECT_H
#define PROJECT_H
-#include <qfeatures.h>
+#include <tqfeatures.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <private/qpluginmanager_p.h>
#include "../interfaces/projectsettingsiface.h"
#include "sourcefile.h"
#include "formfile.h"
-#include <qobjectlist.h>
-#include <qptrdict.h>
+#include <tqobjectlist.h>
+#include <tqptrdict.h>
#include "formfile.h"
class QObjectList;
@@ -66,40 +66,40 @@ public:
DesignerDatabase *iFace();
bool isLoaded() const { return loaded; }
- void setName( const QString& n ) { nm = n; }
- QString name() const { return nm; }
- void setDriver( const QString& d ) { drv = d; }
- QString driver() const { return drv; }
- void setDatabase( const QString& db ) { dbName = db; }
- QString database() const { return dbName; }
- void setUsername( const QString& u ) { uname = u; }
- QString username() const { return uname; }
- void setPassword( const QString& p ) { pword = p; }
- QString password() const { return pword; }
- void setHostname( const QString& h ) { hname = h; }
- QString hostname() const { return hname; }
+ void setName( const TQString& n ) { nm = n; }
+ TQString name() const { return nm; }
+ void setDriver( const TQString& d ) { drv = d; }
+ TQString driver() const { return drv; }
+ void setDatabase( const TQString& db ) { dbName = db; }
+ TQString database() const { return dbName; }
+ void setUsername( const TQString& u ) { uname = u; }
+ TQString username() const { return uname; }
+ void setPassword( const TQString& p ) { pword = p; }
+ TQString password() const { return pword; }
+ void setHostname( const TQString& h ) { hname = h; }
+ TQString hostname() const { return hname; }
void setPort( int p ) { prt = p; }
int port() const { return prt; }
- QString lastError() const { return dbErr; }
- void addTable( const QString& t ) { tbls.append(t); }
- void setFields( const QString& t, const QStringList& f ) { flds[t] = f; }
- QStringList tables() const { return tbls; }
- QStringList fields( const QString& t ) { return flds[t]; }
- QMap<QString, QStringList> fields() { return flds; }
+ TQString lastError() const { return dbErr; }
+ void addTable( const TQString& t ) { tbls.append(t); }
+ void setFields( const TQString& t, const TQStringList& f ) { flds[t] = f; }
+ TQStringList tables() const { return tbls; }
+ TQStringList fields( const TQString& t ) { return flds[t]; }
+ TQMap<TQString, TQStringList> fields() { return flds; }
#ifndef QT_NO_SQL
- QSqlDatabase* connection() const { return conn; }
+ TQSqlDatabase* connection() const { return conn; }
void remove();
#endif
private:
- QString nm;
- QString drv, dbName, uname, pword, hname;
- QString dbErr;
+ TQString nm;
+ TQString drv, dbName, uname, pword, hname;
+ TQString dbErr;
int prt;
- QStringList tbls;
- QMap<QString, QStringList> flds;
+ TQStringList tbls;
+ TQMap<TQString, TQStringList> flds;
#ifndef QT_NO_SQL
- QSqlDatabase *conn;
+ TQSqlDatabase *conn;
#endif
Project *project;
bool loaded;
@@ -114,23 +114,23 @@ class Project : public QObject
friend class DatabaseConnection;
public:
- Project( const QString &fn, const QString &pName = QString::null,
+ Project( const TQString &fn, const TQString &pName = TQString::null,
QPluginManager<ProjectSettingsInterface> *pm = 0, bool isDummy = FALSE,
- const QString &l = "C++" );
+ const TQString &l = "C++" );
~Project();
- void setFileName( const QString &fn, bool doClear = TRUE );
- QString fileName( bool singlePro = FALSE ) const;
- QString projectName() const;
+ void setFileName( const TQString &fn, bool doClear = TRUE );
+ TQString fileName( bool singlePro = FALSE ) const;
+ TQString projectName() const;
- void setDatabaseDescription( const QString &db );
- QString databaseDescription() const;
+ void setDatabaseDescription( const TQString &db );
+ TQString databaseDescription() const;
- void setDescription( const QString &s );
- QString description() const;
+ void setDescription( const TQString &s );
+ TQString description() const;
- void setLanguage( const QString &l );
- QString language() const;
+ void setLanguage( const TQString &l );
+ TQString language() const;
bool isValid() const;
@@ -138,77 +138,77 @@ public:
// returns TRUE if this project is the <No Project> project
bool isDummy() const;
- QString makeAbsolute( const QString &f );
- QString makeRelative( const QString &f );
+ TQString makeAbsolute( const TQString &f );
+ TQString makeRelative( const TQString &f );
void save( bool onlyProjectFile = FALSE );
#ifndef QT_NO_SQL
- QPtrList<DatabaseConnection> databaseConnections() const;
- void setDatabaseConnections( const QPtrList<DatabaseConnection> &lst );
+ TQPtrList<DatabaseConnection> databaseConnections() const;
+ void setDatabaseConnections( const TQPtrList<DatabaseConnection> &lst );
void addDatabaseConnection( DatabaseConnection *conn );
- void removeDatabaseConnection( const QString &conn );
- DatabaseConnection *databaseConnection( const QString &name );
- QStringList databaseConnectionList();
- QStringList databaseTableList( const QString &connection );
- QStringList databaseFieldList( const QString &connection, const QString &table );
+ void removeDatabaseConnection( const TQString &conn );
+ DatabaseConnection *databaseConnection( const TQString &name );
+ TQStringList databaseConnectionList();
+ TQStringList databaseTableList( const TQString &connection );
+ TQStringList databaseFieldList( const TQString &connection, const TQString &table );
#endif
void saveConnections();
void loadConnections();
- bool openDatabase( const QString &connection, bool suppressDialog = TRUE );
- void closeDatabase( const QString &connection );
+ bool openDatabase( const TQString &connection, bool suppressDialog = TRUE );
+ void closeDatabase( const TQString &connection );
- QObjectList *formList( bool resolveFakeObjects = FALSE ) const;
+ TQObjectList *formList( bool resolveFakeObjects = FALSE ) const;
DesignerProject *iFace();
- void setCustomSetting( const QString &key, const QString &value );
- QString customSetting( const QString &key ) const;
+ void setCustomSetting( const TQString &key, const TQString &value );
+ TQString customSetting( const TQString &key ) const;
PixmapCollection *pixmapCollection() const { return pixCollection; }
void setActive( bool b );
- QPtrListIterator<SourceFile> sourceFiles() const { return QPtrListIterator<SourceFile>(sourcefiles); }
+ TQPtrListIterator<SourceFile> sourceFiles() const { return TQPtrListIterator<SourceFile>(sourcefiles); }
void addSourceFile( SourceFile *sf );
bool removeSourceFile( SourceFile *sf );
- SourceFile* findSourceFile( const QString& filename, SourceFile *ignore = 0 ) const;
+ SourceFile* findSourceFile( const TQString& filename, SourceFile *ignore = 0 ) const;
- QPtrListIterator<FormFile> formFiles() const { return QPtrListIterator<FormFile>(formfiles); }
+ TQPtrListIterator<FormFile> formFiles() const { return TQPtrListIterator<FormFile>(formfiles); }
void addFormFile( FormFile *ff );
bool removeFormFile( FormFile *ff );
- FormFile* findFormFile( const QString& filename, FormFile *ignore = 0 ) const;
+ FormFile* findFormFile( const TQString& filename, FormFile *ignore = 0 ) const;
- void setIncludePath( const QString &platform, const QString &path );
- void setLibs( const QString &platform, const QString &path );
- void setDefines( const QString &platform, const QString &path );
- void setConfig( const QString &platform, const QString &config );
- void setTemplate( const QString &t );
+ void setIncludePath( const TQString &platform, const TQString &path );
+ void setLibs( const TQString &platform, const TQString &path );
+ void setDefines( const TQString &platform, const TQString &path );
+ void setConfig( const TQString &platform, const TQString &config );
+ void setTemplate( const TQString &t );
- QString config( const QString &platform ) const;
- QString libs( const QString &platform ) const;
- QString defines( const QString &platform ) const;
- QString includePath( const QString &platform ) const;
- QString templte() const;
+ TQString config( const TQString &platform ) const;
+ TQString libs( const TQString &platform ) const;
+ TQString defines( const TQString &platform ) const;
+ TQString includePath( const TQString &platform ) const;
+ TQString templte() const;
bool isModified() const { return !isDummy() && modified; }
void setModified( bool b );
- void addObject( QObject *o );
- void setObjects( const QObjectList &ol );
- void removeObject( QObject *o );
- QObjectList objects() const;
- FormFile *fakeFormFileFor( QObject *o ) const;
- QObject *objectForFakeForm( FormWindow *fw ) const;
- QObject *objectForFakeFormFile( FormFile *ff ) const;
+ void addObject( TQObject *o );
+ void setObjects( const TQObjectList &ol );
+ void removeObject( TQObject *o );
+ TQObjectList objects() const;
+ FormFile *fakeFormFileFor( TQObject *o ) const;
+ TQObject *objectForFakeForm( FormWindow *fw ) const;
+ TQObject *objectForFakeFormFile( FormFile *ff ) const;
- void addAndEditFunction( const QString &functionName, const QString &functionBody,
+ void addAndEditFunction( const TQString &functionName, const TQString &functionBody,
bool openDeveloper );
void removeTempProject();
- bool hasParentObject( QObject *o );
- QString qualifiedName( QObject *o );
+ bool hasParentObject( TQObject *o );
+ TQString qualifiedName( TQObject *o );
bool isCpp() const { return is_cpp; }
@@ -216,7 +216,7 @@ public:
void formOpened( FormWindow *fw );
- QString locationOfObject( QObject *o );
+ TQString locationOfObject( TQObject *o );
bool hasGUI() const;
@@ -226,46 +226,46 @@ signals:
void sourceFileRemoved( SourceFile* );
void formFileAdded( FormFile* );
void formFileRemoved( FormFile* );
- void objectAdded( QObject * );
- void objectRemoved( QObject * );
+ void objectAdded( TQObject * );
+ void objectRemoved( TQObject * );
void newFormOpened( FormWindow *fw );
private:
void parse();
void clear();
void updateCustomSettings();
- void readPlatformSettings( const QString &contents,
- const QString &setting,
- QMap<QString, QString> &res );
- void removePlatformSettings( QString &contents, const QString &setting );
- void writePlatformSettings( QString &contents, const QString &setting,
- const QMap<QString, QString> &input );
+ void readPlatformSettings( const TQString &contents,
+ const TQString &setting,
+ TQMap<TQString, TQString> &res );
+ void removePlatformSettings( TQString &contents, const TQString &setting );
+ void writePlatformSettings( TQString &contents, const TQString &setting,
+ const TQMap<TQString, TQString> &input );
bool singleProjectMode() const;
- QWidget *messageBoxParent() const;
+ TQWidget *messageBoxParent() const;
private:
- QString filename;
- QString proName;
- QString desc;
- QString dbFile;
+ TQString filename;
+ TQString proName;
+ TQString desc;
+ TQString dbFile;
#ifndef QT_NO_SQL
- QPtrList<DatabaseConnection> dbConnections;
+ TQPtrList<DatabaseConnection> dbConnections;
#endif
- QString lang;
+ TQString lang;
DesignerProject *iface;
- QMap<QString, QString> customSettings;
- QStringList csList;
+ TQMap<TQString, TQString> customSettings;
+ TQStringList csList;
QPluginManager<ProjectSettingsInterface> *projectSettingsPluginManager;
PixmapCollection *pixCollection;
- QPtrList<SourceFile> sourcefiles;
- QPtrList<FormFile> formfiles;
- QMap<QString, QString> inclPath, defs, lbs, cfg, sources, headers;
- QString templ;
+ TQPtrList<SourceFile> sourcefiles;
+ TQPtrList<FormFile> formfiles;
+ TQMap<TQString, TQString> inclPath, defs, lbs, cfg, sources, headers;
+ TQString templ;
bool isDummyProject;
bool modified;
- QObjectList objs;
- QPtrDict<FormFile> fakeFormFiles;
- QString singleProFileName;
+ TQObjectList objs;
+ TQPtrDict<FormFile> fakeFormFiles;
+ TQString singleProFileName;
bool is_cpp;
};
diff --git a/kdevdesigner/designer/projectsettingsimpl.cpp b/kdevdesigner/designer/projectsettingsimpl.cpp
index a1a2b6b1..8d213a0a 100644
--- a/kdevdesigner/designer/projectsettingsimpl.cpp
+++ b/kdevdesigner/designer/projectsettingsimpl.cpp
@@ -38,14 +38,14 @@
#include <klocale.h>
#include <klineedit.h>
-#include <qtextedit.h>
-#include <qcheckbox.h>
-#include <qfiledialog.h>
-#include <qcombobox.h>
-#include <qobjectlist.h>
-#include <qheader.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqtextedit.h>
+#include <tqcheckbox.h>
+#include <tqfiledialog.h>
+#include <tqcombobox.h>
+#include <tqobjectlist.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
/*
* Constructs a ProjectSettings which is a child of 'parent', with the
@@ -54,10 +54,10 @@
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-ProjectSettings::ProjectSettings( Project *pro, QWidget* parent, const char* name, bool modal, WFlags fl )
+ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl )
: ProjectSettingsBase( parent, name, modal, fl ), project( pro )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
editProjectFile->setFocus();
@@ -93,7 +93,7 @@ ProjectSettings::~ProjectSettings()
void ProjectSettings::chooseDatabaseFile()
{
- QString fn = KFileDialog::getSaveFileName( editDatabaseFile->text(), i18n( "*.db|Database Files\n*|All Files" ), this );
+ TQString fn = KFileDialog::getSaveFileName( editDatabaseFile->text(), i18n( "*.db|Database Files\n*|All Files" ), this );
if ( fn.isEmpty() )
return;
editDatabaseFile->setText( fn );
@@ -101,7 +101,7 @@ void ProjectSettings::chooseDatabaseFile()
void ProjectSettings::chooseProjectFile()
{
- QString fn = KFileDialog::getSaveFileName( editDatabaseFile->text(), i18n( "*.pro|Project Files\n*|All Files" ), this );
+ TQString fn = KFileDialog::getSaveFileName( editDatabaseFile->text(), i18n( "*.pro|Project Files\n*|All Files" ), this );
if ( fn.isEmpty() )
return;
editProjectFile->setText( fn );
@@ -121,6 +121,6 @@ void ProjectSettings::okClicked()
accept();
}
-void ProjectSettings::languageChanged( const QString & )
+void ProjectSettings::languageChanged( const TQString & )
{
}
diff --git a/kdevdesigner/designer/projectsettingsimpl.h b/kdevdesigner/designer/projectsettingsimpl.h
index 3833d813..ee5c6c72 100644
--- a/kdevdesigner/designer/projectsettingsimpl.h
+++ b/kdevdesigner/designer/projectsettingsimpl.h
@@ -39,7 +39,7 @@ class ProjectSettings : public ProjectSettingsBase
Q_OBJECT
public:
- ProjectSettings( Project *pro, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~ProjectSettings();
protected slots:
@@ -47,7 +47,7 @@ protected slots:
void chooseProjectFile();
void helpClicked();
void okClicked();
- void languageChanged( const QString &lang );
+ void languageChanged( const TQString &lang );
private:
Project *project;
diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp
index 06b8f93b..7ec9cc9b 100644
--- a/kdevdesigner/designer/propertyeditor.cpp
+++ b/kdevdesigner/designer/propertyeditor.cpp
@@ -24,7 +24,7 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "propertyeditor.h"
#include "formwindow.h"
@@ -49,56 +49,56 @@
#include <klocale.h>
#include "kdevdesigner_part.h"
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qapplication.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qstrlist.h>
-#include <qmetaobject.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qfontdialog.h>
-#include <qspinbox.h>
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qlistbox.h>
-#include <qfontdatabase.h>
-#include <qcolor.h>
-#include <qcolordialog.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsizepolicy.h>
-#include <qbitmap.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qaccel.h>
-#include <qworkspace.h>
-#include <qtimer.h>
-#include <qdragobject.h>
-#include <qdom.h>
-#include <qprocess.h>
-#include <qstyle.h>
-#include <qdatetimeedit.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqstrlist.h>
+#include <tqmetaobject.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqfontdialog.h>
+#include <tqspinbox.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqlistbox.h>
+#include <tqfontdatabase.h>
+#include <tqcolor.h>
+#include <tqcolordialog.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsizepolicy.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqaccel.h>
+#include <tqworkspace.h>
+#include <tqtimer.h>
+#include <tqdragobject.h>
+#include <tqdom.h>
+#include <tqprocess.h>
+#include <tqstyle.h>
+#include <tqdatetimeedit.h>
#include <qassistantclient.h>
-#include <qdrawutil.h>
-#include <qmultilineedit.h> // FIXME: obsolete
-#include <qsplitter.h>
-#include <qdatatable.h>
-#include <qtextview.h>
+#include <tqdrawutil.h>
+#include <tqmultilineedit.h> // FIXME: obsolete
+#include <tqsplitter.h>
+#include <tqdatatable.h>
+#include <tqtextview.h>
#include <limits.h>
-static QFontDatabase *fontDataBase = 0;
-QString assistantPath();
+static TQFontDatabase *fontDataBase = 0;
+TQString assistantPath();
#ifdef Q_WS_MAC
-#include <qwindowsstyle.h>
-static void setupStyle(QWidget *w)
+#include <tqwindowsstyle.h>
+static void setupStyle(TQWidget *w)
{
- static QStyle *windowsStyle = 0;
+ static TQStyle *windowsStyle = 0;
if(!windowsStyle)
windowsStyle = new QWindowsStyle;
w->setStyle(windowsStyle);
@@ -113,7 +113,7 @@ static void cleanupFontDatabase()
fontDataBase = 0;
}
-static QStringList getFontList()
+static TQStringList getFontList()
{
if ( !fontDataBase ) {
fontDataBase = new QFontDatabase;
@@ -127,8 +127,8 @@ class PropertyWhatsThis : public QWhatsThis
{
public:
PropertyWhatsThis( PropertyList *l );
- QString text( const QPoint &pos );
- bool clicked( const QString& href );
+ TQString text( const TQPoint &pos );
+ bool clicked( const TQString& href );
private:
PropertyList *propertyList;
@@ -136,20 +136,20 @@ private:
};
PropertyWhatsThis::PropertyWhatsThis( PropertyList *l )
- : QWhatsThis( l->viewport() ), propertyList( l )
+ : TQWhatsThis( l->viewport() ), propertyList( l )
{
}
-QString PropertyWhatsThis::text( const QPoint &pos )
+TQString PropertyWhatsThis::text( const TQPoint &pos )
{
return propertyList->whatsThisAt( pos );
}
-bool PropertyWhatsThis::clicked( const QString& href )
+bool PropertyWhatsThis::clicked( const TQString& href )
{
if ( !href.isEmpty() ) {
QAssistantClient *ac = MainWindow::self->assistantClient();
- ac->showPage( QString( qInstallPathDocs() ) + "/html/" + href );
+ ac->showPage( TQString( qInstallPathDocs() ) + "/html/" + href );
}
return FALSE; // do not hide window
}
@@ -170,8 +170,8 @@ bool PropertyWhatsThis::clicked( const QString& href )
\a prop as the parent item.
*/
-PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
- : QListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName )
+PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
+ : TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName )
{
setSelectable( FALSE );
open = FALSE;
@@ -206,10 +206,10 @@ void PropertyItem::updateBackColor()
backColor = *backColor1;
}
-QColor PropertyItem::backgroundColor()
+TQColor PropertyItem::backgroundColor()
{
updateBackColor();
- if ( (QListViewItem*)this == listview->currentItem() )
+ if ( (TQListViewItem*)this == listview->currentItem() )
return *selectedBack;
return backColor;
}
@@ -230,12 +230,12 @@ void PropertyItem::initChildren()
{
}
-void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align )
{
- QColorGroup g( cg );
- g.setColor( QColorGroup::Base, backgroundColor() );
- g.setColor( QColorGroup::Foreground, Qt::black );
- g.setColor( QColorGroup::Text, Qt::black );
+ TQColorGroup g( cg );
+ g.setColor( TQColorGroup::Base, backgroundColor() );
+ g.setColor( TQColorGroup::Foreground, Qt::black );
+ g.setColor( TQColorGroup::Text, Qt::black );
int indent = 0;
if ( column == 0 ) {
indent = 20 + ( property ? 20 : 0 );
@@ -246,16 +246,16 @@ void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, in
if ( isChanged() && column == 0 ) {
p->save();
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold( TRUE );
p->setFont( f );
}
if ( !hasCustomContents() || column != 1 ) {
- QListViewItem::paintCell( p, g, column, width - indent, align );
+ TQListViewItem::paintCell( p, g, column, width - indent, align );
} else {
p->fillRect( 0, 0, width, height(), backgroundColor() );
- drawCustomContents( p, QRect( 0, 0, width, height() ) );
+ drawCustomContents( p, TQRect( 0, 0, width, height() ) );
}
if ( isChanged() && column == 0 )
@@ -273,29 +273,29 @@ void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, in
p->restore();
}
p->save();
- p->setPen( QPen( cg.dark(), 1 ) );
+ p->setPen( TQPen( cg.dark(), 1 ) );
p->drawLine( 0, height() - 1, width, height() - 1 );
p->drawLine( width - 1, 0, width - 1, height() );
p->restore();
if ( listview->currentItem() == this && column == 0 &&
!listview->hasFocus() && !listview->viewport()->hasFocus() )
- paintFocus( p, cg, QRect( 0, 0, width, height() ) );
+ paintFocus( p, cg, TQRect( 0, 0, width, height() ) );
}
-void PropertyItem::paintBranches( QPainter * p, const QColorGroup & cg,
+void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg,
int w, int y, int h )
{
- QColorGroup g( cg );
- g.setColor( QColorGroup::Base, backgroundColor() );
- QListViewItem::paintBranches( p, g, w, y, h );
+ TQColorGroup g( cg );
+ g.setColor( TQColorGroup::Base, backgroundColor() );
+ TQListViewItem::paintBranches( p, g, w, y, h );
}
-void PropertyItem::paintFocus( QPainter *p, const QColorGroup &cg, const QRect &r )
+void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r )
{
p->save();
- QApplication::style().drawPrimitive(QStyle::PE_Panel, p, r, cg,
- QStyle::Style_Sunken, QStyleOption(1,1) );
+ TQApplication::style().drawPrimitive(TQStyle::PE_Panel, p, r, cg,
+ TQStyle::Style_Sunken, TQStyleOption(1,1) );
p->restore();
}
@@ -365,12 +365,12 @@ void PropertyItem::hideEditor()
subclasses to init the editor
*/
-void PropertyItem::setValue( const QVariant &v )
+void PropertyItem::setValue( const TQVariant &v )
{
val = v;
}
-QVariant PropertyItem::value() const
+TQVariant PropertyItem::value() const
{
return val;
}
@@ -394,7 +394,7 @@ void PropertyItem::setChanged( bool b, bool updateDb )
updateResetButtonState();
}
-QString PropertyItem::name() const
+TQString PropertyItem::name() const
{
return propertyName;
}
@@ -405,22 +405,22 @@ void PropertyItem::createResetButton()
resetButton->parentWidget()->lower();
return;
}
- const QPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , KDevDesignerPartFactory::instance());
- QHBox *hbox = new QHBox( listview->viewport() );
- hbox->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ TQHBox *hbox = new TQHBox( listview->viewport() );
+ hbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
hbox->setLineWidth( 1 );
- resetButton = new QPushButton( hbox );
+ resetButton = new TQPushButton( hbox );
setupStyle( resetButton );
resetButton->setPixmap( DesignerResetPix );
resetButton->setFixedWidth( resetButton->sizeHint().width() );
hbox->layout()->setAlignment( Qt::AlignRight );
listview->addChild( hbox );
hbox->hide();
- QObject::connect( resetButton, SIGNAL( clicked() ),
- listview, SLOT( resetProperty() ) );
- QToolTip::add( resetButton, i18n( "Reset the property to its default value" ) );
- QWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) );
+ TQObject::connect( resetButton, TQT_SIGNAL( clicked() ),
+ listview, TQT_SLOT( resetProperty() ) );
+ TQToolTip::add( resetButton, i18n( "Reset the property to its default value" ) );
+ TQWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) );
updateResetButtonState();
}
@@ -438,10 +438,10 @@ void PropertyItem::updateResetButtonState()
call it from showEditor())
*/
-void PropertyItem::placeEditor( QWidget *w )
+void PropertyItem::placeEditor( TQWidget *w )
{
createResetButton();
- QRect r = listview->itemRect( this );
+ TQRect r = listview->itemRect( this );
if ( !r.size().isValid() ) {
listview->ensureItemVisible( this );
#if defined(Q_WS_WIN)
@@ -452,7 +452,7 @@ void PropertyItem::placeEditor( QWidget *w )
r.setX( listview->header()->sectionPos( 1 ) );
r.setWidth( listview->header()->sectionSize( 1 ) - 1 );
r.setWidth( r.width() - resetButton->width() - 2 );
- r = QRect( listview->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
listview->moveChild( w, r.x(), r.y() );
resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() );
@@ -519,13 +519,13 @@ bool PropertyItem::hasCustomContents() const
\sa hasCustomContents()
*/
-void PropertyItem::drawCustomContents( QPainter *, const QRect & )
+void PropertyItem::drawCustomContents( TQPainter *, const TQRect & )
{
}
-QString PropertyItem::currentItem() const
+TQString PropertyItem::currentItem() const
{
- return QString::null;
+ return TQString::null;
}
int PropertyItem::currentIntItem() const
@@ -533,7 +533,7 @@ int PropertyItem::currentIntItem() const
return -1;
}
-void PropertyItem::setCurrentItem( const QString & )
+void PropertyItem::setCurrentItem( const TQString & )
{
}
@@ -546,12 +546,12 @@ int PropertyItem::currentIntItemFromObject() const
return -1;
}
-QString PropertyItem::currentItemFromObject() const
+TQString PropertyItem::currentItemFromObject() const
{
- return QString::null;
+ return TQString::null;
}
-void PropertyItem::setFocus( QWidget *w )
+void PropertyItem::setFocus( TQWidget *w )
{
if ( !qApp->focusWidget() ||
listview->propertyEditor()->formWindow() &&
@@ -560,18 +560,18 @@ void PropertyItem::setFocus( QWidget *w )
w->setFocus();
}
-void PropertyItem::setText( int col, const QString &t )
+void PropertyItem::setText( int col, const TQString &t )
{
- QString txt( t );
+ TQString txt( t );
if ( col == 1 )
txt = txt.replace( "\n", " " );
- QListViewItem::setText( col, txt );
+ TQListViewItem::setText( col, txt );
}
// --------------------------------------------------------------
PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool comment, bool multiLine, bool ascii, bool a )
+ const TQString &propName, bool comment, bool multiLine, bool ascii, bool a )
: PropertyItem( l, after, prop, propName ), withComment( comment ),
hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a )
{
@@ -579,30 +579,30 @@ PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, Proper
box = 0;
}
-QLineEdit *PropertyTextItem::lined()
+TQLineEdit *PropertyTextItem::lined()
{
if ( lin )
return lin;
if ( hasMultiLines ) {
- box = new QHBox( listview->viewport() );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box = new TQHBox( listview->viewport() );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
box->hide();
}
lin = 0;
if ( hasMultiLines )
- lin = new QLineEdit( box );
+ lin = new TQLineEdit( box );
else
- lin = new QLineEdit( listview->viewport() );
+ lin = new TQLineEdit( listview->viewport() );
if ( asciiOnly ) {
if ( PropertyItem::name() == "name" ) {
- lin->setValidator( new AsciiValidator( QString(":"), lin, "ascii_validator" ) );
+ lin->setValidator( new AsciiValidator( TQString(":"), lin, "ascii_validator" ) );
if ( listview->propertyEditor()->formWindow()->isFake() )
lin->setEnabled( FALSE );
} else {
- lin->setValidator( new AsciiValidator( QString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
+ lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
"\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9"
"\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3"
"\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc"
@@ -611,30 +611,30 @@ QLineEdit *PropertyTextItem::lined()
} if ( !hasMultiLines ) {
lin->hide();
} else {
- button = new QPushButton( "...", box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getText() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getText() ) );
lin->setFrame( FALSE );
}
- connect( lin, SIGNAL( returnPressed() ),
- this, SLOT( setValue() ) );
- connect( lin, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( setValue() ) );
if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" )
- connect( lin, SIGNAL( returnPressed() ),
+ connect( lin, TQT_SIGNAL( returnPressed() ),
listview->propertyEditor()->formWindow()->commandHistory(),
- SLOT( checkCompressedCommand() ) );
+ TQT_SLOT( checkCompressedCommand() ) );
lin->installEventFilter( listview );
return lin;
}
PropertyTextItem::~PropertyTextItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
lin = 0;
- delete (QHBox*)box;
+ delete (TQHBox*)box;
box = 0;
}
@@ -669,7 +669,7 @@ void PropertyTextItem::showEditor()
lined()->blockSignals( FALSE );
}
- QWidget* w;
+ TQWidget* w;
if ( hasMultiLines )
w = box;
else
@@ -709,7 +709,7 @@ void PropertyTextItem::initChildren()
void PropertyTextItem::hideEditor()
{
PropertyItem::hideEditor();
- QWidget* w;
+ TQWidget* w;
if ( hasMultiLines )
w = box;
else
@@ -718,7 +718,7 @@ void PropertyTextItem::hideEditor()
w->hide();
}
-void PropertyTextItem::setValue( const QVariant &v )
+void PropertyTextItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -739,9 +739,9 @@ void PropertyTextItem::setValue( const QVariant &v )
void PropertyTextItem::setValue()
{
setText( 1, lined()->text() );
- QVariant v;
+ TQVariant v;
if ( accel ) {
- v = QVariant( QKeySequence( lined()->text() ) );
+ v = TQVariant( TQKeySequence( lined()->text() ) );
if ( v.toString().isNull() )
return; // not yet valid input
} else {
@@ -753,10 +753,10 @@ void PropertyTextItem::setValue()
void PropertyTextItem::getText()
{
- bool richText = !::qt_cast<QButton*>(listview->propertyEditor()->widget()) ||
+ bool richText = !::qt_cast<TQButton*>(listview->propertyEditor()->widget()) ||
( text( 0 ) == "whatsThis" );
bool doWrap = FALSE;
- QString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap );
+ TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap );
if ( !txt.isEmpty() ) {
setText( 1, txt );
PropertyItem::setValue( txt );
@@ -770,30 +770,30 @@ void PropertyTextItem::getText()
// --------------------------------------------------------------
PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
}
-QLineEdit *PropertyDoubleItem::lined()
+TQLineEdit *PropertyDoubleItem::lined()
{
if ( lin )
return lin;
- lin = new QLineEdit( listview->viewport() );
- lin->setValidator( new QDoubleValidator( lin, "double_validator" ) );
+ lin = new TQLineEdit( listview->viewport() );
+ lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) );
- connect( lin, SIGNAL( returnPressed() ),
- this, SLOT( setValue() ) );
- connect( lin, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( setValue() ) );
lin->installEventFilter( listview );
return lin;
}
PropertyDoubleItem::~PropertyDoubleItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
lin = 0;
}
@@ -802,10 +802,10 @@ void PropertyDoubleItem::showEditor()
PropertyItem::showEditor();
if ( !lin ) {
lined()->blockSignals( TRUE );
- lined()->setText( QString::number( value().toDouble() ) );
+ lined()->setText( TQString::number( value().toDouble() ) );
lined()->blockSignals( FALSE );
}
- QWidget* w = lined();
+ TQWidget* w = lined();
placeEditor( w );
if ( !w->isVisible() || !lined()->hasFocus() ) {
@@ -818,11 +818,11 @@ void PropertyDoubleItem::showEditor()
void PropertyDoubleItem::hideEditor()
{
PropertyItem::hideEditor();
- QWidget* w = lined();
+ TQWidget* w = lined();
w->hide();
}
-void PropertyDoubleItem::setValue( const QVariant &v )
+void PropertyDoubleItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
@@ -830,19 +830,19 @@ void PropertyDoubleItem::setValue( const QVariant &v )
lined()->blockSignals( TRUE );
int oldCursorPos;
oldCursorPos = lin->cursorPosition();
- lined()->setText( QString::number( v.toDouble() ) );
+ lined()->setText( TQString::number( v.toDouble() ) );
if ( oldCursorPos < (int)lin->text().length() )
lin->setCursorPosition( oldCursorPos );
lined()->blockSignals( FALSE );
}
- setText( 1, QString::number( v.toDouble() ) );
+ setText( 1, TQString::number( v.toDouble() ) );
PropertyItem::setValue( v );
}
void PropertyDoubleItem::setValue()
{
setText( 1, lined()->text() );
- QVariant v = lined()->text().toDouble();
+ TQVariant v = lined()->text().toDouble();
PropertyItem::setValue( v );
notifyValueChange();
}
@@ -850,7 +850,7 @@ void PropertyDoubleItem::setValue()
// --------------------------------------------------------------
-PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
@@ -861,12 +861,12 @@ QDateEdit *PropertyDateItem::lined()
if ( lin )
return lin;
lin = new QDateEdit( listview->viewport() );
- QObjectList *l = lin->queryList( "QLineEdit" );
- for ( QObject *o = l->first(); o; o = l->next() )
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
+ for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
- connect( lin, SIGNAL( valueChanged( const QDate & ) ),
- this, SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ),
+ this, TQT_SLOT( setValue() ) );
return lin;
}
@@ -898,7 +898,7 @@ void PropertyDateItem::hideEditor()
lin->hide();
}
-void PropertyDateItem::setValue( const QVariant &v )
+void PropertyDateItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -917,7 +917,7 @@ void PropertyDateItem::setValue( const QVariant &v )
void PropertyDateItem::setValue()
{
setText( 1, lined()->date().toString( ::Qt::ISODate ) );
- QVariant v;
+ TQVariant v;
v = lined()->date();
PropertyItem::setValue( v );
notifyValueChange();
@@ -925,7 +925,7 @@ void PropertyDateItem::setValue()
// --------------------------------------------------------------
-PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
@@ -936,10 +936,10 @@ QTimeEdit *PropertyTimeItem::lined()
if ( lin )
return lin;
lin = new QTimeEdit( listview->viewport() );
- connect( lin, SIGNAL( valueChanged( const QTime & ) ),
- this, SLOT( setValue() ) );
- QObjectList *l = lin->queryList( "QLineEdit" );
- for ( QObject *o = l->first(); o; o = l->next() )
+ connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ),
+ this, TQT_SLOT( setValue() ) );
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
+ for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
return lin;
@@ -973,7 +973,7 @@ void PropertyTimeItem::hideEditor()
lin->hide();
}
-void PropertyTimeItem::setValue( const QVariant &v )
+void PropertyTimeItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -992,7 +992,7 @@ void PropertyTimeItem::setValue( const QVariant &v )
void PropertyTimeItem::setValue()
{
setText( 1, lined()->time().toString( ::Qt::ISODate ) );
- QVariant v;
+ TQVariant v;
v = lined()->time();
PropertyItem::setValue( v );
notifyValueChange();
@@ -1000,7 +1000,7 @@ void PropertyTimeItem::setValue()
// --------------------------------------------------------------
-PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
@@ -1011,10 +1011,10 @@ QDateTimeEdit *PropertyDateTimeItem::lined()
if ( lin )
return lin;
lin = new QDateTimeEdit( listview->viewport() );
- connect( lin, SIGNAL( valueChanged( const QDateTime & ) ),
- this, SLOT( setValue() ) );
- QObjectList *l = lin->queryList( "QLineEdit" );
- for ( QObject *o = l->first(); o; o = l->next() )
+ connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ),
+ this, TQT_SLOT( setValue() ) );
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
+ for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
return lin;
@@ -1048,7 +1048,7 @@ void PropertyDateTimeItem::hideEditor()
lin->hide();
}
-void PropertyDateTimeItem::setValue( const QVariant &v )
+void PropertyDateTimeItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1067,7 +1067,7 @@ void PropertyDateTimeItem::setValue( const QVariant &v )
void PropertyDateTimeItem::setValue()
{
setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) );
- QVariant v;
+ TQVariant v;
v = lined()->dateTime();
PropertyItem::setValue( v );
notifyValueChange();
@@ -1075,36 +1075,36 @@ void PropertyDateTimeItem::setValue()
// --------------------------------------------------------------
-PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
comb = 0;
}
-QComboBox *PropertyBoolItem::combo()
+TQComboBox *PropertyBoolItem::combo()
{
if ( comb )
return comb;
- comb = new QComboBox( FALSE, listview->viewport() );
+ comb = new TQComboBox( FALSE, listview->viewport() );
comb->hide();
comb->insertItem( i18n( "False" ) );
comb->insertItem( i18n( "True" ) );
- connect( comb, SIGNAL( activated( int ) ),
- this, SLOT( setValue() ) );
+ connect( comb, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( setValue() ) );
comb->installEventFilter( listview );
return comb;
}
PropertyBoolItem::~PropertyBoolItem()
{
- delete (QComboBox*)comb;
+ delete (TQComboBox*)comb;
comb = 0;
}
void PropertyBoolItem::toggle()
{
bool b = value().toBool();
- setValue( QVariant( !b, 0 ) );
+ setValue( TQVariant( !b, 0 ) );
setValue();
}
@@ -1132,7 +1132,7 @@ void PropertyBoolItem::hideEditor()
combo()->hide();
}
-void PropertyBoolItem::setValue( const QVariant &v )
+void PropertyBoolItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1146,7 +1146,7 @@ void PropertyBoolItem::setValue( const QVariant &v )
combo()->setCurrentItem( 0 );
combo()->blockSignals( FALSE );
}
- QString tmp = i18n( "True" );
+ TQString tmp = i18n( "True" );
if ( !v.toBool() )
tmp = i18n( "False" );
setText( 1, tmp );
@@ -1159,41 +1159,41 @@ void PropertyBoolItem::setValue()
return;
setText( 1, combo()->currentText() );
bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE;
- PropertyItem::setValue( QVariant( b, 0 ) );
+ PropertyItem::setValue( TQVariant( b, 0 ) );
notifyValueChange();
}
// --------------------------------------------------------------
PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool s )
+ const TQString &propName, bool s )
: PropertyItem( l, after, prop, propName ), signedValue( s )
{
spinBx = 0;
}
-QSpinBox *PropertyIntItem::spinBox()
+TQSpinBox *PropertyIntItem::spinBox()
{
if ( spinBx )
return spinBx;
if ( signedValue )
- spinBx = new QSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() );
+ spinBx = new TQSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() );
else
- spinBx = new QSpinBox( 0, INT_MAX, 1, listview->viewport() );
+ spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() );
spinBx->hide();
spinBx->installEventFilter( listview );
- QObjectList *ol = spinBx->queryList( "QLineEdit" );
+ TQObjectList *ol = spinBx->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
- connect( spinBx, SIGNAL( valueChanged( int ) ),
- this, SLOT( setValue() ) );
+ connect( spinBx, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( setValue() ) );
return spinBx;
}
PropertyIntItem::~PropertyIntItem()
{
- delete (QSpinBox*)spinBx;
+ delete (TQSpinBox*)spinBx;
spinBx = 0;
}
@@ -1221,7 +1221,7 @@ void PropertyIntItem::hideEditor()
spinBox()->hide();
}
-void PropertyIntItem::setValue( const QVariant &v )
+void PropertyIntItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1237,9 +1237,9 @@ void PropertyIntItem::setValue( const QVariant &v )
}
if ( signedValue )
- setText( 1, QString::number( v.toInt() ) );
+ setText( 1, TQString::number( v.toInt() ) );
else
- setText( 1, QString::number( v.toUInt() ) );
+ setText( 1, TQString::number( v.toUInt() ) );
PropertyItem::setValue( v );
}
@@ -1247,7 +1247,7 @@ void PropertyIntItem::setValue()
{
if ( !spinBx )
return;
- setText( 1, QString::number( spinBox()->value() ) );
+ setText( 1, TQString::number( spinBox()->value() ) );
if ( signedValue )
PropertyItem::setValue( spinBox()->value() );
else
@@ -1258,7 +1258,7 @@ void PropertyIntItem::setValue()
// --------------------------------------------------------------
PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
spinBx = 0;
@@ -1266,24 +1266,24 @@ PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, Pr
PropertyLayoutItem::~PropertyLayoutItem()
{
- delete (QSpinBox*)spinBx;
+ delete (TQSpinBox*)spinBx;
spinBx = 0;
}
-QSpinBox* PropertyLayoutItem::spinBox()
+TQSpinBox* PropertyLayoutItem::spinBox()
{
if ( spinBx )
return spinBx;
- spinBx = new QSpinBox( -1, INT_MAX, 1, listview->viewport() );
+ spinBx = new TQSpinBox( -1, INT_MAX, 1, listview->viewport() );
spinBx->setSpecialValueText( i18n( "default" ) );
spinBx->hide();
spinBx->installEventFilter( listview );
- QObjectList *ol = spinBx->queryList( "QLineEdit" );
+ TQObjectList *ol = spinBx->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
- connect( spinBx, SIGNAL( valueChanged( int ) ),
- this, SLOT( setValue() ) );
+ connect( spinBx, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( setValue() ) );
return spinBx;
}
@@ -1308,14 +1308,14 @@ void PropertyLayoutItem::hideEditor()
spinBox()->hide();
}
-void PropertyLayoutItem::setValue( const QVariant &v )
+void PropertyLayoutItem::setValue( const TQVariant &v )
{
if ( spinBx ) {
spinBox()->blockSignals( TRUE );
spinBox()->setValue( v.toInt() );
spinBox()->blockSignals( FALSE );
}
- QString s = v.toString();
+ TQString s = v.toString();
if ( v.toInt() == -1 )
s = spinBox()->specialValueText();
setText( 1, s );
@@ -1334,24 +1334,24 @@ void PropertyLayoutItem::setValue()
// --------------------------------------------------------------
PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool e )
+ const TQString &propName, bool e )
: PropertyItem( l, after, prop, propName ), editable( e )
{
comb = 0;
oldInt = -1;
}
-QComboBox *PropertyListItem::combo()
+TQComboBox *PropertyListItem::combo()
{
if ( comb )
return comb;
- comb = new QComboBox( editable, listview->viewport() );
+ comb = new TQComboBox( editable, listview->viewport() );
comb->hide();
- connect( comb, SIGNAL( activated( int ) ),
- this, SLOT( setValue() ) );
+ connect( comb, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( setValue() ) );
comb->installEventFilter( listview );
if ( editable ) {
- QObjectList *ol = comb->queryList( "QLineEdit" );
+ TQObjectList *ol = comb->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
@@ -1361,7 +1361,7 @@ QComboBox *PropertyListItem::combo()
PropertyListItem::~PropertyListItem()
{
- delete (QComboBox*)comb;
+ delete (TQComboBox*)comb;
comb = 0;
}
@@ -1387,7 +1387,7 @@ void PropertyListItem::hideEditor()
combo()->hide();
}
-void PropertyListItem::setValue( const QVariant &v )
+void PropertyListItem::setValue( const TQVariant &v )
{
if ( comb ) {
combo()->blockSignals( TRUE );
@@ -1404,7 +1404,7 @@ void PropertyListItem::setValue()
if ( !comb )
return;
setText( 1, combo()->currentText() );
- QStringList lst;
+ TQStringList lst;
for ( uint i = 0; i < combo()->listBox()->count(); ++i )
lst << combo()->listBox()->item( i )->text();
PropertyItem::setValue( lst );
@@ -1413,12 +1413,12 @@ void PropertyListItem::setValue()
oldString = currentItem();
}
-QString PropertyListItem::currentItem() const
+TQString PropertyListItem::currentItem() const
{
return ( (PropertyListItem*)this )->combo()->currentText();
}
-void PropertyListItem::setCurrentItem( const QString &s )
+void PropertyListItem::setCurrentItem( const TQString &s )
{
if ( comb && currentItem().lower() == s.lower() )
return;
@@ -1440,7 +1440,7 @@ void PropertyListItem::setCurrentItem( const QString &s )
oldString = currentItem();
}
-void PropertyListItem::addItem( const QString &s )
+void PropertyListItem::addItem( const TQString &s )
{
combo()->insertItem( s );
}
@@ -1472,7 +1472,7 @@ int PropertyListItem::currentIntItemFromObject() const
return oldInt;
}
-QString PropertyListItem::currentItemFromObject() const
+TQString PropertyListItem::currentItemFromObject() const
{
return oldString;
}
@@ -1480,18 +1480,18 @@ QString PropertyListItem::currentItemFromObject() const
// --------------------------------------------------------------
PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, Type t )
+ const TQString &propName, Type t )
: PropertyItem( l, after, prop, propName ), typ( t )
{
lin = 0;
}
-QLineEdit *PropertyCoordItem::lined()
+TQLineEdit *PropertyCoordItem::lined()
{
if ( lin )
return lin;
- lin = new QLineEdit( listview->viewport() );
+ lin = new TQLineEdit( listview->viewport() );
lin->setReadOnly( TRUE );
lin->installEventFilter( listview );
lin->hide();
@@ -1546,7 +1546,7 @@ void PropertyCoordItem::initChildren()
PropertyCoordItem::~PropertyCoordItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
lin = 0;
}
@@ -1568,22 +1568,22 @@ void PropertyCoordItem::hideEditor()
lined()->hide();
}
-void PropertyCoordItem::setValue( const QVariant &v )
+void PropertyCoordItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
return;
- QString s;
+ TQString s;
if ( typ == Rect )
- s = "[ " + QString::number( v.toRect().x() ) + ", " + QString::number( v.toRect().y() ) + ", " +
- QString::number( v.toRect().width() ) + ", " + QString::number( v.toRect().height() ) + " ]";
+ s = "[ " + TQString::number( v.toRect().x() ) + ", " + TQString::number( v.toRect().y() ) + ", " +
+ TQString::number( v.toRect().width() ) + ", " + TQString::number( v.toRect().height() ) + " ]";
else if ( typ == Point )
- s = "[ " + QString::number( v.toPoint().x() ) + ", " +
- QString::number( v.toPoint().y() ) + " ]";
+ s = "[ " + TQString::number( v.toPoint().x() ) + ", " +
+ TQString::number( v.toPoint().y() ) + " ]";
else if ( typ == Size )
- s = "[ " + QString::number( v.toSize().width() ) + ", " +
- QString::number( v.toSize().height() ) + " ]";
+ s = "[ " + TQString::number( v.toSize().width() ) + ", " +
+ TQString::number( v.toSize().height() ) + " ]";
setText( 1, s );
if ( lin )
lined()->setText( s );
@@ -1598,7 +1598,7 @@ bool PropertyCoordItem::hasSubItems() const
void PropertyCoordItem::childValueChanged( PropertyItem *child )
{
if ( typ == Rect ) {
- QRect r = value().toRect();
+ TQRect r = value().toRect();
if ( child->name() == i18n( "x" ) )
r.moveBy( -r.x() + child->value().toInt(), 0 );
else if ( child->name() == i18n( "y" ) )
@@ -1609,14 +1609,14 @@ void PropertyCoordItem::childValueChanged( PropertyItem *child )
r.setHeight( child->value().toInt() );
setValue( r );
} else if ( typ == Point ) {
- QPoint r = value().toPoint();
+ TQPoint r = value().toPoint();
if ( child->name() == i18n( "x" ) )
r.setX( child->value().toInt() );
else if ( child->name() == i18n( "y" ) )
r.setY( child->value().toInt() );
setValue( r );
} else if ( typ == Size ) {
- QSize r = value().toSize();
+ TQSize r = value().toSize();
if ( child->name() == i18n( "width" ) )
r.setWidth( child->value().toInt() );
else if ( child->name() == i18n( "height" ) )
@@ -1629,28 +1629,28 @@ void PropertyCoordItem::childValueChanged( PropertyItem *child )
// --------------------------------------------------------------
PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, Type t )
+ const TQString &propName, Type t )
: PropertyItem( l, after, prop, propName ), type( t )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- pixPrev = new QLabel( box );
- pixPrev->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Minimum ) );
- pixPrev->setBackgroundColor( pixPrev->colorGroup().color( QColorGroup::Base ) );
- button = new QPushButton( "...", box );
+ pixPrev = new TQLabel( box );
+ pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Minimum ) );
+ pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- pixPrev->setFrameStyle( QFrame::NoFrame );
+ pixPrev->setFrameStyle( TQFrame::NoFrame );
box->installEventFilter( listview );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getPixmap() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getPixmap() ) );
}
PropertyPixmapItem::~PropertyPixmapItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyPixmapItem::showEditor()
@@ -1669,9 +1669,9 @@ void PropertyPixmapItem::hideEditor()
box->hide();
}
-void PropertyPixmapItem::setValue( const QVariant &v )
+void PropertyPixmapItem::setValue( const TQVariant &v )
{
- QString s;
+ TQString s;
if ( type == Pixmap )
pixPrev->setPixmap( v.toPixmap() );
else if ( type == IconSet )
@@ -1684,12 +1684,12 @@ void PropertyPixmapItem::setValue( const QVariant &v )
void PropertyPixmapItem::getPixmap()
{
- QPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() );
+ TQPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() );
if ( !pix.isNull() ) {
if ( type == Pixmap )
setValue( pix );
else if ( type == IconSet )
- setValue( QIconSet( pix ) );
+ setValue( TQIconSet( pix ) );
else
setValue( pix.convertToImage() );
@@ -1702,9 +1702,9 @@ bool PropertyPixmapItem::hasCustomContents() const
return TRUE;
}
-void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r )
+void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
- QPixmap pix;
+ TQPixmap pix;
if ( type == Pixmap )
pix = value().toPixmap();
else if ( type == IconSet )
@@ -1714,7 +1714,7 @@ void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r )
if ( !pix.isNull() ) {
p->save();
- p->setClipRect( QRect( QPoint( (int)(p->worldMatrix().dx() + r.x()),
+ p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()),
(int)(p->worldMatrix().dy() + r.y()) ),
r.size() ) );
p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix );
@@ -1726,29 +1726,29 @@ void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r )
// --------------------------------------------------------------
PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool children )
+ const TQString &propName, bool children )
: PropertyItem( l, after, prop, propName ), withChildren( children )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- colorPrev = new QFrame( box );
- button = new QPushButton( "...", box );
+ colorPrev = new TQFrame( box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- colorPrev->setFrameStyle( QFrame::Plain | QFrame::Box );
+ colorPrev->setFrameStyle( TQFrame::Plain | TQFrame::Box );
colorPrev->setLineWidth( 2 );
- QPalette pal = colorPrev->palette();
- QColorGroup cg = pal.active();
- cg.setColor( QColorGroup::Foreground, cg.color( QColorGroup::Base ) );
+ TQPalette pal = colorPrev->palette();
+ TQColorGroup cg = pal.active();
+ cg.setColor( TQColorGroup::Foreground, cg.color( TQColorGroup::Base ) );
pal.setActive( cg );
pal.setInactive( cg );
pal.setDisabled( cg );
colorPrev->setPalette( pal );
box->installEventFilter( listview );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getColor() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getColor() ) );
}
void PropertyColorItem::createChildren()
@@ -1778,7 +1778,7 @@ void PropertyColorItem::initChildren()
PropertyColorItem::~PropertyColorItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyColorItem::showEditor()
@@ -1797,13 +1797,13 @@ void PropertyColorItem::hideEditor()
box->hide();
}
-void PropertyColorItem::setValue( const QVariant &v )
+void PropertyColorItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
return;
- QString s;
+ TQString s;
setText( 1, v.toColor().name() );
colorPrev->setBackgroundColor( v.toColor() );
PropertyItem::setValue( v );
@@ -1816,7 +1816,7 @@ bool PropertyColorItem::hasSubItems() const
void PropertyColorItem::childValueChanged( PropertyItem *child )
{
- QColor c( val.toColor() );
+ TQColor c( val.toColor() );
if ( child->name() == i18n( "Red" ) )
c.setRgb( child->value().toInt(), c.green(), c.blue() );
else if ( child->name() == i18n( "Green" ) )
@@ -1829,7 +1829,7 @@ void PropertyColorItem::childValueChanged( PropertyItem *child )
void PropertyColorItem::getColor()
{
- QColor c = QColorDialog::getColor( val.asColor(), listview );
+ TQColor c = QColorDialog::getColor( val.asColor(), listview );
if ( c.isValid() ) {
setValue( c );
notifyValueChange();
@@ -1841,10 +1841,10 @@ bool PropertyColorItem::hasCustomContents() const
return TRUE;
}
-void PropertyColorItem::drawCustomContents( QPainter *p, const QRect &r )
+void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
p->save();
- p->setPen( QPen( black, 1 ) );
+ p->setPen( TQPen( black, 1 ) );
p->setBrush( val.toColor() );
p->drawRect( r.x() + 2, r.y() + 2, r.width() - 5, r.height() - 5 );
p->restore();
@@ -1852,16 +1852,16 @@ void PropertyColorItem::drawCustomContents( QPainter *p, const QRect &r )
// --------------------------------------------------------------
-PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- lined = new QLineEdit( box );
- button = new QPushButton( "...", box );
+ lined = new TQLineEdit( box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
lined->setFrame( FALSE );
lined->setReadOnly( TRUE );
@@ -1869,8 +1869,8 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper
box->installEventFilter( listview );
lined->installEventFilter( listview );
button->installEventFilter( listview );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getFont() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getFont() ) );
}
void PropertyFontItem::createChildren()
@@ -1901,19 +1901,19 @@ void PropertyFontItem::initChildren()
} else if ( item->name() == i18n( "Point Size" ) )
item->setValue( val.toFont().pointSize() );
else if ( item->name() == i18n( "Bold" ) )
- item->setValue( QVariant( val.toFont().bold(), 0 ) );
+ item->setValue( TQVariant( val.toFont().bold(), 0 ) );
else if ( item->name() == i18n( "Italic" ) )
- item->setValue( QVariant( val.toFont().italic(), 0 ) );
+ item->setValue( TQVariant( val.toFont().italic(), 0 ) );
else if ( item->name() == i18n( "Underline" ) )
- item->setValue( QVariant( val.toFont().underline(), 0 ) );
+ item->setValue( TQVariant( val.toFont().underline(), 0 ) );
else if ( item->name() == i18n( "Strikeout" ) )
- item->setValue( QVariant( val.toFont().strikeOut(), 0 ) );
+ item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) );
}
}
PropertyFontItem::~PropertyFontItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyFontItem::showEditor()
@@ -1932,20 +1932,20 @@ void PropertyFontItem::hideEditor()
box->hide();
}
-void PropertyFontItem::setValue( const QVariant &v )
+void PropertyFontItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
- setText( 1, v.toFont().family() + "-" + QString::number( v.toFont().pointSize() ) );
- lined->setText( v.toFont().family() + "-" + QString::number( v.toFont().pointSize() ) );
+ setText( 1, v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) );
+ lined->setText( v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) );
PropertyItem::setValue( v );
}
void PropertyFontItem::getFont()
{
bool ok = FALSE;
- QFont f = QFontDialog::getFont( &ok, val.toFont(), listview );
+ TQFont f = QFontDialog::getFont( &ok, val.toFont(), listview );
if ( ok && f != val.toFont() ) {
setValue( f );
notifyValueChange();
@@ -1959,7 +1959,7 @@ bool PropertyFontItem::hasSubItems() const
void PropertyFontItem::childValueChanged( PropertyItem *child )
{
- QFont f = val.toFont();
+ TQFont f = val.toFont();
if ( child->name() == i18n( "Family" ) )
f.setFamily( ( (PropertyListItem*)child )->currentItem() );
else if ( child->name() == i18n( "Point Size" ) )
@@ -1979,16 +1979,16 @@ void PropertyFontItem::childValueChanged( PropertyItem *child )
// --------------------------------------------------------------
PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool wField )
+ const TQString &propName, bool wField )
: PropertyItem( l, after, prop, propName ), withField( wField )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- lined = new QLineEdit( box );
- button = new QPushButton( "...", box );
+ lined = new TQLineEdit( box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
lined->setFrame( FALSE );
lined->setReadOnly( TRUE );
@@ -2015,18 +2015,18 @@ void PropertyDatabaseItem::initChildren()
{
#ifndef QT_NO_SQL
PropertyItem *item = 0;
- QStringList lst = value().toStringList();
- QString conn, table;
+ TQStringList lst = value().toStringList();
+ TQString conn, table;
for ( int i = 0; i < childCount(); ++i ) {
item = PropertyItem::child( i );
if ( item->name() == i18n( "Connection" ) ) {
- QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList();
+ TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList();
if ( !cl.isEmpty() )
item->setValue( cl );
else if ( lst.count() > 0 )
- item->setValue( QStringList( lst[ 0 ] ) );
+ item->setValue( TQStringList( lst[ 0 ] ) );
else if ( withField )
- item->setValue( QStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
+ item->setValue( TQStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
"database" ).toStringList()[ 0 ] ) );
if ( lst.count() > 0 && !lst[ 0 ].isEmpty() )
@@ -2038,13 +2038,13 @@ void PropertyDatabaseItem::initChildren()
item->setCurrentItem( 0 );
conn = item->currentItem();
} else if ( item->name() == i18n( "Table" ) ) {
- QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn );
+ TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn );
if ( !cl.isEmpty() )
item->setValue( cl );
else if ( lst.count() > 1 )
- item->setValue( QStringList( lst[ 1 ] ) );
+ item->setValue( TQStringList( lst[ 1 ] ) );
else if ( withField ) {
- QStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
+ TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
if ( fakeLst.count() > 1 )
item->setValue( fakeLst[ 1 ] );
}
@@ -2052,7 +2052,7 @@ void PropertyDatabaseItem::initChildren()
if ( lst.count() > 1 && !lst[ 1 ].isEmpty() )
item->setCurrentItem( lst[ 1 ] );
else if ( !isChanged() && withField ) {
- QStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
+ TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
if ( fakeLst.count() > 1 )
item->setCurrentItem( fakeLst[ 1 ] );
else
@@ -2061,11 +2061,11 @@ void PropertyDatabaseItem::initChildren()
item->setCurrentItem( 0 );
table = item->currentItem();
} else if ( item->name() == i18n( "Field" ) ) {
- QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table );
+ TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table );
if ( !cl.isEmpty() )
item->setValue( cl );
else if ( lst.count() > 2 )
- item->setValue( QStringList( lst[ 2 ] ) );
+ item->setValue( TQStringList( lst[ 2 ] ) );
if ( lst.count() > 2 && !lst[ 2 ].isEmpty() )
item->setCurrentItem( lst[ 2 ] );
else
@@ -2077,7 +2077,7 @@ void PropertyDatabaseItem::initChildren()
PropertyDatabaseItem::~PropertyDatabaseItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyDatabaseItem::showEditor()
@@ -2096,13 +2096,13 @@ void PropertyDatabaseItem::hideEditor()
box->hide();
}
-void PropertyDatabaseItem::setValue( const QVariant &v )
+void PropertyDatabaseItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
- QStringList lst = v.toStringList();
- QString s = lst.join( "." );
+ TQStringList lst = v.toStringList();
+ TQString s = lst.join( "." );
setText( 1, s );
lined->setText( s );
PropertyItem::setValue( v );
@@ -2116,7 +2116,7 @@ bool PropertyDatabaseItem::hasSubItems() const
void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
{
#ifndef QT_NO_SQL
- QStringList lst;
+ TQStringList lst;
lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem()
<< ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem();
if ( withField )
@@ -2146,17 +2146,17 @@ void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
// --------------------------------------------------------------
PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
}
-QLineEdit *PropertySizePolicyItem::lined()
+TQLineEdit *PropertySizePolicyItem::lined()
{
if ( lin )
return lin;
- lin = new QLineEdit( listview->viewport() );
+ lin = new TQLineEdit( listview->viewport() );
lin->hide();
lin->setReadOnly( TRUE );
return lin;
@@ -2164,7 +2164,7 @@ QLineEdit *PropertySizePolicyItem::lined()
void PropertySizePolicyItem::createChildren()
{
- QStringList lst;
+ TQStringList lst;
lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored";
PropertyItem *i = this;
@@ -2183,7 +2183,7 @@ void PropertySizePolicyItem::createChildren()
void PropertySizePolicyItem::initChildren()
{
PropertyItem *item = 0;
- QSizePolicy sp = val.toSizePolicy();
+ TQSizePolicy sp = val.toSizePolicy();
for ( int i = 0; i < childCount(); ++i ) {
item = PropertyItem::child( i );
if ( item->name() == i18n( "hSizeType" ) )
@@ -2199,7 +2199,7 @@ void PropertySizePolicyItem::initChildren()
PropertySizePolicyItem::~PropertySizePolicyItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
}
void PropertySizePolicyItem::showEditor()
@@ -2218,12 +2218,12 @@ void PropertySizePolicyItem::hideEditor()
lined()->hide();
}
-void PropertySizePolicyItem::setValue( const QVariant &v )
+void PropertySizePolicyItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
- QString s = i18n( "%1/%2/%3/%4" );
+ TQString s = i18n( "%1/%2/%3/%4" );
s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ).
arg( size_type_to_string( v.toSizePolicy().verData() ) ).
arg( v.toSizePolicy().horStretch() ).
@@ -2235,7 +2235,7 @@ void PropertySizePolicyItem::setValue( const QVariant &v )
void PropertySizePolicyItem::childValueChanged( PropertyItem *child )
{
- QSizePolicy sp = val.toSizePolicy();
+ TQSizePolicy sp = val.toSizePolicy();
if ( child->name() == i18n( "hSizeType" ) )
sp.setHorData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) );
else if ( child->name() == i18n( "vSizeType" ) )
@@ -2256,25 +2256,25 @@ bool PropertySizePolicyItem::hasSubItems() const
// --------------------------------------------------------------
PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- palettePrev = new QLabel( box );
- button = new QPushButton( "...", box );
+ palettePrev = new TQLabel( box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- palettePrev->setFrameStyle( QFrame::NoFrame );
+ palettePrev->setFrameStyle( TQFrame::NoFrame );
box->installEventFilter( listview );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getPalette() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getPalette() ) );
}
PropertyPaletteItem::~PropertyPaletteItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyPaletteItem::showEditor()
@@ -2293,9 +2293,9 @@ void PropertyPaletteItem::hideEditor()
box->hide();
}
-void PropertyPaletteItem::setValue( const QVariant &v )
+void PropertyPaletteItem::setValue( const TQVariant &v )
{
- QString s;
+ TQString s;
palettePrev->setPalette( v.toPalette() );
PropertyItem::setValue( v );
repaint();
@@ -2306,10 +2306,10 @@ void PropertyPaletteItem::getPalette()
if ( !listview->propertyEditor()->widget()->isWidgetType() )
return;
bool ok = FALSE;
- QWidget *w = (QWidget*)listview->propertyEditor()->widget();
- if ( ::qt_cast<QScrollView*>(w) )
- w = ( (QScrollView*)w )->viewport();
- QPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
+ TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
+ if ( ::qt_cast<TQScrollView*>(w) )
+ w = ( (TQScrollView*)w )->viewport();
+ TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
#if defined(QT_NON_COMMERCIAL)
w->backgroundMode(), listview->topLevelWidget(),
#else
@@ -2327,19 +2327,19 @@ bool PropertyPaletteItem::hasCustomContents() const
return TRUE;
}
-void PropertyPaletteItem::drawCustomContents( QPainter *p, const QRect &r )
+void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
- QPalette pal( value().toPalette() );
+ TQPalette pal( value().toPalette() );
p->save();
- p->setClipRect( QRect( QPoint( (int)(p->worldMatrix().dx() + r.x()),
+ p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()),
(int)(p->worldMatrix().dy() + r.y()) ),
r.size() ) );
- QRect r2( r );
+ TQRect r2( r );
r2.setX( r2.x() + 2 );
r2.setY( r2.y() + 2 );
r2.setWidth( r2.width() - 3 );
r2.setHeight( r2.height() - 3 );
- p->setPen( QPen( black, 1 ) );
+ p->setPen( TQPen( black, 1 ) );
p->setBrush( pal.active().background() );
p->drawRect( r2 );
p->restore();
@@ -2348,62 +2348,62 @@ void PropertyPaletteItem::drawCustomContents( QPainter *p, const QRect &r )
// --------------------------------------------------------------
PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
comb = 0;
}
-QComboBox *PropertyCursorItem::combo()
+TQComboBox *PropertyCursorItem::combo()
{
if ( comb )
return comb;
- comb = new QComboBox( FALSE, listview->viewport() );
+ comb = new TQComboBox( FALSE, listview->viewport() );
comb->hide();
- QBitmap cur;
-
- const QPixmap ArrowPix = SmallIcon( "designer_arrow.png" , KDevDesignerPartFactory::instance());
- const QPixmap UpArrowPix = SmallIcon( "designer_uparrow.png" , KDevDesignerPartFactory::instance());
- const QPixmap CrossPix = SmallIcon( "designer_cross.png" , KDevDesignerPartFactory::instance());
- const QPixmap WaitPix = SmallIcon( "designer_wait.png" , KDevDesignerPartFactory::instance());
- const QPixmap IBeamPix = SmallIcon( "designer_ibeam.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeVPix = SmallIcon( "designer_sizev.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeHPix = SmallIcon( "designer_sizeh.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeFPix = SmallIcon( "designer_sizef.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeBPix = SmallIcon( "designer_sizeb.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeAllPix = SmallIcon( "designer_sizeall.png" , KDevDesignerPartFactory::instance());
- const QPixmap VSplitPix = SmallIcon( "designer_vsplit.png" , KDevDesignerPartFactory::instance());
- const QPixmap HSplitPix = SmallIcon( "designer_hsplit.png" , KDevDesignerPartFactory::instance());
- const QPixmap HandPix = SmallIcon( "designer_hand.png" , KDevDesignerPartFactory::instance());
- const QPixmap NoPix = SmallIcon( "designer_no.png" , KDevDesignerPartFactory::instance());
-
- comb->insertItem( ArrowPix, i18n("Arrow"), QObject::ArrowCursor);
- comb->insertItem( UpArrowPix, i18n("Up-Arrow"), QObject::UpArrowCursor );
- comb->insertItem( CrossPix, i18n("Cross"), QObject::CrossCursor );
- comb->insertItem( WaitPix, i18n("Waiting"), QObject::WaitCursor );
- comb->insertItem( IBeamPix, i18n("iBeam"), QObject::IbeamCursor );
- comb->insertItem( SizeVPix, i18n("Size Vertical"), QObject::SizeVerCursor );
- comb->insertItem( SizeHPix, i18n("Size Horizontal"), QObject::SizeHorCursor );
- comb->insertItem( SizeFPix, i18n("Size Slash"), QObject::SizeBDiagCursor );
- comb->insertItem( SizeBPix, i18n("Size Backslash"), QObject::SizeFDiagCursor );
- comb->insertItem( SizeAllPix, i18n("Size All"), QObject::SizeAllCursor );
- cur = QBitmap( 25, 25, 1 );
+ TQBitmap cur;
+
+ const TQPixmap ArrowPix = SmallIcon( "designer_arrow.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap UpArrowPix = SmallIcon( "designer_uparrow.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap CrossPix = SmallIcon( "designer_cross.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap WaitPix = SmallIcon( "designer_wait.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap IBeamPix = SmallIcon( "designer_ibeam.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeVPix = SmallIcon( "designer_sizev.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeHPix = SmallIcon( "designer_sizeh.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeFPix = SmallIcon( "designer_sizef.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeBPix = SmallIcon( "designer_sizeb.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeAllPix = SmallIcon( "designer_sizeall.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap VSplitPix = SmallIcon( "designer_vsplit.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap HSplitPix = SmallIcon( "designer_hsplit.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap HandPix = SmallIcon( "designer_hand.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap NoPix = SmallIcon( "designer_no.png" , KDevDesignerPartFactory::instance());
+
+ comb->insertItem( ArrowPix, i18n("Arrow"), TQObject::ArrowCursor);
+ comb->insertItem( UpArrowPix, i18n("Up-Arrow"), TQObject::UpArrowCursor );
+ comb->insertItem( CrossPix, i18n("Cross"), TQObject::CrossCursor );
+ comb->insertItem( WaitPix, i18n("Waiting"), TQObject::WaitCursor );
+ comb->insertItem( IBeamPix, i18n("iBeam"), TQObject::IbeamCursor );
+ comb->insertItem( SizeVPix, i18n("Size Vertical"), TQObject::SizeVerCursor );
+ comb->insertItem( SizeHPix, i18n("Size Horizontal"), TQObject::SizeHorCursor );
+ comb->insertItem( SizeFPix, i18n("Size Slash"), TQObject::SizeBDiagCursor );
+ comb->insertItem( SizeBPix, i18n("Size Backslash"), TQObject::SizeFDiagCursor );
+ comb->insertItem( SizeAllPix, i18n("Size All"), TQObject::SizeAllCursor );
+ cur = TQBitmap( 25, 25, 1 );
cur.setMask( cur );
- comb->insertItem( cur, i18n("Blank"), QObject::BlankCursor );
- comb->insertItem( VSplitPix, i18n("Split Vertical"), QObject::SplitVCursor );
- comb->insertItem( HSplitPix, i18n("Split Horizontal"), QObject::SplitHCursor );
- comb->insertItem( HandPix, i18n("Pointing Hand"), QObject::PointingHandCursor );
- comb->insertItem( NoPix, i18n("Forbidden"), QObject::ForbiddenCursor );
-
- connect( comb, SIGNAL( activated( int ) ),
- this, SLOT( setValue() ) );
+ comb->insertItem( cur, i18n("Blank"), TQObject::BlankCursor );
+ comb->insertItem( VSplitPix, i18n("Split Vertical"), TQObject::SplitVCursor );
+ comb->insertItem( HSplitPix, i18n("Split Horizontal"), TQObject::SplitHCursor );
+ comb->insertItem( HandPix, i18n("Pointing Hand"), TQObject::PointingHandCursor );
+ comb->insertItem( NoPix, i18n("Forbidden"), TQObject::ForbiddenCursor );
+
+ connect( comb, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( setValue() ) );
comb->installEventFilter( listview );
return comb;
}
PropertyCursorItem::~PropertyCursorItem()
{
- delete (QComboBox*)comb;
+ delete (TQComboBox*)comb;
}
void PropertyCursorItem::showEditor()
@@ -2427,7 +2427,7 @@ void PropertyCursorItem::hideEditor()
combo()->hide();
}
-void PropertyCursorItem::setValue( const QVariant &v )
+void PropertyCursorItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -2444,10 +2444,10 @@ void PropertyCursorItem::setValue()
{
if ( !comb )
return;
- if ( QVariant( QCursor( combo()->currentItem() ) ) == val )
+ if ( TQVariant( TQCursor( combo()->currentItem() ) ) == val )
return;
setText( 1, combo()->currentText() );
- PropertyItem::setValue( QCursor( combo()->currentItem() ) );
+ PropertyItem::setValue( TQCursor( combo()->currentItem() ) );
notifyValueChange();
}
@@ -2456,21 +2456,21 @@ void PropertyCursorItem::setValue()
PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l,
PropertyItem *after,
PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName ),
k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- sequence = new QLineEdit( box );
- connect( sequence, SIGNAL(textChanged( const QString & )),
- this, SLOT(setValue()) );
+ sequence = new TQLineEdit( box );
+ connect( sequence, TQT_SIGNAL(textChanged( const TQString & )),
+ this, TQT_SLOT(setValue()) );
sequence->installEventFilter( this );
}
PropertyKeysequenceItem::~PropertyKeysequenceItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyKeysequenceItem::showEditor()
@@ -2489,41 +2489,41 @@ void PropertyKeysequenceItem::hideEditor()
box->hide();
}
-bool PropertyKeysequenceItem::eventFilter( QObject *o, QEvent *e )
+bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e )
{
Q_UNUSED( o );
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *k = (QKeyEvent *)e;
+ if ( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *k = (TQKeyEvent *)e;
if ( !mouseEnter &&
- (k->key() == QObject::Key_Up ||
- k->key() == QObject::Key_Down) )
+ (k->key() == TQObject::Key_Up ||
+ k->key() == TQObject::Key_Down) )
return FALSE;
handleKeyEvent( k );
return TRUE;
- } else if ( (e->type() == QEvent::FocusIn) ||
- (e->type() == QEvent::MouseButtonPress) ) {
+ } else if ( (e->type() == TQEvent::FocusIn) ||
+ (e->type() == TQEvent::MouseButtonPress) ) {
mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) ||
- (e->type() == QEvent::MouseButtonPress);
+ (e->type() == TQEvent::MouseButtonPress);
return TRUE;
}
// Lets eat accelerators now..
- if ( e->type() == QEvent::Accel ||
- e->type() == QEvent::AccelOverride ||
- e->type() == QEvent::KeyRelease )
+ if ( e->type() == TQEvent::Accel ||
+ e->type() == TQEvent::AccelOverride ||
+ e->type() == TQEvent::KeyRelease )
return TRUE;
return FALSE;
}
-void PropertyKeysequenceItem::handleKeyEvent( QKeyEvent *e )
+void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e )
{
int nextKey = e->key();
if ( num > 3 ||
- nextKey == QObject::Key_Control ||
- nextKey == QObject::Key_Shift ||
- nextKey == QObject::Key_Meta ||
- nextKey == QObject::Key_Alt )
+ nextKey == TQObject::Key_Control ||
+ nextKey == TQObject::Key_Shift ||
+ nextKey == TQObject::Key_Meta ||
+ nextKey == TQObject::Key_Alt )
return;
nextKey |= translateModifiers( e->state() );
@@ -2544,28 +2544,28 @@ void PropertyKeysequenceItem::handleKeyEvent( QKeyEvent *e )
break;
}
num++;
- QKeySequence ks( k1, k2, k3, k4 );
+ TQKeySequence ks( k1, k2, k3, k4 );
sequence->setText( ks );
}
int PropertyKeysequenceItem::translateModifiers( int state )
{
int result = 0;
- if ( state & QObject::ShiftButton )
- result |= QObject::SHIFT;
- if ( state & QObject::ControlButton )
- result |= QObject::CTRL;
- if ( state & QObject::MetaButton )
- result |= QObject::META;
- if ( state & QObject::AltButton )
- result |= QObject::ALT;
+ if ( state & TQObject::ShiftButton )
+ result |= TQObject::SHIFT;
+ if ( state & TQObject::ControlButton )
+ result |= TQObject::CTRL;
+ if ( state & TQObject::MetaButton )
+ result |= TQObject::META;
+ if ( state & TQObject::AltButton )
+ result |= TQObject::ALT;
return result;
}
void PropertyKeysequenceItem::setValue()
{
- QVariant v;
- v = QVariant( QKeySequence(sequence->text()) );
+ TQVariant v;
+ v = TQVariant( TQKeySequence(sequence->text()) );
if ( v.toString().isNull() )
return;
setText( 1, sequence->text() );
@@ -2575,9 +2575,9 @@ void PropertyKeysequenceItem::setValue()
setChanged( TRUE );
}
-void PropertyKeysequenceItem::setValue( const QVariant &v )
+void PropertyKeysequenceItem::setValue( const TQVariant &v )
{
- QKeySequence ks = v.toKeySequence();
+ TQKeySequence ks = v.toKeySequence();
if ( sequence ) {
sequence->setText( ks );
}
@@ -2592,13 +2592,13 @@ void PropertyKeysequenceItem::setValue( const QVariant &v )
// --------------------------------------------------------------
-EnumPopup::EnumPopup( QWidget *parent, const char *name, WFlags f )
- : QFrame( parent, name, f )
+EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( parent, name, f )
{
setLineWidth( 1 );
setFrameStyle( Panel | Plain );
setPaletteBackgroundColor( Qt::white );
- popLayout = new QVBoxLayout( this, 3 );
+ popLayout = new TQVBoxLayout( this, 3 );
checkBoxList.setAutoDelete( TRUE );
}
@@ -2606,16 +2606,16 @@ EnumPopup::~EnumPopup()
{
}
-void EnumPopup::insertEnums( QValueList<EnumItem> lst )
+void EnumPopup::insertEnums( TQValueList<EnumItem> lst )
{
while ( checkBoxList.count() )
checkBoxList.removeFirst();
itemList = lst;
- QCheckBox *cb;
- QValueListConstIterator<EnumItem> it = itemList.begin();
+ TQCheckBox *cb;
+ TQValueListConstIterator<EnumItem> it = itemList.begin();
for ( ; it != itemList.end(); ++it ) {
- cb = new QCheckBox( this );
+ cb = new TQCheckBox( this );
cb->setText( (*it).key );
cb->setChecked( (*it).selected );
if ( it == itemList.begin() )
@@ -2626,7 +2626,7 @@ void EnumPopup::insertEnums( QValueList<EnumItem> lst )
}
}
-void EnumPopup::keyPressEvent( QKeyEvent *e )
+void EnumPopup::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Escape ) {
hide();
@@ -2638,7 +2638,7 @@ void EnumPopup::keyPressEvent( QKeyEvent *e )
void EnumPopup::closeWidget()
{
- QPtrListIterator<QCheckBox> it( checkBoxList );
+ TQPtrListIterator<TQCheckBox> it( checkBoxList );
int i = 0;
while ( it.current() != 0 ) {
itemList[i].selected = (*it)->isChecked();
@@ -2649,17 +2649,17 @@ void EnumPopup::closeWidget()
emit closed();
}
-QValueList<EnumItem> EnumPopup::enumList() const
+TQValueList<EnumItem> EnumPopup::enumList() const
{
return itemList;
}
-EnumBox::EnumBox( QWidget *parent, const char *name )
- : QComboBox( parent, name )
+EnumBox::EnumBox( TQWidget *parent, const char *name )
+ : TQComboBox( parent, name )
{
- pop = new EnumPopup( this, "popup", QObject::WType_Popup );
- connect( pop, SIGNAL( hidden() ), this, SLOT( popupHidden() ) );
- connect( pop, SIGNAL( closed() ), this, SLOT( popupClosed() ) );
+ pop = new EnumPopup( this, "popup", TQObject::WType_Popup );
+ connect( pop, TQT_SIGNAL( hidden() ), this, TQT_SLOT( popupHidden() ) );
+ connect( pop, TQT_SIGNAL( closed() ), this, TQT_SLOT( popupClosed() ) );
popupShown = FALSE;
arrowDown = FALSE;
}
@@ -2675,50 +2675,50 @@ void EnumBox::popupClosed()
emit valueChanged();
}
-void EnumBox::paintEvent( QPaintEvent * )
+void EnumBox::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
- const QColorGroup & g = colorGroup();
+ TQPainter p( this );
+ const TQColorGroup & g = colorGroup();
p.setPen(g.text());
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (hasFocus())
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if ( width() < 5 || height() < 5 ) {
qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2,
- &g.brush( QColorGroup::Button ) );
+ &g.brush( TQColorGroup::Button ) );
return;
}
- style().drawComplexControl( QStyle::CC_ComboBox, &p, this, rect(), g,
- flags, QStyle::SC_All,
+ style().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g,
+ flags, TQStyle::SC_All,
(arrowDown ?
- QStyle::SC_ComboBoxArrow :
- QStyle::SC_None ));
+ TQStyle::SC_ComboBoxArrow :
+ TQStyle::SC_None ));
- QRect re = style().querySubControlMetrics( QStyle::CC_ComboBox, this,
- QStyle::SC_ComboBoxEditField );
- re = QStyle::visualRect(re, this);
+ TQRect re = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ TQStyle::SC_ComboBoxEditField );
+ re = TQStyle::visualRect(re, this);
p.setClipRect( re );
if ( !str.isNull() ) {
p.save();
p.setFont(font());
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
int x = re.x(), y = re.y() + fm.ascent();
p.drawText( x, y, str );
p.restore();
}
}
-void EnumBox::insertEnums( QValueList<EnumItem> lst )
+void EnumBox::insertEnums( TQValueList<EnumItem> lst )
{
pop->insertEnums( lst );
}
-QValueList<EnumItem> EnumBox::enumList() const
+TQValueList<EnumItem> EnumBox::enumList() const
{
return pop->enumList();
}
@@ -2730,21 +2730,21 @@ void EnumBox::popup()
popupShown = FALSE;
return;
}
- pop->move( ((QWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) );
+ pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) );
pop->setMinimumWidth( width() );
emit aboutToShowPopup();
pop->show();
popupShown = TRUE;
}
-void EnumBox::mousePressEvent( QMouseEvent *e )
+void EnumBox::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() != LeftButton )
return;
- QRect arrowRect = style().querySubControlMetrics( QStyle::CC_ComboBox, this,
- QStyle::SC_ComboBoxArrow);
- arrowRect = QStyle::visualRect(arrowRect, this);
+ TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ TQStyle::SC_ComboBoxArrow);
+ arrowRect = TQStyle::visualRect(arrowRect, this);
arrowRect.setHeight( QMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
@@ -2754,14 +2754,14 @@ void EnumBox::mousePressEvent( QMouseEvent *e )
}
popup();
- QTimer::singleShot( 100, this, SLOT( restoreArrow() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) );
}
-void EnumBox::keyPressEvent( QKeyEvent *e )
+void EnumBox::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Space ) {
popup();
- QTimer::singleShot( 100, this, SLOT( restoreArrow() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) );
} else if ( e->key() == Key_Enter || e->key() == Key_Return ) {
popup();
}
@@ -2773,7 +2773,7 @@ void EnumBox::restoreArrow()
repaint( FALSE );
}
-void EnumBox::setText( const QString &text )
+void EnumBox::setText( const TQString &text )
{
str = text;
repaint( FALSE );
@@ -2784,14 +2784,14 @@ void EnumBox::setText( const QString &text )
PropertyEnumItem::PropertyEnumItem( PropertyList *l,
PropertyItem *after,
PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
box = new EnumBox( listview->viewport() );
box->hide();
box->installEventFilter( listview );
- connect( box, SIGNAL( aboutToShowPopup() ), this, SLOT( insertEnums() ) );
- connect( box, SIGNAL( valueChanged() ), this, SLOT( setValue() ) );
+ connect( box, TQT_SIGNAL( aboutToShowPopup() ), this, TQT_SLOT( insertEnums() ) );
+ connect( box, TQT_SIGNAL( valueChanged() ), this, TQT_SLOT( setValue() ) );
}
PropertyEnumItem::~PropertyEnumItem()
@@ -2817,12 +2817,12 @@ void PropertyEnumItem::hideEditor()
box->hide();
}
-void PropertyEnumItem::setValue( const QVariant &v )
+void PropertyEnumItem::setValue( const TQVariant &v )
{
enumString = "";
enumList.clear();
- QStringList lst = v.toStringList();
- QValueListConstIterator<QString> it = lst.begin();
+ TQStringList lst = v.toStringList();
+ TQValueListConstIterator<TQString> it = lst.begin();
for ( ; it != lst.end(); ++it )
enumList.append( EnumItem( *it, FALSE ) );
enumList.first().selected = TRUE;
@@ -2841,7 +2841,7 @@ void PropertyEnumItem::setValue()
{
enumList = box->enumList();
enumString = "";
- QValueListConstIterator<EnumItem> it = enumList.begin();
+ TQValueListConstIterator<EnumItem> it = enumList.begin();
for ( ; it != enumList.end(); ++it ) {
if ( (*it).selected )
enumString += "|" + (*it).key;
@@ -2854,15 +2854,15 @@ void PropertyEnumItem::setValue()
notifyValueChange();
}
-void PropertyEnumItem::setCurrentValues( QStrList lst )
+void PropertyEnumItem::setCurrentValues( TQStrList lst )
{
enumString ="";
- QStrList::ConstIterator it = lst.begin();
- QValueList<EnumItem>::Iterator eit = enumList.begin();
+ TQStrList::ConstIterator it = lst.begin();
+ TQValueList<EnumItem>::Iterator eit = enumList.begin();
for ( ; eit != enumList.end(); ++eit ) {
(*eit).selected = FALSE;
for ( it = lst.begin(); it != lst.end(); ++it ) {
- if ( QString( *it ) == (*eit).key ) {
+ if ( TQString( *it ) == (*eit).key ) {
(*eit).selected = TRUE;
enumString += "|" + (*eit).key;
break;
@@ -2875,12 +2875,12 @@ void PropertyEnumItem::setCurrentValues( QStrList lst )
setText( 1, enumString );
}
-QString PropertyEnumItem::currentItem() const
+TQString PropertyEnumItem::currentItem() const
{
return enumString;
}
-QString PropertyEnumItem::currentItemFromObject() const
+TQString PropertyEnumItem::currentItemFromObject() const
{
return enumString;
}
@@ -2889,7 +2889,7 @@ QString PropertyEnumItem::currentItemFromObject() const
/*!
\class PropertyList propertyeditor.h
- \brief PropertyList is a QListView derived class which is used for editing widget properties
+ \brief PropertyList is a TQListView derived class which is used for editing widget properties
This class is used for widget properties. It has to be child of a
PropertyEditor.
@@ -2908,7 +2908,7 @@ QString PropertyEnumItem::currentItemFromObject() const
*/
PropertyList::PropertyList( PropertyEditor *e )
- : QListView( e ), editor( e )
+ : TQListView( e ), editor( e )
{
init_colors();
@@ -2916,21 +2916,21 @@ PropertyList::PropertyList( PropertyEditor *e )
showSorted = FALSE;
header()->setMovingEnabled( FALSE );
header()->setStretchEnabled( TRUE );
- setResizePolicy( QScrollView::Manual );
+ setResizePolicy( TQScrollView::Manual );
viewport()->setAcceptDrops( TRUE );
viewport()->installEventFilter( this );
addColumn( i18n( "Property" ) );
addColumn( i18n( "Value" ) );
- connect( header(), SIGNAL( sizeChange( int, int, int ) ),
- this, SLOT( updateEditorSize() ) );
- disconnect( header(), SIGNAL( sectionClicked( int ) ),
- this, SLOT( changeSortColumn( int ) ) );
- connect( header(), SIGNAL( sectionClicked( int ) ),
- this, SLOT( toggleSort() ) );
- connect( this, SIGNAL( pressed( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( itemPressed( QListViewItem *, const QPoint &, int ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
- this, SLOT( toggleOpen( QListViewItem * ) ) );
+ connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ),
+ this, TQT_SLOT( updateEditorSize() ) );
+ disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+ this, TQT_SLOT( changeSortColumn( int ) ) );
+ connect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+ this, TQT_SLOT( toggleSort() ) );
+ connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) );
setSorting( -1 );
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
@@ -2948,80 +2948,80 @@ void PropertyList::toggleSort()
editor->setup();
}
-void PropertyList::resizeEvent( QResizeEvent *e )
+void PropertyList::resizeEvent( TQResizeEvent *e )
{
- QListView::resizeEvent( e );
+ TQListView::resizeEvent( e );
if ( currentItem() )
( ( PropertyItem* )currentItem() )->showEditor();
}
-static QVariant::Type type_to_variant( const QString &s )
+static TQVariant::Type type_to_variant( const TQString &s )
{
if ( s == "Invalid " )
- return QVariant::Invalid;
+ return TQVariant::Invalid;
if ( s == "Map" )
- return QVariant::Map;
+ return TQVariant::Map;
if ( s == "List" )
- return QVariant::List;
+ return TQVariant::List;
if ( s == "String" )
- return QVariant::String;
+ return TQVariant::String;
if ( s == "StringList" )
- return QVariant::StringList;
+ return TQVariant::StringList;
if ( s == "Font" )
- return QVariant::Font;
+ return TQVariant::Font;
if ( s == "Pixmap" )
- return QVariant::Pixmap;
+ return TQVariant::Pixmap;
if ( s == "Brush" )
- return QVariant::Brush;
+ return TQVariant::Brush;
if ( s == "Rect" )
- return QVariant::Rect;
+ return TQVariant::Rect;
if ( s == "Size" )
- return QVariant::Size;
+ return TQVariant::Size;
if ( s == "Color" )
- return QVariant::Color;
+ return TQVariant::Color;
if ( s == "Palette" )
- return QVariant::Palette;
+ return TQVariant::Palette;
if ( s == "ColorGroup" )
- return QVariant::ColorGroup;
+ return TQVariant::ColorGroup;
if ( s == "IconSet" )
- return QVariant::IconSet;
+ return TQVariant::IconSet;
if ( s == "Point" )
- return QVariant::Point;
+ return TQVariant::Point;
if ( s == "Image" )
- return QVariant::Image;
+ return TQVariant::Image;
if ( s == "Int" )
- return QVariant::Int;
+ return TQVariant::Int;
if ( s == "UInt" )
- return QVariant::UInt;
+ return TQVariant::UInt;
if ( s == "Bool" )
- return QVariant::Bool;
+ return TQVariant::Bool;
if ( s == "Double" )
- return QVariant::Double;
+ return TQVariant::Double;
if ( s == "CString" )
- return QVariant::CString;
+ return TQVariant::CString;
if ( s == "PointArray" )
- return QVariant::PointArray;
+ return TQVariant::PointArray;
if ( s == "Region" )
- return QVariant::Region;
+ return TQVariant::Region;
if ( s == "Bitmap" )
- return QVariant::Bitmap;
+ return TQVariant::Bitmap;
if ( s == "Cursor" )
- return QVariant::Cursor;
+ return TQVariant::Cursor;
if ( s == "SizePolicy" )
- return QVariant::SizePolicy;
+ return TQVariant::SizePolicy;
if ( s == "Date" )
- return QVariant::Date;
+ return TQVariant::Date;
if ( s == "Time" )
- return QVariant::Time;
+ return TQVariant::Time;
if ( s == "DateTime" )
- return QVariant::DateTime;
- return QVariant::Invalid;
+ return TQVariant::DateTime;
+ return TQVariant::Invalid;
}
#ifndef QT_NO_SQL
-static bool parent_is_data_aware( QWidget *w )
+static bool parent_is_data_aware( TQWidget *w )
{
- QWidget *p = w ? w->parentWidget() : 0;
+ TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) {
if ( ::qt_cast<QDesignerDataBrowser*>(p) || ::qt_cast<QDesignerDataView*>(p) )
return TRUE;
@@ -3040,22 +3040,22 @@ void PropertyList::setupProperties()
if ( !editor->widget() )
return;
bool allProperties = !::qt_cast<Spacer*>(editor->widget());
- QStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
+ TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
PropertyItem *item = 0;
- QMap<QString, bool> unique;
- QObject *w = editor->widget();
- QStringList valueSet;
+ TQMap<TQString, bool> unique;
+ TQObject *w = editor->widget();
+ TQStringList valueSet;
bool parentHasLayout =
w->isWidgetType() &&
- !editor->formWindow()->isMainContainer( (QWidget*)w ) && ( (QWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (QWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
- const QMetaProperty* p =
+ !editor->formWindow()->isMainContainer( (TQWidget*)w ) && ( (TQWidget*)w )->parentWidget() &&
+ WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ const TQMetaProperty* p =
editor->widget()->metaObject()->
property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties );
if ( !p )
continue;
- if ( unique.contains( QString::fromLatin1( it.current() ) ) )
+ if ( unique.contains( TQString::fromLatin1( it.current() ) ) )
continue;
if ( ::qt_cast<QDesignerToolBar*>(editor->widget()) ||
::qt_cast<MenuBarEditor*>(editor->widget()) ) {
@@ -3076,9 +3076,9 @@ void PropertyList::setupProperties()
if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
continue;
}
- unique.insert( QString::fromLatin1( it.current() ), TRUE );
+ unique.insert( TQString::fromLatin1( it.current() ), TRUE );
if ( editor->widget()->isWidgetType() &&
- editor->formWindow()->isMainContainer( (QWidget*)editor->widget() ) ) {
+ editor->formWindow()->isMainContainer( (TQWidget*)editor->widget() ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
} else { // hide some toplevel-only stuff
@@ -3137,7 +3137,7 @@ void PropertyList::setupProperties()
continue;
}
}
- if ( ::qt_cast<QActionGroup*>(w) ) {
+ if ( ::qt_cast<TQActionGroup*>(w) ) {
if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
continue;
if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
@@ -3154,7 +3154,7 @@ void PropertyList::setupProperties()
if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in Q_PROPERTY can take a function (isInButtonGroup() in this case)
if ( !editor->widget()->isWidgetType() ||
!editor->widget()->parent() ||
- !::qt_cast<QButtonGroup*>(editor->widget()->parent()) )
+ !::qt_cast<TQButtonGroup*>(editor->widget()->parent()) )
continue;
}
@@ -3164,8 +3164,8 @@ void PropertyList::setupProperties()
isPropertyObject && p->designable( ( (PropertyObject*)w )->widgetList().first() ) ) &&
( !isPropertyObject || qstrcmp( p->name(), "name" ) != 0 ) ) {
if ( p->isSetType() ) {
- if ( QString( p->name() ) == "alignment" ) {
- QStringList lst;
+ if ( TQString( p->name() ) == "alignment" ) {
+ TQStringList lst;
lst << p->valueToKey( AlignAuto )
<< p->valueToKey( AlignLeft )
<< p->valueToKey( AlignHCenter )
@@ -3176,7 +3176,7 @@ void PropertyList::setupProperties()
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
item->setChanged( TRUE, FALSE );
- if ( !::qt_cast<QMultiLineEdit*>(editor->widget()) ) {
+ if ( !::qt_cast<TQMultiLineEdit*>(editor->widget()) ) {
lst.clear();
lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter )
@@ -3187,18 +3187,18 @@ void PropertyList::setupProperties()
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
item->setChanged( TRUE, FALSE );
item = new PropertyBoolItem( this, item, 0, "wordwrap" );
- if ( ::qt_cast<QGroupBox*>(w) )
+ if ( ::qt_cast<TQGroupBox*>(w) )
item->setVisible( FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
item->setChanged( TRUE, FALSE );
}
} else {
- QStrList lst( p->enumKeys() );
- QStringList l;
- QPtrListIterator<char> it( lst );
+ TQStrList lst( p->enumKeys() );
+ TQStringList l;
+ TQPtrListIterator<char> it( lst );
while ( it.current() != 0 ) {
- l << QString(*it);
+ l << TQString(*it);
++it;
}
item = new PropertyEnumItem( this, item, 0, p->name() );
@@ -3208,19 +3208,19 @@ void PropertyList::setupProperties()
item->setChanged( TRUE, FALSE );
}
} else if ( p->isEnumType() ) {
- QStrList l = p->enumKeys();
- QStringList lst;
+ TQStrList l = p->enumKeys();
+ TQStringList lst;
for ( uint i = 0; i < l.count(); ++i ) {
- QString k = l.at( i );
+ TQString k = l.at( i );
// filter out enum-masks
- if ( k[0] == 'M' && k[1].category() == QChar::Letter_Uppercase )
+ if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase )
continue;
lst << k;
}
item = new PropertyListItem( this, item, 0, p->name(), FALSE );
item->setValue( lst );
} else {
- QVariant::Type t = QVariant::nameToType( p->type() );
+ TQVariant::Type t = TQVariant::nameToType( p->type() );
if ( !addPropertyItem( item, p->name(), t ) )
continue;
}
@@ -3235,8 +3235,8 @@ void PropertyList::setupProperties()
}
}
- if ( !::qt_cast<QSplitter*>(w) && !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<QDesignerToolBar*>(w) &&
- w->isWidgetType() && WidgetFactory::layoutType( (QWidget*)w ) != WidgetFactory::NoLayout ) {
+ if ( !::qt_cast<TQSplitter*>(w) && !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<QDesignerToolBar*>(w) &&
+ w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" )
@@ -3251,15 +3251,15 @@ void PropertyList::setupProperties()
layoutInitValue( item, TRUE );
else
layoutInitValue( item );
- QWidget *widget = (QWidget*)w;
+ TQWidget *widget = (TQWidget*)w;
if ( ( !::qt_cast<QLayoutWidget*>(widget) &&
widget->parentWidget() && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) {
item = new PropertyListItem( this, item, 0, "resizeMode", FALSE );
- QStringList lst;
+ TQStringList lst;
lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
item->setValue( lst );
setPropertyValue( item );
- QString resizeMod = MetaDataBase::resizeMode( editor->widget() );
+ TQString resizeMod = MetaDataBase::resizeMode( editor->widget() );
if ( !resizeMod.isEmpty() &&
resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) {
item->setChanged( TRUE, FALSE );
@@ -3281,16 +3281,16 @@ void PropertyList::setupProperties()
}
#ifndef QT_NO_SQL
- if ( !::qt_cast<QDataTable*>(editor->widget()) && !::qt_cast<QDataBrowser*>(editor->widget()) &&
- !::qt_cast<QDataView*>(editor->widget()) && parent_is_data_aware( ::qt_cast<QWidget*>(editor->widget()) ) ) {
+ if ( !::qt_cast<TQDataTable*>(editor->widget()) && !::qt_cast<TQDataBrowser*>(editor->widget()) &&
+ !::qt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::qt_cast<TQWidget*>(editor->widget()) ) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
item->setChanged( TRUE, FALSE );
}
- if ( ::qt_cast<QDataTable*>(editor->widget()) || ::qt_cast<QDataBrowser*>(editor->widget()) ||
- ::qt_cast<QDataView*>(editor->widget()) ) {
+ if ( ::qt_cast<TQDataTable*>(editor->widget()) || ::qt_cast<TQDataBrowser*>(editor->widget()) ||
+ ::qt_cast<TQDataView*>(editor->widget()) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@@ -3303,8 +3303,8 @@ void PropertyList::setupProperties()
#endif
if ( w->isA("PropertyObject") ) {
- const QWidgetList wl = ( (PropertyObject*)w )->widgetList();
- QPtrListIterator<QWidget> wIt( wl );
+ const TQWidgetList wl = ( (PropertyObject*)w )->widgetList();
+ TQPtrListIterator<TQWidget> wIt( wl );
while ( *wIt ) {
if ( (*wIt)->inherits("CustomWidget") ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)*wIt )->customWidget();
@@ -3331,17 +3331,17 @@ void PropertyList::setupProperties()
}
void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
- QMap<QString, bool> &unique,
+ TQMap<TQString, bool> &unique,
PropertyItem *&item )
{
if ( !cw )
return;
- for ( QValueList<MetaDataBase::Property>::Iterator it =
+ for ( TQValueList<MetaDataBase::Property>::Iterator it =
cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
- if ( unique.contains( QString( (*it).property ) ) )
+ if ( unique.contains( TQString( (*it).property ) ) )
continue;
- unique.insert( QString( (*it).property ), TRUE );
+ unique.insert( TQString( (*it).property ), TRUE );
addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) )
@@ -3349,13 +3349,13 @@ void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
}
}
-bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t )
+bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t )
{
if ( name == "buddy" ) {
PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE );
- QPtrDict<QWidget> *widgets = editor->formWindow()->widgets();
- QPtrDictIterator<QWidget> it( *widgets );
- QStringList l;
+ TQPtrDict<TQWidget> *widgets = editor->formWindow()->widgets();
+ TQPtrDictIterator<TQWidget> it( *widgets );
+ TQStringList l;
l << "";
while ( it.current() ) {
if ( editor->formWindow()->canBeBuddy( it.current() ) ) {
@@ -3371,25 +3371,25 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, Q
}
switch ( t ) {
- case QVariant::String:
+ case TQVariant::String:
item = new PropertyTextItem( this, item, 0, name, TRUE,
- ::qt_cast<QLabel*>(editor->widget()) ||
- ::qt_cast<QTextView*>(editor->widget()) ||
- ::qt_cast<QButton*>(editor->widget()) );
+ ::qt_cast<TQLabel*>(editor->widget()) ||
+ ::qt_cast<TQTextView*>(editor->widget()) ||
+ ::qt_cast<TQButton*>(editor->widget()) );
break;
- case QVariant::CString:
+ case TQVariant::CString:
item = new PropertyTextItem( this, item, 0,
name, name == "name" &&
editor->widget() == editor->formWindow()->mainContainer(),
FALSE, TRUE );
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
item = new PropertyBoolItem( this, item, 0, name );
break;
- case QVariant::Font:
+ case TQVariant::Font:
item = new PropertyFontItem( this, item, 0, name );
break;
- case QVariant::Int:
+ case TQVariant::Int:
if ( name == "accel" )
item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE );
else if ( name == "layoutSpacing" || name == "layoutMargin" )
@@ -3399,55 +3399,55 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, Q
else
item = new PropertyIntItem( this, item, 0, name, TRUE );
break;
- case QVariant::Double:
+ case TQVariant::Double:
item = new PropertyDoubleItem( this, item, 0, name );
break;
- case QVariant::KeySequence:
+ case TQVariant::KeySequence:
item = new PropertyKeysequenceItem( this, item, 0, name );
break;
- case QVariant::UInt:
+ case TQVariant::UInt:
item = new PropertyIntItem( this, item, 0, name, FALSE );
break;
- case QVariant::StringList:
+ case TQVariant::StringList:
item = new PropertyListItem( this, item, 0, name, TRUE );
break;
- case QVariant::Rect:
+ case TQVariant::Rect:
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect );
break;
- case QVariant::Point:
+ case TQVariant::Point:
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point );
break;
- case QVariant::Size:
+ case TQVariant::Size:
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size );
break;
- case QVariant::Color:
+ case TQVariant::Color:
item = new PropertyColorItem( this, item, 0, name, TRUE );
break;
- case QVariant::Pixmap:
+ case TQVariant::Pixmap:
item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap );
break;
- case QVariant::IconSet:
+ case TQVariant::IconSet:
item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::IconSet );
break;
- case QVariant::Image:
+ case TQVariant::Image:
item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Image );
break;
- case QVariant::SizePolicy:
+ case TQVariant::SizePolicy:
item = new PropertySizePolicyItem( this, item, 0, name );
break;
- case QVariant::Palette:
+ case TQVariant::Palette:
item = new PropertyPaletteItem( this, item, 0, name );
break;
- case QVariant::Cursor:
+ case TQVariant::Cursor:
item = new PropertyCursorItem( this, item, 0, name );
break;
- case QVariant::Date:
+ case TQVariant::Date:
item = new PropertyDateItem( this, item, 0, name );
break;
- case QVariant::Time:
+ case TQVariant::Time:
item = new PropertyTimeItem( this, item, 0, name );
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
item = new PropertyDateTimeItem( this, item, 0, name );
break;
default:
@@ -3456,19 +3456,19 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, Q
return TRUE;
}
-void PropertyList::paintEmptyArea( QPainter *p, const QRect &r )
+void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r )
{
p->fillRect( r, *backColor2 );
}
-void PropertyList::setCurrentItem( QListViewItem *i )
+void PropertyList::setCurrentItem( TQListViewItem *i )
{
if ( !i )
return;
if ( currentItem() )
( (PropertyItem*)currentItem() )->hideEditor();
- QListView::setCurrentItem( i );
+ TQListView::setCurrentItem( i );
( (PropertyItem*)currentItem() )->showEditor();
}
@@ -3486,7 +3486,7 @@ void PropertyList::valueChanged( PropertyItem *i )
{
if ( !editor->widget() )
return;
- QString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), WidgetFactory::property( editor->widget(), i->name() ),
@@ -3500,7 +3500,7 @@ void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
{
if ( !editor->widget() )
return;
- QString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), WidgetFactory::property( editor->widget(), i->name() ),
@@ -3511,7 +3511,7 @@ void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
i->setChanged( changed );
}
-void PropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c )
+void PropertyList::itemPressed( TQListViewItem *i, const TQPoint &p, int c )
{
if ( !i )
return;
@@ -3523,7 +3523,7 @@ void PropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c )
toggleOpen( i );
}
-void PropertyList::toggleOpen( QListViewItem *i )
+void PropertyList::toggleOpen( TQListViewItem *i )
{
if ( !i )
return;
@@ -3535,26 +3535,26 @@ void PropertyList::toggleOpen( QListViewItem *i )
}
}
-bool PropertyList::eventFilter( QObject *o, QEvent *e )
+bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
{
if ( !o || !e )
return TRUE;
PropertyItem *i = (PropertyItem*)currentItem();
- if ( e->type() == QEvent::KeyPress )
+ if ( e->type() == TQEvent::KeyPress )
theLastEvent = KeyEvent;
- else if ( e->type() == QEvent::MouseButtonPress )
+ else if ( e->type() == TQEvent::MouseButtonPress )
theLastEvent = MouseEvent;
- if ( o != this &&e->type() == QEvent::KeyPress ) {
- QKeyEvent *ke = (QKeyEvent*)e;
+ if ( o != this &&e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) &&
( o != this || o != viewport() ) &&
!( ke->state() & ControlButton ) ) {
- QApplication::sendEvent( this, (QKeyEvent*)e );
+ TQApplication::sendEvent( this, (TQKeyEvent*)e );
return TRUE;
- } else if ( ( !::qt_cast<QLineEdit*>(o) ||
- ( ::qt_cast<QLineEdit*>(o) && ( (QLineEdit*)o )->isReadOnly() ) ) &&
+ } else if ( ( !::qt_cast<TQLineEdit*>(o) ||
+ ( ::qt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
i && i->hasSubItems() ) {
if ( !i->isOpen() &&
( ke->key() == Key_Plus ||
@@ -3564,19 +3564,19 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
( ke->key() == Key_Minus ||
ke->key() == Key_Left ) )
i->setOpen( FALSE );
- } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::qt_cast<QComboBox*>(o) ) {
- QKeyEvent ke2( QEvent::KeyPress, Key_Space, 0, 0 );
- QApplication::sendEvent( o, &ke2 );
+ } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::qt_cast<TQComboBox*>(o) ) {
+ TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
+ TQApplication::sendEvent( o, &ke2 );
return TRUE;
}
- } else if ( e->type() == QEvent::FocusOut && ::qt_cast<QLineEdit*>(o) && editor->formWindow() ) {
- QTimer::singleShot( 100, editor->formWindow()->commandHistory(), SLOT( checkCompressedCommand() ) );
+ } else if ( e->type() == TQEvent::FocusOut && ::qt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
+ TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
} else if ( o == viewport() ) {
- QMouseEvent *me;
+ TQMouseEvent *me;
PropertyListItem* i;
switch ( e->type() ) {
- case QEvent::MouseButtonPress:
- me = (QMouseEvent*)e;
+ case TQEvent::MouseButtonPress:
+ me = (TQMouseEvent*)e;
i = (PropertyListItem*) itemAt( me->pos() );
if ( i && ( ::qt_cast<PropertyColorItem*>(i) || ::qt_cast<PropertyPixmapItem*>(i) ) ) {
pressItem = i;
@@ -3584,20 +3584,20 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
mousePressed = TRUE;
}
break;
- case QEvent::MouseMove:
- me = (QMouseEvent*)e;
+ case TQEvent::MouseMove:
+ me = (TQMouseEvent*)e;
if ( me && me->state() & LeftButton && mousePressed) {
i = (PropertyListItem*) itemAt( me->pos() );
if ( i && i == pressItem ) {
- if (( pressPos - me->pos() ).manhattanLength() > QApplication::startDragDistance() ){
+ if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){
if ( ::qt_cast<PropertyColorItem*>(i) ) {
- QColor col = i->value().asColor();
- QColorDrag *drg = new QColorDrag( col, this );
- QPixmap pix( 25, 25 );
+ TQColor col = i->value().asColor();
+ TQColorDrag *drg = new TQColorDrag( col, this );
+ TQPixmap pix( 25, 25 );
pix.fill( col );
- QPainter p( &pix );
+ TQPainter p( &pix );
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
@@ -3605,10 +3605,10 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
drg->dragCopy();
}
else if ( ::qt_cast<PropertyPixmapItem*>(i) ) {
- QPixmap pix = i->value().asPixmap();
+ TQPixmap pix = i->value().asPixmap();
if( !pix.isNull() ) {
- QImage img = pix.convertToImage();
- QImageDrag *drg = new QImageDrag( img, this );
+ TQImage img = pix.convertToImage();
+ TQImageDrag *drg = new TQImageDrag( img, this );
drg->setPixmap( pix );
mousePressed = FALSE;
drg->dragCopy();
@@ -3622,9 +3622,9 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
break;
}
} else if ( o == header() ) {
- if ( e->type() == QEvent::ContextMenu ) {
- ((QContextMenuEvent *)e)->accept();
- QPopupMenu menu( 0 );
+ if ( e->type() == TQEvent::ContextMenu ) {
+ ((TQContextMenuEvent *)e)->accept();
+ TQPopupMenu menu( 0 );
menu.setCheckable( TRUE );
const int cat_id = 1;
const int alpha_id = 2;
@@ -3634,7 +3634,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
menu.setItemChecked( alpha_id, TRUE );
else
menu.setItemChecked( cat_id, TRUE );
- int res = menu.exec( ( (QContextMenuEvent*)e )->globalPos() );
+ int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() );
if ( res != -1 ) {
bool newShowSorted = ( res == alpha );
if ( showSorted != newShowSorted ) {
@@ -3647,7 +3647,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
}
}
- return QListView::eventFilter( o, e );
+ return TQListView::eventFilter( o, e );
}
/*! This method re-initializes each item of the property list.
@@ -3655,7 +3655,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
void PropertyList::refetchData()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
PropertyItem *i = (PropertyItem*)it.current();
if ( !i->propertyParent() )
@@ -3675,7 +3675,7 @@ void PropertyList::refetchData()
updateEditorSize();
}
-static void clearAlignList( QStrList &l )
+static void clearAlignList( TQStrList &l )
{
if ( l.count() == 1 )
return;
@@ -3691,7 +3691,7 @@ static void clearAlignList( QStrList &l )
void PropertyList::setPropertyValue( PropertyItem *i )
{
- const QMetaProperty *p =
+ const TQMetaProperty *p =
editor->widget()->metaObject()->
property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE );
if ( !p ) {
@@ -3700,7 +3700,7 @@ void PropertyList::setPropertyValue( PropertyItem *i )
p = editor->widget()->metaObject()->
property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE );
align &= ~AlignVertical_Mask;
- QStrList l = p->valueToKeys( align );
+ TQStrList l = p->valueToKeys( align );
clearAlignList( l );
( (PropertyListItem*)i )->setCurrentItem( l.last() );
} else if ( i->name() == "vAlign" ) {
@@ -3712,15 +3712,15 @@ void PropertyList::setPropertyValue( PropertyItem *i )
} else if ( i->name() == "wordwrap" ) {
int align = editor->widget()->property( "alignment" ).toInt();
if ( align & WordBreak )
- i->setValue( QVariant( TRUE, 0 ) );
+ i->setValue( TQVariant( TRUE, 0 ) );
else
- i->setValue( QVariant( FALSE, 0 ) );
+ i->setValue( TQVariant( FALSE, 0 ) );
} else if ( i->name() == "layoutSpacing" ) {
- ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
} else if ( i->name() == "layoutMargin" ) {
- ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
} else if ( i->name() == "resizeMode" ) {
- ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
} else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) {
i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@@ -3741,14 +3741,14 @@ void PropertyList::setPropertyValue( PropertyItem *i )
i->setValue( editor->widget()->property( i->name() ) );
}
-void PropertyList::setCurrentProperty( const QString &n )
+void PropertyList::setCurrentProperty( const TQString &n )
{
if ( currentItem() && currentItem()->text( 0 ) == n ||
currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() &&
( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n )
return;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
if ( it.current()->text( 0 ) == n ) {
setCurrentItem( it.current() );
@@ -3769,7 +3769,7 @@ void PropertyList::resetProperty()
PropertyItem *i = (PropertyItem*)currentItem();
if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) )
return;
- QString pn( i18n( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), i->value(),
@@ -3782,7 +3782,7 @@ void PropertyList::resetProperty()
i->initChildren();
}
-void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e )
+void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e )
{
PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
if( !i ) {
@@ -3790,15 +3790,15 @@ void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && QColorDrag::canDecode( e ) )
+ if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::qt_cast<PropertyPixmapItem*>(i) && QImageDrag::canDecode( e ) )
+ else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
}
-void PropertyList::viewportDragMoveEvent ( QDragMoveEvent *e )
+void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e )
{
PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
if( !i ) {
@@ -3806,15 +3806,15 @@ void PropertyList::viewportDragMoveEvent ( QDragMoveEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && QColorDrag::canDecode( e ) )
+ if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::qt_cast<PropertyPixmapItem*>(i) && QImageDrag::canDecode( e ) )
+ else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
}
-void PropertyList::viewportDropEvent ( QDropEvent *e )
+void PropertyList::viewportDropEvent ( TQDropEvent *e )
{
PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
if( !i ) {
@@ -3822,19 +3822,19 @@ void PropertyList::viewportDropEvent ( QDropEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && QColorDrag::canDecode( e ) ) {
- QColor color;
- QColorDrag::decode( e, color );
- i->setValue( QVariant( color ) );
+ if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) {
+ TQColor color;
+ TQColorDrag::decode( e, color );
+ i->setValue( TQVariant( color ) );
valueChanged( i );
e->accept();
}
- else if ( ::qt_cast<PropertyPixmapItem*>(i) && QImageDrag::canDecode( e ) ) {
- QImage img;
- QImageDrag::decode( e, img );
- QPixmap pm;
+ else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
+ TQImage img;
+ TQImageDrag::decode( e, img );
+ TQPixmap pm;
pm.convertFromImage( img );
- i->setValue( QVariant( pm ) );
+ i->setValue( TQVariant( pm ) );
valueChanged( i );
e->accept();
}
@@ -3842,7 +3842,7 @@ void PropertyList::viewportDropEvent ( QDropEvent *e )
e->ignore();
}
-QString PropertyList::whatsThisAt( const QPoint &p )
+TQString PropertyList::whatsThisAt( const TQPoint &p )
{
return whatsThisText( itemAt( p ) );
}
@@ -3851,32 +3851,32 @@ void PropertyList::showCurrentWhatsThis()
{
if ( !currentItem() )
return;
- QPoint p( 0, currentItem()->itemPos() );
+ TQPoint p( 0, currentItem()->itemPos() );
p = viewport()->mapToGlobal( contentsToViewport( p ) );
- QWhatsThis::display( whatsThisText( currentItem() ), p, viewport() );
+ TQWhatsThis::display( whatsThisText( currentItem() ), p, viewport() );
}
-QString PropertyList::whatsThisText( QListViewItem *i )
+TQString PropertyList::whatsThisText( TQListViewItem *i )
{
if ( !i || !editor->widget() )
- return QString::null;
+ return TQString::null;
readPropertyDocs();
if ( ( (PropertyItem*)i )->propertyParent() )
i = ( (PropertyItem*)i )->propertyParent();
- const QMetaObject *mo = editor->widget()->metaObject();
- QString prop = ( (PropertyItem*)i )->name();
+ const TQMetaObject *mo = editor->widget()->metaObject();
+ TQString prop = ( (PropertyItem*)i )->name();
while ( mo ) {
- QString s;
- s = QString( mo->className() ) + "::" + prop;
- QMap<QString, QString>::Iterator it;
+ TQString s;
+ s = TQString( mo->className() ) + "::" + prop;
+ TQMap<TQString, TQString>::Iterator it;
if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) {
return *it;
}
mo = mo->superClass();
}
- return i18n( "<p><b>QWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).arg( prop );
+ return i18n( "<p><b>TQWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).arg( prop );
}
void PropertyList::readPropertyDocs()
@@ -3884,21 +3884,21 @@ void PropertyList::readPropertyDocs()
if ( !propertyDocs.isEmpty() )
return;
- QString docFile = MainWindow::self->documentationPath() + "/propertydocs";
- QFile f( docFile );
+ TQString docFile = MainWindow::self->documentationPath() + "/propertydocs";
+ TQFile f( docFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &f, &errMsg, &errLine ) )
return;
- QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement e = doc.firstChild().toElement().firstChild().toElement();
for ( ; !e.isNull(); e = e.nextSibling().toElement() ) {
- QDomElement n = e.firstChild().toElement();
- QString name;
- QString doc;
+ TQDomElement n = e.firstChild().toElement();
+ TQString name;
+ TQString doc;
for ( ; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "name" )
name = n.firstChild().toText().data();
@@ -3916,26 +3916,26 @@ PropertyList::LastEventType PropertyList::lastEvent()
}
// ------------------------------------------------------------
-EventList::EventList( QWidget *parent, FormWindow *fw, PropertyEditor *e )
+EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e )
: HierarchyList( parent, fw, TRUE ), editor( e )
{
header()->hide();
removeColumn( 1 );
setRootIsDecorated( TRUE );
- connect( this, SIGNAL( itemRenamed( QListViewItem *, int, const QString & ) ),
- this, SLOT( renamed( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
+ this, TQT_SLOT( renamed( TQListViewItem * ) ) );
}
-QString clean_arguments( const QString &s )
+TQString clean_arguments( const TQString &s )
{
- QString slot = s;
- QString arg = slot.mid( slot.find( '(' ) + 1 );
+ TQString slot = s;
+ TQString arg = slot.mid( slot.find( '(' ) + 1 );
arg = arg.left( arg.findRev( ')' ) );
- QStringList args = QStringList::split( ',', arg );
+ TQStringList args = TQStringList::split( ',', arg );
slot = slot.left( slot.find( '(' ) + 1 );
int num = 0;
- for ( QStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) {
- QString a = *it;
+ for ( TQStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) {
+ TQString a = *it;
int i;
if ( ( i =a.find( ':' ) ) == -1 )
slot += a.simplifyWhiteSpace();
@@ -3958,61 +3958,61 @@ void EventList::setup()
if ( !formWindow )
return;
LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() );
- const QPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance());
- QStrList sigs;
+ const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance());
+ TQStrList sigs;
if ( iface )
{
sigs = iface->signalNames( editor->widget() );
}
- QStrListIterator it( sigs );
+ TQStrListIterator it( sigs );
while ( it.current() ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0,
- it.current(), QString::null, QString::null );
+ it.current(), TQString::null, TQString::null );
eventItem->setOpen( TRUE );
- QValueList<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
HierarchyItem *item = 0;
- for ( QValueList<MetaDataBase::Connection>::Iterator cit = conns.begin();
+ for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin();
cit != conns.end(); ++cit ) {
- QString s = it.current();
- if ( MetaDataBase::normalizeFunction( clean_arguments( QString( (*cit).signal ) ) ) !=
+ TQString s = it.current();
+ if ( MetaDataBase::normalizeFunction( clean_arguments( TQString( (*cit).signal ) ) ) !=
MetaDataBase::normalizeFunction( clean_arguments( s ) ) )
continue;
item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, item,
- (*cit).slot, QString::null, QString::null );
+ (*cit).slot, TQString::null, TQString::null );
item->setPixmap( 0, DesignerEditSlotsPix );
}
++it;
}
}
-extern QListViewItem *newItem;
+extern TQListViewItem *newItem;
-void EventList::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
- QListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
+ TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
if ( !i || i->parent() )
return;
- QString s;
+ TQString s;
if ( !formWindow->project()->isCpp() ) {
- QString s1 = i->text( 0 );
+ TQString s1 = i->text( 0 );
int pt = s1.find( "(" );
if ( pt != -1 )
s1 = s1.left( pt );
- s = QString( editor->widget()->name() ) + "_" + s1;
+ s = TQString( editor->widget()->name() ) + "_" + s1;
} else {
- s = QString( editor->widget()->name() ) + "_" + i->text( 0 );
+ s = TQString( editor->widget()->name() ) + "_" + i->text( 0 );
}
- const QPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance());
insertEntry( i, DesignerEditSlotsPix , s );
}
-void EventList::setCurrent( QWidget * )
+void EventList::setCurrent( TQWidget * )
{
}
-void EventList::objectClicked( QListViewItem *i )
+void EventList::objectClicked( TQListViewItem *i )
{
if ( !i || !i->parent() )
return;
@@ -4021,26 +4021,26 @@ void EventList::objectClicked( QListViewItem *i )
// formWindow->mainWindow()->editFunction( i->text( 0 ) );
}
-void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos )
+void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
{
if ( !i )
return;
- QPopupMenu menu;
+ TQPopupMenu menu;
const int NEW_ITEM = 1;
const int DEL_ITEM = 2;
menu.insertItem( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()), i18n( "New Signal Handler" ), NEW_ITEM );
menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete Signal Handler" ), DEL_ITEM );
int res = menu.exec( pos );
if ( res == NEW_ITEM ) {
- QString s;
+ TQString s;
if ( !formWindow->project()->isCpp() ) {
- QString s1 = ( i->parent() ? i->parent() : i )->text( 0 );
+ TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 );
int pt = s1.find( "(" );
if ( pt != -1 )
s1 = s1.left( pt );
- s = QString( editor->widget()->name() ) + "_" + s1;
+ s = TQString( editor->widget()->name() ) + "_" + s1;
} else {
- s = QString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 );
+ s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 );
}
insertEntry( i->parent() ? i->parent() : i, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), s );
} else if ( res == DEL_ITEM && i->parent() ) {
@@ -4059,13 +4059,13 @@ void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos )
}
}
-void EventList::renamed( QListViewItem *i )
+void EventList::renamed( TQListViewItem *i )
{
if ( newItem == i )
newItem = 0;
if ( !i->parent() )
return;
- QListViewItem *itm = i->parent()->firstChild();
+ TQListViewItem *itm = i->parent()->firstChild();
bool del = FALSE;
while ( itm ) {
if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) {
@@ -4089,9 +4089,9 @@ void EventList::renamed( QListViewItem *i )
formWindow->commandHistory()->addCommand( cmd );
// #### we should look if the specified slot already
// exists and if we can connect to this one
- QString funcname = i->text( 0 ).latin1();
+ TQString funcname = i->text( 0 ).latin1();
if ( funcname.find( '(' ) == -1 ) { // try to create a signature
- QString sig = i->parent()->text( 0 );
+ TQString sig = i->parent()->text( 0 );
sig = sig.mid( sig.find( '(' ) + 1 );
sig.remove( (int)sig.length() - 1, 1 );
LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() );
@@ -4118,10 +4118,10 @@ void EventList::renamed( QListViewItem *i )
}
}
-void EventList::save( QListViewItem *p )
+void EventList::save( TQListViewItem *p )
{
- QStringList lst;
- QListViewItem *i = p->firstChild();
+ TQStringList lst;
+ TQListViewItem *i = p->firstChild();
while ( i ) {
lst << i->text( 0 );
i = i->nextSibling();
@@ -4138,8 +4138,8 @@ void EventList::save( QListViewItem *p )
listview for editing properties.
*/
-PropertyEditor::PropertyEditor( QWidget *parent )
- : QTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+PropertyEditor::PropertyEditor( TQWidget *parent )
+ : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
{
setCaption( i18n( "Property Editor" ) );
@@ -4151,12 +4151,12 @@ PropertyEditor::PropertyEditor( QWidget *parent )
addTab( eList, i18n( "Signa&l Handlers" ) );
}
-QObject *PropertyEditor::widget() const
+TQObject *PropertyEditor::widget() const
{
return wid;
}
-void PropertyEditor::setWidget( QObject *w, FormWindow *fw )
+void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
{
if ( fw && fw->isFake() )
w = fw->project()->objectForFakeForm( fw );
@@ -4165,8 +4165,8 @@ void PropertyEditor::setWidget( QObject *w, FormWindow *fw )
// if there is no properties displayed then we really should show them.
// to do this check the number of properties in the list.
bool ret = (listview->childCount() > 0) ? TRUE : FALSE;
- if ( wid->isWidgetType() && WidgetFactory::layoutType( (QWidget*)wid ) != WidgetFactory::NoLayout ) {
- QListViewItemIterator it( listview );
+ if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
+ TQListViewItemIterator it( listview );
ret = FALSE;
while ( it.current() ) {
if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) {
@@ -4243,7 +4243,7 @@ void PropertyEditor::closed( FormWindow *w )
}
}
-void PropertyEditor::closeEvent( QCloseEvent *e )
+void PropertyEditor::closeEvent( TQCloseEvent *e )
{
emit hidden();
e->accept();
@@ -4259,32 +4259,32 @@ FormWindow *PropertyEditor::formWindow() const
return formwindow;
}
-QString PropertyEditor::currentProperty() const
+TQString PropertyEditor::currentProperty() const
{
if ( !wid )
- return QString::null;
+ return TQString::null;
if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() )
return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name();
return ( (PropertyItem*)listview->currentItem() )->name();
}
-QString PropertyEditor::classOfCurrentProperty() const
+TQString PropertyEditor::classOfCurrentProperty() const
{
if ( !wid )
- return QString::null;
- QObject *o = wid;
- QString curr = currentProperty();
- QMetaObject *mo = o->metaObject();
+ return TQString::null;
+ TQObject *o = wid;
+ TQString curr = currentProperty();
+ TQMetaObject *mo = o->metaObject();
while ( mo ) {
- QStrList props = mo->propertyNames( FALSE );
+ TQStrList props = mo->propertyNames( FALSE );
if ( props.find( curr.latin1() ) != -1 )
return mo->className();
mo = mo->superClass();
}
- return QString::null;
+ return TQString::null;
}
-QMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const
+TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const
{
if ( !wid )
return 0;
@@ -4324,9 +4324,9 @@ void PropertyEditor::updateWindow()
{
if ( isHidden() && count() ) {
parentWidget()->show();
- MainWindow::self->setAppropriate( (QDockWindow*)parentWidget(), TRUE );
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE );
} else if ( isShown() && !count() ) {
parentWidget()->hide();
- MainWindow::self->setAppropriate( (QDockWindow*)parentWidget(), FALSE );
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE );
}
}
diff --git a/kdevdesigner/designer/propertyeditor.h b/kdevdesigner/designer/propertyeditor.h
index 3bdc19e3..ff9987a5 100644
--- a/kdevdesigner/designer/propertyeditor.h
+++ b/kdevdesigner/designer/propertyeditor.h
@@ -27,17 +27,17 @@
#ifndef PROPERTYEDITOR_H
#define PROPERTYEDITOR_H
-#include <qfeatures.h>
-#include <qvariant.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qguardedptr.h>
-#include <qtabwidget.h>
-#include <qmodules.h>
-#include <qptrlist.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqfeatures.h>
+#include <tqvariant.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqguardedptr.h>
+#include <tqtabwidget.h>
+#include <tqmodules.h>
+#include <tqptrlist.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include "hierarchyview.h"
#include "metadatabase.h"
@@ -62,13 +62,13 @@ class QDateTimeEdit;
class PropertyItem : public QListViewItem
{
public:
- PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
~PropertyItem();
- void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
- void paintBranches( QPainter * p, const QColorGroup & cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
+ void paintBranches( TQPainter * p, const TQColorGroup & cg,
int w, int y, int h );
- void paintFocus( QPainter *p, const QColorGroup &cg, const QRect &r );
+ void paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r );
virtual bool hasSubItems() const;
virtual void createChildren();
@@ -80,15 +80,15 @@ public:
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
- QVariant value() const;
- QString name() const;
+ virtual void setValue( const TQVariant &v );
+ TQVariant value() const;
+ TQString name() const;
virtual void notifyValueChange();
virtual void setChanged( bool b, bool updateDb = TRUE );
bool isChanged() const;
- virtual void placeEditor( QWidget *w );
+ virtual void placeEditor( TQWidget *w );
virtual PropertyItem *propertyParent() const;
virtual void childValueChanged( PropertyItem *child );
@@ -98,51 +98,51 @@ public:
PropertyItem *child( int i ) const;
virtual bool hasCustomContents() const;
- virtual void drawCustomContents( QPainter *p, const QRect &r );
+ virtual void drawCustomContents( TQPainter *p, const TQRect &r );
void updateBackColor();
- void setup() { QListViewItem::setup(); setHeight( QListViewItem::height() + 2 ); }
+ void setup() { TQListViewItem::setup(); setHeight( TQListViewItem::height() + 2 ); }
- virtual QString currentItem() const;
+ virtual TQString currentItem() const;
virtual int currentIntItem() const;
- virtual void setCurrentItem( const QString &s );
+ virtual void setCurrentItem( const TQString &s );
virtual void setCurrentItem( int i );
virtual int currentIntItemFromObject() const;
- virtual QString currentItemFromObject() const;
+ virtual TQString currentItemFromObject() const;
- void setFocus( QWidget *w );
+ void setFocus( TQWidget *w );
virtual void toggle();
- void setText( int col, const QString &txt );
+ void setText( int col, const TQString &txt );
protected:
PropertyList *listview;
- QVariant val;
+ TQVariant val;
private:
- QColor backgroundColor();
+ TQColor backgroundColor();
void createResetButton();
void updateResetButtonState();
private:
bool open, changed;
PropertyItem *property;
- QString propertyName;
- QPtrList<PropertyItem> children;
- QColor backColor;
- QPushButton *resetButton;
+ TQString propertyName;
+ TQPtrList<PropertyItem> children;
+ TQColor backColor;
+ TQPushButton *resetButton;
};
-class PropertyTextItem : public QObject,
+class PropertyTextItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE );
+ const TQString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE );
~PropertyTextItem();
virtual void createChildren();
@@ -151,7 +151,7 @@ public:
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual bool hasSubItems() const;
virtual void childValueChanged( PropertyItem *child );
@@ -162,153 +162,153 @@ private slots:
void getText();
private:
- QLineEdit *lined();
- QGuardedPtr<QLineEdit> lin;
- QGuardedPtr<QHBox> box;
- QPushButton *button;
+ TQLineEdit *lined();
+ TQGuardedPtr<TQLineEdit> lin;
+ TQGuardedPtr<TQHBox> box;
+ TQPushButton *button;
bool withComment, hasMultiLines, asciiOnly, accel;
};
-class PropertyBoolItem : public QObject,
+class PropertyBoolItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
- PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
~PropertyBoolItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual void toggle();
private slots:
void setValue();
private:
- QComboBox *combo();
- QGuardedPtr<QComboBox> comb;
+ TQComboBox *combo();
+ TQGuardedPtr<TQComboBox> comb;
};
-class PropertyIntItem : public QObject,
+class PropertyIntItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool s );
+ const TQString &propName, bool s );
~PropertyIntItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
private slots:
void setValue();
private:
- QSpinBox *spinBox();
- QGuardedPtr<QSpinBox> spinBx;
+ TQSpinBox *spinBox();
+ TQGuardedPtr<TQSpinBox> spinBx;
bool signedValue;
};
-class PropertyLayoutItem : public QObject,
+class PropertyLayoutItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName );
+ const TQString &propName );
~PropertyLayoutItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
private slots:
void setValue();
private:
- QSpinBox *spinBox();
- QGuardedPtr<QSpinBox> spinBx;
+ TQSpinBox *spinBox();
+ TQGuardedPtr<TQSpinBox> spinBx;
};
-class PropertyDoubleItem : public QObject,
+class PropertyDoubleItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName );
+ const TQString &propName );
~PropertyDoubleItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
private slots:
void setValue();
private:
- QLineEdit *lined();
- QGuardedPtr<QLineEdit> lin;
+ TQLineEdit *lined();
+ TQGuardedPtr<TQLineEdit> lin;
};
-class PropertyListItem : public QObject,
+class PropertyListItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool editable );
+ const TQString &propName, bool editable );
~PropertyListItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
- QString currentItem() const;
+ TQString currentItem() const;
int currentIntItem() const;
- void setCurrentItem( const QString &s );
+ void setCurrentItem( const TQString &s );
void setCurrentItem( int i );
int currentIntItemFromObject() const;
- QString currentItemFromObject() const;
- void addItem( const QString &s );
+ TQString currentItemFromObject() const;
+ void addItem( const TQString &s );
private slots:
void setValue();
private:
- QComboBox *combo();
- QGuardedPtr<QComboBox> comb;
+ TQComboBox *combo();
+ TQGuardedPtr<TQComboBox> comb;
int oldInt;
bool editable;
- QString oldString;
+ TQString oldString;
};
-class PropertyFontItem : public QObject,
+class PropertyFontItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
- PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
~PropertyFontItem();
virtual void createChildren();
@@ -317,7 +317,7 @@ public:
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual bool hasSubItems() const;
virtual void childValueChanged( PropertyItem *child );
@@ -325,13 +325,13 @@ private slots:
void getFont();
private:
- QGuardedPtr<QLineEdit> lined;
- QGuardedPtr<QPushButton> button;
- QGuardedPtr<QHBox> box;
+ TQGuardedPtr<TQLineEdit> lined;
+ TQGuardedPtr<TQPushButton> button;
+ TQGuardedPtr<TQHBox> box;
};
-class PropertyCoordItem : public QObject,
+class PropertyCoordItem : public TQObject,
public PropertyItem
{
Q_OBJECT
@@ -340,7 +340,7 @@ public:
enum Type { Rect, Size, Point };
PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, Type t );
+ const TQString &propName, Type t );
~PropertyCoordItem();
virtual void createChildren();
@@ -349,25 +349,25 @@ public:
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual bool hasSubItems() const;
virtual void childValueChanged( PropertyItem *child );
private:
- QLineEdit *lined();
- QGuardedPtr<QLineEdit> lin;
+ TQLineEdit *lined();
+ TQGuardedPtr<TQLineEdit> lin;
Type typ;
};
-class PropertyColorItem : public QObject,
+class PropertyColorItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool children );
+ const TQString &propName, bool children );
~PropertyColorItem();
virtual void createChildren();
@@ -376,25 +376,25 @@ public:
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual bool hasSubItems() const;
virtual void childValueChanged( PropertyItem *child );
virtual bool hasCustomContents() const;
- virtual void drawCustomContents( QPainter *p, const QRect &r );
+ virtual void drawCustomContents( TQPainter *p, const TQRect &r );
private slots:
void getColor();
private:
- QGuardedPtr<QHBox> box;
- QGuardedPtr<QFrame> colorPrev;
- QGuardedPtr<QPushButton> button;
+ TQGuardedPtr<TQHBox> box;
+ TQGuardedPtr<TQFrame> colorPrev;
+ TQGuardedPtr<TQPushButton> button;
bool withChildren;
};
-class PropertyPixmapItem : public QObject,
+class PropertyPixmapItem : public TQObject,
public PropertyItem
{
Q_OBJECT
@@ -403,37 +403,37 @@ public:
enum Type { Pixmap, IconSet, Image };
PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, Type t );
+ const TQString &propName, Type t );
~PropertyPixmapItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual bool hasCustomContents() const;
- virtual void drawCustomContents( QPainter *p, const QRect &r );
+ virtual void drawCustomContents( TQPainter *p, const TQRect &r );
private slots:
void getPixmap();
private:
- QGuardedPtr<QHBox> box;
- QGuardedPtr<QLabel> pixPrev;
- QPushButton *button;
+ TQGuardedPtr<TQHBox> box;
+ TQGuardedPtr<TQLabel> pixPrev;
+ TQPushButton *button;
Type type;
};
-class PropertySizePolicyItem : public QObject,
+class PropertySizePolicyItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName );
+ const TQString &propName );
~PropertySizePolicyItem();
virtual void createChildren();
@@ -442,105 +442,105 @@ public:
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual bool hasSubItems() const;
virtual void childValueChanged( PropertyItem *child );
private:
- QLineEdit *lined();
- QGuardedPtr<QLineEdit> lin;
+ TQLineEdit *lined();
+ TQGuardedPtr<TQLineEdit> lin;
};
-class PropertyPaletteItem : public QObject,
+class PropertyPaletteItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName );
+ const TQString &propName );
~PropertyPaletteItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual bool hasCustomContents() const;
- virtual void drawCustomContents( QPainter *p, const QRect &r );
+ virtual void drawCustomContents( TQPainter *p, const TQRect &r );
private slots:
void getPalette();
private:
- QGuardedPtr<QHBox> box;
- QGuardedPtr<QLabel> palettePrev;
- QGuardedPtr<QPushButton> button;
+ TQGuardedPtr<TQHBox> box;
+ TQGuardedPtr<TQLabel> palettePrev;
+ TQGuardedPtr<TQPushButton> button;
};
-class PropertyCursorItem : public QObject,
+class PropertyCursorItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName );
+ const TQString &propName );
~PropertyCursorItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
private slots:
void setValue();
private:
- QComboBox *combo();
- QGuardedPtr<QComboBox> comb;
+ TQComboBox *combo();
+ TQGuardedPtr<TQComboBox> comb;
};
-class PropertyKeysequenceItem : public QObject,
+class PropertyKeysequenceItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyKeysequenceItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName );
+ const TQString &propName );
~PropertyKeysequenceItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
private slots:
void setValue();
private:
- bool eventFilter( QObject *o, QEvent *e );
- void handleKeyEvent( QKeyEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
+ void handleKeyEvent( TQKeyEvent *e );
int translateModifiers( int state );
- QGuardedPtr<QLineEdit> sequence;
- QGuardedPtr<QHBox> box;
+ TQGuardedPtr<TQLineEdit> sequence;
+ TQGuardedPtr<TQHBox> box;
int k1,k2,k3,k4;
int num;
bool mouseEnter;
};
-class PropertyDatabaseItem : public QObject,
+class PropertyDatabaseItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
- PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName, bool wField );
+ PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName, bool wField );
~PropertyDatabaseItem();
virtual void createChildren();
@@ -549,26 +549,26 @@ public:
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
virtual bool hasSubItems() const;
virtual void childValueChanged( PropertyItem *child );
private:
- QGuardedPtr<QLineEdit> lined;
- QGuardedPtr<QPushButton> button;
- QGuardedPtr<QHBox> box;
+ TQGuardedPtr<TQLineEdit> lined;
+ TQGuardedPtr<TQPushButton> button;
+ TQGuardedPtr<TQHBox> box;
bool withField;
};
struct EnumItem {
- EnumItem( const QString &k, bool s )
+ EnumItem( const TQString &k, bool s )
: key( k ), selected( s ) {}
- EnumItem() : key( QString::null ), selected( FALSE ) {}
+ EnumItem() : key( TQString::null ), selected( FALSE ) {}
bool operator==( const EnumItem &item ) const {
return key == item.key;
}
- QString key;
+ TQString key;
bool selected;
};
@@ -577,10 +577,10 @@ class EnumPopup : public QFrame
Q_OBJECT
public:
- EnumPopup( QWidget *parent, const char *name, WFlags f=0 );
+ EnumPopup( TQWidget *parent, const char *name, WFlags f=0 );
~EnumPopup();
- void insertEnums( QValueList<EnumItem> lst );
- QValueList<EnumItem> enumList() const;
+ void insertEnums( TQValueList<EnumItem> lst );
+ TQValueList<EnumItem> enumList() const;
void closeWidget();
signals:
@@ -588,12 +588,12 @@ signals:
void hidden();
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
private:
- QValueList<EnumItem> itemList;
- QPtrList<QCheckBox> checkBoxList;
- QVBoxLayout *popLayout;
+ TQValueList<EnumItem> itemList;
+ TQPtrList<TQCheckBox> checkBoxList;
+ TQVBoxLayout *popLayout;
};
class EnumBox : public QComboBox
@@ -601,20 +601,20 @@ class EnumBox : public QComboBox
Q_OBJECT
public:
- EnumBox( QWidget *parent, const char *name = 0 );
+ EnumBox( TQWidget *parent, const char *name = 0 );
~EnumBox() {}
- void setText( const QString &text );
- void insertEnums( QValueList<EnumItem> lst );
- QValueList<EnumItem> enumList() const;
+ void setText( const TQString &text );
+ void insertEnums( TQValueList<EnumItem> lst );
+ TQValueList<EnumItem> enumList() const;
signals:
void aboutToShowPopup();
void valueChanged();
protected:
- void paintEvent( QPaintEvent * );
- void mousePressEvent( QMouseEvent *e );
- void keyPressEvent( QKeyEvent *e );
+ void paintEvent( TQPaintEvent * );
+ void mousePressEvent( TQMouseEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
protected slots:
void restoreArrow();
@@ -624,36 +624,36 @@ protected slots:
private:
void popup();
bool arrowDown;
- QString str;
+ TQString str;
bool popupShown;
EnumPopup *pop;
};
-class PropertyEnumItem : public QObject,
+class PropertyEnumItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
PropertyEnumItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName );
+ const TQString &propName );
~PropertyEnumItem();
void showEditor();
void hideEditor();
- void setValue( const QVariant &v );
- QString currentItem() const;
- QString currentItemFromObject() const;
- void setCurrentValues( QStrList lst );
+ void setValue( const TQVariant &v );
+ TQString currentItem() const;
+ TQString currentItemFromObject() const;
+ void setCurrentValues( TQStrList lst );
private slots:
void setValue();
void insertEnums();
private:
- QGuardedPtr<EnumBox> box;
- QValueList<EnumItem> enumList;
- QString enumString;
+ TQGuardedPtr<EnumBox> box;
+ TQValueList<EnumItem> enumList;
+ TQString enumString;
};
class PropertyList : public QListView
@@ -665,15 +665,15 @@ public:
virtual void setupProperties();
- virtual void setCurrentItem( QListViewItem *i );
+ virtual void setCurrentItem( TQListViewItem *i );
virtual void valueChanged( PropertyItem *i );
virtual void refetchData();
virtual void setPropertyValue( PropertyItem *i );
- virtual void setCurrentProperty( const QString &n );
+ virtual void setCurrentProperty( const TQString &n );
void layoutInitValue( PropertyItem *i, bool changed = FALSE );
PropertyEditor *propertyEditor() const;
- QString whatsThisAt( const QPoint &p );
+ TQString whatsThisAt( const TQPoint &p );
void showCurrentWhatsThis();
enum LastEventType { KeyEvent, MouseEvent };
@@ -685,18 +685,18 @@ public slots:
void toggleSort();
private slots:
- void itemPressed( QListViewItem *i, const QPoint &p, int c );
- void toggleOpen( QListViewItem *i );
- bool eventFilter( QObject *o, QEvent *e );
+ void itemPressed( TQListViewItem *i, const TQPoint &p, int c );
+ void toggleOpen( TQListViewItem *i );
+ bool eventFilter( TQObject *o, TQEvent *e );
protected:
- void resizeEvent( QResizeEvent *e );
- void paintEmptyArea( QPainter *p, const QRect &r );
- bool addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t );
+ void resizeEvent( TQResizeEvent *e );
+ void paintEmptyArea( TQPainter *p, const TQRect &r );
+ bool addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t );
- void viewportDragEnterEvent( QDragEnterEvent * );
- void viewportDragMoveEvent ( QDragMoveEvent * );
- void viewportDropEvent ( QDropEvent * );
+ void viewportDragEnterEvent( TQDragEnterEvent * );
+ void viewportDragMoveEvent ( TQDragMoveEvent * );
+ void viewportDropEvent ( TQDropEvent * );
protected:
PropertyEditor *editor;
@@ -704,16 +704,16 @@ protected:
private:
void readPropertyDocs();
void setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
- QMap<QString, bool> &unique,
+ TQMap<TQString, bool> &unique,
PropertyItem *&item );
- QString whatsThisText( QListViewItem *i );
+ TQString whatsThisText( TQListViewItem *i );
private:
PropertyListItem* pressItem;
- QPoint pressPos;
+ TQPoint pressPos;
bool mousePressed;
bool showSorted;
- QMap<QString, QString> propertyDocs;
+ TQMap<TQString, TQString> propertyDocs;
PropertyWhatsThis *whatsThis;
LastEventType theLastEvent;
};
@@ -723,21 +723,21 @@ class EventList : public HierarchyList
Q_OBJECT
public:
- EventList( QWidget *parent, FormWindow *fw, PropertyEditor *e );
+ EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e );
void setup();
- void setCurrent( QWidget *w );
+ void setCurrent( TQWidget *w );
protected:
- void contentsMouseDoubleClickEvent( QMouseEvent *e );
+ void contentsMouseDoubleClickEvent( TQMouseEvent *e );
private:
- void save( QListViewItem *p );
+ void save( TQListViewItem *p );
private slots:
- void objectClicked( QListViewItem *i );
- void showRMBMenu( QListViewItem *, const QPoint & );
- void renamed( QListViewItem *i );
+ void objectClicked( TQListViewItem *i );
+ void showRMBMenu( TQListViewItem *, const TQPoint & );
+ void renamed( TQListViewItem *i );
private:
PropertyEditor *editor;
@@ -750,9 +750,9 @@ class PropertyEditor : public QTabWidget
Q_OBJECT
public:
- PropertyEditor( QWidget *parent );
+ PropertyEditor( TQWidget *parent );
- QObject *widget() const;
+ TQObject *widget() const;
void clear();
void setup();
@@ -766,9 +766,9 @@ public:
FormWindow *formWindow() const;
EventList *eventList() const;
- QString currentProperty() const;
- QString classOfCurrentProperty() const;
- QMetaObject* metaObjectOfCurrentProperty() const;
+ TQString currentProperty() const;
+ TQString classOfCurrentProperty() const;
+ TQMetaObject* metaObjectOfCurrentProperty() const;
void resetFocus();
@@ -779,88 +779,88 @@ signals:
void hidden();
public slots:
- void setWidget( QObject *w, FormWindow *fw );
+ void setWidget( TQObject *w, FormWindow *fw );
protected:
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
private:
void updateWindow();
private:
- QObject *wid;
+ TQObject *wid;
PropertyList *listview;
EventList *eList;
FormWindow *formwindow;
};
-class PropertyDateItem : public QObject,
+class PropertyDateItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
- PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
~PropertyDateItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
private slots:
void setValue();
private:
QDateEdit *lined();
- QGuardedPtr<QDateEdit> lin;
+ TQGuardedPtr<QDateEdit> lin;
};
-class PropertyTimeItem : public QObject,
+class PropertyTimeItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
- PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
~PropertyTimeItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
private slots:
void setValue();
private:
QTimeEdit *lined();
- QGuardedPtr<QTimeEdit> lin;
+ TQGuardedPtr<QTimeEdit> lin;
};
-class PropertyDateTimeItem : public QObject,
+class PropertyDateTimeItem : public TQObject,
public PropertyItem
{
Q_OBJECT
public:
- PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
+ PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
~PropertyDateTimeItem();
virtual void showEditor();
virtual void hideEditor();
- virtual void setValue( const QVariant &v );
+ virtual void setValue( const TQVariant &v );
private slots:
void setValue();
private:
QDateTimeEdit *lined();
- QGuardedPtr<QDateTimeEdit> lin;
+ TQGuardedPtr<QDateTimeEdit> lin;
};
diff --git a/kdevdesigner/designer/propertyobject.cpp b/kdevdesigner/designer/propertyobject.cpp
index 8687033e..8053501e 100644
--- a/kdevdesigner/designer/propertyobject.cpp
+++ b/kdevdesigner/designer/propertyobject.cpp
@@ -26,21 +26,21 @@
#include "propertyobject.h"
#include "metadatabase.h"
-#include <qptrvector.h>
-#include <qptrlist.h>
-#include <qmetaobject.h>
-#include <qvariant.h>
+#include <tqptrvector.h>
+#include <tqptrlist.h>
+#include <tqmetaobject.h>
+#include <tqvariant.h>
-PropertyObject::PropertyObject( const QWidgetList &objs )
- : QObject(), objects( objs ), mobj( 0 )
+PropertyObject::PropertyObject( const TQWidgetList &objs )
+ : TQObject(), objects( objs ), mobj( 0 )
{
- QPtrVector<QPtrList<QMetaObject> > v;
+ TQPtrVector<TQPtrList<TQMetaObject> > v;
v.resize( objects.count() );
v.setAutoDelete( TRUE );
- for ( QObject *o = objects.first(); o; o = objects.next() ) {
- const QMetaObject *m = o->metaObject();
- QPtrList<QMetaObject> *mol = new QPtrList<QMetaObject>;
+ for ( TQObject *o = objects.first(); o; o = objects.next() ) {
+ const TQMetaObject *m = o->metaObject();
+ TQPtrList<TQMetaObject> *mol = new TQPtrList<TQMetaObject>;
while ( m ) {
mol->insert( 0, m );
m = m->superClass();
@@ -58,7 +58,7 @@ PropertyObject::PropertyObject( const QWidgetList &objs )
minDepth = depth;
}
- const QMetaObject *m = v[0]->at( --minDepth );
+ const TQMetaObject *m = v[0]->at( --minDepth );
for ( int j = 0; j < numObjects; ++j ) {
if ( v[j]->at( minDepth ) != m ) {
@@ -72,87 +72,87 @@ PropertyObject::PropertyObject( const QWidgetList &objs )
Q_ASSERT( mobj );
}
-bool PropertyObject::setProperty( const char *name, const QVariant& value )
+bool PropertyObject::setProperty( const char *name, const TQVariant& value )
{
- for ( QObject *o = objects.first(); o; o = objects.next() )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
o->setProperty( name, value );
return TRUE;
}
-QVariant PropertyObject::property( const char *name ) const
+TQVariant PropertyObject::property( const char *name ) const
{
return ( (PropertyObject*)this )->objects.first()->property( name );
}
-void PropertyObject::mdPropertyChanged( const QString &property, bool changed )
+void PropertyObject::mdPropertyChanged( const TQString &property, bool changed )
{
- for ( QObject *o = objects.first(); o; o = objects.next() )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPropertyChanged( o, property, changed );
}
-bool PropertyObject::mdIsPropertyChanged( const QString &property )
+bool PropertyObject::mdIsPropertyChanged( const TQString &property )
{
- for ( QObject *o = objects.first(); o; o = objects.next() ) {
+ for ( TQObject *o = objects.first(); o; o = objects.next() ) {
if ( MetaDataBase::isPropertyChanged( o, property ) )
return TRUE;
}
return FALSE;
}
-void PropertyObject::mdSetPropertyComment( const QString &property, const QString &comment )
+void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment )
{
- for ( QObject *o = objects.first(); o; o = objects.next() )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPropertyComment( o, property, comment );
}
-QString PropertyObject::mdPropertyComment( const QString &property )
+TQString PropertyObject::mdPropertyComment( const TQString &property )
{
return MetaDataBase::propertyComment( objects.first(), property );
}
-void PropertyObject::mdSetFakeProperty( const QString &property, const QVariant &value )
+void PropertyObject::mdSetFakeProperty( const TQString &property, const TQVariant &value )
{
- for ( QObject *o = objects.first(); o; o = objects.next() )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setFakeProperty( o, property, value );
}
-QVariant PropertyObject::mdFakeProperty( const QString &property )
+TQVariant PropertyObject::mdFakeProperty( const TQString &property )
{
return MetaDataBase::fakeProperty( objects.first(), property );
}
-void PropertyObject::mdSetCursor( const QCursor &c )
+void PropertyObject::mdSetCursor( const TQCursor &c )
{
- for ( QObject *o = objects.first(); o; o = objects.next() ) {
+ for ( TQObject *o = objects.first(); o; o = objects.next() ) {
if ( o->isWidgetType() )
- MetaDataBase::setCursor( (QWidget*)o, c );
+ MetaDataBase::setCursor( (TQWidget*)o, c );
}
}
-QCursor PropertyObject::mdCursor()
+TQCursor PropertyObject::mdCursor()
{
return MetaDataBase::cursor( objects.first() );
}
-void PropertyObject::mdSetPixmapKey( int pixmap, const QString &arg )
+void PropertyObject::mdSetPixmapKey( int pixmap, const TQString &arg )
{
- for ( QObject *o = objects.first(); o; o = objects.next() )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPixmapKey( o, pixmap, arg );
}
-QString PropertyObject::mdPixmapKey( int pixmap )
+TQString PropertyObject::mdPixmapKey( int pixmap )
{
return MetaDataBase::pixmapKey( objects.first(), pixmap );
}
-void PropertyObject::mdSetExportMacro( const QString &macro )
+void PropertyObject::mdSetExportMacro( const TQString &macro )
{
- for ( QObject *o = objects.first(); o; o = objects.next() )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setExportMacro( o, macro );
}
-QString PropertyObject::mdExportMacro()
+TQString PropertyObject::mdExportMacro()
{
return MetaDataBase::exportMacro( objects.first() );
}
diff --git a/kdevdesigner/designer/propertyobject.h b/kdevdesigner/designer/propertyobject.h
index c8445239..784fa74b 100644
--- a/kdevdesigner/designer/propertyobject.h
+++ b/kdevdesigner/designer/propertyobject.h
@@ -1,42 +1,42 @@
#ifndef PROPERTYOBJECT_H
#define PROPERTYOBJECT_H
-#include <qobject.h>
-#include <qwidgetlist.h>
-#include <qcursor.h>
+#include <tqobject.h>
+#include <tqwidgetlist.h>
+#include <tqcursor.h>
class PropertyObject : public QObject
{
public:
- QMetaObject *metaObject() const { return (QMetaObject*)mobj; }
+ TQMetaObject *metaObject() const { return (TQMetaObject*)mobj; }
const char *className() const { return "PropertyObject"; }
- QObject* qObject() { return (QObject*)this; }
+ TQObject* qObject() { return (TQObject*)this; }
private:
- static QMetaObject *metaObj;
+ static TQMetaObject *metaObj;
public:
- PropertyObject( const QWidgetList &objs );
-
- bool setProperty( const char *name, const QVariant& value );
- QVariant property( const char *name ) const;
-
- void mdPropertyChanged( const QString &property, bool changed );
- bool mdIsPropertyChanged( const QString &property );
- void mdSetPropertyComment( const QString &property, const QString &comment );
- QString mdPropertyComment( const QString &property );
- void mdSetFakeProperty( const QString &property, const QVariant &value );
- QVariant mdFakeProperty( const QString &property );
- void mdSetCursor( const QCursor &c );
- QCursor mdCursor();
- void mdSetPixmapKey( int pixmap, const QString &arg );
- QString mdPixmapKey( int pixmap );
- void mdSetExportMacro( const QString &macro );
- QString mdExportMacro();
- QWidgetList widgetList() const { return objects; }
+ PropertyObject( const TQWidgetList &objs );
+
+ bool setProperty( const char *name, const TQVariant& value );
+ TQVariant property( const char *name ) const;
+
+ void mdPropertyChanged( const TQString &property, bool changed );
+ bool mdIsPropertyChanged( const TQString &property );
+ void mdSetPropertyComment( const TQString &property, const TQString &comment );
+ TQString mdPropertyComment( const TQString &property );
+ void mdSetFakeProperty( const TQString &property, const TQVariant &value );
+ TQVariant mdFakeProperty( const TQString &property );
+ void mdSetCursor( const TQCursor &c );
+ TQCursor mdCursor();
+ void mdSetPixmapKey( int pixmap, const TQString &arg );
+ TQString mdPixmapKey( int pixmap );
+ void mdSetExportMacro( const TQString &macro );
+ TQString mdExportMacro();
+ TQWidgetList widgetList() const { return objects; }
private:
- QWidgetList objects;
- const QMetaObject *mobj;
+ TQWidgetList objects;
+ const TQMetaObject *mobj;
};
diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp
index 9c735577..c00e9b84 100644
--- a/kdevdesigner/designer/qcompletionedit.cpp
+++ b/kdevdesigner/designer/qcompletionedit.cpp
@@ -25,28 +25,28 @@
**********************************************************************/
#include "qcompletionedit.h"
-#include <qlistbox.h>
-#include <qsizegrip.h>
-#include <qapplication.h>
-#include <qvbox.h>
+#include <tqlistbox.h>
+#include <tqsizegrip.h>
+#include <tqapplication.h>
+#include <tqvbox.h>
-QCompletionEdit::QCompletionEdit( QWidget *parent, const char *name )
- : QLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE )
+QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name )
+ : TQLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE )
{
- popup = new QVBox( 0, 0, WType_Popup );
- popup->setFrameStyle( QFrame::Box | QFrame::Plain );
+ popup = new TQVBox( 0, 0, WType_Popup );
+ popup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
popup->setLineWidth( 1 );
popup->hide();
- listbox = new QListBox( popup );
- listbox->setFrameStyle( QFrame::NoFrame );
+ listbox = new TQListBox( popup );
+ listbox->setFrameStyle( TQFrame::NoFrame );
listbox->setLineWidth( 1 );
listbox->installEventFilter( this );
- listbox->setHScrollBarMode( QScrollView::AlwaysOn );
- listbox->setVScrollBarMode( QScrollView::AlwaysOn );
- listbox->setCornerWidget( new QSizeGrip( listbox, "completion sizegrip" ) );
- connect( this, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( textDidChange( const QString & ) ) );
+ listbox->setHScrollBarMode( TQScrollView::AlwaysOn );
+ listbox->setVScrollBarMode( TQScrollView::AlwaysOn );
+ listbox->setCornerWidget( new TQSizeGrip( listbox, "completion sizegrip" ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( textDidChange( const TQString & ) ) );
popup->setFocusProxy( listbox );
installEventFilter( this );
}
@@ -56,12 +56,12 @@ bool QCompletionEdit::autoAdd() const
return aAdd;
}
-QStringList QCompletionEdit::completionList() const
+TQStringList QCompletionEdit::completionList() const
{
return compList;
}
-void QCompletionEdit::setCompletionList( const QStringList &l )
+void QCompletionEdit::setCompletionList( const TQStringList &l )
{
compList = l;
}
@@ -71,7 +71,7 @@ void QCompletionEdit::setAutoAdd( bool add )
aAdd = add;
}
-void QCompletionEdit::textDidChange( const QString &text )
+void QCompletionEdit::textDidChange( const TQString &text )
{
if ( text.isEmpty() ) {
popup->close();
@@ -91,8 +91,8 @@ void QCompletionEdit::placeListBox()
popup->resize( QMAX( listbox->sizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ),
listbox->sizeHint().height() + listbox->horizontalScrollBar()->height() + 4 );
- QPoint p( mapToGlobal( QPoint( 0, 0 ) ) );
- if ( p.y() + height() + popup->height() <= QApplication::desktop()->height() )
+ TQPoint p( mapToGlobal( TQPoint( 0, 0 ) ) );
+ if ( p.y() + height() + popup->height() <= TQApplication::desktop()->height() )
popup->move( p.x(), p.y() + height() );
else
popup->move( p.x(), p.y() - listbox->height() );
@@ -107,18 +107,18 @@ void QCompletionEdit::updateListBox()
listbox->clear();
if ( compList.isEmpty() )
return;
- for ( QStringList::Iterator it = compList.begin(); it != compList.end(); ++it ) {
+ for ( TQStringList::Iterator it = compList.begin(); it != compList.end(); ++it ) {
if ( caseSensitive && (*it).left( text().length() ) == text() ||
!caseSensitive && (*it).left( text().length() ).lower() == text().lower() )
listbox->insertItem( *it );
}
}
-bool QCompletionEdit::eventFilter( QObject *o, QEvent *e )
+bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
{
if ( o == popup || o == listbox || o == listbox->viewport() ) {
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *ke = (QKeyEvent*)e;
+ if ( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) {
if ( ke->key() == Key_Tab && listbox->count() > 1 &&
listbox->currentItem() < (int)listbox->count() - 1 ) {
@@ -147,10 +147,10 @@ bool QCompletionEdit::eventFilter( QObject *o, QEvent *e )
popup->close();
setFocus();
}
- QApplication::sendEvent( this, e );
+ TQApplication::sendEvent( this, e );
return TRUE;
}
- } else if ( e->type() == QEvent::MouseButtonDblClick ) {
+ } else if ( e->type() == TQEvent::MouseButtonDblClick ) {
popup->close();
setFocus();
blockSignals( TRUE );
@@ -160,8 +160,8 @@ bool QCompletionEdit::eventFilter( QObject *o, QEvent *e )
return TRUE;
}
} else if ( o == this ) {
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *ke = (QKeyEvent*)e;
+ if ( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Up ||
ke->key() == Key_Down ||
ke->key() == Key_Prior ||
@@ -170,15 +170,15 @@ bool QCompletionEdit::eventFilter( QObject *o, QEvent *e )
ke->key() == Key_Enter ||
ke->key() == Key_Tab ||
ke->key() == Key_Escape ) {
- QApplication::sendEvent( listbox, e );
+ TQApplication::sendEvent( listbox, e );
return TRUE;
}
}
}
- return QLineEdit::eventFilter( o, e );
+ return TQLineEdit::eventFilter( o, e );
}
-void QCompletionEdit::addCompletionEntry( const QString &entry )
+void QCompletionEdit::addCompletionEntry( const TQString &entry )
{
if ( compList.find( entry ) == compList.end() ) {
compList << entry;
@@ -186,9 +186,9 @@ void QCompletionEdit::addCompletionEntry( const QString &entry )
}
}
-void QCompletionEdit::removeCompletionEntry( const QString &entry )
+void QCompletionEdit::removeCompletionEntry( const TQString &entry )
{
- QStringList::Iterator it = compList.find( entry );
+ TQStringList::Iterator it = compList.find( entry );
if ( it != compList.end() )
compList.remove( it );
}
@@ -205,6 +205,6 @@ bool QCompletionEdit::isCaseSensitive() const
void QCompletionEdit::clear()
{
- QLineEdit::clear();
+ TQLineEdit::clear();
compList.clear();
}
diff --git a/kdevdesigner/designer/qcompletionedit.h b/kdevdesigner/designer/qcompletionedit.h
index 426e7202..2e55854d 100644
--- a/kdevdesigner/designer/qcompletionedit.h
+++ b/kdevdesigner/designer/qcompletionedit.h
@@ -27,8 +27,8 @@
#ifndef QCOMPLETIONEDIT_H
#define QCOMPLETIONEDIT_H
-#include <qlineedit.h>
-#include <qstringlist.h>
+#include <tqlineedit.h>
+#include <tqstringlist.h>
class QListBox;
class QVBox;
@@ -40,26 +40,26 @@ class QCompletionEdit : public QLineEdit
Q_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive )
public:
- QCompletionEdit( QWidget *parent = 0, const char *name = 0 );
+ QCompletionEdit( TQWidget *parent = 0, const char *name = 0 );
bool autoAdd() const;
- QStringList completionList() const;
- bool eventFilter( QObject *o, QEvent *e );
+ TQStringList completionList() const;
+ bool eventFilter( TQObject *o, TQEvent *e );
bool isCaseSensitive() const;
public slots:
- void setCompletionList( const QStringList &l );
+ void setCompletionList( const TQStringList &l );
void setAutoAdd( bool add );
void clear();
- void addCompletionEntry( const QString &entry );
- void removeCompletionEntry( const QString &entry );
+ void addCompletionEntry( const TQString &entry );
+ void removeCompletionEntry( const TQString &entry );
void setCaseSensitive( bool b );
signals:
- void chosen( const QString &text );
+ void chosen( const TQString &text );
private slots:
- void textDidChange( const QString &text );
+ void textDidChange( const TQString &text );
private:
void placeListBox();
@@ -67,9 +67,9 @@ private:
private:
bool aAdd;
- QStringList compList;
- QListBox *listbox;
- QVBox *popup;
+ TQStringList compList;
+ TQListBox *listbox;
+ TQVBox *popup;
bool caseSensitive;
};
diff --git a/kdevdesigner/designer/replacedialog.ui.h b/kdevdesigner/designer/replacedialog.ui.h
index 9fa0f546..7867d0c6 100644
--- a/kdevdesigner/designer/replacedialog.ui.h
+++ b/kdevdesigner/designer/replacedialog.ui.h
@@ -63,7 +63,7 @@ void ReplaceDialog::doReplaceAll()
checkBegin->setChecked( FALSE );
}
-void ReplaceDialog::setEditor( EditorInterface * e, QObject * fw )
+void ReplaceDialog::setEditor( EditorInterface * e, TQObject * fw )
{
if ( fw != formWindow )
checkBegin->setChecked( TRUE );
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp
index ca983a42..70768b5b 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -43,42 +43,42 @@
#include <domtool.h>
#include <widgetdatabase.h>
-#include <qaccel.h>
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qcombobox.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qfeatures.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qiconview.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qmenudata.h>
-#include <qmessagebox.h>
-#include <qmetaobject.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qtabbar.h>
+#include <tqaccel.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
+#include <tqcombobox.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqfeatures.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqiconview.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqmenudata.h>
+#include <tqmessagebox.h>
+#include <tqmetaobject.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqtabbar.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
-#include <qdatatable.h>
+#include <tqtable.h>
+#include <tqdatatable.h>
#endif
-#include <qtabwidget.h>
-#include <qtabwidget.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
-#include <qwidgetstack.h>
-#include <qwizard.h>
-#include <qworkspace.h>
-#include <qworkspace.h>
-#include <qsplitter.h>
+#include <tqtabwidget.h>
+#include <tqtabwidget.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
+#include <tqwidgetstack.h>
+#include <tqwizard.h>
+#include <tqworkspace.h>
+#include <tqworkspace.h>
+#include <tqsplitter.h>
#include <private/qucom_p.h>
#include <kiconloader.h>
@@ -87,16 +87,16 @@
#include "kdevdesigner_part.h"
-static QString makeIndent( int indent )
+static TQString makeIndent( int indent )
{
- QString s;
+ TQString s;
s.fill( ' ', indent * 4 );
return s;
}
-static QString entitize( const QString &s, bool attribute = FALSE )
+static TQString entitize( const TQString &s, bool attribute = FALSE )
{
- QString s2 = s;
+ TQString s2 = s;
s2 = s2.replace( "&", "&amp;" );
s2 = s2.replace( ">", "&gt;" );
s2 = s2.replace( "<", "&lt;" );
@@ -112,99 +112,99 @@ static struct {
int key;
const char* name;
} keyname[] = {
- { Qt::Key_Space, QT_TRANSLATE_NOOP( "QAccel", "Space" ) },
- { Qt::Key_Escape, QT_TRANSLATE_NOOP( "QAccel", "Esc" ) },
- { Qt::Key_Tab, QT_TRANSLATE_NOOP( "QAccel", "Tab" ) },
- { Qt::Key_Backtab, QT_TRANSLATE_NOOP( "QAccel", "Backtab" ) },
- { Qt::Key_Backspace, QT_TRANSLATE_NOOP( "QAccel", "Backspace" ) },
- { Qt::Key_Return, QT_TRANSLATE_NOOP( "QAccel", "Return" ) },
- { Qt::Key_Enter, QT_TRANSLATE_NOOP( "QAccel", "Enter" ) },
- { Qt::Key_Insert, QT_TRANSLATE_NOOP( "QAccel", "Ins" ) },
- { Qt::Key_Delete, QT_TRANSLATE_NOOP( "QAccel", "Del" ) },
- { Qt::Key_Pause, QT_TRANSLATE_NOOP( "QAccel", "Pause" ) },
- { Qt::Key_Print, QT_TRANSLATE_NOOP( "QAccel", "Print" ) },
- { Qt::Key_SysReq, QT_TRANSLATE_NOOP( "QAccel", "SysReq" ) },
- { Qt::Key_Home, QT_TRANSLATE_NOOP( "QAccel", "Home" ) },
- { Qt::Key_End, QT_TRANSLATE_NOOP( "QAccel", "End" ) },
- { Qt::Key_Left, QT_TRANSLATE_NOOP( "QAccel", "Left" ) },
- { Qt::Key_Up, QT_TRANSLATE_NOOP( "QAccel", "Up" ) },
- { Qt::Key_Right, QT_TRANSLATE_NOOP( "QAccel", "Right" ) },
- { Qt::Key_Down, QT_TRANSLATE_NOOP( "QAccel", "Down" ) },
- { Qt::Key_Prior, QT_TRANSLATE_NOOP( "QAccel", "PgUp" ) },
- { Qt::Key_Next, QT_TRANSLATE_NOOP( "QAccel", "PgDown" ) },
- { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( "QAccel", "CapsLock" ) },
- { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "QAccel", "NumLock" ) },
- { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( "QAccel", "ScrollLock" ) },
- { Qt::Key_Menu, QT_TRANSLATE_NOOP( "QAccel", "Menu" ) },
- { Qt::Key_Help, QT_TRANSLATE_NOOP( "QAccel", "Help" ) },
+ { Qt::Key_Space, QT_TRANSLATE_NOOP( "TQAccel", "Space" ) },
+ { Qt::Key_Escape, QT_TRANSLATE_NOOP( "TQAccel", "Esc" ) },
+ { Qt::Key_Tab, QT_TRANSLATE_NOOP( "TQAccel", "Tab" ) },
+ { Qt::Key_Backtab, QT_TRANSLATE_NOOP( "TQAccel", "Backtab" ) },
+ { Qt::Key_Backspace, QT_TRANSLATE_NOOP( "TQAccel", "Backspace" ) },
+ { Qt::Key_Return, QT_TRANSLATE_NOOP( "TQAccel", "Return" ) },
+ { Qt::Key_Enter, QT_TRANSLATE_NOOP( "TQAccel", "Enter" ) },
+ { Qt::Key_Insert, QT_TRANSLATE_NOOP( "TQAccel", "Ins" ) },
+ { Qt::Key_Delete, QT_TRANSLATE_NOOP( "TQAccel", "Del" ) },
+ { Qt::Key_Pause, QT_TRANSLATE_NOOP( "TQAccel", "Pause" ) },
+ { Qt::Key_Print, QT_TRANSLATE_NOOP( "TQAccel", "Print" ) },
+ { Qt::Key_SysReq, QT_TRANSLATE_NOOP( "TQAccel", "SysReq" ) },
+ { Qt::Key_Home, QT_TRANSLATE_NOOP( "TQAccel", "Home" ) },
+ { Qt::Key_End, QT_TRANSLATE_NOOP( "TQAccel", "End" ) },
+ { Qt::Key_Left, QT_TRANSLATE_NOOP( "TQAccel", "Left" ) },
+ { Qt::Key_Up, QT_TRANSLATE_NOOP( "TQAccel", "Up" ) },
+ { Qt::Key_Right, QT_TRANSLATE_NOOP( "TQAccel", "Right" ) },
+ { Qt::Key_Down, QT_TRANSLATE_NOOP( "TQAccel", "Down" ) },
+ { Qt::Key_Prior, QT_TRANSLATE_NOOP( "TQAccel", "PgUp" ) },
+ { Qt::Key_Next, QT_TRANSLATE_NOOP( "TQAccel", "PgDown" ) },
+ { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( "TQAccel", "CapsLock" ) },
+ { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "TQAccel", "NumLock" ) },
+ { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( "TQAccel", "ScrollLock" ) },
+ { Qt::Key_Menu, QT_TRANSLATE_NOOP( "TQAccel", "Menu" ) },
+ { Qt::Key_Help, QT_TRANSLATE_NOOP( "TQAccel", "Help" ) },
// Multimedia keys
- { Qt::Key_Back, QT_TRANSLATE_NOOP( "QAccel", "Back" ) },
- { Qt::Key_Forward, QT_TRANSLATE_NOOP( "QAccel", "Forward" ) },
- { Qt::Key_Stop, QT_TRANSLATE_NOOP( "QAccel", "Stop" ) },
- { Qt::Key_Refresh, QT_TRANSLATE_NOOP( "QAccel", "Refresh" ) },
- { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP( "QAccel", "Volume Down" ) },
- { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP( "QAccel", "Volume Mute" ) },
- { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP( "QAccel", "Volume Up" ) },
- { Qt::Key_BassBoost, QT_TRANSLATE_NOOP( "QAccel", "Bass Boost" ) },
- { Qt::Key_BassUp, QT_TRANSLATE_NOOP( "QAccel", "Bass Up" ) },
- { Qt::Key_BassDown, QT_TRANSLATE_NOOP( "QAccel", "Bass Down" ) },
- { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP( "QAccel", "Treble Up" ) },
- { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP( "QAccel", "Treble Down" ) },
- { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP( "QAccel", "Media Play" ) },
- { Qt::Key_MediaStop, QT_TRANSLATE_NOOP( "QAccel", "Media Stop" ) },
- { Qt::Key_MediaPrev, QT_TRANSLATE_NOOP( "QAccel", "Media Previous" ) },
- { Qt::Key_MediaNext, QT_TRANSLATE_NOOP( "QAccel", "Media Next" ) },
- { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP( "QAccel", "Media Record" ) },
- { Qt::Key_HomePage, QT_TRANSLATE_NOOP( "QAccel", "Home" ) },
- { Qt::Key_Favorites, QT_TRANSLATE_NOOP( "QAccel", "Favorites" ) },
- { Qt::Key_Search, QT_TRANSLATE_NOOP( "QAccel", "Search" ) },
- { Qt::Key_Standby, QT_TRANSLATE_NOOP( "QAccel", "Standby" ) },
- { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP( "QAccel", "Open URL" ) },
- { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP( "QAccel", "Launch Mail" ) },
- { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP( "QAccel", "Launch Media" ) },
- { Qt::Key_Launch0, QT_TRANSLATE_NOOP( "QAccel", "Launch (0)" ) },
- { Qt::Key_Launch1, QT_TRANSLATE_NOOP( "QAccel", "Launch (1)" ) },
- { Qt::Key_Launch2, QT_TRANSLATE_NOOP( "QAccel", "Launch (2)" ) },
- { Qt::Key_Launch3, QT_TRANSLATE_NOOP( "QAccel", "Launch (3)" ) },
- { Qt::Key_Launch4, QT_TRANSLATE_NOOP( "QAccel", "Launch (4)" ) },
- { Qt::Key_Launch5, QT_TRANSLATE_NOOP( "QAccel", "Launch (5)" ) },
- { Qt::Key_Launch6, QT_TRANSLATE_NOOP( "QAccel", "Launch (6)" ) },
- { Qt::Key_Launch7, QT_TRANSLATE_NOOP( "QAccel", "Launch (7)" ) },
- { Qt::Key_Launch8, QT_TRANSLATE_NOOP( "QAccel", "Launch (8)" ) },
- { Qt::Key_Launch9, QT_TRANSLATE_NOOP( "QAccel", "Launch (9)" ) },
- { Qt::Key_LaunchA, QT_TRANSLATE_NOOP( "QAccel", "Launch (A)" ) },
- { Qt::Key_LaunchB, QT_TRANSLATE_NOOP( "QAccel", "Launch (B)" ) },
- { Qt::Key_LaunchC, QT_TRANSLATE_NOOP( "QAccel", "Launch (C)" ) },
- { Qt::Key_LaunchD, QT_TRANSLATE_NOOP( "QAccel", "Launch (D)" ) },
- { Qt::Key_LaunchE, QT_TRANSLATE_NOOP( "QAccel", "Launch (E)" ) },
- { Qt::Key_LaunchF, QT_TRANSLATE_NOOP( "QAccel", "Launch (F)" ) },
+ { Qt::Key_Back, QT_TRANSLATE_NOOP( "TQAccel", "Back" ) },
+ { Qt::Key_Forward, QT_TRANSLATE_NOOP( "TQAccel", "Forward" ) },
+ { Qt::Key_Stop, QT_TRANSLATE_NOOP( "TQAccel", "Stop" ) },
+ { Qt::Key_Refresh, QT_TRANSLATE_NOOP( "TQAccel", "Refresh" ) },
+ { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP( "TQAccel", "Volume Down" ) },
+ { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP( "TQAccel", "Volume Mute" ) },
+ { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP( "TQAccel", "Volume Up" ) },
+ { Qt::Key_BassBoost, QT_TRANSLATE_NOOP( "TQAccel", "Bass Boost" ) },
+ { Qt::Key_BassUp, QT_TRANSLATE_NOOP( "TQAccel", "Bass Up" ) },
+ { Qt::Key_BassDown, QT_TRANSLATE_NOOP( "TQAccel", "Bass Down" ) },
+ { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP( "TQAccel", "Treble Up" ) },
+ { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP( "TQAccel", "Treble Down" ) },
+ { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP( "TQAccel", "Media Play" ) },
+ { Qt::Key_MediaStop, QT_TRANSLATE_NOOP( "TQAccel", "Media Stop" ) },
+ { Qt::Key_MediaPrev, QT_TRANSLATE_NOOP( "TQAccel", "Media Previous" ) },
+ { Qt::Key_MediaNext, QT_TRANSLATE_NOOP( "TQAccel", "Media Next" ) },
+ { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP( "TQAccel", "Media Record" ) },
+ { Qt::Key_HomePage, QT_TRANSLATE_NOOP( "TQAccel", "Home" ) },
+ { Qt::Key_Favorites, QT_TRANSLATE_NOOP( "TQAccel", "Favorites" ) },
+ { Qt::Key_Search, QT_TRANSLATE_NOOP( "TQAccel", "Search" ) },
+ { Qt::Key_Standby, QT_TRANSLATE_NOOP( "TQAccel", "Standby" ) },
+ { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP( "TQAccel", "Open URL" ) },
+ { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP( "TQAccel", "Launch Mail" ) },
+ { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP( "TQAccel", "Launch Media" ) },
+ { Qt::Key_Launch0, QT_TRANSLATE_NOOP( "TQAccel", "Launch (0)" ) },
+ { Qt::Key_Launch1, QT_TRANSLATE_NOOP( "TQAccel", "Launch (1)" ) },
+ { Qt::Key_Launch2, QT_TRANSLATE_NOOP( "TQAccel", "Launch (2)" ) },
+ { Qt::Key_Launch3, QT_TRANSLATE_NOOP( "TQAccel", "Launch (3)" ) },
+ { Qt::Key_Launch4, QT_TRANSLATE_NOOP( "TQAccel", "Launch (4)" ) },
+ { Qt::Key_Launch5, QT_TRANSLATE_NOOP( "TQAccel", "Launch (5)" ) },
+ { Qt::Key_Launch6, QT_TRANSLATE_NOOP( "TQAccel", "Launch (6)" ) },
+ { Qt::Key_Launch7, QT_TRANSLATE_NOOP( "TQAccel", "Launch (7)" ) },
+ { Qt::Key_Launch8, QT_TRANSLATE_NOOP( "TQAccel", "Launch (8)" ) },
+ { Qt::Key_Launch9, QT_TRANSLATE_NOOP( "TQAccel", "Launch (9)" ) },
+ { Qt::Key_LaunchA, QT_TRANSLATE_NOOP( "TQAccel", "Launch (A)" ) },
+ { Qt::Key_LaunchB, QT_TRANSLATE_NOOP( "TQAccel", "Launch (B)" ) },
+ { Qt::Key_LaunchC, QT_TRANSLATE_NOOP( "TQAccel", "Launch (C)" ) },
+ { Qt::Key_LaunchD, QT_TRANSLATE_NOOP( "TQAccel", "Launch (D)" ) },
+ { Qt::Key_LaunchE, QT_TRANSLATE_NOOP( "TQAccel", "Launch (E)" ) },
+ { Qt::Key_LaunchF, QT_TRANSLATE_NOOP( "TQAccel", "Launch (F)" ) },
// --------------------------------------------------------------
// More consistent namings
- { Qt::Key_Print, QT_TRANSLATE_NOOP( "QAccel", "Print Screen" ) },
- { Qt::Key_Prior, QT_TRANSLATE_NOOP( "QAccel", "Page Up" ) },
- { Qt::Key_Next, QT_TRANSLATE_NOOP( "QAccel", "Page Down" ) },
- { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( "QAccel", "Caps Lock" ) },
- { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "QAccel", "Num Lock" ) },
- { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "QAccel", "Number Lock" ) },
- { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( "QAccel", "Scroll Lock" ) },
- { Qt::Key_Insert, QT_TRANSLATE_NOOP( "QAccel", "Insert" ) },
- { Qt::Key_Delete, QT_TRANSLATE_NOOP( "QAccel", "Delete" ) },
- { Qt::Key_Escape, QT_TRANSLATE_NOOP( "QAccel", "Escape" ) },
- { Qt::Key_SysReq, QT_TRANSLATE_NOOP( "QAccel", "System Request" ) },
+ { Qt::Key_Print, QT_TRANSLATE_NOOP( "TQAccel", "Print Screen" ) },
+ { Qt::Key_Prior, QT_TRANSLATE_NOOP( "TQAccel", "Page Up" ) },
+ { Qt::Key_Next, QT_TRANSLATE_NOOP( "TQAccel", "Page Down" ) },
+ { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( "TQAccel", "Caps Lock" ) },
+ { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "TQAccel", "Num Lock" ) },
+ { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "TQAccel", "Number Lock" ) },
+ { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( "TQAccel", "Scroll Lock" ) },
+ { Qt::Key_Insert, QT_TRANSLATE_NOOP( "TQAccel", "Insert" ) },
+ { Qt::Key_Delete, QT_TRANSLATE_NOOP( "TQAccel", "Delete" ) },
+ { Qt::Key_Escape, QT_TRANSLATE_NOOP( "TQAccel", "Escape" ) },
+ { Qt::Key_SysReq, QT_TRANSLATE_NOOP( "TQAccel", "System Request" ) },
{ 0, 0 }
};
#endif
-static QString platformNeutralKeySequence(const QKeySequence &ks)
+static TQString platformNeutralKeySequence(const TQKeySequence &ks)
{
#ifndef Q_WS_MACX
- return QString(ks);
+ return TQString(ks);
#else
uint k;
- QString str;
- QString p;
+ TQString str;
+ TQString p;
for (k = 0; k < ks.count(); ++k) {
int keycombo = ks[k];
int basekey = keycombo & ~(Qt::SHIFT | Qt::CTRL | Qt::ALT | Qt::META);
@@ -217,22 +217,22 @@ static QString platformNeutralKeySequence(const QKeySequence &ks)
if (keycombo & Qt::SHIFT)
str += "Shift+";
- // begin copy and paste from QKeySequence :(
+ // begin copy and paste from TQKeySequence :(
if (basekey & Qt::UNICODE_ACCEL) {
// Note: This character should NOT be upper()'ed, since
// the encoded string should indicate EXACTLY what the
// key represents! Hence a 'Ctrl+Shift+c' is posible to
// represent, but is clearly impossible to trigger...
- p = QChar(basekey & 0xffff);
+ p = TQChar(basekey & 0xffff);
} else if ( basekey >= Qt::Key_F1 && basekey <= Qt::Key_F35 ) {
- p = QAccel::tr( "F%1" ).arg(basekey - Qt::Key_F1 + 1);
+ p = TQAccel::tr( "F%1" ).arg(basekey - Qt::Key_F1 + 1);
} else if ( basekey > Qt::Key_Space && basekey <= Qt::Key_AsciiTilde ) {
p.sprintf( "%c", basekey );
} else {
int i = 0;
while (keyname[i].name) {
if (basekey == keyname[i].key) {
- p = QAccel::tr(keyname[i].name);
+ p = TQAccel::tr(keyname[i].name);
break;
}
++i;
@@ -243,7 +243,7 @@ static QString platformNeutralKeySequence(const QKeySequence &ks)
// ( Really depends on you locale )
if ( !keyname[i].name )
// Note: This character should NOT be upper()'ed, see above!
- p = QChar(basekey & 0xffff);
+ p = TQChar(basekey & 0xffff);
}
// end copy...
str += p + ", ";
@@ -253,7 +253,7 @@ static QString platformNeutralKeySequence(const QKeySequence &ks)
#endif
}
-static QString mkBool( bool b )
+static TQString mkBool( bool b )
{
return b? "true" : "false";
}
@@ -304,7 +304,7 @@ void Resource::setWidget( FormWindow *w )
toplevel = w;
}
-QWidget *Resource::widget() const
+TQWidget *Resource::widget() const
{
return toplevel;
}
@@ -316,7 +316,7 @@ bool Resource::load( FormFile *ff, Project *defProject )
currFileName = ff->absFileName();
mainContainerSet = FALSE;
- QFile f( ff->absFileName() );
+ TQFile f( ff->absFileName() );
f.open( IO_ReadOnly | IO_Translate );
bool b = load( ff, &f, defProject );
@@ -328,10 +328,10 @@ bool Resource::load( FormFile *ff, Project *defProject )
#undef signals
#undef slots
-bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
+bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
{
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( dev, &errMsg, &errLine ) ) {
return FALSE;
@@ -339,7 +339,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
DomTool::fixDocument( doc );
- QWidget *p = mainwindow ? mainwindow->qWorkspace() : 0;
+ TQWidget *p = mainwindow ? mainwindow->qWorkspace() : 0;
toplevel = formwindow = new FormWindow( ff, p, 0 );
if ( defProject )
formwindow->setProject( defProject );
@@ -350,7 +350,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
MetaDataBase::addEntry( formwindow );
if ( !langIface ) {
- QString lang = "Qt Script";
+ TQString lang = "Qt Script";
if ( mainwindow )
lang = mainwindow->currProject()->language();
langIface = MetaDataBase::languageInterface( lang );
@@ -359,62 +359,62 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
}
uiFileVersion = doc.firstChild().toElement().attribute("version");
- QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement e = doc.firstChild().toElement().firstChild().toElement();
- QDomElement forwards = e;
+ TQDomElement forwards = e;
while ( forwards.tagName() != "forwards" && !forwards.isNull() )
forwards = forwards.nextSibling().toElement();
- QDomElement includes = e;
+ TQDomElement includes = e;
while ( includes.tagName() != "includes" && !includes.isNull() )
includes = includes.nextSibling().toElement();
- QDomElement variables = e;
+ TQDomElement variables = e;
while ( variables.tagName() != "variables" && !variables.isNull() )
variables = variables.nextSibling().toElement();
- QDomElement signals = e;
+ TQDomElement signals = e;
while ( signals.tagName() != "signals" && !signals.isNull() )
signals = signals.nextSibling().toElement();
- QDomElement slots = e;
+ TQDomElement slots = e;
while ( slots.tagName() != "slots" && !slots.isNull() )
slots = slots.nextSibling().toElement();
- QDomElement functions = e;
+ TQDomElement functions = e;
while ( functions.tagName() != "functions" && !functions.isNull() )
functions = functions.nextSibling().toElement();
- QDomElement connections = e;
+ TQDomElement connections = e;
while ( connections.tagName() != "connections" && !connections.isNull() )
connections = connections.nextSibling().toElement();
- QDomElement imageCollection = e;
+ TQDomElement imageCollection = e;
images.clear();
while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
imageCollection = imageCollection.nextSibling().toElement();
- QDomElement customWidgets = e;
+ TQDomElement customWidgets = e;
while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() )
customWidgets = customWidgets.nextSibling().toElement();
- QDomElement tabOrder = e;
+ TQDomElement tabOrder = e;
while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() )
tabOrder = tabOrder.nextSibling().toElement();
- QDomElement actions = e;
+ TQDomElement actions = e;
while ( actions.tagName() != "actions" && !actions.isNull() )
actions = actions.nextSibling().toElement();
- QDomElement toolbars = e;
+ TQDomElement toolbars = e;
while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() )
toolbars = toolbars.nextSibling().toElement();
- QDomElement menubar = e;
+ TQDomElement menubar = e;
while ( menubar.tagName() != "menubar" && !menubar.isNull() )
menubar = menubar.nextSibling().toElement();
- QDomElement widget;
+ TQDomElement widget;
while ( !e.isNull() ) {
if ( e.tagName() == "widget" ) {
widgets.clear();
@@ -461,8 +461,8 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
} else if ( e.tagName() == "layoutdefaults" ) {
- formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", QString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
- formwindow->setLayoutDefaultMargin( e.attribute( "margin", QString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
+ formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
+ formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
} else if ( e.tagName() == "layoutfunctions" ) {
formwindow->setSpacingFunction( e.attribute( "spacing" ) );
formwindow->setMarginFunction( e.attribute( "margin" ) );
@@ -480,7 +480,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
#if defined (QT_NON_COMMERCIAL)
bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE;
- QWidget *w = (QWidget*)createObject( widget, !previewMode ? (QWidget*)formwindow : MainWindow::self );
+ TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self );
if ( !w )
return FALSE;
if ( previewMode )
@@ -491,13 +491,13 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
#endif
if ( !forwards.isNull() ) {
- for ( QDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "forward" )
metaForwards << n.firstChild().toText().data();
}
if ( !includes.isNull() ) {
- for ( QDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "include" ) {
if ( n.tagName() == "include" ) {
MetaDataBase::Include inc;
@@ -519,7 +519,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
}
if ( !variables.isNull() ) {
- for ( QDomElement n = variables.firstChild().toElement(); !n.isNull();
+ for ( TQDomElement n = variables.firstChild().toElement(); !n.isNull();
n = n.nextSibling().toElement() ) {
if ( n.tagName() == "variable" ) {
MetaDataBase::Variable v;
@@ -532,12 +532,12 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
}
}
if ( !signals.isNull() ) {
- for ( QDomElement n = signals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = signals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "signal" )
metaSignals << n.firstChild().toText().data();
}
if ( !slots.isNull() ) {
- for ( QDomElement n = slots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = slots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "slot" ) {
MetaDataBase::Function function;
function.specifier = n.attribute( "specifier", "virtual" );
@@ -564,7 +564,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
}
if ( !functions.isNull() ) {
- for ( QDomElement n = functions.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
+ for ( TQDomElement n = functions.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "function" ) {
MetaDataBase::Function function;
function.specifier = n.attribute( "specifier", "virtual" );
@@ -610,7 +610,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
MetaDataBase::setForwards( formwindow, metaForwards );
MetaDataBase::setVariables( formwindow, metaVariables );
MetaDataBase::setSignalList( formwindow, metaSignals );
- metaInfo.classNameChanged = metaInfo.className != QString( formwindow->name() );
+ metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() );
MetaDataBase::setMetaInfo( formwindow, metaInfo );
MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro );
}
@@ -634,23 +634,23 @@ bool Resource::load( FormFile *ff, QIODevice* dev, Project *defProject )
return TRUE;
}
-static bool saveCode( const QString &filename, const QString &code )
+static bool saveCode( const TQString &filename, const TQString &code )
{
- QFile f( filename );
+ TQFile f( filename );
if ( f.open(IO_WriteOnly | IO_Translate) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
ts << code;
return TRUE;
}
return FALSE;
}
-bool Resource::save( const QString& filename, bool formCodeOnly )
+bool Resource::save( const TQString& filename, bool formCodeOnly )
{
if ( !formwindow || filename.isEmpty() )
return FALSE;
if (!langIface) {
- QString lang = "Qt Script";
+ TQString lang = "Qt Script";
if ( mainwindow )
lang = mainwindow->currProject()->language();
langIface = MetaDataBase::languageInterface( lang );
@@ -662,10 +662,10 @@ bool Resource::save( const QString& filename, bool formCodeOnly )
return TRUE;
bool breakout = FALSE;
FormFile *ff = formwindow->formFile();
- QString codeFile = ff->project()->makeAbsolute( ff->codeFile() );
- QString filter = langIface->fileFilterList().join("\n");
+ TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() );
+ TQString filter = langIface->fileFilterList().join("\n");
while ( !breakout ) {
- QString fn = KFileDialog::getSaveFileName( codeFile, filter );
+ TQString fn = KFileDialog::getSaveFileName( codeFile, filter );
breakout = fn.isEmpty();
if ( !breakout ) {
if ( saveCode(fn, ff->code()) )
@@ -675,7 +675,7 @@ bool Resource::save( const QString& filename, bool formCodeOnly )
}
currFileName = filename;
- QFile f( filename );
+ TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
return FALSE;
bool b = save( &f );
@@ -683,13 +683,13 @@ bool Resource::save( const QString& filename, bool formCodeOnly )
return b;
}
-bool Resource::save( QIODevice* dev )
+bool Resource::save( TQIODevice* dev )
{
if ( !formwindow )
return FALSE;
if ( !langIface ) {
- QString lang = "C++";
+ TQString lang = "C++";
if ( mainwindow )
lang = mainwindow->currProject()->language();
langIface = MetaDataBase::languageInterface( lang );
@@ -697,19 +697,19 @@ bool Resource::save( QIODevice* dev )
langIface->addRef();
}
- QTextStream ts( dev );
- ts.setCodec( QTextCodec::codecForName( "UTF-8" ) );
+ TQTextStream ts( dev );
+ ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) );
ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
saveObject( formwindow->mainContainer(), 0, ts, 0 );
- if ( ::qt_cast<QMainWindow*>(formwindow->mainContainer()) ) {
- saveMenuBar( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
- saveToolBars( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
+ if ( ::qt_cast<TQMainWindow*>(formwindow->mainContainer()) ) {
+ saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
+ saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
- if ( ::qt_cast<QMainWindow*>(formwindow->mainContainer()) )
+ if ( ::qt_cast<TQMainWindow*>(formwindow->mainContainer()) )
saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() )
saveImageCollection( ts, 0 );
@@ -726,20 +726,20 @@ bool Resource::save( QIODevice* dev )
return ok;
}
-QString Resource::copy()
+TQString Resource::copy()
{
if ( !formwindow )
- return QString::null;
+ return TQString::null;
copying = TRUE;
- QString s;
- QTextOStream ts( &s );
+ TQString s;
+ TQTextOStream ts( &s );
ts << "<!DOCTYPE UI-SELECTION><UI-SELECTION>" << endl;
- QWidgetList widgets = formwindow->selectedWidgets();
- QWidgetList tmp( widgets );
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
- QWidget *p = w->parentWidget();
+ TQWidgetList widgets = formwindow->selectedWidgets();
+ TQWidgetList tmp( widgets );
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
+ TQWidget *p = w->parentWidget();
bool save = TRUE;
while ( p ) {
if ( tmp.findRef( p ) != -1 ) {
@@ -761,26 +761,26 @@ QString Resource::copy()
}
-void Resource::paste( const QString &cb, QWidget *parent )
+void Resource::paste( const TQString &cb, TQWidget *parent )
{
if ( !formwindow )
return;
mainContainerSet = TRUE;
pasting = TRUE;
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
doc.setContent( cb, &errMsg, &errLine );
- QDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
- QDomElement imageCollection = firstWidget;
+ TQDomElement imageCollection = firstWidget;
images.clear();
while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
imageCollection = imageCollection.nextSibling().toElement();
- QDomElement customWidgets = firstWidget;
+ TQDomElement customWidgets = firstWidget;
while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() )
customWidgets = customWidgets.nextSibling().toElement();
@@ -789,13 +789,13 @@ void Resource::paste( const QString &cb, QWidget *parent )
if ( !customWidgets.isNull() )
loadCustomWidgets( customWidgets, this );
- QWidgetList widgets;
+ TQWidgetList widgets;
formwindow->clearSelection( FALSE );
formwindow->setPropertyShowingBlocked( TRUE );
formwindow->clearSelection( FALSE );
while ( !firstWidget.isNull() ) {
if ( firstWidget.tagName() == "widget" ) {
- QWidget *w = (QWidget*)createObject( firstWidget, parent, 0 );
+ TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
if ( !w )
continue;
widgets.append( w );
@@ -809,7 +809,7 @@ void Resource::paste( const QString &cb, QWidget *parent )
w->move( x, y );
formwindow->selectWidget( w );
} else if ( firstWidget.tagName() == "spacer" ) {
- QWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
+ TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
if ( !w )
continue;
widgets.append( w );
@@ -832,31 +832,31 @@ void Resource::paste( const QString &cb, QWidget *parent )
formwindow->commandHistory()->addCommand( cmd );
}
-void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream &ts, int indent )
+void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent )
{
- if ( obj && obj->isWidgetType() && ( (QWidget*)obj )->isHidden() )
+ if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() )
return;
- QString closeTag;
+ TQString closeTag;
const char* className = WidgetFactory::classNameOf( obj );
int classID = WidgetDatabase::idFromClassName( className );
bool isPlugin = WidgetDatabase::isCustomPluginWidget( classID );
if ( obj->isWidgetType() ) {
if ( obj->isA("CustomWidget") || isPlugin ) {
- usedCustomWidgets << QString( className );
+ usedCustomWidgets << TQString( className );
includeHints << WidgetDatabase::includeFile( classID );
}
- if ( obj != formwindow && !formwindow->widgets()->find( (QWidget*)obj ) )
+ if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
return; // we don't know anything about this thing
- QString attributes;
+ TQString attributes;
if ( grid ) {
- QDesignerGridLayout::Item item = grid->items[ (QWidget*)obj ];
- attributes += QString(" row=\"") + QString::number(item.row) + "\"";
- attributes += QString(" column=\"") + QString::number(item.column) + "\"";
+ QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
+ attributes += TQString(" row=\"") + TQString::number(item.row) + "\"";
+ attributes += TQString(" column=\"") + TQString::number(item.column) + "\"";
if ( item.rowspan * item.colspan != 1 ) {
- attributes += QString(" rowspan=\"") + QString::number(item.rowspan) + "\"";
- attributes += QString(" colspan=\"") + QString::number(item.colspan) + "\"";
+ attributes += TQString(" rowspan=\"") + TQString::number(item.rowspan) + "\"";
+ attributes += TQString(" colspan=\"") + TQString::number(item.colspan) + "\"";
}
}
@@ -879,16 +879,16 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
QDesignerWidgetStack* ws = 0;
- if ( ::qt_cast<QTabWidget*>(obj) ) {
- QTabWidget* tw = (QTabWidget*) obj;
- QObjectList* tmpl = tw->queryList( "QWidgetStack" );
- QWidgetStack *ws = (QWidgetStack*)tmpl->first();
- QTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
+ if ( ::qt_cast<TQTabWidget*>(obj) ) {
+ TQTabWidget* tw = (TQTabWidget*) obj;
+ TQObjectList* tmpl = tw->queryList( "TQWidgetStack" );
+ TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
+ TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) {
- QTab *t = tb->tabAt( i );
+ TQTab *t = tb->tabAt( i );
if ( !t )
continue;
- QWidget *w = ws->widget( t->identifier() );
+ TQWidget *w = ws->widget( t->identifier() );
if ( !w )
continue;
if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ) == -1 )
@@ -913,7 +913,7 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
delete tmpl;
} else if ( (ws = ::qt_cast<QDesignerWidgetStack*>(obj)) != 0 ) {
for ( int i = 0; i < ws->count(); ++i ) {
- QWidget *w = ws->page( i );
+ TQWidget *w = ws->page( i );
if ( !w )
continue;
if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
@@ -927,17 +927,17 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<attribute name=\"id\">" << endl;
indent++;
- ts << makeIndent( indent ) << "<number>" << QString::number(i) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number(i) << "</number>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
saveChildrenOf( w, ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::qt_cast<QToolBox*>(obj) ) {
- QToolBox* tb = (QToolBox*)obj;
+ } else if ( ::qt_cast<TQToolBox*>(obj) ) {
+ TQToolBox* tb = (TQToolBox*)obj;
for ( int i = 0; i < tb->count(); ++i ) {
- QWidget *w = tb->item( i );
+ TQWidget *w = tb->item( i );
if ( !w )
continue;
if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
@@ -951,7 +951,7 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl;
indent++;
- saveEnumProperty( w, "backgroundMode", QVariant::Invalid, ts, indent );
+ saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
@@ -963,10 +963,10 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::qt_cast<QWizard*>(obj) ) {
- QWizard* wiz = (QWizard*)obj;
+ } else if ( ::qt_cast<TQWizard*>(obj) ) {
+ TQWizard* wiz = (TQWizard*)obj;
for ( int i = 0; i < wiz->pageCount(); ++i ) {
- QWidget *w = wiz->page( i );
+ TQWidget *w = wiz->page( i );
if ( !w )
continue;
if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
@@ -988,8 +988,8 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::qt_cast<QMainWindow*>(obj) ) {
- saveChildrenOf( ( (QMainWindow*)obj )->centralWidget(), ts, indent );
+ } else if ( ::qt_cast<TQMainWindow*>(obj) ) {
+ saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else {
bool saved = FALSE;
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
@@ -1001,11 +1001,11 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 );
if ( iface2 ) {
if ( iface2->supportsPages( className ) ) {
- QWidgetList containers = iface2->pages( className, (QWidget*)obj );
+ TQWidgetList containers = iface2->pages( className, (TQWidget*)obj );
if ( !containers.isEmpty() ) {
saved = TRUE;
int i = 0;
- for ( QWidget *w = containers.first(); w; w = containers.next(), ++i ) {
+ for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) {
if ( WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
continue; // we don't know this widget
@@ -1022,7 +1022,7 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
indent++;
ts << makeIndent( indent ) << "<cstring>"
- << entitize( iface2->pageLabel( className, (QWidget*)obj, i ) )
+ << entitize( iface2->pageLabel( className, (TQWidget*)obj, i ) )
<< "</cstring>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
@@ -1033,7 +1033,7 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
}
} else {
saved = TRUE;
- QWidget *w = iface2->containerOfWidget( className, (QWidget*)obj );
+ TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj );
if ( obj != w ) {
ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( w )
@@ -1054,18 +1054,18 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget;
cw->className = className;
cw->includeFile = WidgetDatabase::includeFile( classID );
- QStrList lst = w->metaObject()->signalNames( TRUE );
- for ( QPtrListIterator<char> it(lst); it.current(); ++it )
+ TQStrList lst = w->metaObject()->signalNames( TRUE );
+ for ( TQPtrListIterator<char> it(lst); it.current(); ++it )
cw->lstSignals.append(it.current());
int i;
int total = w->metaObject()->numProperties( TRUE );
for ( i = 0; i < total; i++ ) {
- const QMetaProperty *p = w->metaObject()->property( i, TRUE );
+ const TQMetaProperty *p = w->metaObject()->property( i, TRUE );
if ( p->designable(w) ) {
MetaDataBase::Property prop;
prop.property = p->name();
- QString pType = p->type();
+ TQString pType = p->type();
// *sigh* designer types are not normal types
// Handle most cases, the ones it misses are
// probably too difficult to deal with anyway...
@@ -1121,56 +1121,56 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << closeTag;
}
-void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
+void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
{
- if ( ::qt_cast<QListBox*>(obj) || ::qt_cast<QComboBox*>(obj) ) {
- QListBox *lb = 0;
- if ( ::qt_cast<QListBox*>(obj) )
- lb = (QListBox*)obj;
+ if ( ::qt_cast<TQListBox*>(obj) || ::qt_cast<TQComboBox*>(obj) ) {
+ TQListBox *lb = 0;
+ if ( ::qt_cast<TQListBox*>(obj) )
+ lb = (TQListBox*)obj;
else
- lb = ( (QComboBox*)obj )->listBox();
+ lb = ( (TQComboBox*)obj )->listBox();
- QListBoxItem *i = lb->firstItem();
+ TQListBoxItem *i = lb->firstItem();
for ( ; i; i = i->next() ) {
ts << makeIndent( indent ) << "<item>" << endl;
indent++;
- QStringList text;
+ TQStringList text;
text << i->text();
- QPtrList<QPixmap> pixmaps;
+ TQPtrList<TQPixmap> pixmaps;
if ( i->pixmap() )
pixmaps.append( i->pixmap() );
saveItem( text, pixmaps, ts, indent );
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( ::qt_cast<QIconView*>(obj) ) {
- QIconView *iv = (QIconView*)obj;
+ } else if ( ::qt_cast<TQIconView*>(obj) ) {
+ TQIconView *iv = (TQIconView*)obj;
- QIconViewItem *i = iv->firstItem();
+ TQIconViewItem *i = iv->firstItem();
for ( ; i; i = i->nextItem() ) {
ts << makeIndent( indent ) << "<item>" << endl;
indent++;
- QStringList text;
+ TQStringList text;
text << i->text();
- QPtrList<QPixmap> pixmaps;
+ TQPtrList<TQPixmap> pixmaps;
if ( i->pixmap() )
pixmaps.append( i->pixmap() );
saveItem( text, pixmaps, ts, indent );
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( ::qt_cast<QListView*>(obj) ) {
- QListView *lv = (QListView*)obj;
+ } else if ( ::qt_cast<TQListView*>(obj) ) {
+ TQListView *lv = (TQListView*)obj;
int i;
for ( i = 0; i < lv->header()->count(); ++i ) {
ts << makeIndent( indent ) << "<column>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << lv->header()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> pix;
pix.setAutoDelete( TRUE );
if ( lv->header()->iconSet( i ) )
- pix.append( new QPixmap( lv->header()->iconSet( i )->pixmap() ) );
+ pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
ts << makeIndent( indent ) << "<property name=\"clickable\">" << endl;
indent++;
@@ -1188,12 +1188,12 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
saveItem( lv->firstChild(), ts, indent - 1 );
}
#if !defined (QT_NO_TABLE)
- else if ( ::qt_cast<QTable*>(obj) ) {
- QTable *table = (QTable*)obj;
+ else if ( ::qt_cast<TQTable*>(obj) ) {
+ TQTable *table = (TQTable*)obj;
int i;
- QMap<QString, QString> columnFields = MetaDataBase::columnFields( table );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
# ifndef QT_NO_SQL
- bool isDataTable = ::qt_cast<QDataTable*>(table);
+ bool isDataTable = ::qt_cast<TQDataTable*>(table);
# else
bool isDataTable = false;
# endif
@@ -1204,12 +1204,12 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
isDataTable ) {
ts << makeIndent( indent ) << "<column>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << table->horizontalHeader()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> pix;
pix.setAutoDelete( TRUE );
if ( table->horizontalHeader()->iconSet( i ) )
- pix.append( new QPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
+ pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
if ( isDataTable && !columnFields.isEmpty() ) {
ts << makeIndent( indent ) << "<property name=\"field\">" << endl;
@@ -1228,12 +1228,12 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
table->verticalHeader()->iconSet( i ) ) {
ts << makeIndent( indent ) << "<row>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << table->verticalHeader()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> pix;
pix.setAutoDelete( TRUE );
if ( table->verticalHeader()->iconSet( i ) )
- pix.append( new QPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) );
+ pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
indent--;
ts << makeIndent( indent ) << "</row>" << endl;
@@ -1243,15 +1243,15 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
#endif
}
-void Resource::saveItem( QListViewItem *i, QTextStream &ts, int indent )
+void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent )
{
- QListView *lv = i->listView();
+ TQListView *lv = i->listView();
while ( i ) {
ts << makeIndent( indent ) << "<item>" << endl;
indent++;
- QPtrList<QPixmap> pixmaps;
- QStringList textes;
+ TQPtrList<TQPixmap> pixmaps;
+ TQStringList textes;
for ( int c = 0; c < lv->columns(); ++c ) {
pixmaps.append( i->pixmap( c ) );
textes << i->text( c );
@@ -1267,7 +1267,7 @@ void Resource::saveItem( QListViewItem *i, QTextStream &ts, int indent )
}
}
-void Resource::savePixmap( const QPixmap &p, QTextStream &ts, int indent, const QString &tagname )
+void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname )
{
if ( p.isNull() ) {
ts << makeIndent( indent ) << "<" << tagname << "></" << tagname << ">" << endl;
@@ -1284,18 +1284,18 @@ void Resource::savePixmap( const QPixmap &p, QTextStream &ts, int indent, const
<< "</" << tagname << ">" << endl;
}
-QPixmap Resource::loadPixmap( const QDomElement &e, const QString &/*tagname*/ )
+TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*/ )
{
- QString arg = e.firstChild().toText().data();
+ TQString arg = e.firstChild().toText().data();
if ( formwindow && formwindow->savePixmapInline() ) {
- QImage img = loadFromCollection( arg );
- QPixmap pix;
+ TQImage img = loadFromCollection( arg );
+ TQPixmap pix;
pix.convertFromImage( img );
MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix;
} else if ( formwindow && formwindow->savePixmapInProject() ) {
- QPixmap pix;
+ TQPixmap pix;
if ( mainwindow && mainwindow->currProject() ) {
pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg );
} else {
@@ -1307,18 +1307,18 @@ QPixmap Resource::loadPixmap( const QDomElement &e, const QString &/*tagname*/ )
MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
return pix;
}
- QPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() );
+ TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() );
// we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that
pix.convertFromImage( pix.convertToImage() );
MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix;
}
-void Resource::saveItem( const QStringList &text,
- const QPtrList<QPixmap> &pixmaps, QTextStream &ts,
+void Resource::saveItem( const TQStringList &text,
+ const TQPtrList<TQPixmap> &pixmaps, TQTextStream &ts,
int indent )
{
- QStringList::ConstIterator it = text.begin();
+ TQStringList::ConstIterator it = text.begin();
for ( ; it != text.end(); ++it ) {
ts << makeIndent( indent ) << "<property name=\"text\">" << endl;
indent++;
@@ -1328,33 +1328,33 @@ void Resource::saveItem( const QStringList &text,
}
for ( int i = 0; i < (int)pixmaps.count(); ++i ) {
- QPixmap *p = ( (QPtrList<QPixmap>)pixmaps ).at( i );
+ TQPixmap *p = ( (TQPtrList<TQPixmap>)pixmaps ).at( i );
ts << makeIndent( indent ) << "<property name=\"pixmap\">" << endl;
indent++;
if ( p )
savePixmap( *p, ts, indent );
else
- savePixmap( QPixmap(), ts, indent );
+ savePixmap( TQPixmap(), ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
}
}
-void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
+void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
{
- const QObjectList *l = obj->children();
+ const TQObjectList *l = obj->children();
if ( !l )
return; // no children to save
- QString closeTag;
+ TQString closeTag;
// if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer
- QLayout *layout = 0;
+ TQLayout *layout = 0;
QDesignerGridLayout* grid = 0;
- if ( !::qt_cast<QSplitter*>(obj) &&
+ if ( !::qt_cast<TQSplitter*>(obj) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
- WidgetFactory::layoutType( (QWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
- WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (QWidget*)obj, layout );
+ WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
+ WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout );
switch ( lay ) {
case WidgetFactory::HBox:
closeTag = makeIndent( indent ) + "</hbox>";
@@ -1382,9 +1382,9 @@ void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
}
- QObject *o = 0;
- for ( QPtrListIterator<QObject> it ( *l ); ( o = it.current() ); ++it )
- if ( !QString( o->name() ).startsWith( "qt_dead_widget_" ) )
+ TQObject *o = 0;
+ for ( TQPtrListIterator<TQObject> it ( *l ); ( o = it.current() ); ++it )
+ if ( !TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
saveObject( o, grid, ts, indent );
if ( !closeTag.isEmpty() ) {
indent--;
@@ -1392,10 +1392,10 @@ void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
}
}
-void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
+void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
{
- QStringList saved;
- QStringList changed;
+ TQStringList saved;
+ TQStringList changed;
changed = MetaDataBase::changedProperties( w );
if ( w->isWidgetType() ) {
if ( ::qt_cast<Spacer*>(w) ) {
@@ -1404,18 +1404,18 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
if ( !changed.contains( "geometry" ) )
changed << "geometry";
} else {
- QToolButton *tb = ::qt_cast<QToolButton*>(w);
+ TQToolButton *tb = ::qt_cast<TQToolButton*>(w);
if ( tb && !tb->iconSet().isNull() ) {
changed << "iconSet";
}
}
- } else if ( ::qt_cast<QLayout*>(w) ) {
- if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) ) > -1 )
+ } else if ( ::qt_cast<TQLayout*>(w) ) {
+ if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 )
changed << "spacing";
- if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) ) > -1 )
+ if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 )
changed << "margin";
- if ( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) ) != "Auto"
- && !MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) ).isEmpty() )
+ if ( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) != "Auto"
+ && !MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ).isEmpty() )
changed << "resizeMode";
}
@@ -1429,22 +1429,22 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
if ( changed.isEmpty() )
return;
- bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (QWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (QWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
+ WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
- QStrList lst = w->metaObject()->propertyNames( !::qt_cast<Spacer*>(w) );
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
- if ( changed.find( QString::fromLatin1( it.current() ) ) == changed.end() )
+ TQStrList lst = w->metaObject()->propertyNames( !::qt_cast<Spacer*>(w) );
+ for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() )
continue;
- if ( saved.find( QString::fromLatin1( it.current() ) ) != saved.end() )
+ if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() )
continue;
- saved << QString::fromLatin1( it.current() );
- const QMetaProperty* p = w->metaObject()->
+ saved << TQString::fromLatin1( it.current() );
+ const TQMetaProperty* p = w->metaObject()->
property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
- if ( ::qt_cast<QLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
- ( !( (QLabel*)w )->pixmap() || ( (QLabel*)w )->pixmap()->isNull() ) )
+ if ( ::qt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
+ ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue;
if ( ::qt_cast<MenuBarEditor*>(w) &&
( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
@@ -1460,22 +1460,22 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
ts << " stdset=\"0\"";
ts << ">" << endl;
indent++;
- if ( strcmp( it.current(), "resizeMode" ) == 0 && ::qt_cast<QLayout*>(w) ) {
- saveProperty( w, it.current(), "", QVariant::String, ts, indent );
+ if ( strcmp( it.current(), "resizeMode" ) == 0 && ::qt_cast<TQLayout*>(w) ) {
+ saveProperty( w, it.current(), "", TQVariant::String, ts, indent );
} else if ( p->isSetType() ) {
- saveSetProperty( w, it.current(), QVariant::nameToType( p->type() ), ts, indent );
+ saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent );
} else if ( p->isEnumType() ) {
- saveEnumProperty( w, it.current(), QVariant::nameToType( p->type() ), ts, indent );
+ saveEnumProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent );
} else {
- saveProperty( w, it.current(), w->property( p->name() ), QVariant::nameToType( p->type() ), ts, indent );
+ saveProperty( w, it.current(), w->property( p->name() ), TQVariant::nameToType( p->type() ), ts, indent );
}
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
}
if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) {
- QMap<QString, QVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
- for ( QMap<QString, QVariant>::Iterator fake = fakeProperties->begin();
+ TQMap<TQString, TQVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
+ for ( TQMap<TQString, TQVariant>::Iterator fake = fakeProperties->begin();
fake != fakeProperties->end(); ++fake ) {
if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) {
if ( w->inherits("CustomWidget") ) {
@@ -1494,11 +1494,11 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
}
}
-void Resource::saveSetProperty( QObject *w, const QString &name, QVariant::Type, QTextStream &ts, int indent )
+void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const QMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
- QStrList l( p->valueToKeys( w->property( name ).toInt() ) );
- QString v;
+ const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
+ TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
+ TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
v += l.at( i );
if ( i < l.count() - 1 )
@@ -1507,13 +1507,13 @@ void Resource::saveSetProperty( QObject *w, const QString &name, QVariant::Type,
ts << makeIndent( indent ) << "<set>" << v << "</set>" << endl;
}
-void Resource::saveEnumProperty( QObject *w, const QString &name, QVariant::Type, QTextStream &ts, int indent )
+void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const QMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
+ const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
-void Resource::saveProperty( QObject *w, const QString &name, const QVariant &value, QVariant::Type t, QTextStream &ts, int indent )
+void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent )
{
if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" ||
name == "layoutMargin" || name =="layoutSpacing" )
@@ -1521,13 +1521,13 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
int num;
uint unum;
double dob;
- QString comment;
- if ( w && formwindow->widgets()->find( (QWidget*)w ) || formwindow->actionList().find( (QAction*)w ) )
+ TQString comment;
+ if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) )
comment = MetaDataBase::propertyComment( w, name );
switch ( t ) {
- case QVariant::String:
+ case TQVariant::String:
if ( name == "resizeMode" ) {
- QString resmod = MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) );
+ TQString resmod = MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
if ( !resmod.isNull() && resmod != "Auto" ) {
ts << makeIndent( indent ) << "<enum>";
ts << resmod;
@@ -1540,100 +1540,100 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "<comment>" << entitize( comment ) << "</comment>" << endl;
}
break;
- case QVariant::CString:
+ case TQVariant::CString:
ts << makeIndent( indent ) << "<cstring>" << entitize( value.toCString() ).latin1() << "</cstring>" << endl;
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl;
break;
- case QVariant::Int:
- if ( ::qt_cast<QLayout*>(w) ) {
+ case TQVariant::Int:
+ if ( ::qt_cast<TQLayout*>(w) ) {
num = -1;
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) );
+ num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) );
+ num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
if ( num != -1 )
- ts << makeIndent( indent ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
} else {
num = value.toInt();
- ts << makeIndent( indent ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
}
break;
- case QVariant::Double:
+ case TQVariant::Double:
dob = value.toDouble();
- ts << makeIndent( indent ) << "<number>" << QString::number( dob ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( dob ) << "</number>" << endl;
break;
- case QVariant::KeySequence:
+ case TQVariant::KeySequence:
ts << makeIndent( indent ) << "<string>"
<< entitize(platformNeutralKeySequence(value.toKeySequence())) << "</string>" << endl;
break;
- case QVariant::UInt:
+ case TQVariant::UInt:
unum = value.toUInt();
- ts << makeIndent( indent ) << "<number>" << QString::number( unum ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( unum ) << "</number>" << endl;
break;
- case QVariant::Rect: {
- QVariant v( value );
+ case TQVariant::Rect: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<rect>" << endl;
indent++;
- ts << makeIndent( indent ) << "<x>" << QString::number( v.toRect().x() ) << "</x>" << endl;
- ts << makeIndent( indent ) << "<y>" << QString::number( v.toRect().y() ) << "</y>" << endl;
- ts << makeIndent( indent ) << "<width>" << QString::number( v.toRect().width() ) << "</width>" << endl;
- ts << makeIndent( indent ) << "<height>" << QString::number( v.toRect().height() ) << "</height>" << endl;
+ ts << makeIndent( indent ) << "<x>" << TQString::number( v.toRect().x() ) << "</x>" << endl;
+ ts << makeIndent( indent ) << "<y>" << TQString::number( v.toRect().y() ) << "</y>" << endl;
+ ts << makeIndent( indent ) << "<width>" << TQString::number( v.toRect().width() ) << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << TQString::number( v.toRect().height() ) << "</height>" << endl;
indent--;
ts << makeIndent( indent ) << "</rect>" << endl;
} break;
- case QVariant::Point: {
- QVariant v( value );
+ case TQVariant::Point: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<point>" << endl;
indent++;
- ts << makeIndent( indent ) << "<x>" << QString::number( v.toPoint().x() ) << "</x>" << endl;
- ts << makeIndent( indent ) << "<y>" << QString::number( v.toPoint().y() ) << "</y>" << endl;
+ ts << makeIndent( indent ) << "<x>" << TQString::number( v.toPoint().x() ) << "</x>" << endl;
+ ts << makeIndent( indent ) << "<y>" << TQString::number( v.toPoint().y() ) << "</y>" << endl;
indent--;
ts << makeIndent( indent ) << "</point>" << endl;
} break;
- case QVariant::Size: {
- QVariant v( value );
+ case TQVariant::Size: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<size>" << endl;
indent++;
- ts << makeIndent( indent ) << "<width>" << QString::number( v.toSize().width() ) << "</width>" << endl;
- ts << makeIndent( indent ) << "<height>" << QString::number( v.toSize().height() ) << "</height>" << endl;
+ ts << makeIndent( indent ) << "<width>" << TQString::number( v.toSize().width() ) << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << TQString::number( v.toSize().height() ) << "</height>" << endl;
indent--;
ts << makeIndent( indent ) << "</size>" << endl;
} break;
- case QVariant::Color: {
- QVariant v( value );
+ case TQVariant::Color: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<color>" << endl;
indent++;
saveColor( ts, indent, v.toColor() );
indent--;
ts << makeIndent( indent ) << "</color>" << endl;
} break;
- case QVariant::Font: {
- QVariant v( value );
+ case TQVariant::Font: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<font>" << endl;
- QFont f( qApp->font() );
- if ( w && w->isWidgetType() && ((QWidget*)w)->parentWidget() )
- f = ((QWidget*)w)->parentWidget()->font();
- QFont f2( v.toFont() );
+ TQFont f( qApp->font() );
+ if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() )
+ f = ((TQWidget*)w)->parentWidget()->font();
+ TQFont f2( v.toFont() );
indent++;
if ( f.family() != f2.family() )
ts << makeIndent( indent ) << "<family>" << f2.family() << "</family>" << endl;
if ( f.pointSize() != f2.pointSize() )
- ts << makeIndent( indent ) << "<pointsize>" << QString::number( f2.pointSize() ) << "</pointsize>" << endl;
+ ts << makeIndent( indent ) << "<pointsize>" << TQString::number( f2.pointSize() ) << "</pointsize>" << endl;
if ( f.bold() != f2.bold() )
- ts << makeIndent( indent ) << "<bold>" << QString::number( (int)f2.bold() ) << "</bold>" << endl;
+ ts << makeIndent( indent ) << "<bold>" << TQString::number( (int)f2.bold() ) << "</bold>" << endl;
if ( f.italic() != f2.italic() )
- ts << makeIndent( indent ) << "<italic>" << QString::number( (int)f2.italic() ) << "</italic>" << endl;
+ ts << makeIndent( indent ) << "<italic>" << TQString::number( (int)f2.italic() ) << "</italic>" << endl;
if ( f.underline() != f2.underline() )
- ts << makeIndent( indent ) << "<underline>" << QString::number( (int)f2.underline() ) << "</underline>" << endl;
+ ts << makeIndent( indent ) << "<underline>" << TQString::number( (int)f2.underline() ) << "</underline>" << endl;
if ( f.strikeOut() != f2.strikeOut() )
- ts << makeIndent( indent ) << "<strikeout>" << QString::number( (int)f2.strikeOut() ) << "</strikeout>" << endl;
+ ts << makeIndent( indent ) << "<strikeout>" << TQString::number( (int)f2.strikeOut() ) << "</strikeout>" << endl;
indent--;
ts << makeIndent( indent ) << "</font>" << endl;
} break;
- case QVariant::SizePolicy: {
- QSizePolicy sp( value.toSizePolicy() );
+ case TQVariant::SizePolicy: {
+ TQSizePolicy sp( value.toSizePolicy() );
ts << makeIndent( indent ) << "<sizepolicy>" << endl;
indent++;
ts << makeIndent( indent ) << "<hsizetype>" << (int)sp.horData() << "</hsizetype>" << endl;
@@ -1644,17 +1644,17 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</sizepolicy>" << endl;
break;
}
- case QVariant::Pixmap:
+ case TQVariant::Pixmap:
savePixmap( value.toPixmap(), ts, indent );
break;
- case QVariant::IconSet:
+ case TQVariant::IconSet:
savePixmap( value.toIconSet().pixmap(), ts, indent, "iconset" );
break;
- case QVariant::Image:
+ case TQVariant::Image:
ts << makeIndent( indent ) << "<image>" << saveInCollection( value.toImage() ) << "</image>" << endl;
break;
- case QVariant::Palette: {
- QPalette p( value.toPalette() );
+ case TQVariant::Palette: {
+ TQPalette p( value.toPalette() );
ts << makeIndent( indent ) << "<palette>" << endl;
indent++;
@@ -1679,11 +1679,11 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
indent--;
ts << makeIndent( indent ) << "</palette>" << endl;
} break;
- case QVariant::Cursor:
+ case TQVariant::Cursor:
ts << makeIndent( indent ) << "<cursor>" << value.toCursor().shape() << "</cursor>" << endl;
break;
- case QVariant::StringList: {
- QStringList lst = value.toStringList();
+ case TQVariant::StringList: {
+ TQStringList lst = value.toStringList();
uint i = 0;
ts << makeIndent( indent ) << "<stringlist>" << endl;
indent++;
@@ -1694,8 +1694,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
indent--;
ts << makeIndent( indent ) << "</stringlist>" << endl;
} break;
- case QVariant::Date: {
- QDate d = value.toDate();
+ case TQVariant::Date: {
+ TQDate d = value.toDate();
ts << makeIndent( indent ) << "<date>" << endl;
indent++;
ts << makeIndent( indent ) << "<year>" << d.year() << "</year>" << endl;
@@ -1705,8 +1705,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</date>" << endl;
break;
}
- case QVariant::Time: {
- QTime t = value.toTime();
+ case TQVariant::Time: {
+ TQTime t = value.toTime();
ts << makeIndent( indent ) << "<time>" << endl;
indent++;
ts << makeIndent( indent ) << "<hour>" << t.hour() << "</hour>" << endl;
@@ -1716,8 +1716,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</time>" << endl;
break;
}
- case QVariant::DateTime: {
- QDateTime dt = value.toDateTime();
+ case TQVariant::DateTime: {
+ TQDateTime dt = value.toDateTime();
ts << makeIndent( indent ) << "<datetime>" << endl;
indent++;
ts << makeIndent( indent ) << "<year>" << dt.date().year() << "</year>" << endl;
@@ -1735,33 +1735,33 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
}
}
-void Resource::saveColorGroup( QTextStream &ts, int indent, const QColorGroup &cg )
+void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg )
{
- for( int r = 0 ; r < QColorGroup::NColorRoles ; r++ ) {
+ for( int r = 0 ; r < TQColorGroup::NColorRoles ; r++ ) {
ts << makeIndent( indent ) << "<color>" << endl;
indent++;
- saveColor( ts, indent, cg.color( (QColorGroup::ColorRole)r ) );
+ saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) );
indent--;
ts << makeIndent( indent ) << "</color>" << endl;
- QPixmap* pm = cg.brush( (QColorGroup::ColorRole)r ).pixmap();
+ TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap();
if ( pm && !pm->isNull() )
savePixmap( *pm, ts, indent );
}
}
-void Resource::saveColor( QTextStream &ts, int indent, const QColor &c )
+void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c )
{
- ts << makeIndent( indent ) << "<red>" << QString::number( c.red() ) << "</red>" << endl;
- ts << makeIndent( indent ) << "<green>" << QString::number( c.green() ) << "</green>" << endl;
- ts << makeIndent( indent ) << "<blue>" << QString::number( c.blue() ) << "</blue>" << endl;
+ ts << makeIndent( indent ) << "<red>" << TQString::number( c.red() ) << "</red>" << endl;
+ ts << makeIndent( indent ) << "<green>" << TQString::number( c.green() ) << "</green>" << endl;
+ ts << makeIndent( indent ) << "<blue>" << TQString::number( c.blue() ) << "</blue>" << endl;
}
-QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* layout )
+TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout )
{
lastItem = 0;
- QDomElement n = e.firstChild().toElement();
- QWidget *w = 0; // the widget that got created
- QObject *obj = 0; // gets the properties
+ TQDomElement n = e.firstChild().toElement();
+ TQWidget *w = 0; // the widget that got created
+ TQObject *obj = 0; // gets the properties
int row = e.attribute( "row" ).toInt();
int col = e.attribute( "column" ).toInt();
@@ -1772,9 +1772,9 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
if ( colspan < 1 )
colspan = 1;
- QString className = e.attribute( "class", "QWidget" );
+ TQString className = e.attribute( "class", "TQWidget" );
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
- QString parentClassName = WidgetFactory::classNameOf( parent );
+ TQString parentClassName = WidgetFactory::classNameOf( parent );
bool isPlugin =
WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( parentClassName ) );
if ( isPlugin )
@@ -1784,7 +1784,7 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
if ( !className.isNull() ) {
obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE );
if ( !obj ) {
- QMessageBox::critical( MainWindow::self, i18n( "Loading File" ),
+ TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ),
i18n( "Error loading %1.\n"
"The widget %2 could not be created." ).
arg( currFileName ).arg( className ) );
@@ -1792,19 +1792,19 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
}
if ( !mainContainerSet ) {
if ( formwindow )
- formwindow->setMainContainer( (QWidget*)obj );
+ formwindow->setMainContainer( (TQWidget*)obj );
mainContainerSet = TRUE;
}
- w = (QWidget*)obj;
- if ( ::qt_cast<QMainWindow*>(w) )
- w = ( (QMainWindow*)w )->centralWidget();
+ w = (TQWidget*)obj;
+ if ( ::qt_cast<TQMainWindow*>(w) )
+ w = ( (TQMainWindow*)w )->centralWidget();
if ( layout ) {
switch ( WidgetFactory::layoutType( layout ) ) {
case WidgetFactory::HBox:
- ( (QHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)layout )->addWidget( w );
break;
case WidgetFactory::VBox:
- ( (QVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)layout )->addWidget( w );
break;
case WidgetFactory::Grid:
( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
@@ -1821,20 +1821,20 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
if ( w && formwindow ) {
if ( !parent ||
- ( !::qt_cast<QTabWidget*>(parent) &&
- !::qt_cast<QWidgetStack*>(parent) &&
- !::qt_cast<QToolBox*>(parent) &&
- !::qt_cast<QWizard*>(parent)
+ ( !::qt_cast<TQTabWidget*>(parent) &&
+ !::qt_cast<TQWidgetStack*>(parent) &&
+ !::qt_cast<TQToolBox*>(parent) &&
+ !::qt_cast<TQWizard*>(parent)
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
&& !isPlugin
#endif
) )
formwindow->insertWidget( w, pasting );
else if ( parent &&
- ( ::qt_cast<QTabWidget*>(parent) ||
- ::qt_cast<QWidgetStack*>(parent) ||
- ::qt_cast<QToolBox*>(parent) ||
- ::qt_cast<QWizard*>(parent)
+ ( ::qt_cast<TQTabWidget*>(parent) ||
+ ::qt_cast<TQWidgetStack*>(parent) ||
+ ::qt_cast<TQToolBox*>(parent) ||
+ ::qt_cast<TQWizard*>(parent)
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
|| isPlugin
#endif
@@ -1843,8 +1843,8 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
}
}
- QDomElement sizePolicyElement;
- QObject *sizePolicyObject = 0;
+ TQDomElement sizePolicyElement;
+ TQObject *sizePolicyObject = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "spacer" ) {
@@ -1875,20 +1875,20 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
setObjectProperty( obj, n.attribute( "name" ), n.firstChild().toElement() );
}
} else if ( n.tagName() == "attribute" && w ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
- if ( ::qt_cast<QTabWidget*>(parent) ) {
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
+ if ( ::qt_cast<TQTabWidget*>(parent) ) {
if ( attrib == "title" )
- ( (QTabWidget*)parent )->insertTab( w, v.toString() );
- } else if ( ::qt_cast<QWidgetStack*>(parent) ) {
+ ( (TQTabWidget*)parent )->insertTab( w, v.toString() );
+ } else if ( ::qt_cast<TQWidgetStack*>(parent) ) {
if ( attrib == "id" )
( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() );
- } else if ( ::qt_cast<QToolBox*>(parent) ) {
+ } else if ( ::qt_cast<TQToolBox*>(parent) ) {
if ( attrib == "label" )
- ( (QToolBox*)parent )->addItem( w, v.toString() );
- } else if ( ::qt_cast<QWizard*>(parent) ) {
+ ( (TQToolBox*)parent )->addItem( w, v.toString() );
+ } else if ( ::qt_cast<TQWizard*>(parent) ) {
if ( attrib == "title" )
- ( (QWizard*)parent )->addPage( w, v.toString() );
+ ( (TQWizard*)parent )->addPage( w, v.toString() );
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
} else if ( isPlugin ) {
if ( attrib == "label" ) {
@@ -1899,7 +1899,7 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 );
if ( iface2 ) {
iface2->insertPage( parentClassName,
- (QWidget*)parent, v.toString(), -1, w );
+ (TQWidget*)parent, v.toString(), -1, w );
iface2->release();
}
iface->release();
@@ -1929,22 +1929,22 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
return w;
}
-void Resource::createColumn( const QDomElement &e, QWidget *widget )
+void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
{
if ( !widget )
return;
- if ( ::qt_cast<QListView*>(widget) && e.tagName() == "column" ) {
- QListView *lv = (QListView*)widget;
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ if ( ::qt_cast<TQListView*>(widget) && e.tagName() == "column" ) {
+ TQListView *lv = (TQListView*)widget;
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = FALSE;
- QString txt;
+ TQString txt;
bool clickable = TRUE, resizable = TRUE;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -1968,24 +1968,24 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget )
lv->header()->setResizeEnabled( resizable, i );
}
#ifndef QT_NO_TABLE
- else if ( ::qt_cast<QTable*>(widget) ) {
- QTable *table = (QTable*)widget;
+ else if ( ::qt_cast<TQTable*>(widget) ) {
+ TQTable *table = (TQTable*)widget;
bool isRow;
if ( ( isRow = e.tagName() == "row" ) )
table->setNumRows( table->numRows() + 1 );
else
table->setNumCols( table->numCols() + 1 );
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = FALSE;
- QString txt;
- QString field;
- QMap<QString, QString> fieldMap = MetaDataBase::columnFields( table );
+ TQString txt;
+ TQString field;
+ TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table );
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -1999,7 +1999,7 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget )
}
int i = isRow ? table->numRows() - 1 : table->numCols() - 1;
- QHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader();
+ TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader();
if ( hasPixmap )
h->setLabel( i, pix, txt );
else
@@ -2011,14 +2011,14 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget )
#endif
}
-void Resource::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap )
+void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap )
{
- QDomElement n = e;
+ TQDomElement n = e;
hasPixmap = FALSE;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -2030,59 +2030,59 @@ void Resource::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool
}
}
-void Resource::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i )
+void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i )
{
if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) )
return;
- if ( ::qt_cast<QListBox*>(widget) || ::qt_cast<QComboBox*>(widget) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ if ( ::qt_cast<TQListBox*>(widget) || ::qt_cast<TQComboBox*>(widget) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = FALSE;
- QString txt;
+ TQString txt;
loadItem( n, pix, txt, hasPixmap );
- QListBox *lb = 0;
- if ( ::qt_cast<QListBox*>(widget) )
- lb = (QListBox*)widget;
+ TQListBox *lb = 0;
+ if ( ::qt_cast<TQListBox*>(widget) )
+ lb = (TQListBox*)widget;
else
- lb = ( (QComboBox*)widget)->listBox();
+ lb = ( (TQComboBox*)widget)->listBox();
if ( hasPixmap ) {
- new QListBoxPixmap( lb, pix, txt );
+ new TQListBoxPixmap( lb, pix, txt );
} else {
- new QListBoxText( lb, txt );
+ new TQListBoxText( lb, txt );
}
- } else if ( ::qt_cast<QIconView*>(widget) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ } else if ( ::qt_cast<TQIconView*>(widget) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = FALSE;
- QString txt;
+ TQString txt;
loadItem( n, pix, txt, hasPixmap );
- QIconView *iv = (QIconView*)widget;
+ TQIconView *iv = (TQIconView*)widget;
if ( hasPixmap )
- new QIconViewItem( iv, txt, pix );
+ new TQIconViewItem( iv, txt, pix );
else
- new QIconViewItem( iv, txt );
- } else if ( ::qt_cast<QListView*>(widget) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
- QValueList<QPixmap> pixmaps;
- QStringList textes;
- QListViewItem *item = 0;
- QListView *lv = (QListView*)widget;
+ new TQIconViewItem( iv, txt );
+ } else if ( ::qt_cast<TQListView*>(widget) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
+ TQValueList<TQPixmap> pixmaps;
+ TQStringList textes;
+ TQListViewItem *item = 0;
+ TQListView *lv = (TQListView*)widget;
if ( i )
- item = new QListViewItem( i, lastItem );
+ item = new TQListViewItem( i, lastItem );
else
- item = new QListViewItem( lv, lastItem );
+ item = new TQListViewItem( lv, lastItem );
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( attrib == "text" )
textes << v.toString();
else if ( attrib == "pixmap" ) {
- QString s = v.toString();
+ TQString s = v.toString();
if ( s.isEmpty() ) {
- pixmaps << QPixmap();
+ pixmaps << TQPixmap();
} else {
pix = loadPixmap( n.firstChild().toElement() );
pixmaps << pix;
@@ -2104,9 +2104,9 @@ void Resource::createItem( const QDomElement &e, QWidget *widget, QListViewItem
}
}
-QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout *layout, Qt::Orientation o )
+TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
int row = e.attribute( "row" ).toInt();
int col = e.attribute( "column" ).toInt();
int rowspan = e.attribute( "rowspan" ).toInt();
@@ -2129,8 +2129,8 @@ QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
if ( layout ) {
- if ( ::qt_cast<QBoxLayout*>(layout) )
- ( (QBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
+ if ( ::qt_cast<TQBoxLayout*>(layout) )
+ ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
else
( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
spacer->alignment() );
@@ -2141,11 +2141,11 @@ QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout
/*!
Attention: this function has to be in sync with Uic::setObjectProperty(). If you change one, change both.
*/
-void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomElement &e )
+void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
- const QMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE );
+ const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE );
- if ( !::qt_cast<QLayout*>(obj) ) {// no layouts in metadatabase... (RS)
+ if ( !::qt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
@@ -2154,16 +2154,16 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
MetaDataBase::setPropertyChanged( obj, prop, TRUE );
}
- QVariant defVarient;
+ TQVariant defVarient;
if ( e.tagName() == "font" ) {
- QFont f( qApp->font() );
- if ( obj->isWidgetType() && ( (QWidget*)obj )->parentWidget() )
- f = ( (QWidget*)obj )->parentWidget()->font();
- defVarient = QVariant( f );
+ TQFont f( qApp->font() );
+ if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
+ f = ( (TQWidget*)obj )->parentWidget()->font();
+ defVarient = TQVariant( f );
}
- QString comment;
- QVariant v( DomTool::elementToVariant( e, defVarient, comment ) );
+ TQString comment;
+ TQVariant v( DomTool::elementToVariant( e, defVarient, comment ) );
if ( !comment.isEmpty() ) {
MetaDataBase::addEntry( obj );
@@ -2171,24 +2171,24 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
if ( e.tagName() == "pixmap" ) {
- QPixmap pix = loadPixmap( e );
+ TQPixmap pix = loadPixmap( e );
if ( pix.isNull() )
return;
- v = QVariant( pix );
+ v = TQVariant( pix );
} else if ( e.tagName() == "iconset" ) {
- QPixmap pix = loadPixmap( e, "iconset" );
+ TQPixmap pix = loadPixmap( e, "iconset" );
if ( pix.isNull() )
return;
- v = QVariant( QIconSet( pix ) );
+ v = TQVariant( TQIconSet( pix ) );
} else if ( e.tagName() == "image" ) {
- v = QVariant( loadFromCollection( v.toString() ) );
+ v = TQVariant( loadFromCollection( v.toString() ) );
}
if ( !p ) {
MetaDataBase::setFakeProperty( obj, prop, v );
if ( obj->isWidgetType() ) {
if ( prop == "database" && obj != toplevel ) {
- QStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
+ TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
if ( lst.count() > 2 )
dbControls.insert( obj->name(), lst[ 2 ] );
else if ( lst.count() == 2 )
@@ -2199,10 +2199,10 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
if ( e.tagName() == "palette" ) {
- QDomElement n = e.firstChild().toElement();
- QPalette p;
+ TQDomElement n = e.firstChild().toElement();
+ TQPalette p;
while ( !n.isNull() ) {
- QColorGroup cg;
+ TQColorGroup cg;
if ( n.tagName() == "active" ) {
cg = loadColorGroup( n );
p.setActive( cg );
@@ -2215,25 +2215,25 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
n = n.nextSibling().toElement();
}
- v = QPalette( p );
+ v = TQPalette( p );
} else if ( e.tagName() == "enum" && p && p->isEnumType() && prop != "resizeMode" ) {
- QString key( v.toString() );
+ TQString key( v.toString() );
int vi = p->keyToValue( key );
if ( p->valueToKey( vi ) != key )
return; // ignore invalid properties
- v = QVariant( vi );
+ v = TQVariant( vi );
} else if ( e.tagName() == "set" && p && p->isSetType() ) {
- QString keys( v.toString() );
- QStringList lst = QStringList::split( '|', keys );
- QStrList l;
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ TQString keys( v.toString() );
+ TQStringList lst = TQStringList::split( '|', keys );
+ TQStrList l;
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
l.append( *it );
- v = QVariant( p->keysToValue( l ) );
+ v = TQVariant( p->keysToValue( l ) );
}
if ( prop == "caption" ) {
- QCString s1 = v.toCString();
- QString s2 = v.toString();
+ TQCString s1 = v.toCString();
+ TQString s2 = v.toString();
if ( !s2.isEmpty() )
formwindow->setCaption( s2 );
else if ( !s1.isEmpty() )
@@ -2241,7 +2241,7 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
if ( prop == "icon" ) {
formwindow->setIcon( v.toPixmap() );
- QString pmk = MetaDataBase::pixmapKey( formwindow, v.toPixmap().serialNumber() );
+ TQString pmk = MetaDataBase::pixmapKey( formwindow, v.toPixmap().serialNumber() );
MetaDataBase::setPixmapKey( formwindow,
formwindow->icon()->serialNumber(), pmk );
}
@@ -2258,23 +2258,23 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
}
- if ( ::qt_cast<QLayout*>(obj) ) {
+ if ( ::qt_cast<TQLayout*>(obj) ) {
if ( prop == "spacing" ) {
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
return;
} else if ( prop == "margin" ) {
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
return;
} else if ( e.tagName() == "enum" && prop == "resizeMode" ) {
- MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toString() );
+ MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toString() );
return;
}
}
if ( prop == "name" ) {
if ( pasting ) {
- QString s = v.toString();
- formwindow->unify( (QWidget*)obj, s, TRUE );
+ TQString s = v.toString();
+ formwindow->unify( (TQWidget*)obj, s, TRUE );
obj->setName( s );
return;
} else if ( formwindow && obj == formwindow->mainContainer() ) {
@@ -2283,21 +2283,21 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
if ( prop == "sizePolicy" ) {
- QSizePolicy sp = v.toSizePolicy();
- sp.setHeightForWidth( ( (QWidget*)obj )->sizePolicy().hasHeightForWidth() );
+ TQSizePolicy sp = v.toSizePolicy();
+ sp.setHeightForWidth( ( (TQWidget*)obj )->sizePolicy().hasHeightForWidth() );
}
if ( prop == "cursor" )
- MetaDataBase::setCursor( (QWidget*)obj, v.toCursor() );
+ MetaDataBase::setCursor( (TQWidget*)obj, v.toCursor() );
obj->setProperty( prop, v );
}
-QString Resource::saveInCollection( const QImage &img )
+TQString Resource::saveInCollection( const TQImage &img )
{
- QString imgName = "none";
- QValueList<Image>::Iterator it = images.begin();
+ TQString imgName = "none";
+ TQValueList<Image>::Iterator it = images.begin();
for ( ; it != images.end(); ++it ) {
if ( img == ( *it ).img ) {
imgName = ( *it ).name;
@@ -2307,7 +2307,7 @@ QString Resource::saveInCollection( const QImage &img )
if ( imgName == "none" ) {
Image i;
- imgName = "image" + QString::number( images.count() );
+ imgName = "image" + TQString::number( images.count() );
i.name = imgName;
i.img = img;
images.append( i );
@@ -2315,12 +2315,12 @@ QString Resource::saveInCollection( const QImage &img )
return imgName;
}
-void Resource::saveImageData( const QImage &img, QTextStream &ts, int indent )
+void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent )
{
- QByteArray ba;
- QBuffer buf( ba );
+ TQByteArray ba;
+ TQBuffer buf( ba );
buf.open( IO_WriteOnly | IO_Translate );
- QString format;
+ TQString format;
bool compress = FALSE;
if (img.hasAlphaBuffer()) {
format = "PNG";
@@ -2328,11 +2328,11 @@ void Resource::saveImageData( const QImage &img, QTextStream &ts, int indent )
format = img.depth() > 1 ? "XPM" : "XBM";
compress = TRUE;
}
- QImageIO iio( &buf, format );
+ TQImageIO iio( &buf, format );
iio.setImage( img );
iio.write();
buf.close();
- QByteArray bazip = ba;
+ TQByteArray bazip = ba;
int i = 0;
if (compress) {
bazip = qCompress( ba );
@@ -2352,12 +2352,12 @@ void Resource::saveImageData( const QImage &img, QTextStream &ts, int indent )
ts << "</data>" << endl;
}
-void Resource::saveImageCollection( QTextStream &ts, int indent )
+void Resource::saveImageCollection( TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<images>" << endl;
indent++;
- QValueList<Image>::Iterator it = images.begin();
+ TQValueList<Image>::Iterator it = images.begin();
for ( ; it != images.end(); ++it ) {
ts << makeIndent( indent ) << "<image name=\"" << (*it).name << "\">" << endl;
indent++;
@@ -2370,10 +2370,10 @@ void Resource::saveImageCollection( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</images>" << endl;
}
-static QImage loadImageData( QDomElement &n2 )
+static TQImage loadImageData( TQDomElement &n2 )
{
- QImage img;
- QString data = n2.firstChild().toText().data();
+ TQImage img;
+ TQString data = n2.firstChild().toText().data();
const int lengthOffset = 4;
int baSize = data.length() / 2 + lengthOffset;
uchar *ba = new uchar[ baSize ];
@@ -2392,7 +2392,7 @@ static QImage loadImageData( QDomElement &n2 )
r += l - 'a' + 10;
ba[ i ] = r;
}
- QString format = n2.attribute( "format", "PNG" );
+ TQString format = n2.attribute( "format", "PNG" );
if ( format == "XPM.GZ" || format == "XBM.GZ" ) {
ulong len = n2.attribute( "length" ).toULong();
if ( len < data.length() * 5 )
@@ -2403,7 +2403,7 @@ static QImage loadImageData( QDomElement &n2 )
ba[1] = ( len & 0x00ff0000 ) >> 16;
ba[2] = ( len & 0x0000ff00 ) >> 8;
ba[3] = ( len & 0x000000ff );
- QByteArray baunzip = qUncompress( ba, baSize );
+ TQByteArray baunzip = qUncompress( ba, baSize );
img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')) );
} else {
img.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format );
@@ -2412,14 +2412,14 @@ static QImage loadImageData( QDomElement &n2 )
return img;
}
-void Resource::loadImageCollection( const QDomElement &e )
+void Resource::loadImageCollection( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "image" ) {
Image img;
img.name = n.attribute( "name" );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "data" )
img.img = loadImageData( n2 );
@@ -2431,32 +2431,32 @@ void Resource::loadImageCollection( const QDomElement &e )
}
}
-QImage Resource::loadFromCollection( const QString &name )
+TQImage Resource::loadFromCollection( const TQString &name )
{
- QValueList<Image>::Iterator it = images.begin();
+ TQValueList<Image>::Iterator it = images.begin();
for ( ; it != images.end(); ++it ) {
if ( ( *it ).name == name )
return ( *it ).img;
}
- return QImage();
+ return TQImage();
}
-void Resource::saveConnections( QTextStream &ts, int indent )
+void Resource::saveConnections( TQTextStream &ts, int indent )
{
- QValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
+ TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
if ( connections.isEmpty() )
return;
ts << makeIndent( indent ) << "<connections>" << endl;
indent++;
- QValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
+ TQValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
for ( ; it != connections.end(); ++it ) {
MetaDataBase::Connection conn = *it;
- if ( ( knownNames.findIndex( QString( conn.sender->name() ) ) == -1 &&
+ if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 &&
qstrcmp( conn.sender->name(), "this" ) != 0 ) ||
- ( knownNames.findIndex( QString( conn.receiver->name() ) ) == -1 &&
+ ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 &&
qstrcmp( conn.receiver->name(), "this" ) != 0 ) )
continue;
- if ( formwindow->isMainContainer( (QWidget*)(*it).receiver ) &&
+ if ( formwindow->isMainContainer( (TQWidget*)(*it).receiver ) &&
!MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) )
continue;
@@ -2482,29 +2482,29 @@ void Resource::saveConnections( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</connection>" << endl;
}
- QString lang = formwindow->project()->language();
+ TQString lang = formwindow->project()->language();
indent--;
ts << makeIndent( indent ) << "</connections>" << endl;
}
-void Resource::loadConnections( const QDomElement &e )
+void Resource::loadConnections( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "connection" ) {
- QString lang = n.attribute( "language", "C++" );
- QDomElement n2 = n.firstChild().toElement();
+ TQString lang = n.attribute( "language", "C++" );
+ TQDomElement n2 = n.firstChild().toElement();
MetaDataBase::Connection conn;
while ( !n2.isNull() ) {
if ( n2.tagName() == "sender" ) {
conn.sender = 0;
- QString name = n2.firstChild().toText().data();
+ TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
conn.sender = toplevel;
} else {
if ( name == "this" )
name = toplevel->name();
- QObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, FALSE );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@@ -2518,11 +2518,11 @@ void Resource::loadConnections( const QDomElement &e )
conn.signal = n2.firstChild().toText().data();
} else if ( n2.tagName() == "receiver" ) {
conn.receiver = 0;
- QString name = n2.firstChild().toText().data();
+ TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
conn.receiver = toplevel;
} else {
- QObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, FALSE );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@@ -2574,12 +2574,12 @@ void Resource::loadConnections( const QDomElement &e )
}
}
-void Resource::saveCustomWidgets( QTextStream &ts, int indent )
+void Resource::saveCustomWidgets( TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<customwidgets>" << endl;
indent++;
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
if ( usedCustomWidgets.findIndex( w->className ) == -1 )
continue;
@@ -2606,16 +2606,16 @@ void Resource::saveCustomWidgets( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</sizepolicy>" << endl;
ts << makeIndent( indent ) << "<pixmap>" << saveInCollection( w->pixmap->convertToImage() ) << "</pixmap>" << endl;
if ( !w->lstSignals.isEmpty() ) {
- for ( QValueList<QCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
ts << makeIndent( indent ) << "<signal>" << entitize( *it ) << "</signal>" << endl;
}
if ( !w->lstSlots.isEmpty() ) {
- for ( QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
ts << makeIndent( indent ) << "<slot access=\"" << (*it).access << "\" specifier=\""
<< (*it).specifier << "\">" << entitize( (*it).function ) << "</slot>" << endl;
}
if ( !w->lstProperties.isEmpty() ) {
- for ( QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
ts << makeIndent( indent ) << "<property type=\"" << (*it).type << "\">" << entitize( (*it).property ) << "</property>" << endl;
}
indent--;
@@ -2627,25 +2627,25 @@ void Resource::saveCustomWidgets( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</customwidgets>" << endl;
}
-void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
+void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "customwidget" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget;
while ( !n2.isNull() ) {
if ( n2.tagName() == "class" ) {
w->className = n2.firstChild().toText().data();
} else if ( n2.tagName() == "header" ) {
w->includeFile = n2.firstChild().toText().data();
- QString s = n2.attribute( "location" );
+ TQString s = n2.attribute( "location" );
if ( s != "local" )
w->includePolicy = MetaDataBase::CustomWidget::Global;
else
w->includePolicy = MetaDataBase::CustomWidget::Local;
} else if ( n2.tagName() == "sizehint" ) {
- QDomElement n3 = n2.firstChild().toElement();
+ TQDomElement n3 = n2.firstChild().toElement();
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() );
@@ -2654,12 +2654,12 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
n3 = n3.nextSibling().toElement();
}
} else if ( n2.tagName() == "sizepolicy" ) {
- QDomElement n3 = n2.firstChild().toElement();
+ TQDomElement n3 = n2.firstChild().toElement();
while ( !n3.isNull() ) {
if ( n3.tagName() == "hordata" )
- w->sizePolicy.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ w->sizePolicy.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verdata" )
- w->sizePolicy.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ w->sizePolicy.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "horstretch" )
w->sizePolicy.setHorStretch( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verstretch" )
@@ -2667,12 +2667,12 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
n3 = n3.nextSibling().toElement();
}
} else if ( n2.tagName() == "pixmap" ) {
- QPixmap pix;
+ TQPixmap pix;
if ( r ) {
pix = r->loadPixmap( n2 );
} else {
- QDomElement n3 = n2.firstChild().toElement();
- QImage img;
+ TQDomElement n3 = n2.firstChild().toElement();
+ TQImage img;
while ( !n3.isNull() ) {
if ( n3.tagName() == "data" ) {
img = loadImageData( n3 );
@@ -2681,7 +2681,7 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
}
pix.convertFromImage( img );
}
- w->pixmap = new QPixmap( pix );
+ w->pixmap = new TQPixmap( pix );
} else if ( n2.tagName() == "signal" ) {
w->lstSignals.append( n2.firstChild().toText().data().latin1() );
} else if ( n2.tagName() == "container" ) {
@@ -2706,16 +2706,16 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r )
}
}
-void Resource::saveTabOrder( QTextStream &ts, int indent )
+void Resource::saveTabOrder( TQTextStream &ts, int indent )
{
- QWidgetList l = MetaDataBase::tabOrder( toplevel );
+ TQWidgetList l = MetaDataBase::tabOrder( toplevel );
if ( l.isEmpty() )
return;
ts << makeIndent( indent ) << "<tabstops>" << endl;
indent++;
- for ( QWidget *w = l.first(); w; w = l.next() ) {
+ for ( TQWidget *w = l.first(); w; w = l.next() ) {
if ( w->testWState( Qt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 )
continue;
ts << makeIndent( indent ) << "<tabstop>" << w->name() << "</tabstop>" << endl;
@@ -2725,20 +2725,20 @@ void Resource::saveTabOrder( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</tabstops>" << endl;
}
-void Resource::loadTabOrder( const QDomElement &e )
+void Resource::loadTabOrder( const TQDomElement &e )
{
- QWidget *last = 0;
- QDomElement n = e.firstChild().toElement();
- QWidgetList widgets;
+ TQWidget *last = 0;
+ TQDomElement n = e.firstChild().toElement();
+ TQWidgetList widgets;
while ( !n.isNull() ) {
if ( n.tagName() == "tabstop" ) {
- QString name = n.firstChild().toText().data();
+ TQString name = n.firstChild().toText().data();
if ( name.isEmpty() )
continue;
- QObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, FALSE );
if ( l ) {
if ( l->first() ) {
- QWidget *w = (QWidget*)l->first();
+ TQWidget *w = (TQWidget*)l->first();
widgets.append( w );
if ( last )
toplevel->setTabOrder( last, w );
@@ -2754,10 +2754,10 @@ void Resource::loadTabOrder( const QDomElement &e )
MetaDataBase::setTabOrder( toplevel, widgets );
}
-void Resource::saveMetaInfoBefore( QTextStream &ts, int indent )
+void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
{
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
- QString cn;
+ TQString cn;
if ( info.classNameChanged && !info.className.isEmpty() )
cn = info.className;
else
@@ -2769,24 +2769,24 @@ void Resource::saveMetaInfoBefore( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "<author>" << entitize( info.author ) << "</author>" << endl;
}
-void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
+void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
if ( !langIface || formwindow->project()->isCpp() ) {
- QValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
- QString extensionInclude;
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
+ TQString extensionInclude;
bool needExtensionInclude = FALSE;
if ( langIface &&
formwindow->formFile()->hasFormCode() &&
formwindow->formFile()->codeFileState() != FormFile::Deleted ) {
- extensionInclude = QFileInfo( currFileName ).fileName() + langIface->formCodeExtension();
+ extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension();
needExtensionInclude = TRUE;
}
if ( !includes.isEmpty() || needExtensionInclude ) {
ts << makeIndent( indent ) << "<includes>" << endl;
indent++;
- for ( QValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
ts << makeIndent( indent ) << "<include location=\"" << (*it).location
<< "\" impldecl=\"" << (*it).implDecl << "\">" << (*it).header << "</include>" << endl;
if ( needExtensionInclude )
@@ -2800,21 +2800,21 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</includes>" << endl;
}
- QStringList forwards = MetaDataBase::forwards( formwindow );
+ TQStringList forwards = MetaDataBase::forwards( formwindow );
if ( !forwards.isEmpty() ) {
ts << makeIndent( indent ) << "<forwards>" << endl;
indent++;
- for ( QStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 )
+ for ( TQStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 )
ts << makeIndent( indent ) << "<forward>" << entitize( *it2 ) << "</forward>" << endl;
indent--;
ts << makeIndent( indent ) << "</forwards>" << endl;
}
- QValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formwindow );
+ TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formwindow );
if ( !varLst.isEmpty() ) {
ts << makeIndent( indent ) << "<variables>" << endl;
indent++;
- QValueList<MetaDataBase::Variable>::Iterator it = varLst.begin();
+ TQValueList<MetaDataBase::Variable>::Iterator it = varLst.begin();
for ( ; it != varLst.end(); ++it ) {
ts << makeIndent( indent ) << "<variable";
if ( (*it).varAccess != "protected" )
@@ -2825,22 +2825,22 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</variables>" << endl;
}
- QStringList sigs = MetaDataBase::signalList( formwindow );
+ TQStringList sigs = MetaDataBase::signalList( formwindow );
if ( !sigs.isEmpty() ) {
ts << makeIndent( indent ) << "<signals>" << endl;
indent++;
- for ( QStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 )
+ for ( TQStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 )
ts << makeIndent( indent ) << "<signal>" << entitize( *it3 ) << "</signal>" << endl;
indent--;
ts << makeIndent( indent ) << "</signals>" << endl;
}
- QValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( formwindow );
if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl;
indent++;
- QString lang = formwindow->project()->language();
- QValueList<MetaDataBase::Function>::Iterator it = slotList.begin();
+ TQString lang = formwindow->project()->language();
+ TQValueList<MetaDataBase::Function>::Iterator it = slotList.begin();
for ( ; it != slotList.end(); ++it ) {
MetaDataBase::Function function = *it;
ts << makeIndent( indent ) << "<slot";
@@ -2858,12 +2858,12 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</slots>" << endl;
}
- QValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE );
if ( !functionList.isEmpty() ) {
ts << makeIndent( indent ) << "<functions>" << endl;
indent++;
- QString lang = formwindow->project()->language();
- QValueList<MetaDataBase::Function>::Iterator it = functionList.begin();
+ TQString lang = formwindow->project()->language();
+ TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin();
for ( ; it != functionList.end(); ++it ) {
MetaDataBase::Function function = *it;
ts << makeIndent( indent ) << "<function";
@@ -2894,60 +2894,60 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing()
<< "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl;
if ( formwindow->hasLayoutFunctions() ) {
- QString s = "";
- QString m = "";
+ TQString s = "";
+ TQString m = "";
if ( !formwindow->spacingFunction().isEmpty() )
- s = QString( " spacing=\"%1\"" ).arg( formwindow->spacingFunction() );
+ s = TQString( " spacing=\"%1\"" ).arg( formwindow->spacingFunction() );
if ( !formwindow->marginFunction().isEmpty() )
- m = QString( " margin=\"%1\"" ).arg( formwindow->marginFunction() );
+ m = TQString( " margin=\"%1\"" ).arg( formwindow->marginFunction() );
ts << makeIndent( indent ) << "<layoutfunctions" << s << m << "/>" << endl;
}
}
}
-void Resource::saveIncludeHints( QTextStream &ts, int indent )
+void Resource::saveIncludeHints( TQTextStream &ts, int indent )
{
if ( includeHints.isEmpty() )
return;
ts << makeIndent( indent ) << "<includehints>" << endl;
indent++;
- for ( QStringList::Iterator it = includeHints.begin(); it != includeHints.end(); ++it )
+ for ( TQStringList::Iterator it = includeHints.begin(); it != includeHints.end(); ++it )
ts << makeIndent( indent ) << "<includehint>" << *it << "</includehint>" << endl;
indent--;
ts << makeIndent( indent ) << "</includehints>" << endl;
}
-QColorGroup Resource::loadColorGroup( const QDomElement &e )
+TQColorGroup Resource::loadColorGroup( const TQDomElement &e )
{
- QColorGroup cg;
+ TQColorGroup cg;
int r = -1;
- QDomElement n = e.firstChild().toElement();
- QColor col;
+ TQDomElement n = e.firstChild().toElement();
+ TQColor col;
while ( !n.isNull() ) {
if ( n.tagName() == "color" ) {
r++;
- cg.setColor( (QColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
+ cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
} else if ( n.tagName() == "pixmap" ) {
- QPixmap pix = loadPixmap( n );
- cg.setBrush( (QColorGroup::ColorRole)r, QBrush( col, pix ) );
+ TQPixmap pix = loadPixmap( n );
+ cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) );
}
n = n.nextSibling().toElement();
}
return cg;
}
-void Resource::saveChildActions( QAction *a, QTextStream &ts, int indent )
+void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent )
{
if ( !a->children() )
return;
- QObjectListIt it( *a->children() );
+ TQObjectListIt it( *a->children() );
while ( it.current() ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
- if ( !::qt_cast<QAction*>(o) )
+ if ( !::qt_cast<TQAction*>(o) )
continue;
- QAction *ac = (QAction*)o;
- bool isGroup = ::qt_cast<QActionGroup*>(ac);
+ TQAction *ac = (TQAction*)o;
+ bool isGroup = ::qt_cast<TQActionGroup*>(ac);
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2967,16 +2967,16 @@ void Resource::saveChildActions( QAction *a, QTextStream &ts, int indent )
}
}
-void Resource::saveActions( const QPtrList<QAction> &actions, QTextStream &ts, int indent )
+void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts, int indent )
{
if ( actions.isEmpty() )
return;
ts << makeIndent( indent ) << "<actions>" << endl;
indent++;
- QPtrListIterator<QAction> it( actions );
+ TQPtrListIterator<TQAction> it( actions );
while ( it.current() ) {
- QAction *a = it.current();
- bool isGroup = ::qt_cast<QActionGroup*>(a);
+ TQAction *a = it.current();
+ bool isGroup = ::qt_cast<TQActionGroup*>(a);
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2999,42 +2999,42 @@ void Resource::saveActions( const QPtrList<QAction> &actions, QTextStream &ts, i
ts << makeIndent( indent ) << "</actions>" << endl;
}
-void Resource::loadChildAction( QObject *parent, const QDomElement &e )
+void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
{
- QDomElement n = e;
- QAction *a = 0;
+ TQDomElement n = e;
+ TQAction *a = 0;
if ( n.tagName() == "action" ) {
a = new QDesignerAction( parent );
MetaDataBase::addEntry( a );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE;
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
- QDomElement n3(n2); // don't modify n2
- QString prop = n3.attribute( "name" );
+ TQDomElement n3(n2); // don't modify n2
+ TQString prop = n3.attribute( "name" );
if (prop == "menuText")
hasMenuText = TRUE;
- QDomElement value(n3.firstChild().toElement());
+ TQDomElement value(n3.firstChild().toElement());
setObjectProperty( a, prop, value );
if (!hasMenuText && uiFileVersion < "3.3" && prop == "text")
setObjectProperty( a, "menuText", value );
}
n2 = n2.nextSibling().toElement();
}
- if ( !::qt_cast<QAction*>(parent) )
+ if ( !::qt_cast<TQAction*>(parent) )
formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) {
a = new QDesignerActionGroup( parent );
MetaDataBase::addEntry( a );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE;
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
- QDomElement n3(n2); // don't modify n2
- QString prop = n3.attribute( "name" );
+ TQDomElement n3(n2); // don't modify n2
+ TQString prop = n3.attribute( "name" );
if (prop == "menuText")
hasMenuText = TRUE;
- QDomElement value = n3.firstChild().toElement();
+ TQDomElement value = n3.firstChild().toElement();
setObjectProperty( a, prop, value );
if (!hasMenuText && uiFileVersion < "3.3" && prop == "text")
setObjectProperty( a, "menuText", value );
@@ -3044,14 +3044,14 @@ void Resource::loadChildAction( QObject *parent, const QDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !::qt_cast<QAction*>(parent) )
+ if ( !::qt_cast<TQAction*>(parent) )
formwindow->actionList().append( a );
}
}
-void Resource::loadActions( const QDomElement &e )
+void Resource::loadActions( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
loadChildAction( formwindow, n );
@@ -3062,35 +3062,35 @@ void Resource::loadActions( const QDomElement &e )
}
}
-void Resource::saveToolBars( QMainWindow *mw, QTextStream &ts, int indent )
+void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<toolbars>" << endl;
indent++;
- QPtrList<QToolBar> tbList;
+ TQPtrList<TQToolBar> tbList;
for ( int i = 0; i <= (int)Qt::DockMinimized; ++i ) {
tbList = mw->toolBars( (Qt::Dock)i );
if ( tbList.isEmpty() )
continue;
- for ( QToolBar *tb = tbList.first(); tb; tb = tbList.next() ) {
+ for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) {
if ( tb->isHidden() )
continue;
ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++;
saveObjectProperties( tb, ts, indent );
- QPtrList<QAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( ::qt_cast<QSeparatorAction*>(a) ) {
ts << makeIndent( indent ) << "<separator/>" << endl;
} else {
if ( ::qt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) {
- QWidget *w = ( (QDesignerAction*)a )->widget();
+ TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( w ) << "\">" << endl;
indent++;
const char *className = WidgetFactory::classNameOf( w );
if ( w->isA( "CustomWidget" ) )
- usedCustomWidgets << QString( className );
+ usedCustomWidgets << TQString( className );
if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), w ) )
saveItems( w, ts, indent );
saveObjectProperties( w, ts, indent );
@@ -3109,7 +3109,7 @@ void Resource::saveToolBars( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</toolbars>" << endl;
}
-void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
+void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
{
MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
if ( !mb )
@@ -3138,10 +3138,10 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</menubar>" << endl;
}
-void Resource::savePopupMenu( PopupMenuEditor *pm, QMainWindow *mw, QTextStream &ts, int indent )
+void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent )
{
for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) {
- QAction *a = i->action();
+ TQAction *a = i->action();
if ( ::qt_cast<QSeparatorAction*>(a) )
ts << makeIndent( indent ) << "<separator/>" << endl;
else if ( ::qt_cast<QDesignerAction*>(a) )
@@ -3150,7 +3150,7 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, QMainWindow *mw, QTextStream
ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl;
PopupMenuEditor *s = i->subMenu();
if ( s && s->count() ) {
- QString n = s->name();
+ TQString n = s->name();
ts << makeIndent( indent ) << "<item text=\"" << entitize( a->menuText() )
<< "\" name=\"" << entitize( n )
<< "\" accel=\"" << entitize( a->accel() )
@@ -3163,29 +3163,29 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, QMainWindow *mw, QTextStream
}
}
-void Resource::loadToolBars( const QDomElement &e )
+void Resource::loadToolBars( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMainWindow *mw = ( (QMainWindow*)formwindow->mainContainer() );
+ TQDomElement n = e.firstChild().toElement();
+ TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
QDesignerToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
tb = new QDesignerToolBar( mw, dock );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
- QAction *a = formwindow->findAction( n2.attribute( "name" ) );
+ TQAction *a = formwindow->findAction( n2.attribute( "name" ) );
if ( a ) {
a->addTo( tb );
tb->addAction( a );
}
} else if ( n2.tagName() == "separator" ) {
- QAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
a->addTo( tb );
tb->addAction( a );
} else if ( n2.tagName() == "widget" ) {
- QWidget *w = (QWidget*)createObject( n2, tb );
+ TQWidget *w = (TQWidget*)createObject( n2, tb );
QDesignerAction *a = new QDesignerAction( w, tb );
a->addTo( tb );
tb->addAction( a );
@@ -3200,10 +3200,10 @@ void Resource::loadToolBars( const QDomElement &e )
}
}
-void Resource::loadMenuBar( const QDomElement &e )
+void Resource::loadMenuBar( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMainWindow *mw = (QMainWindow*)formwindow->mainContainer();
+ TQDomElement n = e.firstChild().toElement();
+ TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer();
MenuBarEditor *mb = new MenuBarEditor( formwindow, mw );
MetaDataBase::addEntry( mb );
while ( !n.isNull() ) {
@@ -3222,11 +3222,11 @@ void Resource::loadMenuBar( const QDomElement &e )
}
}
-void Resource::loadPopupMenu( PopupMenuEditor *p, const QDomElement &e )
+void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
{
MetaDataBase::addEntry( p );
- QDomElement n = e.firstChild().toElement();
- QAction *a = 0;
+ TQDomElement n = e.firstChild().toElement();
+ TQAction *a = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "action" || n.tagName() == "actiongroup") {
a = formwindow->findAction( n.attribute( "name" ) );
@@ -3236,7 +3236,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const QDomElement &e )
if ( n.tagName() == "item" ) {
PopupMenuEditorItem *i = p->at( p->find( a ) );
if ( i ) {
- QString name = n.attribute( "name" );
+ TQString name = n.attribute( "name" );
formwindow->unify( i, name, TRUE );
i->setName( name );
MetaDataBase::addEntry( i );
@@ -3252,7 +3252,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const QDomElement &e )
bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface*/ )
{
- QString lang = formfile->project()->language();
+ TQString lang = formfile->project()->language();
if ( formfile->hasTempFileName() ||
formfile->code().isEmpty() ||
!formfile->hasFormCode() ||
@@ -3262,21 +3262,21 @@ bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface
formfile->code() );
}
-void Resource::loadExtraSource( FormFile *formfile, const QString &currFileName,
+void Resource::loadExtraSource( FormFile *formfile, const TQString &currFileName,
LanguageInterface *langIface, bool hasFunctions )
{
- QString lang = "Qt Script";
+ TQString lang = "Qt Script";
if ( MainWindow::self )
lang = MainWindow::self->currProject()->language();
LanguageInterface *iface = langIface;
if ( hasFunctions || !iface )
return;
- QValueList<LanguageInterface::Function> functions;
- QStringList forwards;
- QStringList includesImpl;
- QStringList includesDecl;
- QStringList vars;
- QValueList<LanguageInterface::Connection> connections;
+ TQValueList<LanguageInterface::Function> functions;
+ TQStringList forwards;
+ TQStringList includesImpl;
+ TQStringList includesDecl;
+ TQStringList vars;
+ TQValueList<LanguageInterface::Connection> connections;
iface->loadFormCode( formfile->formName(),
currFileName + iface->formCodeExtension(),
@@ -3284,10 +3284,10 @@ void Resource::loadExtraSource( FormFile *formfile, const QString &currFileName,
vars,
connections );
- QFile f( formfile->project()->makeAbsolute( formfile->codeFile() ) );
- QString code;
+ TQFile f( formfile->project()->makeAbsolute( formfile->codeFile() ) );
+ TQString code;
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
code = ts.read();
}
formfile->setCode( code );
@@ -3295,31 +3295,31 @@ void Resource::loadExtraSource( FormFile *formfile, const QString &currFileName,
if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() )
MetaDataBase::setupConnections( formfile, connections );
- for ( QValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
+ for ( TQValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
fit != functions.end(); ++fit ) {
if ( MetaDataBase::hasFunction( formfile->formWindow() ?
- (QObject*)formfile->formWindow() :
- (QObject*)formfile,
+ (TQObject*)formfile->formWindow() :
+ (TQObject*)formfile,
(*fit).name.latin1() ) ) {
- QString access = (*fit).access;
+ TQString access = (*fit).access;
if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() )
MetaDataBase::changeFunction( formfile->formWindow() ?
- (QObject*)formfile->formWindow() :
- (QObject*)formfile,
+ (TQObject*)formfile->formWindow() :
+ (TQObject*)formfile,
(*fit).name,
(*fit).name,
- QString::null );
+ TQString::null );
} else {
- QString access = (*fit).access;
+ TQString access = (*fit).access;
if ( access.isEmpty() )
access = "protected";
- QString type = "function";
+ TQString type = "function";
if ( (*fit).returnType == "void" )
type = "slot";
MetaDataBase::addFunction( formfile->formWindow() ?
- (QObject*)formfile->formWindow() :
- (QObject*)formfile,
+ (TQObject*)formfile->formWindow() :
+ (TQObject*)formfile,
(*fit).name.latin1(), "virtual", (*fit).access,
type, lang, (*fit).returnType );
}
diff --git a/kdevdesigner/designer/resource.h b/kdevdesigner/designer/resource.h
index abf21cc2..aa0cf295 100644
--- a/kdevdesigner/designer/resource.h
+++ b/kdevdesigner/designer/resource.h
@@ -27,11 +27,11 @@
#ifndef RESOURCE_H
#define RESOURCE_H
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
-#include <qimage.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
+#include <tqimage.h>
#include "actiondnd.h"
#include "metadatabase.h"
@@ -56,8 +56,8 @@ class Resource
{
public:
struct Image {
- QImage img;
- QString name;
+ TQImage img;
+ TQString name;
bool operator==( const Image &i ) const {
return ( i.name == name &&
i.img == img );
@@ -69,97 +69,97 @@ public:
~Resource();
void setWidget( FormWindow *w );
- QWidget *widget() const;
+ TQWidget *widget() const;
bool load( FormFile *ff, Project *defProject = 0 );
- bool load( FormFile *ff, QIODevice*, Project *defProject = 0 );
- QString copy();
+ bool load( FormFile *ff, TQIODevice*, Project *defProject = 0 );
+ TQString copy();
- bool save( const QString& filename, bool formCodeOnly = FALSE);
- bool save( QIODevice* );
- void paste( const QString &cb, QWidget *parent );
+ bool save( const TQString& filename, bool formCodeOnly = FALSE);
+ bool save( TQIODevice* );
+ void paste( const TQString &cb, TQWidget *parent );
- static void saveImageData( const QImage &img, QTextStream &ts, int indent );
- static void loadCustomWidgets( const QDomElement &e, Resource *r );
- static void loadExtraSource( FormFile *formfile, const QString &currFileName,
+ static void saveImageData( const TQImage &img, TQTextStream &ts, int indent );
+ static void loadCustomWidgets( const TQDomElement &e, Resource *r );
+ static void loadExtraSource( FormFile *formfile, const TQString &currFileName,
LanguageInterface *langIface, bool hasFunctions );
static bool saveFormCode( FormFile *formfile, LanguageInterface *langIface );
private:
- void saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream &ts, int indent );
- void saveChildrenOf( QObject* obj, QTextStream &ts, int indent );
- void saveObjectProperties( QObject *w, QTextStream &ts, int indent );
- void saveSetProperty( QObject *w, const QString &name, QVariant::Type t, QTextStream &ts, int indent );
- void saveEnumProperty( QObject *w, const QString &name, QVariant::Type t, QTextStream &ts, int indent );
- void saveProperty( QObject *w, const QString &name, const QVariant &value, QVariant::Type t, QTextStream &ts, int indent );
- void saveProperty( const QVariant &value, QTextStream &ts, int indent );
- void saveItems( QObject *obj, QTextStream &ts, int indent );
- void saveItem( const QStringList &text, const QPtrList<QPixmap> &pixmaps, QTextStream &ts, int indent );
- void saveItem( QListViewItem *i, QTextStream &ts, int indent );
- void saveConnections( QTextStream &ts, int indent );
- void saveCustomWidgets( QTextStream &ts, int indent );
- void saveTabOrder( QTextStream &ts, int indent );
- void saveColorGroup( QTextStream &ts, int indent, const QColorGroup &cg );
- void saveColor( QTextStream &ts, int indent, const QColor &c );
- void saveMetaInfoBefore( QTextStream &ts, int indent );
- void saveMetaInfoAfter( QTextStream &ts, int indent );
- void saveIncludeHints( QTextStream &ts, int indent );
- void savePixmap( const QPixmap &p, QTextStream &ts, int indent, const QString &tagname = "pixmap" );
- void saveActions( const QPtrList<QAction> &actions, QTextStream &ts, int indent );
- void saveChildActions( QAction *a, QTextStream &ts, int indent );
- void saveToolBars( QMainWindow *mw, QTextStream &ts, int indent );
- void saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent );
- void savePopupMenu( PopupMenuEditor *pm, QMainWindow *mw, QTextStream &ts, int indent );
-
- QObject *createObject( const QDomElement &e, QWidget *parent, QLayout* layout = 0 );
- QWidget *createSpacer( const QDomElement &e, QWidget *parent, QLayout *layout, Qt::Orientation o );
- void createItem( const QDomElement &e, QWidget *widget, QListViewItem *i = 0 );
- void createColumn( const QDomElement &e, QWidget *widget );
- void setObjectProperty( QObject* widget, const QString &prop, const QDomElement &e);
- QString saveInCollection( const QImage &img );
- QString saveInCollection( const QPixmap &pix ) { return saveInCollection( pix.convertToImage() ); }
- QImage loadFromCollection( const QString &name );
- void saveImageCollection( QTextStream &ts, int indent );
- void loadImageCollection( const QDomElement &e );
- void loadConnections( const QDomElement &e );
- void loadTabOrder( const QDomElement &e );
- void loadItem( const QDomElement &n, QPixmap &pix, QString &txt, bool &hasPixmap );
- void loadActions( const QDomElement &n );
- void loadChildAction( QObject *parent, const QDomElement &e );
- void loadToolBars( const QDomElement &n );
- void loadMenuBar( const QDomElement &n );
- void loadPopupMenu( PopupMenuEditor *pm, const QDomElement &e );
- QColorGroup loadColorGroup( const QDomElement &e );
- QPixmap loadPixmap( const QDomElement &e, const QString &tagname = "pixmap" );
+ void saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent );
+ void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent );
+ void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent );
+ void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent );
+ void saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent );
+ void saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent );
+ void saveProperty( const TQVariant &value, TQTextStream &ts, int indent );
+ void saveItems( TQObject *obj, TQTextStream &ts, int indent );
+ void saveItem( const TQStringList &text, const TQPtrList<TQPixmap> &pixmaps, TQTextStream &ts, int indent );
+ void saveItem( TQListViewItem *i, TQTextStream &ts, int indent );
+ void saveConnections( TQTextStream &ts, int indent );
+ void saveCustomWidgets( TQTextStream &ts, int indent );
+ void saveTabOrder( TQTextStream &ts, int indent );
+ void saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg );
+ void saveColor( TQTextStream &ts, int indent, const TQColor &c );
+ void saveMetaInfoBefore( TQTextStream &ts, int indent );
+ void saveMetaInfoAfter( TQTextStream &ts, int indent );
+ void saveIncludeHints( TQTextStream &ts, int indent );
+ void savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname = "pixmap" );
+ void saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts, int indent );
+ void saveChildActions( TQAction *a, TQTextStream &ts, int indent );
+ void saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent );
+ void saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent );
+ void savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent );
+
+ TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 );
+ TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o );
+ void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
+ void createColumn( const TQDomElement &e, TQWidget *widget );
+ void setObjectProperty( TQObject* widget, const TQString &prop, const TQDomElement &e);
+ TQString saveInCollection( const TQImage &img );
+ TQString saveInCollection( const TQPixmap &pix ) { return saveInCollection( pix.convertToImage() ); }
+ TQImage loadFromCollection( const TQString &name );
+ void saveImageCollection( TQTextStream &ts, int indent );
+ void loadImageCollection( const TQDomElement &e );
+ void loadConnections( const TQDomElement &e );
+ void loadTabOrder( const TQDomElement &e );
+ void loadItem( const TQDomElement &n, TQPixmap &pix, TQString &txt, bool &hasPixmap );
+ void loadActions( const TQDomElement &n );
+ void loadChildAction( TQObject *parent, const TQDomElement &e );
+ void loadToolBars( const TQDomElement &n );
+ void loadMenuBar( const TQDomElement &n );
+ void loadPopupMenu( PopupMenuEditor *pm, const TQDomElement &e );
+ TQColorGroup loadColorGroup( const TQDomElement &e );
+ TQPixmap loadPixmap( const TQDomElement &e, const TQString &tagname = "pixmap" );
private:
MainWindow *mainwindow;
FormWindow *formwindow;
- QWidget* toplevel;
- QValueList<Image> images;
+ TQWidget* toplevel;
+ TQValueList<Image> images;
bool copying, pasting;
bool mainContainerSet;
- QStringList knownNames;
- QStringList usedCustomWidgets;
- QListViewItem *lastItem;
-
- QValueList<MetaDataBase::Include> metaIncludes;
- QValueList<MetaDataBase::Variable> metaVariables;
- QStringList metaForwards;
- QStringList metaSignals;
+ TQStringList knownNames;
+ TQStringList usedCustomWidgets;
+ TQListViewItem *lastItem;
+
+ TQValueList<MetaDataBase::Include> metaIncludes;
+ TQValueList<MetaDataBase::Variable> metaVariables;
+ TQStringList metaForwards;
+ TQStringList metaSignals;
MetaDataBase::MetaInfo metaInfo;
- QMap<QString, QString> dbControls;
- QMap<QString, QStringList> dbTables;
- QMap<QString, QWidget*> widgets;
- QString exportMacro;
+ TQMap<TQString, TQString> dbControls;
+ TQMap<TQString, TQStringList> dbTables;
+ TQMap<TQString, TQWidget*> widgets;
+ TQString exportMacro;
bool hadGeometry;
- QMap<QString, QValueList<MetaDataBase::Connection> > langConnections;
- QString currFileName;
+ TQMap<TQString, TQValueList<MetaDataBase::Connection> > langConnections;
+ TQString currFileName;
LanguageInterface *langIface;
bool hasFunctions;
- QStringList includeHints;
+ TQStringList includeHints;
- QString uiFileVersion;
+ TQString uiFileVersion;
};
#endif
diff --git a/kdevdesigner/designer/richtextfontdialog.ui.h b/kdevdesigner/designer/richtextfontdialog.ui.h
index 8a3dd4c8..d270b7d9 100644
--- a/kdevdesigner/designer/richtextfontdialog.ui.h
+++ b/kdevdesigner/designer/richtextfontdialog.ui.h
@@ -5,12 +5,12 @@
** update this file, preserving your code. Create an init() slot in place of
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
-#include <qcolordialog.h>
-#include <qfontdatabase.h>
+#include <tqcolordialog.h>
+#include <tqfontdatabase.h>
void RichTextFontDialog::init()
{
- QFontDatabase *db = new QFontDatabase();
+ TQFontDatabase *db = new TQFontDatabase();
fontCombo->insertStringList( db->families() );
}
@@ -33,17 +33,17 @@ void RichTextFontDialog::reject()
done( Rejected );
}
-QString RichTextFontDialog::getSize()
+TQString RichTextFontDialog::getSize()
{
return size;
}
-QString RichTextFontDialog::getColor()
+TQString RichTextFontDialog::getColor()
{
return color.name();
}
-QString RichTextFontDialog::getFont()
+TQString RichTextFontDialog::getFont()
{
return font;
}
diff --git a/kdevdesigner/designer/sizehandle.cpp b/kdevdesigner/designer/sizehandle.cpp
index a63a3404..eef86747 100644
--- a/kdevdesigner/designer/sizehandle.cpp
+++ b/kdevdesigner/designer/sizehandle.cpp
@@ -24,19 +24,19 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "sizehandle.h"
#include "formwindow.h"
#include "widgetfactory.h"
-#include <qwidget.h>
-#include <qapplication.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
#include <klocale.h>
SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s )
- : QWidget( parent )
+ : TQWidget( parent )
{
active = TRUE;
setBackgroundMode( active ? PaletteText : PaletteDark );
@@ -91,37 +91,37 @@ void SizeHandle::setActive( bool a )
updateCursor();
}
-void SizeHandle::setWidget( QWidget *w )
+void SizeHandle::setWidget( TQWidget *w )
{
widget = w;
}
-void SizeHandle::paintEvent( QPaintEvent * )
+void SizeHandle::paintEvent( TQPaintEvent * )
{
if ( ( (FormWindow*)parentWidget() )->currentWidget() != widget )
return;
- QPainter p( this );
+ TQPainter p( this );
p.setPen( blue );
p.drawRect( 0, 0, width(), height() );
}
-void SizeHandle::mousePressEvent( QMouseEvent *e )
+void SizeHandle::mousePressEvent( TQMouseEvent *e )
{
if ( !widget || e->button() != LeftButton || !active )
return;
oldPressPos = e->pos();
- geom = origGeom = QRect( widget->pos(), widget->size() );
+ geom = origGeom = TQRect( widget->pos(), widget->size() );
}
-void SizeHandle::mouseMoveEvent( QMouseEvent *e )
+void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
{
if ( !widget || ( e->state() & LeftButton ) != LeftButton || !active )
return;
- QPoint rp = mapFromGlobal( e->globalPos() );
- QPoint d = oldPressPos - rp;
+ TQPoint rp = mapFromGlobal( e->globalPos() );
+ TQPoint d = oldPressPos - rp;
oldPressPos = rp;
- QPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() );
- QRect pr = widget->parentWidget()->rect();
+ TQPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() );
+ TQRect pr = widget->parentWidget()->rect();
// ##### move code around a bit to reduce duplicated code here
switch ( dir ) {
@@ -209,13 +209,13 @@ void SizeHandle::mouseMoveEvent( QMouseEvent *e )
} break;
}
- QPoint p = pos();
+ TQPoint p = pos();
sel->updateGeometry();
oldPressPos += ( p - pos() );
formWindow->sizePreview()->setText( i18n( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) );
formWindow->sizePreview()->adjustSize();
- QRect lg( formWindow->mapFromGlobal( e->globalPos() ) + QPoint( 16, 16 ),
+ TQRect lg( formWindow->mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ),
formWindow->sizePreview()->size() );
formWindow->checkPreviewGeometry( lg );
formWindow->sizePreview()->setGeometry( lg );
@@ -225,7 +225,7 @@ void SizeHandle::mouseMoveEvent( QMouseEvent *e )
formWindow->updateChildSelections( widget );
}
-void SizeHandle::mouseReleaseEvent( QMouseEvent *e )
+void SizeHandle::mouseReleaseEvent( TQMouseEvent *e )
{
if ( e->button() != LeftButton || !active )
return;
@@ -239,7 +239,7 @@ void SizeHandle::mouseReleaseEvent( QMouseEvent *e )
formWindow->emitUpdateProperties( widget );
}
-void SizeHandle::trySetGeometry( QWidget *w, int x, int y, int width, int height )
+void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height )
{
int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() );
minw = QMAX( minw, 2 * formWindow->grid().x() );
@@ -255,7 +255,7 @@ void SizeHandle::trySetGeometry( QWidget *w, int x, int y, int width, int height
w->setGeometry( x, y, QMAX( minw, width ), QMAX( minh, height ) );
}
-void SizeHandle::tryResize( QWidget *w, int width, int height )
+void SizeHandle::tryResize( TQWidget *w, int width, int height )
{
int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() );
minw = QMAX( minw, 16 );
@@ -266,7 +266,7 @@ void SizeHandle::tryResize( QWidget *w, int width, int height )
// ------------------------------------------------------------------------
-WidgetSelection::WidgetSelection( FormWindow *parent, QPtrDict<WidgetSelection> *selDict )
+WidgetSelection::WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict )
: selectionDict( selDict )
{
formWindow = parent;
@@ -276,7 +276,7 @@ WidgetSelection::WidgetSelection( FormWindow *parent, QPtrDict<WidgetSelection>
hide();
}
-void WidgetSelection::setWidget( QWidget *w, bool updateDict )
+void WidgetSelection::setWidget( TQWidget *w, bool updateDict )
{
if ( !w ) {
hide();
@@ -311,9 +311,9 @@ void WidgetSelection::updateGeometry()
if ( !wid || !wid->parentWidget() )
return;
- QPoint p = wid->parentWidget()->mapToGlobal( wid->pos() );
+ TQPoint p = wid->parentWidget()->mapToGlobal( wid->pos() );
p = formWindow->mapFromGlobal( p );
- QRect r( p, wid->size() );
+ TQRect r( p, wid->size() );
int w = 6;
int h = 6;
@@ -382,7 +382,7 @@ void WidgetSelection::update()
}
}
-QWidget *WidgetSelection::widget() const
+TQWidget *WidgetSelection::widget() const
{
return wid;
}
diff --git a/kdevdesigner/designer/sizehandle.h b/kdevdesigner/designer/sizehandle.h
index 8d53977c..0603f1b2 100644
--- a/kdevdesigner/designer/sizehandle.h
+++ b/kdevdesigner/designer/sizehandle.h
@@ -27,9 +27,9 @@
#ifndef SIZEHANDLE_H
#define SIZEHANDLE_H
-#include <qwidget.h>
-#include <qintdict.h>
-#include <qptrdict.h>
+#include <tqwidget.h>
+#include <tqintdict.h>
+#include <tqptrdict.h>
class QMouseEvent;
class FormWindow;
@@ -44,29 +44,29 @@ public:
enum Direction { LeftTop, Top, RightTop, Right, RightBottom, Bottom, LeftBottom, Left };
SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s );
- void setWidget( QWidget *w );
+ void setWidget( TQWidget *w );
void setActive( bool a );
void updateCursor();
void setEnabled( bool ) {}
protected:
- void paintEvent( QPaintEvent *e );
- void mousePressEvent( QMouseEvent *e );
- void mouseMoveEvent( QMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
+ void paintEvent( TQPaintEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
+ void mouseMoveEvent( TQMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
private:
- void trySetGeometry( QWidget *w, int x, int y, int width, int height );
- void tryResize( QWidget *w, int width, int height );
+ void trySetGeometry( TQWidget *w, int x, int y, int width, int height );
+ void tryResize( TQWidget *w, int width, int height );
private:
- QWidget *widget;
+ TQWidget *widget;
Direction dir;
- QPoint oldPressPos;
+ TQPoint oldPressPos;
FormWindow *formWindow;
WidgetSelection *sel;
- QRect geom, origGeom;
+ TQRect geom, origGeom;
bool active;
};
@@ -74,9 +74,9 @@ private:
class WidgetSelection
{
public:
- WidgetSelection( FormWindow *parent, QPtrDict<WidgetSelection> *selDict );
+ WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict );
- void setWidget( QWidget *w, bool updateDict = TRUE );
+ void setWidget( TQWidget *w, bool updateDict = TRUE );
bool isUsed() const;
void updateGeometry();
@@ -84,13 +84,13 @@ public:
void show();
void update();
- QWidget *widget() const;
+ TQWidget *widget() const;
protected:
- QIntDict<SizeHandle> handles;
- QWidget *wid;
+ TQIntDict<SizeHandle> handles;
+ TQWidget *wid;
FormWindow *formWindow;
- QPtrDict<WidgetSelection> *selectionDict;
+ TQPtrDict<WidgetSelection> *selectionDict;
};
diff --git a/kdevdesigner/designer/sourceeditor.cpp b/kdevdesigner/designer/sourceeditor.cpp
index f3a035b5..f5915664 100644
--- a/kdevdesigner/designer/sourceeditor.cpp
+++ b/kdevdesigner/designer/sourceeditor.cpp
@@ -32,22 +32,22 @@
#include "project.h"
#include "mainwindow.h"
#include "../interfaces/languageinterface.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include "project.h"
#include "sourcefile.h"
#include "hierarchyview.h"
-#include <qmessagebox.h>
-#include <qtextstream.h>
+#include <tqmessagebox.h>
+#include <tqtextstream.h>
#include "kdevdesigner_part.h"
-SourceEditor::SourceEditor( QWidget *parent, EditorInterface *iface, LanguageInterface *liface )
- : QVBox( parent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 )
+SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface )
+ : TQVBox( parent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 )
{
iFace->addRef();
lIface->addRef();
editor = iFace->editor( MainWindow::self->areEditorsReadOnly(),
this, MainWindow::self->designerInterface() );
- iFace->onBreakPointChange( MainWindow::self, SLOT( breakPointsChanged() ) );
+ iFace->onBreakPointChange( MainWindow::self, TQT_SLOT( breakPointsChanged() ) );
resize( 600, 400 );
setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) );
}
@@ -69,7 +69,7 @@ SourceEditor::~SourceEditor()
MainWindow::self->editorClosed( this );
}
-void SourceEditor::setObject( QObject *o, Project *p )
+void SourceEditor::setObject( TQObject *o, Project *p )
{
if ( sourceFile() )
sourceFile()->setEditor( 0 );
@@ -113,10 +113,10 @@ void SourceEditor::setObject( QObject *o, Project *p )
MainWindow::self->objectHierarchy()->showClasses( this );
}
-QString SourceEditor::sourceOfObject( QObject *o, const QString &,
+TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &,
EditorInterface *, LanguageInterface * )
{
- QString txt;
+ TQString txt;
if ( !o )
return txt;
if ( ::qt_cast<FormWindow*>(o) )
@@ -126,17 +126,17 @@ QString SourceEditor::sourceOfObject( QObject *o, const QString &,
return txt;
}
-void SourceEditor::setFunction( const QString &func, const QString &clss )
+void SourceEditor::setFunction( const TQString &func, const TQString &clss )
{
iFace->scrollTo( lIface->createFunctionStart( obj->name(), func, "", "" ), clss );
}
-void SourceEditor::setClass( const QString &clss )
+void SourceEditor::setClass( const TQString &clss )
{
- iFace->scrollTo( clss, QString::null );
+ iFace->scrollTo( clss, TQString::null );
}
-void SourceEditor::closeEvent( QCloseEvent *e )
+void SourceEditor::closeEvent( TQCloseEvent *e )
{
e->accept();
if ( !obj )
@@ -160,12 +160,12 @@ void SourceEditor::save()
sourceFile()->setText( iFace->text() );
}
-QString SourceEditor::language() const
+TQString SourceEditor::language() const
{
return lang;
}
-void SourceEditor::setLanguage( const QString &l )
+void SourceEditor::setLanguage( const TQString &l )
{
lang = l;
}
@@ -258,7 +258,7 @@ void SourceEditor::saveBreakPoints()
{
if ( !obj )
return;
- QValueList<uint> l;
+ TQValueList<uint> l;
iFace->breakPoints( l );
MetaDataBase::setBreakPoints( obj, l );
}
@@ -278,7 +278,7 @@ void SourceEditor::resetBreakPoints()
iFace->setBreakPoints( MetaDataBase::breakPoints( obj ) );
}
-QString SourceEditor::text() const
+TQString SourceEditor::text() const
{
return iFace->text();
}
@@ -307,14 +307,14 @@ bool SourceEditor::saveAs()
SourceFile *SourceEditor::sourceFile() const
{
- if ( !::qt_cast<SourceFile*>((QObject *)obj) )
+ if ( !::qt_cast<SourceFile*>((TQObject *)obj) )
return 0;
- return (SourceFile*)(QObject*)obj;
+ return (SourceFile*)(TQObject*)obj;
}
FormWindow *SourceEditor::formWindow() const
{
- if ( !::qt_cast<FormWindow*>((QObject *)obj) )
+ if ( !::qt_cast<FormWindow*>((TQObject *)obj) )
return 0;
- return (FormWindow*)(QObject*)obj;
+ return (FormWindow*)(TQObject*)obj;
}
diff --git a/kdevdesigner/designer/sourceeditor.h b/kdevdesigner/designer/sourceeditor.h
index a554b80c..4873f5f1 100644
--- a/kdevdesigner/designer/sourceeditor.h
+++ b/kdevdesigner/designer/sourceeditor.h
@@ -28,8 +28,8 @@
#define SOURCEEDITOR_H
#include "../interfaces/editorinterface.h"
-#include <qvbox.h>
-#include <qguardedptr.h>
+#include <tqvbox.h>
+#include <tqguardedptr.h>
class FormWindow;
class QCloseEvent;
@@ -42,23 +42,23 @@ class SourceEditor : public QVBox
Q_OBJECT
public:
- SourceEditor( QWidget *parent, EditorInterface *iface, LanguageInterface *liface );
+ SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface );
~SourceEditor();
- void setObject( QObject *fw, Project *p );
- QObject *object() const { return obj; }
+ void setObject( TQObject *fw, Project *p );
+ TQObject *object() const { return obj; }
Project *project() const { return pro; }
- void setFunction( const QString &func, const QString &clss = QString::null );
- void setClass( const QString &clss );
+ void setFunction( const TQString &func, const TQString &clss = TQString::null );
+ void setClass( const TQString &clss );
void save();
bool saveAs();
void setModified( bool b );
bool isModified() const;
- static QString sourceOfObject( QObject *fw, const QString &lang, EditorInterface *iface, LanguageInterface *lIface );
+ static TQString sourceOfObject( TQObject *fw, const TQString &lang, EditorInterface *iface, LanguageInterface *lIface );
- QString language() const;
- void setLanguage( const QString &l );
+ TQString language() const;
+ void setLanguage( const TQString &l );
void editCut();
void editCopy();
@@ -82,7 +82,7 @@ public:
void clearStackFrame();
void resetBreakPoints();
- QString text() const;
+ TQString text() const;
void checkTimeStamp();
@@ -90,16 +90,16 @@ public:
FormWindow *formWindow() const;
protected:
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
private:
EditorInterface *iFace;
LanguageInterface *lIface;
- QGuardedPtr<QObject> obj;
+ TQGuardedPtr<TQObject> obj;
Project *pro;
- QString lang;
- QGuardedPtr<QWidget> editor;
+ TQString lang;
+ TQGuardedPtr<TQWidget> editor;
};
diff --git a/kdevdesigner/designer/sourcefile.cpp b/kdevdesigner/designer/sourcefile.cpp
index 327dc58c..8e103e85 100644
--- a/kdevdesigner/designer/sourcefile.cpp
+++ b/kdevdesigner/designer/sourcefile.cpp
@@ -25,14 +25,14 @@
**********************************************************************/
#include "sourcefile.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include "designerappiface.h"
#include "sourceeditor.h"
#include "metadatabase.h"
#include "../interfaces/languageinterface.h"
-#include <qfiledialog.h>
-#include <qmessagebox.h>
+#include <tqfiledialog.h>
+#include <tqmessagebox.h>
#include "mainwindow.h"
#include "workspace.h"
#include <stdlib.h>
@@ -40,7 +40,7 @@
#include <kfiledialog.h>
#include <klocale.h>
-SourceFile::SourceFile( const QString &fn, bool temp, Project *p )
+SourceFile::SourceFile( const TQString &fn, bool temp, Project *p )
: filename( fn ), ed( 0 ), fileNameTemp( temp ),
timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( FALSE )
, accepted( TRUE )
@@ -64,12 +64,12 @@ SourceFile::~SourceFile()
delete iface;
}
-QString SourceFile::text() const
+TQString SourceFile::text() const
{
return txt;
}
-void SourceFile::setText( const QString &s )
+void SourceFile::setText( const TQString &s )
{
txt = s;
}
@@ -83,29 +83,29 @@ bool SourceFile::save( bool ignoreModified )
if ( ed )
ed->save();
- if ( QFile::exists( pro->makeAbsolute( filename ) ) ) {
- QString fn( pro->makeAbsolute( filename ) );
+ if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) {
+ TQString fn( pro->makeAbsolute( filename ) );
#if defined(Q_OS_WIN32)
fn += ".bak";
#else
fn += "~";
#endif
- QFile f( pro->makeAbsolute( filename ) );
+ TQFile f( pro->makeAbsolute( filename ) );
if ( f.open( IO_ReadOnly ) ) {
- QFile f2( fn );
+ TQFile f2( fn );
if ( f2.open( IO_WriteOnly | IO_Translate ) ) {
- QCString data( f.size() );
+ TQCString data( f.size() );
f.readBlock( data.data(), f.size() );
f2.writeBlock( data );
}
}
}
- QFile f( pro->makeAbsolute( filename ) );
+ TQFile f( pro->makeAbsolute( filename ) );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
return saveAs();
- QTextStream ts( &f );
+ TQTextStream ts( &f );
ts << txt;
timeStamp.update();
setModified( FALSE );
@@ -115,18 +115,18 @@ bool SourceFile::save( bool ignoreModified )
bool SourceFile::saveAs( bool ignoreModified )
{
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
- QString filter;
+ TQString filter;
if ( iface )
filter = iface->fileFilterList().join("\n");
- QString old = filename;
- QString initFn = pro->makeAbsolute( filename );
+ TQString old = filename;
+ TQString initFn = pro->makeAbsolute( filename );
if ( ignoreModified ) {
- QString dir = QStringList::split( ':', project()->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first();
- initFn = QFileInfo( initFn ).fileName();
+ TQString dir = TQStringList::split( ':', project()->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first();
+ initFn = TQFileInfo( initFn ).fileName();
initFn.prepend( dir + "/" );
}
- QString fn = KFileDialog::getSaveFileName( initFn, filter );
+ TQString fn = KFileDialog::getSaveFileName( initFn, filter );
if ( fn.isEmpty() )
return FALSE;
fileNameTemp = FALSE;
@@ -141,7 +141,7 @@ bool SourceFile::saveAs( bool ignoreModified )
ed->setCaption( i18n( "Edit %1" ).arg( filename ) );
setModified( TRUE );
if ( pro->isDummy() ) {
- QObject *o = ed->parent();
+ TQObject *o = ed->parent();
while ( o && !o->isA( "MainWindow" ) )
o = o->parent();
if ( o )
@@ -152,10 +152,10 @@ bool SourceFile::saveAs( bool ignoreModified )
bool SourceFile::load()
{
- QFile f( pro->makeAbsolute( filename ) );
+ TQFile f( pro->makeAbsolute( filename ) );
if ( !f.open( IO_ReadOnly ) )
return FALSE;
- QTextStream ts( &f );
+ TQTextStream ts( &f );
txt = ts.read();
timeStamp.update();
return TRUE;
@@ -180,13 +180,13 @@ bool SourceFile::isModified() const
return ed->isModified();
}
-static QMap<QString, int> *extensionCounter;
-QString SourceFile::createUnnamedFileName( const QString &extension )
+static TQMap<TQString, int> *extensionCounter;
+TQString SourceFile::createUnnamedFileName( const TQString &extension )
{
if ( !extensionCounter )
- extensionCounter = new QMap<QString, int>;
+ extensionCounter = new TQMap<TQString, int>;
int count = -1;
- QMap<QString, int>::Iterator it;
+ TQMap<TQString, int>::Iterator it;
if ( ( it = extensionCounter->find( extension ) ) != extensionCounter->end() ) {
count = *it;
++count;
@@ -196,7 +196,7 @@ QString SourceFile::createUnnamedFileName( const QString &extension )
extensionCounter->insert( extension, count );
}
- return "unnamed" + QString::number( count ) + "." + extension;
+ return "unnamed" + TQString::number( count ) + "." + extension;
}
void SourceFile::setModified( bool m )
@@ -219,7 +219,7 @@ bool SourceFile::closeEvent()
if ( ed )
ed->save();
- switch ( QMessageBox::warning( MainWindow::self, i18n( "Save Code" ),
+ switch ( TQMessageBox::warning( MainWindow::self, i18n( "Save Code" ),
i18n( "Save changes to '%1'?" ).arg( filename ),
i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) {
case 0: // save
@@ -263,7 +263,7 @@ void SourceFile::checkTimeStamp()
if ( timeStamp.isUpToDate() )
return;
timeStamp.update();
- if ( QMessageBox::information( MainWindow::self, i18n( "Qt Designer" ),
+ if ( TQMessageBox::information( MainWindow::self, i18n( "Qt Designer" ),
i18n( "File '%1' has been changed outside Qt Designer.\n"
"Do you want to reload it?" ).arg( filename ),
i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) {
@@ -277,15 +277,15 @@ bool SourceFile::checkFileName( bool allowBreak )
{
SourceFile *sf = pro->findSourceFile( filename, this );
if ( sf )
- QMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ),
+ TQMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ),
i18n( "The project already contains a source file with \n"
"filename '%1'. Please choose a new filename." ).arg( filename ) );
while ( sf ) {
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
- QString filter;
+ TQString filter;
if ( iface )
filter = iface->fileFilterList().join("\n");
- QString fn;
+ TQString fn;
while ( fn.isEmpty() ) {
fn = KFileDialog::getSaveFileName( pro->makeAbsolute( filename ), filter );
if ( allowBreak && fn.isEmpty() )
diff --git a/kdevdesigner/designer/sourcefile.h b/kdevdesigner/designer/sourcefile.h
index 438d9b4c..79083c83 100644
--- a/kdevdesigner/designer/sourcefile.h
+++ b/kdevdesigner/designer/sourcefile.h
@@ -27,7 +27,7 @@
#ifndef SOURCEFILE_H
#define SOURCEFILE_H
-#include <qobject.h>
+#include <tqobject.h>
#include "timestamp.h"
struct DesignerSourceFile;
@@ -39,10 +39,10 @@ class SourceFile : public QObject
Q_OBJECT
public:
- SourceFile( const QString &fn, bool temp, Project *p );
+ SourceFile( const TQString &fn, bool temp, Project *p );
~SourceFile();
- void setText( const QString &s );
+ void setText( const TQString &s );
void setModified( bool m );
bool save( bool ignoreModified = FALSE );
@@ -52,8 +52,8 @@ public:
bool closeEvent();
Project *project() const;
- QString text() const;
- QString fileName() const { return filename; }
+ TQString text() const;
+ TQString fileName() const { return filename; }
bool isModified() const;
void checkTimeStamp();
@@ -63,7 +63,7 @@ public:
void setEditor( SourceEditor *e );
SourceEditor *editor() const { return ed; }
- static QString createUnnamedFileName( const QString &extension );
+ static TQString createUnnamedFileName( const TQString &extension );
bool isAccepted() const { return accepted; }
@@ -71,8 +71,8 @@ private:
bool checkFileName( bool allowBreak );
private:
- QString filename;
- QString txt;
+ TQString filename;
+ TQString txt;
DesignerSourceFile *iface;
SourceEditor *ed;
bool fileNameTemp;
diff --git a/kdevdesigner/designer/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp
index e408e8a5..cb4bec53 100644
--- a/kdevdesigner/designer/startdialogimpl.cpp
+++ b/kdevdesigner/designer/startdialogimpl.cpp
@@ -1,22 +1,22 @@
#include <kiconloader.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qiconview.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qfiledialog.h>
-#include <qtabwidget.h>
-#include <qpoint.h>
-#include <qobjectlist.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qfileinfo.h>
-#include <qmap.h>
-#include <qdatetime.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qurl.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqiconview.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqfiledialog.h>
+#include <tqtabwidget.h>
+#include <tqpoint.h>
+#include <tqobjectlist.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqfileinfo.h>
+#include <tqmap.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqurl.h>
#include "kdevdesigner_part.h"
@@ -26,8 +26,8 @@
#include <klocale.h>
-FileDialog::FileDialog( const QString &dir, QWidget *parent )
- : QFileDialog( dir, QString::null, parent )
+FileDialog::FileDialog( const TQString &dir, TQWidget *parent )
+ : TQFileDialog( dir, TQString::null, parent )
{
}
@@ -37,7 +37,7 @@ void FileDialog::accept()
}
-StartDialog::StartDialog( QWidget *parent, const QString &templatePath )
+StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath )
: StartDialogBase( parent, 0 )
{
newForm = new NewForm( templateView, templatePath );
@@ -45,13 +45,13 @@ StartDialog::StartDialog( QWidget *parent, const QString &templatePath )
initFileOpen();
showInFuture = TRUE;
- connect( buttonHelp, SIGNAL( clicked() ),
- MainWindow::self, SLOT( showDialogHelp() ) );
- connect( recentView, SIGNAL( doubleClicked(QIconViewItem*) ),
- this, SLOT( accept() ) );
- connect( recentView, SIGNAL( returnPressed(QIconViewItem*) ),
- this, SLOT( accept() ) );
- connect( fd, SIGNAL( fileSelected() ), this, SLOT( accept() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ),
+ MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( recentView, TQT_SIGNAL( doubleClicked(TQIconViewItem*) ),
+ this, TQT_SLOT( accept() ) );
+ connect( recentView, TQT_SIGNAL( returnPressed(TQIconViewItem*) ),
+ this, TQT_SLOT( accept() ) );
+ connect( fd, TQT_SIGNAL( fileSelected() ), this, TQT_SLOT( accept() ) );
}
void StartDialog::accept()
@@ -60,7 +60,7 @@ void StartDialog::accept()
showInFuture = !checkShowInFuture->isChecked(); // means don't show it anymore
int tabindex = tabWidget->currentPageIndex();
- QString filename;
+ TQString filename;
if( !tabindex ) {
if ( !templateView->currentItem() )
return;
@@ -76,7 +76,7 @@ void StartDialog::accept()
}
if ( tabindex ) {
if ( !filename.isEmpty() ) {
- QFileInfo fi( filename );
+ TQFileInfo fi( filename );
if ( fi.extension() == "pro" )
MainWindow::self->openProject( filename );
else
@@ -92,12 +92,12 @@ void StartDialog::reject()
done( Rejected );
}
-void StartDialog::recentItemChanged( QIconViewItem *item )
+void StartDialog::recentItemChanged( TQIconViewItem *item )
{
- QString msg( recentFiles[item->index()] );
- QFileInfo f( recentFiles[item->index()] );
+ TQString msg( recentFiles[item->index()] );
+ TQFileInfo f( recentFiles[item->index()] );
uint s = f.size();
- QString unit( "B" );
+ TQString unit( "B" );
if( s > 1024 ) {
s /= 1024;
unit = "KB";
@@ -106,9 +106,9 @@ void StartDialog::recentItemChanged( QIconViewItem *item )
s /= 1024;
unit = "MB";
}
- QDateTime dt( f.lastModified() );
- QString date( dt.toString( "MMMM dd hh:mm" ));
- msg = QString( "%1 (%2 %3) %4" ).arg(msg).arg(s).arg(unit).arg(date);
+ TQDateTime dt( f.lastModified() );
+ TQString date( dt.toString( "MMMM dd hh:mm" ));
+ msg = TQString( "%1 (%2 %3) %4" ).arg(msg).arg(s).arg(unit).arg(date);
fileInfoLabel->setText( msg );
}
@@ -117,26 +117,26 @@ void StartDialog::clearFileInfo()
fileInfoLabel->clear();
}
-void StartDialog::setRecentlyFiles( QStringList &files )
+void StartDialog::setRecentlyFiles( TQStringList &files )
{
insertRecentItems( files, FALSE );
}
-void StartDialog::setRecentlyProjects( QStringList &projects )
+void StartDialog::setRecentlyProjects( TQStringList &projects )
{
insertRecentItems( projects, TRUE );
}
-void StartDialog::insertRecentItems( QStringList &files, bool isProject )
+void StartDialog::insertRecentItems( TQStringList &files, bool isProject )
{
- QString iconName = "designer_newform.png";
+ TQString iconName = "designer_newform.png";
if ( isProject )
iconName = "designer_project.png";
- QIconViewItem *item;
- QStringList::iterator it = files.begin();
+ TQIconViewItem *item;
+ TQStringList::iterator it = files.begin();
for( ; it != files.end(); ++it ) {
- QFileInfo fi( *it );
- item = new QIconViewItem( recentView, fi.fileName() );
+ TQFileInfo fi( *it );
+ item = new TQIconViewItem( recentView, fi.fileName() );
recentFiles[recentView->index( item )] = *it;
item->setPixmap( BarIcon( iconName, KDevDesignerPartFactory::instance() ) );
item->setDragEnabled( FALSE );
@@ -145,37 +145,37 @@ void StartDialog::insertRecentItems( QStringList &files, bool isProject )
void StartDialog::initFileOpen()
{
- QString encode = QDir::currentDirPath();
- QUrl::encode( encode );
+ TQString encode = TQDir::currentDirPath();
+ TQUrl::encode( encode );
fd = new FileDialog( encode, this );
- QPoint point( 0, 0 );
+ TQPoint point( 0, 0 );
fd->reparent( tab, point );
- QObjectList *l = fd->queryList( "QPushButton" );
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = fd->queryList( "TQPushButton" );
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
- ((QPushButton*)obj)->hide();
+ ((TQPushButton*)obj)->hide();
}
delete l;
fd->setSizeGripEnabled ( FALSE );
tabLayout->addWidget( fd );
- QPluginManager<ImportFilterInterface> manager( IID_ImportFilter, QApplication::libraryPaths(),
+ QPluginManager<ImportFilterInterface> manager( IID_ImportFilter, TQApplication::libraryPaths(),
MainWindow::self->pluginDirectory() );
- QStringList filterlist;
+ TQStringList filterlist;
filterlist << i18n( "Designer Files (*.ui *.pro)" );
filterlist << i18n( "Qt User-Interface Files (*.ui)" );
filterlist << i18n( "QMAKE Project Files (*.pro)" );
- QStringList list = manager.featureList();
- for ( QStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 )
+ TQStringList list = manager.featureList();
+ for ( TQStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 )
filterlist << *it2;
filterlist << i18n( "All Files (*)" );
- QString filters = filterlist.join( ";;" );
+ TQString filters = filterlist.join( ";;" );
fd->setFilters( filters );
fd->show();
diff --git a/kdevdesigner/designer/startdialogimpl.h b/kdevdesigner/designer/startdialogimpl.h
index b29b5bf1..e17592b3 100644
--- a/kdevdesigner/designer/startdialogimpl.h
+++ b/kdevdesigner/designer/startdialogimpl.h
@@ -27,12 +27,12 @@
#ifndef STARTDIALOGIMPL_H
#define STARTDIALOGIMPL_H
-#include <qiconview.h>
-#include <qlistview.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfiledialog.h>
-#include <qmap.h>
+#include <tqiconview.h>
+#include <tqlistview.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfiledialog.h>
+#include <tqmap.h>
#include "newformimpl.h"
#include "startdialog.h"
@@ -42,7 +42,7 @@ class FileDialog : public QFileDialog
Q_OBJECT
public:
- FileDialog( const QString &dir, QWidget *parent );
+ FileDialog( const TQString &dir, TQWidget *parent );
protected slots:
void accept();
@@ -57,23 +57,23 @@ class StartDialog : public StartDialogBase
Q_OBJECT
public:
- StartDialog( QWidget *parent, const QString &templatePath );
- void setRecentlyFiles( QStringList& );
- void setRecentlyProjects( QStringList& );
+ StartDialog( TQWidget *parent, const TQString &templatePath );
+ void setRecentlyFiles( TQStringList& );
+ void setRecentlyProjects( TQStringList& );
bool showDialogInFuture() const { return showInFuture; }
protected slots:
- void recentItemChanged( QIconViewItem *item );
+ void recentItemChanged( TQIconViewItem *item );
void clearFileInfo();
void accept();
void reject();
private:
void initFileOpen();
- void insertRecentItems( QStringList &files, bool isProject );
+ void insertRecentItems( TQStringList &files, bool isProject );
NewForm *newForm;
FileDialog *fd;
- QMap<int, QString> recentFiles;
+ TQMap<int, TQString> recentFiles;
bool showInFuture;
};
diff --git a/kdevdesigner/designer/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp
index 41389684..45c425b4 100644
--- a/kdevdesigner/designer/styledbutton.cpp
+++ b/kdevdesigner/designer/styledbutton.cpp
@@ -24,33 +24,33 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "styledbutton.h"
#include "formwindow.h"
#include "pixmapchooser.h"
-#include <qcolordialog.h>
-#include <qpalette.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qstyle.h>
-
-StyledButton::StyledButton(QWidget* parent, const char* name)
- : QButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE )
+#include <tqcolordialog.h>
+#include <tqpalette.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqstyle.h>
+
+StyledButton::StyledButton(TQWidget* parent, const char* name)
+ : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE )
{
setMinimumSize( minimumSizeHint() );
setAcceptDrops( TRUE );
- connect( this, SIGNAL(clicked()), SLOT(onEditor()));
+ connect( this, TQT_SIGNAL(clicked()), TQT_SLOT(onEditor()));
setEditor( ColorEditor );
}
-StyledButton::StyledButton( const QBrush& b, QWidget* parent, const char* name, WFlags f )
- : QButton( parent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 )
+StyledButton::StyledButton( const TQBrush& b, TQWidget* parent, const char* name, WFlags f )
+ : TQButton( parent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 )
{
col = b.color();
pix = b.pixmap();
@@ -75,17 +75,17 @@ StyledButton::EditorType StyledButton::editor() const
return edit;
}
-void StyledButton::setColor( const QColor& c )
+void StyledButton::setColor( const TQColor& c )
{
col = c;
update();
}
-void StyledButton::setPixmap( const QPixmap & pm )
+void StyledButton::setPixmap( const TQPixmap & pm )
{
if ( !pm.isNull() ) {
delete pix;
- pix = new QPixmap( pm );
+ pix = new TQPixmap( pm );
} else {
delete pix;
pix = 0;
@@ -93,12 +93,12 @@ void StyledButton::setPixmap( const QPixmap & pm )
scalePixmap();
}
-QColor StyledButton::color() const
+TQColor StyledButton::color() const
{
return col;
}
-QPixmap* StyledButton::pixmap() const
+TQPixmap* StyledButton::pixmap() const
{
return pix;
}
@@ -117,14 +117,14 @@ void StyledButton::setScale( bool on )
scalePixmap();
}
-QSize StyledButton::sizeHint() const
+TQSize StyledButton::sizeHint() const
{
- return QSize( 50, 25 );
+ return TQSize( 50, 25 );
}
-QSize StyledButton::minimumSizeHint() const
+TQSize StyledButton::minimumSizeHint() const
{
- return QSize( 50, 25 );
+ return TQSize( 50, 25 );
}
void StyledButton::scalePixmap()
@@ -132,8 +132,8 @@ void StyledButton::scalePixmap()
delete spix;
if ( pix ) {
- spix = new QPixmap( 6*width()/8, 6*height()/8 );
- QImage img = pix->convertToImage();
+ spix = new TQPixmap( 6*width()/8, 6*height()/8 );
+ TQImage img = pix->convertToImage();
spix->convertFromImage( s? img.smoothScale( 6*width()/8, 6*height()/8 ) : img );
} else {
@@ -143,39 +143,39 @@ void StyledButton::scalePixmap()
update();
}
-void StyledButton::resizeEvent( QResizeEvent* e )
+void StyledButton::resizeEvent( TQResizeEvent* e )
{
scalePixmap();
- QButton::resizeEvent( e );
+ TQButton::resizeEvent( e );
}
-void StyledButton::drawButton( QPainter *paint )
+void StyledButton::drawButton( TQPainter *paint )
{
- style().drawPrimitive(QStyle::PE_ButtonBevel, paint, rect(), colorGroup(),
- isDown() ? QStyle::Style_Sunken : QStyle::Style_Raised);
+ style().drawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(),
+ isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised);
drawButtonLabel(paint);
if (hasFocus())
- style().drawPrimitive(QStyle::PE_FocusRect, paint,
- style().subRect(QStyle::SR_PushButtonFocusRect, this),
- colorGroup(), QStyle::Style_Default);
+ style().drawPrimitive(TQStyle::PE_FocusRect, paint,
+ style().subRect(TQStyle::SR_PushButtonFocusRect, this),
+ colorGroup(), TQStyle::Style_Default);
}
-void StyledButton::drawButtonLabel( QPainter *paint )
+void StyledButton::drawButtonLabel( TQPainter *paint )
{
- QColor pen = isEnabled() ?
+ TQColor pen = isEnabled() ?
hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText()
: palette().disabled().buttonText();
paint->setPen( pen );
if(!isEnabled()) {
- paint->setBrush( QBrush( colorGroup().button() ) );
+ paint->setBrush( TQBrush( colorGroup().button() ) );
}
else if ( edit == PixmapEditor && spix ) {
- paint->setBrush( QBrush( col, *spix ) );
+ paint->setBrush( TQBrush( col, *spix ) );
paint->setBrushOrigin( width()/8, height()/8 );
} else
- paint->setBrush( QBrush( col ) );
+ paint->setBrush( TQBrush( col ) );
paint->drawRect( width()/8, height()/8, 6*width()/8, 6*height()/8 );
}
@@ -184,18 +184,18 @@ void StyledButton::onEditor()
{
switch (edit) {
case ColorEditor: {
- QColor c = QColorDialog::getColor( palette().active().background(), this );
+ TQColor c = QColorDialog::getColor( palette().active().background(), this );
if ( c.isValid() ) {
setColor( c );
emit changed();
}
} break;
case PixmapEditor: {
- QPixmap p;
+ TQPixmap p;
if ( pixmap() )
p = qChoosePixmap( this, formWindow, *pixmap() );
else
- p = qChoosePixmap( this, formWindow, QPixmap() );
+ p = qChoosePixmap( this, formWindow, TQPixmap() );
if ( !p.isNull() ) {
setPixmap( p );
emit changed();
@@ -206,25 +206,25 @@ void StyledButton::onEditor()
}
}
-void StyledButton::mousePressEvent(QMouseEvent* e)
+void StyledButton::mousePressEvent(TQMouseEvent* e)
{
- QButton::mousePressEvent(e);
+ TQButton::mousePressEvent(e);
mousePressed = TRUE;
pressPos = e->pos();
}
-void StyledButton::mouseMoveEvent(QMouseEvent* e)
+void StyledButton::mouseMoveEvent(TQMouseEvent* e)
{
- QButton::mouseMoveEvent( e );
+ TQButton::mouseMoveEvent( e );
#ifndef QT_NO_DRAGANDDROP
if ( !mousePressed )
return;
- if ( ( pressPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() ) {
+ if ( ( pressPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) {
if ( edit == ColorEditor ) {
- QColorDrag *drg = new QColorDrag( col, this );
- QPixmap pix( 25, 25 );
+ TQColorDrag *drg = new TQColorDrag( col, this );
+ TQPixmap pix( 25, 25 );
pix.fill( col );
- QPainter p( &pix );
+ TQPainter p( &pix );
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
@@ -232,8 +232,8 @@ void StyledButton::mouseMoveEvent(QMouseEvent* e)
drg->dragCopy();
}
else if ( edit == PixmapEditor && pix && !pix->isNull() ) {
- QImage img = pix->convertToImage();
- QImageDrag *drg = new QImageDrag( img, this );
+ TQImage img = pix->convertToImage();
+ TQImageDrag *drg = new TQImageDrag( img, this );
if(spix)
drg->setPixmap( *spix );
mousePressed = FALSE;
@@ -244,46 +244,46 @@ void StyledButton::mouseMoveEvent(QMouseEvent* e)
}
#ifndef QT_NO_DRAGANDDROP
-void StyledButton::dragEnterEvent( QDragEnterEvent *e )
+void StyledButton::dragEnterEvent( TQDragEnterEvent *e )
{
setFocus();
- if ( edit == ColorEditor && QColorDrag::canDecode( e ) )
+ if ( edit == ColorEditor && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) )
+ else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
}
-void StyledButton::dragLeaveEvent( QDragLeaveEvent * )
+void StyledButton::dragLeaveEvent( TQDragLeaveEvent * )
{
if ( hasFocus() )
parentWidget()->setFocus();
}
-void StyledButton::dragMoveEvent( QDragMoveEvent *e )
+void StyledButton::dragMoveEvent( TQDragMoveEvent *e )
{
- if ( edit == ColorEditor && QColorDrag::canDecode( e ) )
+ if ( edit == ColorEditor && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) )
+ else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
}
-void StyledButton::dropEvent( QDropEvent *e )
+void StyledButton::dropEvent( TQDropEvent *e )
{
- if ( edit == ColorEditor && QColorDrag::canDecode( e ) ) {
- QColor color;
- QColorDrag::decode( e, color );
+ if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) {
+ TQColor color;
+ TQColorDrag::decode( e, color );
setColor(color);
emit changed();
e->accept();
}
- else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) ) {
- QImage img;
- QImageDrag::decode( e, img );
- QPixmap pm;
+ else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) {
+ TQImage img;
+ TQImageDrag::decode( e, img );
+ TQPixmap pm;
pm.convertFromImage(img);
setPixmap(pm);
emit changed();
diff --git a/kdevdesigner/designer/styledbutton.h b/kdevdesigner/designer/styledbutton.h
index 882090c7..16d0b396 100644
--- a/kdevdesigner/designer/styledbutton.h
+++ b/kdevdesigner/designer/styledbutton.h
@@ -27,8 +27,8 @@
#ifndef STYLEDBUTTON_H
#define STYLEDBUTTON_H
-#include <qbutton.h>
-#include <qpixmap.h>
+#include <tqbutton.h>
+#include <tqpixmap.h>
class QColor;
class QBrush;
@@ -38,8 +38,8 @@ class StyledButton : public QButton
{
Q_OBJECT
- Q_PROPERTY( QColor color READ color WRITE setColor )
- Q_PROPERTY( QPixmap pixmap READ pixmap WRITE setPixmap )
+ Q_PROPERTY( TQColor color READ color WRITE setColor )
+ Q_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
Q_PROPERTY( EditorType editor READ editor WRITE setEditor )
Q_PROPERTY( bool scale READ scale WRITE setScale )
@@ -48,24 +48,24 @@ class StyledButton : public QButton
public:
enum EditorType { ColorEditor, PixmapEditor };
- StyledButton( QWidget* parent = 0, const char* name = 0 );
- StyledButton( const QBrush& b, QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+ StyledButton( TQWidget* parent = 0, const char* name = 0 );
+ StyledButton( const TQBrush& b, TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
~StyledButton();
void setEditor( EditorType );
EditorType editor() const;
- void setColor( const QColor& );
- void setPixmap( const QPixmap& );
+ void setColor( const TQColor& );
+ void setPixmap( const TQPixmap& );
- QPixmap* pixmap() const;
- QColor color() const;
+ TQPixmap* pixmap() const;
+ TQColor color() const;
void setScale( bool );
bool scale() const;
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
void setFormWindow( FormWindow *fw ) { formWindow = fw; }
@@ -76,27 +76,27 @@ signals:
void changed();
protected:
- void mousePressEvent(QMouseEvent*);
- void mouseMoveEvent(QMouseEvent*);
+ void mousePressEvent(TQMouseEvent*);
+ void mouseMoveEvent(TQMouseEvent*);
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent ( QDragEnterEvent * );
- void dragMoveEvent ( QDragMoveEvent * );
- void dragLeaveEvent ( QDragLeaveEvent * );
- void dropEvent ( QDropEvent * );
+ void dragEnterEvent ( TQDragEnterEvent * );
+ void dragMoveEvent ( TQDragMoveEvent * );
+ void dragLeaveEvent ( TQDragLeaveEvent * );
+ void dropEvent ( TQDropEvent * );
#endif // QT_NO_DRAGANDDROP
- void drawButton( QPainter* );
- void drawButtonLabel( QPainter* );
- void resizeEvent( QResizeEvent* );
+ void drawButton( TQPainter* );
+ void drawButtonLabel( TQPainter* );
+ void resizeEvent( TQResizeEvent* );
void scalePixmap();
private:
- QPixmap* pix;
- QPixmap* spix; // the pixmap scaled down to fit into the button
- QColor col;
+ TQPixmap* pix;
+ TQPixmap* spix; // the pixmap scaled down to fit into the button
+ TQColor col;
EditorType edit;
bool s;
FormWindow *formWindow;
- QPoint pressPos;
+ TQPoint pressPos;
bool mousePressed;
};
diff --git a/kdevdesigner/designer/syntaxhighlighter_html.cpp b/kdevdesigner/designer/syntaxhighlighter_html.cpp
index cd0c2760..76443305 100644
--- a/kdevdesigner/designer/syntaxhighlighter_html.cpp
+++ b/kdevdesigner/designer/syntaxhighlighter_html.cpp
@@ -26,20 +26,20 @@
**********************************************************************/
#include "syntaxhighlighter_html.h"
-#include "qstring.h"
-#include "qmap.h"
-#include "qapplication.h"
+#include "tqstring.h"
+#include "tqmap.h"
+#include "tqapplication.h"
SyntaxHighlighter_HTML::SyntaxHighlighter_HTML()
: QTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 )
{
- QFont f( qApp->font() );
+ TQFont f( qApp->font() );
- addFormat(Standard, new QTextFormat(f, qApp->palette().color(QPalette::Active, QColorGroup::Text)));
- addFormat(Keyword, new QTextFormat(f, qApp->palette().color(QPalette::Active, QColorGroup::Dark)));
- addFormat(Attribute, new QTextFormat(f, qApp->palette().color(QPalette::Active, QColorGroup::Link)));
- addFormat(AttribValue, new QTextFormat(f, qApp->palette().color(QPalette::Active, QColorGroup::LinkVisited)));
+ addFormat(Standard, new QTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Text)));
+ addFormat(Keyword, new QTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Dark)));
+ addFormat(Attribute, new QTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Link)));
+ addFormat(AttribValue, new QTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::LinkVisited)));
}
SyntaxHighlighter_HTML::~SyntaxHighlighter_HTML()
@@ -59,7 +59,7 @@ void SyntaxHighlighter_HTML::process( QTextDocument *doc, QTextParagraph *string
const int StateAttribute = 2;
const int StateAttribVal = 3;
- QString buffer = "";
+ TQString buffer = "";
int state = StateStandard;
@@ -73,7 +73,7 @@ void SyntaxHighlighter_HTML::process( QTextDocument *doc, QTextParagraph *string
int i = 0;
for ( ;; ) {
- QChar c = string->at( i )->c;
+ TQChar c = string->at( i )->c;
if ( c == '<' ) {
if ( state != StateStandard )
diff --git a/kdevdesigner/designer/syntaxhighlighter_html.h b/kdevdesigner/designer/syntaxhighlighter_html.h
index 4a135671..4a842ff5 100644
--- a/kdevdesigner/designer/syntaxhighlighter_html.h
+++ b/kdevdesigner/designer/syntaxhighlighter_html.h
@@ -50,7 +50,7 @@ private:
QTextFormat *lastFormat;
int lastFormatId;
- QIntDict<QTextFormat> formats;
+ TQIntDict<QTextFormat> formats;
};
diff --git a/kdevdesigner/designer/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp
index b2a440de..d6ebba6c 100644
--- a/kdevdesigner/designer/tableeditorimpl.cpp
+++ b/kdevdesigner/designer/tableeditorimpl.cpp
@@ -26,40 +26,40 @@
#include "tableeditorimpl.h"
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
#include "formwindow.h"
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlistbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlistbox.h>
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "pixmapchooser.h"
#include "command.h"
-#include <qvaluelist.h>
-#include <qtabwidget.h>
-#include <qdatatable.h>
+#include <tqvaluelist.h>
+#include <tqtabwidget.h>
+#include <tqdatatable.h>
#include "project.h"
#include "metadatabase.h"
#include "mainwindow.h"
#include <klocale.h>
-TableEditor::TableEditor( QWidget* parent, QWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl )
+TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl )
: TableEditorBase( parent, name, modal, fl ),
#ifndef QT_NO_TABLE
- editTable( (QTable*)editWidget ),
+ editTable( (TQTable*)editWidget ),
#endif
formWindow( fw )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
#ifndef QT_NO_TABLE
labelColumnPixmap->setText( "" );
labelRowPixmap->setText( "" );
#ifndef QT_NO_SQL
- if ( !::qt_cast<QDataTable*>(editTable) )
+ if ( !::qt_cast<TQDataTable*>(editTable) )
#endif
{
labelFields->hide();
@@ -68,7 +68,7 @@ TableEditor::TableEditor( QWidget* parent, QWidget *editWidget, FormWindow *fw,
labelTableValue->hide();
}
#ifndef QT_NO_SQL
- if ( ::qt_cast<QDataTable*>(editTable) ) {
+ if ( ::qt_cast<TQDataTable*>(editTable) ) {
// ## why does this behave weird?
// TabWidget->removePage( rows_tab );
// rows_tab->hide();
@@ -76,10 +76,10 @@ TableEditor::TableEditor( QWidget* parent, QWidget *editWidget, FormWindow *fw,
TabWidget->setTabEnabled( rows_tab, FALSE );
}
- if ( formWindow->project() && ::qt_cast<QDataTable*>(editTable) ) {
- QStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
+ if ( formWindow->project() && ::qt_cast<TQDataTable*>(editTable) ) {
+ TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) {
- QStringList fields;
+ TQStringList fields;
fields << "<no field>";
fields += formWindow->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] );
comboFields->insertStringList( fields );
@@ -105,7 +105,7 @@ void TableEditor::columnDownClicked()
return;
saveFieldMap();
int index = listColumns->currentItem() + 1;
- QListBoxItem *i = listColumns->item( listColumns->currentItem() );
+ TQListBoxItem *i = listColumns->item( listColumns->currentItem() );
listColumns->takeItem( i );
listColumns->insertItem( i, index );
listColumns->setCurrentItem( i );
@@ -114,7 +114,7 @@ void TableEditor::columnDownClicked()
currentColumnChanged( i );
}
-void TableEditor::columnTextChanged( const QString &s )
+void TableEditor::columnTextChanged( const TQString &s )
{
if ( listColumns->currentItem() == -1 )
return;
@@ -137,7 +137,7 @@ void TableEditor::columnUpClicked()
return;
saveFieldMap();
int index = listColumns->currentItem() - 1;
- QListBoxItem *i = listColumns->item( listColumns->currentItem() );
+ TQListBoxItem *i = listColumns->item( listColumns->currentItem() );
listColumns->takeItem( i );
listColumns->insertItem( i, index );
listColumns->setCurrentItem( i );
@@ -146,7 +146,7 @@ void TableEditor::columnUpClicked()
currentColumnChanged( i );
}
-void TableEditor::currentColumnChanged( QListBoxItem *i )
+void TableEditor::currentColumnChanged( TQListBoxItem *i )
{
if ( !i )
return;
@@ -159,8 +159,8 @@ void TableEditor::currentColumnChanged( QListBoxItem *i )
editColumnText->blockSignals( FALSE );
#ifndef QT_NO_SQL
- if ( ::qt_cast<QDataTable*>(editTable) ) {
- QString s = *fieldMap.find( listColumns->index( i ) );
+ if ( ::qt_cast<TQDataTable*>(editTable) ) {
+ TQString s = *fieldMap.find( listColumns->index( i ) );
if ( s.isEmpty() )
comboFields->setCurrentItem( 0 );
else if ( comboFields->listBox()->findItem( s ) )
@@ -171,20 +171,20 @@ void TableEditor::currentColumnChanged( QListBoxItem *i )
#endif
}
-void TableEditor::currentFieldChanged( const QString &s )
+void TableEditor::currentFieldChanged( const TQString &s )
{
if ( listColumns->currentItem() == -1 )
return;
fieldMap.remove( listColumns->currentItem() );
fieldMap.insert( listColumns->currentItem(), s );
editColumnText->blockSignals( TRUE ); //## necessary
- QString newColText = s.mid(0,1).upper() + s.mid(1);
+ TQString newColText = s.mid(0,1).upper() + s.mid(1);
editColumnText->setText( newColText );
columnTextChanged( newColText );
editColumnText->blockSignals( FALSE );
}
-void TableEditor::currentRowChanged( QListBoxItem *i )
+void TableEditor::currentRowChanged( TQListBoxItem *i )
{
if ( !i )
return;
@@ -231,20 +231,20 @@ void TableEditor::newColumnClicked()
{
#ifndef QT_NO_TABLE
table->setNumCols( table->numCols() + 1 );
- QMap<QString, bool> m;
+ TQMap<TQString, bool> m;
for ( int i = 0; i < table->numCols() - 1; ++i )
m.insert( table->horizontalHeader()->label( i ), TRUE );
int n = table->numCols() - 1;
- QString t = QString::number( n );
+ TQString t = TQString::number( n );
while ( m.find( t ) != m.end() )
- t = QString::number( ++n );
+ t = TQString::number( ++n );
table->horizontalHeader()->setLabel( table->numCols() - 1, t );
listColumns->insertItem( t );
- QListBoxItem *item = listColumns->item( listColumns->count() - 1 );
+ TQListBoxItem *item = listColumns->item( listColumns->count() - 1 );
listColumns->setCurrentItem( item );
listColumns->setSelected( item, TRUE );
#ifndef QT_NO_SQL
- if ( ::qt_cast<QDataTable*>(editTable) ) {
+ if ( ::qt_cast<TQDataTable*>(editTable) ) {
comboFields->setFocus();
} else
#endif
@@ -259,16 +259,16 @@ void TableEditor::newRowClicked()
{
#ifndef QT_NO_TABLE
table->setNumRows( table->numRows() + 1 );
- QMap<QString, bool> m;
+ TQMap<TQString, bool> m;
for ( int i = 0; i < table->numRows() - 1; ++i )
m.insert( table->verticalHeader()->label( i ), TRUE );
int n = table->numRows() - 1;
- QString t = QString::number( n );
+ TQString t = TQString::number( n );
while ( m.find( t ) != m.end() )
- t = QString::number( ++n );
+ t = TQString::number( ++n );
table->verticalHeader()->setLabel( table->numRows() - 1, t );
listRows->insertItem( t );
- QListBoxItem *item = listRows->item( listRows->count() - 1 );
+ TQListBoxItem *item = listRows->item( listRows->count() - 1 );
listRows->setCurrentItem( item );
listRows->setSelected( item, TRUE );
#endif
@@ -287,14 +287,14 @@ void TableEditor::rowDownClicked()
listRows->count() < 2 )
return;
int index = listRows->currentItem() + 1;
- QListBoxItem *i = listRows->item( listRows->currentItem() );
+ TQListBoxItem *i = listRows->item( listRows->currentItem() );
listRows->takeItem( i );
listRows->insertItem( i, index );
listRows->setCurrentItem( i );
readRows();
}
-void TableEditor::rowTextChanged( const QString &s )
+void TableEditor::rowTextChanged( const TQString &s )
{
if ( listRows->currentItem() == -1 )
return;
@@ -314,7 +314,7 @@ void TableEditor::rowUpClicked()
listRows->count() < 2 )
return;
int index = listRows->currentItem() - 1;
- QListBoxItem *i = listRows->item( listRows->currentItem() );
+ TQListBoxItem *i = listRows->item( listRows->currentItem() );
listRows->takeItem( i );
listRows->insertItem( i, index );
listRows->setCurrentItem( i );
@@ -323,8 +323,8 @@ void TableEditor::rowUpClicked()
void TableEditor::applyClicked()
{
- QValueList<PopulateTableCommand::Row> rows;
- QValueList<PopulateTableCommand::Column> cols;
+ TQValueList<PopulateTableCommand::Row> rows;
+ TQValueList<PopulateTableCommand::Column> cols;
int i = 0;
#ifndef QT_NO_TABLE
@@ -354,11 +354,11 @@ void TableEditor::chooseRowPixmapClicked()
{
if ( listRows->currentItem() == -1 )
return;
- QPixmap pix;
+ TQPixmap pix;
if ( listRows->item( listRows->currentItem() )->pixmap() )
pix = qChoosePixmap( this, formWindow, *listRows->item( listRows->currentItem() )->pixmap() );
else
- pix = qChoosePixmap( this, formWindow, QPixmap() );
+ pix = qChoosePixmap( this, formWindow, TQPixmap() );
if ( pix.isNull() )
return;
@@ -374,7 +374,7 @@ void TableEditor::deleteRowPixmapClicked()
if ( listRows->currentItem() == -1 )
return;
#ifndef QT_NO_TABLE
- table->verticalHeader()->setLabel( listRows->currentItem(), QPixmap(), table->verticalHeader()->label( listRows->currentItem() ) );
+ table->verticalHeader()->setLabel( listRows->currentItem(), TQPixmap(), table->verticalHeader()->label( listRows->currentItem() ) );
listRows->changeItem( listRows->currentText(), listRows->currentItem() );
#endif
}
@@ -383,11 +383,11 @@ void TableEditor::chooseColPixmapClicked()
{
if ( listColumns->currentItem() == -1 )
return;
- QPixmap pix;
+ TQPixmap pix;
if ( listColumns->item( listColumns->currentItem() )->pixmap() )
pix = qChoosePixmap( this, formWindow, *listColumns->item( listColumns->currentItem() )->pixmap() );
else
- pix = qChoosePixmap( this, formWindow, QPixmap() );
+ pix = qChoosePixmap( this, formWindow, TQPixmap() );
if ( pix.isNull() )
return;
@@ -402,7 +402,7 @@ void TableEditor::deleteColPixmapClicked()
if ( listColumns->currentItem() == -1 )
return;
#ifndef QT_NO_TABLE
- table->horizontalHeader()->setLabel( listColumns->currentItem(), QPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) );
+ table->horizontalHeader()->setLabel( listColumns->currentItem(), TQPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) );
listColumns->changeItem( listColumns->currentText(), listColumns->currentItem() );
#endif
}
@@ -410,9 +410,9 @@ void TableEditor::deleteColPixmapClicked()
void TableEditor::readFromTable()
{
#ifndef QT_NO_TABLE
- QHeader *cols = editTable->horizontalHeader();
+ TQHeader *cols = editTable->horizontalHeader();
table->setNumCols( cols->count() );
- QMap<QString, QString> columnFields = MetaDataBase::columnFields( editTable );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( editTable );
for ( int i = 0; i < cols->count(); ++i ) {
if ( editTable->horizontalHeader()->iconSet( i ) ) {
table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ),
@@ -423,7 +423,7 @@ void TableEditor::readFromTable()
table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) );
listColumns->insertItem( editTable->horizontalHeader()->label( i ) );
}
- QString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) );
+ TQString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) );
fieldMap.insert( i, cf );
}
@@ -432,7 +432,7 @@ void TableEditor::readFromTable()
listColumns->setSelected( listColumns->firstItem(), TRUE );
}
- QHeader *rows = editTable->verticalHeader();
+ TQHeader *rows = editTable->verticalHeader();
table->setNumRows( rows->count() );
for ( int j = 0; j < rows->count(); ++j ) {
if ( editTable->verticalHeader()->iconSet( j ) ) {
@@ -457,7 +457,7 @@ void TableEditor::readColumns()
{
int j = 0;
#ifndef QT_NO_TABLE
- for ( QListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) {
+ for ( TQListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) {
if ( i->pixmap() )
table->horizontalHeader()->setLabel( j, *i->pixmap(), i->text() );
else
@@ -470,7 +470,7 @@ void TableEditor::readRows()
{
int j = 0;
#ifndef QT_NO_TABLE
- for ( QListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) {
+ for ( TQListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) {
if ( i->pixmap() )
table->verticalHeader()->setLabel( j, *i->pixmap(), i->text() );
else
@@ -482,13 +482,13 @@ void TableEditor::readRows()
void TableEditor::saveFieldMap()
{
tmpFieldMap.clear();
- for ( QMap<int, QString>::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it )
+ for ( TQMap<int, TQString>::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it )
tmpFieldMap.insert( listColumns->item( it.key() ), *it );
}
void TableEditor::restoreFieldMap()
{
fieldMap.clear();
- for ( QMap<QListBoxItem*, QString>::Iterator it = tmpFieldMap.begin(); it != tmpFieldMap.end(); ++it )
+ for ( TQMap<TQListBoxItem*, TQString>::Iterator it = tmpFieldMap.begin(); it != tmpFieldMap.end(); ++it )
fieldMap.insert( listColumns->index( it.key() ), *it );
}
diff --git a/kdevdesigner/designer/tableeditorimpl.h b/kdevdesigner/designer/tableeditorimpl.h
index 8d5ed20d..22a0e362 100644
--- a/kdevdesigner/designer/tableeditorimpl.h
+++ b/kdevdesigner/designer/tableeditorimpl.h
@@ -28,7 +28,7 @@
#define TABLEEDITORIMPL_H
#include "tableeditor.h"
-#include <qmap.h>
+#include <tqmap.h>
class QListBoxItem;
class QTable;
@@ -39,24 +39,24 @@ class TableEditor : public TableEditorBase
Q_OBJECT
public:
- TableEditor( QWidget* parent = 0, QWidget *editWidget = 0, FormWindow *fw = 0,
+ TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~TableEditor();
protected slots:
void columnDownClicked();
- void columnTextChanged( const QString & );
+ void columnTextChanged( const TQString & );
void columnUpClicked();
- void currentColumnChanged( QListBoxItem * );
- void currentFieldChanged( const QString & );
- void currentRowChanged( QListBoxItem * );
+ void currentColumnChanged( TQListBoxItem * );
+ void currentFieldChanged( const TQString & );
+ void currentRowChanged( TQListBoxItem * );
void deleteColumnClicked();
void deleteRowClicked();
void newColumnClicked();
void newRowClicked();
void okClicked();
void rowDownClicked();
- void rowTextChanged( const QString & );
+ void rowTextChanged( const TQString & );
void rowUpClicked();
void applyClicked();
void chooseRowPixmapClicked();
@@ -72,10 +72,10 @@ private:
void restoreFieldMap();
private:
- QTable *editTable;
+ TQTable *editTable;
FormWindow *formWindow;
- QMap<int, QString> fieldMap;
- QMap<QListBoxItem*, QString> tmpFieldMap;
+ TQMap<int, TQString> fieldMap;
+ TQMap<TQListBoxItem*, TQString> tmpFieldMap;
};
diff --git a/kdevdesigner/designer/timestamp.cpp b/kdevdesigner/designer/timestamp.cpp
index 9cda96e6..e7267b40 100644
--- a/kdevdesigner/designer/timestamp.cpp
+++ b/kdevdesigner/designer/timestamp.cpp
@@ -25,26 +25,26 @@
**********************************************************************/
#include "timestamp.h"
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
class QTimer;
-TimeStamp::TimeStamp( QObject *parent, const QString &f )
- : QObject( parent ), filename( f ), autoCheck( FALSE )
+TimeStamp::TimeStamp( TQObject *parent, const TQString &f )
+ : TQObject( parent ), filename( f ), autoCheck( FALSE )
{
- timer = new QTimer( this );
- connect( timer, SIGNAL( timeout() ), this, SLOT( autoCheckTimeStamp() ) );
+ timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoCheckTimeStamp() ) );
update();
}
-void TimeStamp::setFileName( const QString &f )
+void TimeStamp::setFileName( const TQString &f )
{
filename = f;
update();
}
-QString TimeStamp::fileName() const
+TQString TimeStamp::fileName() const
{
return filename;
}
@@ -60,18 +60,18 @@ void TimeStamp::setAutoCheckEnabled( bool a )
void TimeStamp::update()
{
- QFile f( filename );
+ TQFile f( filename );
if ( !f.exists() )
return;
- lastTimeStamp = QFileInfo( f ).lastModified();
+ lastTimeStamp = TQFileInfo( f ).lastModified();
}
bool TimeStamp::isUpToDate() const
{
- QFile f( filename );
+ TQFile f( filename );
if ( !f.exists() )
return TRUE;
- return lastTimeStamp == QFileInfo( f ).lastModified();
+ return lastTimeStamp == TQFileInfo( f ).lastModified();
}
bool TimeStamp::isAutoCheckEnabled() const
diff --git a/kdevdesigner/designer/timestamp.h b/kdevdesigner/designer/timestamp.h
index 373fb884..849a76f8 100644
--- a/kdevdesigner/designer/timestamp.h
+++ b/kdevdesigner/designer/timestamp.h
@@ -27,19 +27,19 @@
#ifndef TIMESTAMP_H
#define TIMESTAMP_H
-#include <qobject.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
class TimeStamp : public QObject
{
Q_OBJECT
public:
- TimeStamp( QObject *parent, const QString &f );
+ TimeStamp( TQObject *parent, const TQString &f );
- void setFileName( const QString &f );
- QString fileName() const;
+ void setFileName( const TQString &f );
+ TQString fileName() const;
void setAutoCheckEnabled( bool a );
void update();
@@ -53,10 +53,10 @@ private slots:
void autoCheckTimeStamp();
private:
- QDateTime lastTimeStamp;
- QString filename;
+ TQDateTime lastTimeStamp;
+ TQString filename;
bool autoCheck;
- QTimer *timer;
+ TQTimer *timer;
};
diff --git a/kdevdesigner/designer/variabledialogimpl.cpp b/kdevdesigner/designer/variabledialogimpl.cpp
index abaa7c68..19af5e6c 100644
--- a/kdevdesigner/designer/variabledialogimpl.cpp
+++ b/kdevdesigner/designer/variabledialogimpl.cpp
@@ -24,11 +24,11 @@
**
**********************************************************************/
-#include <qlistview.h>
-#include <qgroupbox.h>
+#include <tqlistview.h>
+#include <tqgroupbox.h>
#include <klineedit.h>
-#include <qcombobox.h>
-#include <qmessagebox.h>
+#include <tqcombobox.h>
+#include <tqmessagebox.h>
#include "metadatabase.h"
#include "formwindow.h"
@@ -40,14 +40,14 @@
#include <klocale.h>
-VariableDialog::VariableDialog( FormWindow *fw, QWidget *parent )
+VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent )
: VariableDialogBase( parent ), formWindow( fw )
{
varView->setSorting( -1 );
- QValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formWindow );
- QValueList<MetaDataBase::Variable>::Iterator it = varLst.begin();
+ TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formWindow );
+ TQValueList<MetaDataBase::Variable>::Iterator it = varLst.begin();
for ( ; it != varLst.end(); ++it ) {
- QListViewItem *i = new QListViewItem( varView );
+ TQListViewItem *i = new TQListViewItem( varView );
i->setText( 0, (*it).varName );
i->setText( 1, (*it).varAccess );
}
@@ -62,18 +62,18 @@ VariableDialog::~VariableDialog()
{
}
-void VariableDialog::setCurrentItem( QString text )
+void VariableDialog::setCurrentItem( TQString text )
{
- QListViewItem *i = varView->findItem( text, 0 );
+ TQListViewItem *i = varView->findItem( text, 0 );
if ( i )
varView->setCurrentItem( i );
}
void VariableDialog::okClicked()
{
- QValueList<MetaDataBase::Variable> lst;
+ TQValueList<MetaDataBase::Variable> lst;
- QListViewItemIterator it( varView );
+ TQListViewItemIterator it( varView );
while ( it.current() != 0 ) {
MetaDataBase::Variable v;
v.varName = it.current()->text( 0 ).simplifyWhiteSpace();
@@ -85,9 +85,9 @@ void VariableDialog::okClicked()
}
if ( !lst.isEmpty() ) {
- QValueList<MetaDataBase::Variable> invalidLst;
- QValueList<MetaDataBase::Variable>::Iterator it1 = lst.begin();
- QValueList<MetaDataBase::Variable>::Iterator it2;
+ TQValueList<MetaDataBase::Variable> invalidLst;
+ TQValueList<MetaDataBase::Variable>::Iterator it1 = lst.begin();
+ TQValueList<MetaDataBase::Variable>::Iterator it2;
for ( ; it1 != lst.end(); ++it1 ) {
it2 = it1;
++it2;
@@ -100,7 +100,7 @@ void VariableDialog::okClicked()
}
}
if ( !invalidLst.isEmpty() ) {
- if ( QMessageBox::information( this, i18n( "Edit Variables" ),
+ if ( TQMessageBox::information( this, i18n( "Edit Variables" ),
i18n( "One variable has been declared twice.\n"
"Remove this variable?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) {
for ( it2 = invalidLst.begin(); it2 != invalidLst.end(); ++it2 ) {
@@ -127,7 +127,7 @@ void VariableDialog::okClicked()
void VariableDialog::addVariable()
{
- QListViewItem *i = new QListViewItem( varView, varView->lastItem() );
+ TQListViewItem *i = new TQListViewItem( varView, varView->lastItem() );
i->setText( 0, "int newVariable" );
i->setText( 1, "protected" );
varView->setCurrentItem( i );
@@ -138,7 +138,7 @@ void VariableDialog::addVariable()
void VariableDialog::deleteVariable()
{
- QListViewItem *i = varView->selectedItem();
+ TQListViewItem *i = varView->selectedItem();
if ( !i )
return;
delete i;
@@ -147,7 +147,7 @@ void VariableDialog::deleteVariable()
varView->setSelected( varView->firstChild(), TRUE );
}
-void VariableDialog::currentItemChanged( QListViewItem *i )
+void VariableDialog::currentItemChanged( TQListViewItem *i )
{
if ( !i ) {
varName->clear();
diff --git a/kdevdesigner/designer/variabledialogimpl.h b/kdevdesigner/designer/variabledialogimpl.h
index 975e18d7..8c9a55cc 100644
--- a/kdevdesigner/designer/variabledialogimpl.h
+++ b/kdevdesigner/designer/variabledialogimpl.h
@@ -36,10 +36,10 @@ class VariableDialog : public VariableDialogBase
{
Q_OBJECT
public:
- VariableDialog( FormWindow *fw, QWidget* parent = 0 );
+ VariableDialog( FormWindow *fw, TQWidget* parent = 0 );
~VariableDialog();
- void setCurrentItem( QString text );
+ void setCurrentItem( TQString text );
protected slots:
void okClicked();
@@ -47,7 +47,7 @@ protected slots:
void deleteVariable();
void nameChanged();
void accessChanged();
- void currentItemChanged( QListViewItem *i );
+ void currentItemChanged( TQListViewItem *i );
private:
FormWindow *formWindow;
diff --git a/kdevdesigner/designer/widgetaction.cpp b/kdevdesigner/designer/widgetaction.cpp
index 36a9c14c..7568a98c 100644
--- a/kdevdesigner/designer/widgetaction.cpp
+++ b/kdevdesigner/designer/widgetaction.cpp
@@ -25,22 +25,22 @@
**********************************************************************/
#include "widgetaction.h"
-#include <qwidget.h>
-#include <qtoolbutton.h>
+#include <tqwidget.h>
+#include <tqtoolbutton.h>
#include "mainwindow.h"
-#include <qstylefactory.h>
-#include <qstyle.h>
+#include <tqstylefactory.h>
+#include <tqstyle.h>
-static QStyle *windowsStyle = 0;
+static TQStyle *windowsStyle = 0;
-void WidgetAction::addedTo( QWidget *w, QWidget *container )
+void WidgetAction::addedTo( TQWidget *w, TQWidget *container )
{
- if ( ::qt_cast<QToolButton*>(w) && ::qt_cast<QScrollView*>(container->parent()->parent()) ) {
+ if ( ::qt_cast<TQToolButton*>(w) && ::qt_cast<TQScrollView*>(container->parent()->parent()) ) {
if ( !windowsStyle )
- windowsStyle = QStyleFactory::create( "windows" );
+ windowsStyle = TQStyleFactory::create( "windows" );
w->setStyle( windowsStyle );
- ( (QToolButton*)w )->setUsesTextLabel( TRUE );
- ( (QToolButton*)w )->setTextPosition( QToolButton::Right );
+ ( (TQToolButton*)w )->setUsesTextLabel( TRUE );
+ ( (TQToolButton*)w )->setTextPosition( TQToolButton::Right );
w->setBackgroundMode( container->backgroundMode() );
}
}
@@ -51,7 +51,7 @@ WidgetAction::~WidgetAction()
MainWindow::self->toolActions.removeRef( this );
}
-void WidgetAction::init( const QString &g )
+void WidgetAction::init( const TQString &g )
{
MainWindow::self->toolActions.append( this );
grp = g;
diff --git a/kdevdesigner/designer/widgetaction.h b/kdevdesigner/designer/widgetaction.h
index 6215d88d..fa3971c3 100644
--- a/kdevdesigner/designer/widgetaction.h
+++ b/kdevdesigner/designer/widgetaction.h
@@ -27,38 +27,38 @@
#ifndef WIDGETACTION_H
#define WIDGETACTION_H
-#include <qaction.h>
+#include <tqaction.h>
class WidgetAction : public QAction
{
Q_OBJECT
public:
- WidgetAction( const QString &grp, QObject* parent,
+ WidgetAction( const TQString &grp, TQObject* parent,
const char* name = 0, bool toggle = FALSE )
- : QAction( parent, name, toggle ) { init( grp ); }
- WidgetAction( const QString &grp, const QString& text,
- const QIconSet& icon, const QString& menuText, QKeySequence accel,
- QObject* parent, const char* name = 0, bool toggle = FALSE )
- : QAction( text, icon, menuText, accel, parent, name, toggle ) { init( grp ); }
- WidgetAction( const QString &grp, const QString& text,
- const QString& menuText, QKeySequence accel, QObject* parent,
+ : TQAction( parent, name, toggle ) { init( grp ); }
+ WidgetAction( const TQString &grp, const TQString& text,
+ const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
+ TQObject* parent, const char* name = 0, bool toggle = FALSE )
+ : TQAction( text, icon, menuText, accel, parent, name, toggle ) { init( grp ); }
+ WidgetAction( const TQString &grp, const TQString& text,
+ const TQString& menuText, TQKeySequence accel, TQObject* parent,
const char* name = 0, bool toggle = FALSE )
- : QAction( text, menuText, accel, parent, name, toggle ) { init( grp ); }
+ : TQAction( text, menuText, accel, parent, name, toggle ) { init( grp ); }
~WidgetAction();
#if !defined(Q_NO_USING_KEYWORD)
- using QAction::addedTo;
+ using TQAction::addedTo;
#endif
- void addedTo( QWidget *, QWidget * );
+ void addedTo( TQWidget *, TQWidget * );
- QString group() const { return grp; }
+ TQString group() const { return grp; }
private:
- void init( const QString &g );
+ void init( const TQString &g );
private:
- QString grp;
+ TQString grp;
};
diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp
index 191fbb1f..410dab23 100644
--- a/kdevdesigner/designer/widgetfactory.cpp
+++ b/kdevdesigner/designer/widgetfactory.cpp
@@ -24,7 +24,7 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler need this here
+#include <tqvariant.h> // HP-UX compiler need this here
#include "widgetfactory.h"
#include <widgetdatabase.h>
#include "metadatabase.h"
@@ -49,60 +49,60 @@
#include <kiconloader.h>
-#include <qfeatures.h>
+#include <tqfeatures.h>
-#include <qpixmap.h>
-#include <qgroupbox.h>
-#include <qiconview.h>
+#include <tqpixmap.h>
+#include <tqgroupbox.h>
+#include <tqiconview.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
#ifndef QT_NO_SQL
-#include <qdatatable.h>
+#include <tqdatatable.h>
#endif
-#include <qdatetimeedit.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qmultilineedit.h>
-#include <qtextedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qcombobox.h>
-#include <qtabbar.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qobjectlist.h>
-#include <qlcdnumber.h>
-#include <qslider.h>
-#include <qdial.h>
-#include <qprogressbar.h>
-#include <qtextview.h>
-#include <qtextbrowser.h>
-#include <qframe.h>
-#include <qmetaobject.h>
-#include <qwidgetstack.h>
-#include <qwizard.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qscrollbar.h>
-#include <qmainwindow.h>
-#include <qmenubar.h>
-#include <qapplication.h>
-#include <qsplitter.h>
-#include <qtoolbox.h>
-#include <qsizegrip.h>
+#include <tqdatetimeedit.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqmultilineedit.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqcombobox.h>
+#include <tqtabbar.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqobjectlist.h>
+#include <tqlcdnumber.h>
+#include <tqslider.h>
+#include <tqdial.h>
+#include <tqprogressbar.h>
+#include <tqtextview.h>
+#include <tqtextbrowser.h>
+#include <tqframe.h>
+#include <tqmetaobject.h>
+#include <tqwidgetstack.h>
+#include <tqwizard.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqscrollbar.h>
+#include <tqmainwindow.h>
+#include <tqmenubar.h>
+#include <tqapplication.h>
+#include <tqsplitter.h>
+#include <tqtoolbox.h>
+#include <tqsizegrip.h>
#ifndef QT_NO_SQL
#include "database.h"
#endif
#define NO_STATIC_COLORS
#include <globaldefs.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <klocale.h>
-FormWindow *find_formwindow( QWidget *w )
+FormWindow *find_formwindow( TQWidget *w )
{
if ( !w )
return 0;
@@ -115,16 +115,16 @@ FormWindow *find_formwindow( QWidget *w )
}
}
-void QLayoutWidget::paintEvent( QPaintEvent* )
+void QLayoutWidget::paintEvent( TQPaintEvent* )
{
- QPainter p ( this );
+ TQPainter p ( this );
p.setPen( red );
p.drawRect( rect() );
}
-QDesignerTabWidget::QDesignerTabWidget( QWidget *parent, const char *name )
- : QTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE )
+QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name )
+ : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE )
{
tabBar()->setAcceptDrops( TRUE );
tabBar()->installEventFilter( this );
@@ -140,27 +140,27 @@ void QDesignerTabWidget::setCurrentPage( int i )
tabBar()->setCurrentTab( i );
}
-QString QDesignerTabWidget::pageTitle() const
+TQString QDesignerTabWidget::pageTitle() const
{
- return ((QTabWidget*)this)->tabLabel( QTabWidget::currentPage() );
+ return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() );
}
-void QDesignerTabWidget::setPageTitle( const QString& title )
+void QDesignerTabWidget::setPageTitle( const TQString& title )
{
- changeTab( QTabWidget::currentPage(), title );
+ changeTab( TQTabWidget::currentPage(), title );
}
-void QDesignerTabWidget::setPageName( const QCString& name )
+void QDesignerTabWidget::setPageName( const TQCString& name )
{
- if ( QTabWidget::currentPage() )
- QTabWidget::currentPage()->setName( name );
+ if ( TQTabWidget::currentPage() )
+ TQTabWidget::currentPage()->setName( name );
}
-QCString QDesignerTabWidget::pageName() const
+TQCString QDesignerTabWidget::pageName() const
{
- if ( !QTabWidget::currentPage() )
+ if ( !TQTabWidget::currentPage() )
return 0;
- return QTabWidget::currentPage()->name();
+ return TQTabWidget::currentPage()->name();
}
int QDesignerTabWidget::count() const
@@ -168,24 +168,24 @@ int QDesignerTabWidget::count() const
return tabBar()->count();
}
-bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )
+bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
if ( o != tabBar() ) return FALSE;
switch ( e->type() ) {
- case QEvent::MouseButtonPress: {
+ case TQEvent::MouseButtonPress: {
mousePressed = TRUE;
- QMouseEvent *me = (QMouseEvent*)e;
+ TQMouseEvent *me = (TQMouseEvent*)e;
pressPoint = me->pos();
}
break;
- case QEvent::MouseMove: {
- QMouseEvent *me = (QMouseEvent*)e;
- if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > QApplication::startDragDistance() ) {
- QTextDrag *drg = new QTextDrag( QString::number( (long) this ) , this );
+ case TQEvent::MouseMove: {
+ TQMouseEvent *me = (TQMouseEvent*)e;
+ if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) {
+ TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this );
mousePressed = FALSE;
- dragPage = QTabWidget::currentPage();
- dragLabel = QTabWidget::tabLabel( dragPage );
+ dragPage = TQTabWidget::currentPage();
+ dragLabel = TQTabWidget::tabLabel( dragPage );
int index = indexOf( dragPage );
@@ -199,24 +199,24 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )
}
}
break;
- case QEvent::DragLeave: {
+ case TQEvent::DragLeave: {
if ( dropIndicator )
dropIndicator->hide();
}
break;
- case QEvent::DragMove: {
- QDragEnterEvent *de = (QDragEnterEvent*) e;
- if ( QTextDrag::canDecode( de ) ) {
- QString text;
- QTextDrag::decode( de, text );
- if ( text == QString::number( (long)this ) )
+ case TQEvent::DragMove: {
+ TQDragEnterEvent *de = (TQDragEnterEvent*) e;
+ if ( TQTextDrag::canDecode( de ) ) {
+ TQString text;
+ TQTextDrag::decode( de, text );
+ if ( text == TQString::number( (long)this ) )
de->accept();
else
return FALSE;
}
int index = 0;
- QRect rect;
+ TQRect rect;
for ( ; index < tabBar()->count(); index++ ) {
if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {
rect = tabBar()->tabAt( index )->rect();
@@ -225,33 +225,33 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )
}
if ( index == tabBar()->count() -1 ) {
- QRect rect2 = rect;
+ TQRect rect2 = rect;
rect2.setLeft( rect2.left() + rect2.width() / 2 );
if ( rect2.contains( de->pos() ) )
index++;
}
if ( ! dropIndicator ) {
- dropIndicator = new QWidget( this );
+ dropIndicator = new TQWidget( this );
dropIndicator->setBackgroundColor( red );
}
- QPoint pos;
+ TQPoint pos;
if ( index == tabBar()->count() )
- pos = tabBar()->mapToParent( QPoint( rect.x() + rect.width(), rect.y() ) );
+ pos = tabBar()->mapToParent( TQPoint( rect.x() + rect.width(), rect.y() ) );
else
- pos = tabBar()->mapToParent( QPoint( rect.x(), rect.y() ) );
+ pos = tabBar()->mapToParent( TQPoint( rect.x(), rect.y() ) );
dropIndicator->setGeometry( pos.x(), pos.y() , 3, rect.height() );
dropIndicator->show();
}
break;
- case QEvent::Drop: {
- QDragEnterEvent *de = (QDragEnterEvent*) e;
- if ( QTextDrag::canDecode( de ) ) {
- QString text;
- QTextDrag::decode( de, text );
- if ( text == QString::number( (long)this ) ) {
+ case TQEvent::Drop: {
+ TQDragEnterEvent *de = (TQDragEnterEvent*) e;
+ if ( TQTextDrag::canDecode( de ) ) {
+ TQString text;
+ TQTextDrag::decode( de, text );
+ if ( text == TQString::number( (long)this ) ) {
int newIndex = 0;
for ( ; newIndex < tabBar()->count(); newIndex++ ) {
@@ -260,7 +260,7 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )
}
if ( newIndex == tabBar()->count() -1 ) {
- QRect rect2 = tabBar()->tabAt( newIndex )->rect();
+ TQRect rect2 = tabBar()->tabAt( newIndex )->rect();
rect2.setLeft( rect2.left() + rect2.width() / 2 );
if ( rect2.contains( de->pos() ) )
newIndex++;
@@ -290,19 +290,19 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )
}
-QDesignerWidgetStack::QDesignerWidgetStack( QWidget *parent, const char *name )
- : QWidgetStack( parent, name )
+QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name )
+ : TQWidgetStack( parent, name )
{
- prev = new QToolButton( Qt::LeftArrow, this, "designer_wizardstack_button" );
+ prev = new TQToolButton( Qt::LeftArrow, this, "designer_wizardstack_button" );
prev->setAutoRaise( TRUE );
prev->setAutoRepeat( TRUE );
- prev->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ) );
- next = new QToolButton( Qt::RightArrow, this, "designer_wizardstack_button" );
+ prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
+ next = new TQToolButton( Qt::RightArrow, this, "designer_wizardstack_button" );
next->setAutoRaise( TRUE );
next->setAutoRepeat( TRUE );
- next->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ) );
- connect( prev, SIGNAL( clicked() ), this, SLOT( prevPage() ) );
- connect( next, SIGNAL( clicked() ), this, SLOT( nextPage() ) );
+ next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
+ connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) );
+ connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) );
updateButtons();
}
@@ -346,14 +346,14 @@ void QDesignerWidgetStack::setCurrentPage( int i )
updateButtons();
}
-QCString QDesignerWidgetStack::pageName() const
+TQCString QDesignerWidgetStack::pageName() const
{
if ( !visibleWidget() )
return 0;
return visibleWidget()->name();
}
-void QDesignerWidgetStack::setPageName( const QCString& name )
+void QDesignerWidgetStack::setPageName( const TQCString& name )
{
if ( visibleWidget() )
visibleWidget()->setName( name );
@@ -364,7 +364,7 @@ int QDesignerWidgetStack::count() const
return pages.count();
}
-QWidget* QDesignerWidgetStack::page( int i ) const
+TQWidget* QDesignerWidgetStack::page( int i ) const
{
if ( i < 0 || i >= count() )
return 0;
@@ -373,7 +373,7 @@ QWidget* QDesignerWidgetStack::page( int i ) const
}
-int QDesignerWidgetStack::insertPage( QWidget *p, int i )
+int QDesignerWidgetStack::insertPage( TQWidget *p, int i )
{
if ( i < 0 )
pages.append( p );
@@ -382,12 +382,12 @@ int QDesignerWidgetStack::insertPage( QWidget *p, int i )
addWidget( p );
p->show();
raiseWidget( p );
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
updateButtons();
return pages.find( p );
}
-int QDesignerWidgetStack::removePage( QWidget *p )
+int QDesignerWidgetStack::removePage( TQWidget *p )
{
int i = pages.find( p );
pages.remove( p );
@@ -429,30 +429,30 @@ void QDesignerWizard::setCurrentPage( int i )
}
}
-QString QDesignerWizard::pageTitle() const
+TQString QDesignerWizard::pageTitle() const
{
return title( currentPage() );
}
-void QDesignerWizard::setPageTitle( const QString& title )
+void QDesignerWizard::setPageTitle( const TQString& title )
{
setTitle( currentPage(), title );
}
-void QDesignerWizard::setPageName( const QCString& name )
+void QDesignerWizard::setPageName( const TQCString& name )
{
- if ( QWizard::currentPage() )
- QWizard::currentPage()->setName( name );
+ if ( TQWizard::currentPage() )
+ TQWizard::currentPage()->setName( name );
}
-QCString QDesignerWizard::pageName() const
+TQCString QDesignerWizard::pageName() const
{
- if ( !QWizard::currentPage() )
+ if ( !TQWizard::currentPage() )
return 0;
- return QWizard::currentPage()->name();
+ return TQWizard::currentPage()->name();
}
-int QDesignerWizard::pageNum( QWidget *p )
+int QDesignerWizard::pageNum( TQWidget *p )
{
for ( int i = 0; i < pageCount(); ++i ) {
if ( page( i ) == p )
@@ -461,28 +461,28 @@ int QDesignerWizard::pageNum( QWidget *p )
return -1;
}
-void QDesignerWizard::addPage( QWidget *p, const QString &t )
+void QDesignerWizard::addPage( TQWidget *p, const TQString &t )
{
- QWizard::addPage( p, t );
+ TQWizard::addPage( p, t );
if ( removedPages.find( p ) )
removedPages.remove( p );
}
-void QDesignerWizard::removePage( QWidget *p )
+void QDesignerWizard::removePage( TQWidget *p )
{
- QWizard::removePage( p );
+ TQWizard::removePage( p );
removedPages.insert( p, p );
}
-void QDesignerWizard::insertPage( QWidget *p, const QString &t, int index )
+void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
{
- QWizard::insertPage( p, t, index );
+ TQWizard::insertPage( p, t, index );
if ( removedPages.find( p ) )
removedPages.remove( p );
}
-QMap< int, QMap< QString, QVariant> > *defaultProperties = 0;
-QMap< int, QStringList > *changedProperties = 0;
+TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = 0;
+TQMap< int, TQStringList > *changedProperties = 0;
/*!
\class WidgetFactory widgetfactory.h
@@ -495,24 +495,24 @@ QMap< int, QStringList > *changedProperties = 0;
*/
-void WidgetFactory::saveDefaultProperties( QObject *w, int id )
+void WidgetFactory::saveDefaultProperties( TQObject *w, int id )
{
- QMap< QString, QVariant> propMap;
- QStrList lst = w->metaObject()->propertyNames( TRUE );
+ TQMap< TQString, TQVariant> propMap;
+ TQStrList lst = w->metaObject()->propertyNames( TRUE );
for ( uint i = 0; i < lst.count(); ++i ) {
- QVariant var = w->property( lst.at( i ) );
+ TQVariant var = w->property( lst.at( i ) );
if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 )
- var = QVariant( QPixmap() );
+ var = TQVariant( TQPixmap() );
else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 )
- var = QVariant( QIconSet() );
+ var = TQVariant( TQIconSet() );
propMap.replace( lst.at( i ), var );
}
defaultProperties->replace( id, propMap );
}
-void WidgetFactory::saveChangedProperties( QObject *w, int id )
+void WidgetFactory::saveChangedProperties( TQObject *w, int id )
{
- QStringList l = MetaDataBase::changedProperties( w );
+ TQStringList l = MetaDataBase::changedProperties( w );
changedProperties->insert( id, l );
}
@@ -522,23 +522,23 @@ void WidgetFactory::saveChangedProperties( QObject *w, int id )
created.
*/
-QWidget *WidgetFactory::create( int id, QWidget *parent, const char *name, bool init, const QRect *r, Qt::Orientation orient )
+TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient )
{
- QString n = WidgetDatabase::className( id );
+ TQString n = WidgetDatabase::className( id );
if ( n.isEmpty() )
return 0;
if ( !defaultProperties ) {
- defaultProperties = new QMap< int, QMap< QString, QVariant> >();
- changedProperties = new QMap< int, QStringList >();
+ defaultProperties = new TQMap< int, TQMap< TQString, TQVariant> >();
+ changedProperties = new TQMap< int, TQStringList >();
}
- QWidget *w = 0;
- QString str = WidgetDatabase::createWidgetName( id );
+ TQWidget *w = 0;
+ TQString str = WidgetDatabase::createWidgetName( id );
const char *s = str.latin1();
w = createWidget( n, parent, name ? name : s, init, r, orient );
- if ( ::qt_cast<QScrollView*>(w) )
- ( (QScrollView*)w )->disableSizeHintCaching();
+ if ( ::qt_cast<TQScrollView*>(w) )
+ ( (TQScrollView*)w )->disableSizeHintCaching();
if ( !w && WidgetDatabase::isCustomWidget( id ) )
w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) );
if ( !w )
@@ -557,7 +557,7 @@ QWidget *WidgetFactory::create( int id, QWidget *parent, const char *name, bool
which can be \c HBox, \c VBox or \c Grid.
*/
-QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutType type )
+TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type )
{
int spacing = MainWindow::self->currentLayoutDefaultSpacing();
int margin = 0;
@@ -570,37 +570,37 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
widget && ::qt_cast<FormWindow*>(widget->parentWidget()) ) )
margin = MainWindow::self->currentLayoutDefaultMargin();
- if ( !layout && ::qt_cast<QTabWidget*>(widget) )
- widget = ((QTabWidget*)widget)->currentPage();
+ if ( !layout && ::qt_cast<TQTabWidget*>(widget) )
+ widget = ((TQTabWidget*)widget)->currentPage();
- if ( !layout && ::qt_cast<QWizard*>(widget) )
- widget = ((QWizard*)widget)->currentPage();
+ if ( !layout && ::qt_cast<TQWizard*>(widget) )
+ widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && ::qt_cast<QMainWindow*>(widget) )
- widget = ((QMainWindow*)widget)->centralWidget();
+ if ( !layout && ::qt_cast<TQMainWindow*>(widget) )
+ widget = ((TQMainWindow*)widget)->centralWidget();
- if ( !layout && ::qt_cast<QWidgetStack*>(widget) )
- widget = ((QWidgetStack*)widget)->visibleWidget();
+ if ( !layout && ::qt_cast<TQWidgetStack*>(widget) )
+ widget = ((TQWidgetStack*)widget)->visibleWidget();
- if ( !layout && ::qt_cast<QToolBox*>(widget) )
- widget = ((QToolBox*)widget)->currentItem();
+ if ( !layout && ::qt_cast<TQToolBox*>(widget) )
+ widget = ((TQToolBox*)widget)->currentItem();
MetaDataBase::addEntry( widget );
- QLayout *l = 0;
+ TQLayout *l = 0;
int align = 0;
- if ( !layout && ::qt_cast<QGroupBox*>(widget) ) {
- QGroupBox *gb = (QGroupBox*)widget;
+ if ( !layout && ::qt_cast<TQGroupBox*>(widget) ) {
+ TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
layout = gb->layout();
layout->setMargin( 0 );
layout->setSpacing( 0 );
switch ( type ) {
case HBox:
- l = new QHBoxLayout( layout );
+ l = new TQHBoxLayout( layout );
break;
case VBox:
- l = new QVBoxLayout( layout );
+ l = new TQVBoxLayout( layout );
break;
case Grid:
l = new QDesignerGridLayout( layout );
@@ -615,10 +615,10 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
if ( layout ) {
switch ( type ) {
case HBox:
- l = new QHBoxLayout( layout );
+ l = new TQHBoxLayout( layout );
break;
case VBox:
- l = new QVBoxLayout( layout );
+ l = new TQVBoxLayout( layout );
break;
case Grid:
l = new QDesignerGridLayout( layout );
@@ -632,10 +632,10 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
} else {
switch ( type ) {
case HBox:
- l = new QHBoxLayout( widget );
+ l = new TQHBoxLayout( widget );
break;
case VBox:
- l = new QVBoxLayout( widget );
+ l = new TQVBoxLayout( widget );
break;
case Grid:
l = new QDesignerGridLayout( widget );
@@ -658,21 +658,21 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
return l;
}
-void WidgetFactory::deleteLayout( QWidget *widget )
+void WidgetFactory::deleteLayout( TQWidget *widget )
{
if ( !widget )
return;
- if ( ::qt_cast<QTabWidget*>(widget) )
- widget = ((QTabWidget*)widget)->currentPage();
- if ( ::qt_cast<QWizard*>(widget) )
- widget = ((QWizard*)widget)->currentPage();
- if ( ::qt_cast<QMainWindow*>(widget) )
- widget = ((QMainWindow*)widget)->centralWidget();
- if ( ::qt_cast<QWidgetStack*>(widget) )
- widget = ((QWidgetStack*)widget)->visibleWidget();
- if ( ::qt_cast<QToolBox*>(widget) )
- widget = ((QToolBox*)widget)->currentItem();
+ if ( ::qt_cast<TQTabWidget*>(widget) )
+ widget = ((TQTabWidget*)widget)->currentPage();
+ if ( ::qt_cast<TQWizard*>(widget) )
+ widget = ((TQWizard*)widget)->currentPage();
+ if ( ::qt_cast<TQMainWindow*>(widget) )
+ widget = ((TQMainWindow*)widget)->centralWidget();
+ if ( ::qt_cast<TQWidgetStack*>(widget) )
+ widget = ((TQWidgetStack*)widget)->visibleWidget();
+ if ( ::qt_cast<TQToolBox*>(widget) )
+ widget = ((TQToolBox*)widget)->currentItem();
delete widget->layout();
}
@@ -683,76 +683,76 @@ void WidgetFactory::deleteLayout( QWidget *widget )
has to be in sync with the initChangedProperties() function!
*/
-QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, const char *name, bool init,
- const QRect *r, Qt::Orientation orient )
+TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
+ const TQRect *r, Qt::Orientation orient )
{
- if ( className == "QPushButton" ) {
- QPushButton *b = 0;
+ if ( className == "TQPushButton" ) {
+ TQPushButton *b = 0;
if ( init ) {
b = new QDesignerPushButton( parent, name );
- b->setText( QString::fromLatin1( name ) );
+ b->setText( TQString::fromLatin1( name ) );
} else {
b = new QDesignerPushButton( parent, name );
}
- QWidget *w = find_formwindow( b );
- b->setAutoDefault( w && ::qt_cast<QDialog*>(((FormWindow*)w)->mainContainer()) );
+ TQWidget *w = find_formwindow( b );
+ b->setAutoDefault( w && ::qt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) );
return b;
- } else if ( className == "QToolButton" ) {
+ } else if ( className == "TQToolButton" ) {
if ( init ) {
QDesignerToolButton *tb = new QDesignerToolButton( parent, name );
- if ( ::qt_cast<QToolBox*>(widgetOfContainer(parent))) {
+ if ( ::qt_cast<TQToolBox*>(widgetOfContainer(parent))) {
tb->setUsesTextLabel(TRUE);
tb->setTextLabel("...");
tb->setAutoRaise(TRUE);
- tb->setTextPosition(QToolButton::BesideIcon);
+ tb->setTextPosition(TQToolButton::BesideIcon);
} else {
tb->setText( "..." );
}
return tb;
}
return new QDesignerToolButton( parent, name );
- } else if ( className == "QCheckBox" ) {
+ } else if ( className == "TQCheckBox" ) {
if ( init ) {
QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name );
- cb->setText( QString::fromLatin1( name ) );
+ cb->setText( TQString::fromLatin1( name ) );
return cb;
}
return new QDesignerCheckBox( parent, name );
- } else if ( className == "QRadioButton" ) {
+ } else if ( className == "TQRadioButton" ) {
if ( init ) {
QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name );
- rb->setText( QString::fromLatin1( name ) );
+ rb->setText( TQString::fromLatin1( name ) );
return rb;
}
return new QDesignerRadioButton( parent, name );
- } else if ( className == "QGroupBox" ) {
+ } else if ( className == "TQGroupBox" ) {
if ( init )
- return new QGroupBox( QString::fromLatin1( name ), parent, name );
- return new QGroupBox( parent, name );
- } else if ( className == "QButtonGroup" ) {
+ return new TQGroupBox( TQString::fromLatin1( name ), parent, name );
+ return new TQGroupBox( parent, name );
+ } else if ( className == "TQButtonGroup" ) {
if ( init )
- return new QButtonGroup( QString::fromLatin1( name ), parent, name );
- return new QButtonGroup( parent, name );
- } else if ( className == "QIconView" ) {
+ return new TQButtonGroup( TQString::fromLatin1( name ), parent, name );
+ return new TQButtonGroup( parent, name );
+ } else if ( className == "TQIconView" ) {
#if !defined(QT_NO_ICONVIEW)
- QIconView* iv = new QIconView( parent, name );
+ TQIconView* iv = new TQIconView( parent, name );
if ( init )
- (void) new QIconViewItem( iv, i18n( "New Item" ) );
+ (void) new TQIconViewItem( iv, i18n( "New Item" ) );
return iv;
#else
return 0;
#endif
- } else if ( className == "QTable" ) {
+ } else if ( className == "TQTable" ) {
#if !defined(QT_NO_TABLE)
if ( init )
- return new QTable( 3, 3, parent, name );
- return new QTable( parent, name );
+ return new TQTable( 3, 3, parent, name );
+ return new TQTable( parent, name );
#else
return 0;
#endif
#ifndef QT_NO_SQL
- } else if ( className == "QDataTable" ) {
- return new QDataTable( parent, name );
+ } else if ( className == "TQDataTable" ) {
+ return new TQDataTable( parent, name );
#endif //QT_NO_SQL
} else if ( className == "QDateEdit" ) {
return new QDateEdit( parent, name );
@@ -761,35 +761,35 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
} else if ( className == "QDateTimeEdit" ) {
return new QDateTimeEdit( parent, name );
}
- else if ( className == "QListBox" ) {
- QListBox* lb = new QListBox( parent, name );
+ else if ( className == "TQListBox" ) {
+ TQListBox* lb = new TQListBox( parent, name );
if ( init ) {
lb->insertItem( i18n( "New Item" ) );
lb->setCurrentItem( 0 );
}
return lb;
- } else if ( className == "QListView" ) {
- QListView *lv = new QListView( parent, name );
+ } else if ( className == "TQListView" ) {
+ TQListView *lv = new TQListView( parent, name );
lv->setSorting( -1 );
if ( init ) {
lv->addColumn( i18n( "Column 1" ) );
- lv->setCurrentItem( new QListViewItem( lv, i18n( "New Item" ) ) );
+ lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) );
}
return lv;
- } else if ( className == "QLineEdit" )
- return new QLineEdit( parent, name );
- else if ( className == "QSpinBox" )
- return new QSpinBox( parent, name );
- else if ( className == "QSplitter" )
- return new QSplitter( parent, name );
- else if ( className == "QMultiLineEdit" )
- return new QMultiLineEdit( parent, name );
- else if ( className == "QTextEdit" )
- return new QTextEdit( parent, name );
- else if ( className == "QLabel" || className == "TextLabel" ) {
+ } else if ( className == "TQLineEdit" )
+ return new TQLineEdit( parent, name );
+ else if ( className == "TQSpinBox" )
+ return new TQSpinBox( parent, name );
+ else if ( className == "TQSplitter" )
+ return new TQSplitter( parent, name );
+ else if ( className == "TQMultiLineEdit" )
+ return new TQMultiLineEdit( parent, name );
+ else if ( className == "TQTextEdit" )
+ return new TQTextEdit( parent, name );
+ else if ( className == "TQLabel" || className == "TextLabel" ) {
QDesignerLabel *l = new QDesignerLabel( parent, name );
if ( init ) {
- l->setText( QString::fromLatin1( name ) );
+ l->setText( TQString::fromLatin1( name ) );
MetaDataBase::addEntry( l );
MetaDataBase::setPropertyChanged( l, "text", TRUE );
}
@@ -806,39 +806,39 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
return l;
} else if ( className == "QLayoutWidget" )
return new QLayoutWidget( parent, name );
- else if ( className == "QTabWidget" ) {
- QTabWidget *tw = new QDesignerTabWidget( parent, name );
+ else if ( className == "TQTabWidget" ) {
+ TQTabWidget *tw = new QDesignerTabWidget( parent, name );
if ( init ) {
FormWindow *fw = find_formwindow( parent );
- QWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new QWidget( tw, "tab" );
+ TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" );
tw->addTab( w, i18n("Tab 1") );
MetaDataBase::addEntry( w );
- w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new QWidget( tw, "tab" );
+ w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" );
tw->addTab( w, i18n("Tab 2") );
MetaDataBase::addEntry( tw );
MetaDataBase::addEntry( w );
}
return tw;
- } else if ( className == "QWidgetStack" ) {
+ } else if ( className == "TQWidgetStack" ) {
QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name );
if ( init ) {
FormWindow *fw = find_formwindow( parent );
- QWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new QWidget( ws, "WStackPage" );
+ TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" );
ws->insertPage( w );
MetaDataBase::addEntry( w );
MetaDataBase::addEntry( ws );
}
return ws;
- } else if ( className == "QComboBox" ) {
- return new QComboBox( FALSE, parent, name );
- } else if ( className == "QWidget" ) {
+ } else if ( className == "TQComboBox" ) {
+ return new TQComboBox( FALSE, parent, name );
+ } else if ( className == "TQWidget" ) {
if ( parent &&
( ::qt_cast<FormWindow*>(parent) ||
- ::qt_cast<QWizard*>(parent) ||
- ::qt_cast<QTabWidget*>(parent) ||
- ::qt_cast<QWidgetStack*>(parent) ||
- ::qt_cast<QToolBox*>(parent) ||
- ::qt_cast<QMainWindow*>(parent) ) ) {
+ ::qt_cast<TQWizard*>(parent) ||
+ ::qt_cast<TQTabWidget*>(parent) ||
+ ::qt_cast<TQWidgetStack*>(parent) ||
+ ::qt_cast<TQToolBox*>(parent) ||
+ ::qt_cast<TQMainWindow*>(parent) ) ) {
FormWindow *fw = find_formwindow( parent );
if ( fw ) {
QDesignerWidget *dw = new QDesignerWidget( fw, parent, name );
@@ -846,33 +846,33 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
return dw;
}
}
- return new QWidget( parent, name );
- } else if ( className == "QDialog" ) {
- QDialog *dia = 0;
+ return new TQWidget( parent, name );
+ } else if ( className == "TQDialog" ) {
+ TQDialog *dia = 0;
if ( ::qt_cast<FormWindow*>(parent) )
dia = new QDesignerDialog( (FormWindow*)parent, parent, name );
else
- dia = new QDialog( parent, name );
+ dia = new TQDialog( parent, name );
#if defined(QT_NON_COMMERCIAL)
if ( ::qt_cast<MainWindow*>(parent) )
#else
if ( parent )
#endif
- dia->reparent( parent, QPoint( 0, 0 ), TRUE );
+ dia->reparent( parent, TQPoint( 0, 0 ), TRUE );
return dia;
- } else if ( className == "QWizard" ) {
- QWizard *wiz = new QDesignerWizard( parent, name );
+ } else if ( className == "TQWizard" ) {
+ TQWizard *wiz = new QDesignerWizard( parent, name );
#if defined(QT_NON_COMMERCIAL)
if ( ::qt_cast<MainWindow*>(parent) )
#else
if ( parent )
#endif
- wiz->reparent( parent, QPoint( 0, 0 ), TRUE );
+ wiz->reparent( parent, TQPoint( 0, 0 ), TRUE );
if ( init && ::qt_cast<FormWindow*>(parent) ) {
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" );
MetaDataBase::addEntry( dw );
wiz->addPage( dw, i18n( "Page" ) );
- QTimer::singleShot( 0, wiz, SLOT( next() ) );
+ TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) );
}
return wiz;
} else if ( className == "Spacer" ) {
@@ -889,18 +889,18 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
else
s->setOrientation( Qt::Horizontal );
return s;
- } else if ( className == "QLCDNumber" )
- return new QLCDNumber( parent, name );
- else if ( className == "QProgressBar" )
- return new QProgressBar( parent, name );
- else if ( className == "QTextView" )
- return new QTextView( parent, name );
- else if ( className == "QTextBrowser" )
- return new QTextBrowser( parent, name );
- else if ( className == "QDial" )
- return new QDial( parent, name );
- else if ( className == "QSlider" ) {
- QSlider *s = new QSlider( parent, name );
+ } else if ( className == "TQLCDNumber" )
+ return new TQLCDNumber( parent, name );
+ else if ( className == "TQProgressBar" )
+ return new TQProgressBar( parent, name );
+ else if ( className == "TQTextView" )
+ return new TQTextView( parent, name );
+ else if ( className == "TQTextBrowser" )
+ return new TQTextBrowser( parent, name );
+ else if ( className == "TQDial" )
+ return new TQDial( parent, name );
+ else if ( className == "TQSlider" ) {
+ TQSlider *s = new TQSlider( parent, name );
if ( !r )
return s;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
@@ -910,8 +910,8 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
MetaDataBase::addEntry( s );
MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
return s;
- } else if ( className == "QScrollBar" ) {
- QScrollBar *s = new QScrollBar( parent, name );
+ } else if ( className == "TQScrollBar" ) {
+ TQScrollBar *s = new TQScrollBar( parent, name );
if ( !r )
return s;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
@@ -921,11 +921,11 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
MetaDataBase::addEntry( s );
MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
return s;
- } else if ( className == "QFrame" ) {
+ } else if ( className == "TQFrame" ) {
if ( !init )
- return new QFrame( parent, name );
- QFrame *f = new QFrame( parent, name );
- f->setFrameStyle( QFrame::StyledPanel | QFrame::Raised );
+ return new TQFrame( parent, name );
+ TQFrame *f = new TQFrame( parent, name );
+ f->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised );
return f;
} else if ( className == "Line" ) {
Line *l = new Line( parent, name );
@@ -940,8 +940,8 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
else if ( r->width() < r->height() )
l->setOrientation( Qt::Vertical );
return l;
- } else if ( className == "QMainWindow" ) {
- QMainWindow *mw = new QMainWindow( parent, name, 0 );
+ } else if ( className == "TQMainWindow" ) {
+ TQMainWindow *mw = new TQMainWindow( parent, name, 0 );
mw->setDockEnabled( Qt::DockMinimized, FALSE );
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" );
mw->setDockMenuEnabled( FALSE );
@@ -950,31 +950,31 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
(void)mw->statusBar();
dw->show();
return mw;
- } else if ( className == "QToolBox" ) {
+ } else if ( className == "TQToolBox" ) {
if ( !init )
return new QDesignerToolBox( parent, name );
- QToolBox *tb = new QDesignerToolBox( parent, name );
+ TQToolBox *tb = new QDesignerToolBox( parent, name );
FormWindow *fw = find_formwindow( parent );
- QWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) :
- new QWidget( tb, "page1" );
+ TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) :
+ new TQWidget( tb, "page1" );
tb->addItem( w, i18n("Page 1") );
MetaDataBase::addEntry( w );
- w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new QWidget( tb, "page2" );
+ w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" );
tb->addItem( w, i18n("Page 2") );
MetaDataBase::addEntry( tb );
MetaDataBase::addEntry( w );
return tb;
}
#ifndef QT_NO_SQL
- else if ( className == "QDataBrowser" ) {
- QWidget *w = new QDesignerDataBrowser( parent, name );
+ else if ( className == "TQDataBrowser" ) {
+ TQWidget *w = new QDesignerDataBrowser( parent, name );
if ( parent )
- w->reparent( parent, QPoint( 0, 0 ), TRUE );
+ w->reparent( parent, TQPoint( 0, 0 ), TRUE );
return w;
- } else if ( className == "QDataView" ) {
- QWidget *w = new QDesignerDataView( parent, name );
+ } else if ( className == "TQDataView" ) {
+ TQWidget *w = new QDesignerDataView( parent, name );
if ( parent )
- w->reparent( parent, QPoint( 0, 0 ), TRUE );
+ w->reparent( parent, TQPoint( 0, 0 ), TRUE );
return w;
}
#endif
@@ -984,7 +984,7 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
if ( !iface )
return 0;
- QWidget *w = iface->create( className, parent, name );
+ TQWidget *w = iface->create( className, parent, name );
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
if ( init && WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( className ) ) ) {
QWidgetContainerInterfacePrivate *iface2 = 0;
@@ -1003,44 +1003,44 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
/*! Find out which type the layout of the widget is. Returns \c HBox,
\c VBox, \c Grid or \c NoLayout. \a layout points to this
- QWidget::layout() of \a w or to 0 after the function call.
+ TQWidget::layout() of \a w or to 0 after the function call.
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w, QLayout *&layout )
+WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout )
{
layout = 0;
- if ( ::qt_cast<QTabWidget*>(w) )
- w = ((QTabWidget*)w)->currentPage();
- if ( ::qt_cast<QWizard*>(w) )
- w = ((QWizard*)w)->currentPage();
- if ( ::qt_cast<QMainWindow*>(w) )
- w = ((QMainWindow*)w)->centralWidget();
- if ( ::qt_cast<QWidgetStack*>(w) )
- w = ((QWidgetStack*)w)->visibleWidget();
- if ( ::qt_cast<QToolBox*>(w) )
- w = ((QToolBox*)w)->currentItem();
+ if ( ::qt_cast<TQTabWidget*>(w) )
+ w = ((TQTabWidget*)w)->currentPage();
+ if ( ::qt_cast<TQWizard*>(w) )
+ w = ((TQWizard*)w)->currentPage();
+ if ( ::qt_cast<TQMainWindow*>(w) )
+ w = ((TQMainWindow*)w)->centralWidget();
+ if ( ::qt_cast<TQWidgetStack*>(w) )
+ w = ((TQWidgetStack*)w)->visibleWidget();
+ if ( ::qt_cast<TQToolBox*>(w) )
+ w = ((TQToolBox*)w)->currentItem();
- if ( ::qt_cast<QSplitter*>(w) )
- return ( (QSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
+ if ( ::qt_cast<TQSplitter*>(w) )
+ return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
if ( !w || !w->layout() )
return NoLayout;
- QLayout *lay = w->layout();
+ TQLayout *lay = w->layout();
- if ( ::qt_cast<QGroupBox*>(w) ) {
- QObjectList *l = lay->queryList( "QLayout" );
+ if ( ::qt_cast<TQGroupBox*>(w) ) {
+ TQObjectList *l = lay->queryList( "TQLayout" );
if ( l && l->first() )
- lay = (QLayout*)l->first();
+ lay = (TQLayout*)l->first();
delete l;
}
layout = lay;
- if ( ::qt_cast<QHBoxLayout*>(lay) )
+ if ( ::qt_cast<TQHBoxLayout*>(lay) )
return HBox;
- else if ( ::qt_cast<QVBoxLayout*>(lay) )
+ else if ( ::qt_cast<TQVBoxLayout*>(lay) )
return VBox;
- else if ( ::qt_cast<QGridLayout*>(lay) )
+ else if ( ::qt_cast<TQGridLayout*>(lay) )
return Grid;
return NoLayout;
}
@@ -1048,13 +1048,13 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w, QLayout *&layou
/*!
\overload
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( QLayout *layout )
+WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
{
- if ( ::qt_cast<QHBoxLayout*>(layout) )
+ if ( ::qt_cast<TQHBoxLayout*>(layout) )
return HBox;
- else if ( ::qt_cast<QVBoxLayout*>(layout) )
+ else if ( ::qt_cast<TQVBoxLayout*>(layout) )
return VBox;
- else if ( ::qt_cast<QGridLayout*>(layout) )
+ else if ( ::qt_cast<TQGridLayout*>(layout) )
return Grid;
return NoLayout;
}
@@ -1062,19 +1062,19 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( QLayout *layout )
/*!
\overload
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w )
+WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w )
{
- QLayout *l = 0;
+ TQLayout *l = 0;
return layoutType( w, l );
}
-QWidget *WidgetFactory::layoutParent( QLayout *layout )
+TQWidget *WidgetFactory::layoutParent( TQLayout *layout )
{
- QObject *o = layout;
+ TQObject *o = layout;
while ( o ) {
if ( o->isWidgetType() )
- return (QWidget*)o;
+ return (TQWidget*)o;
o = o->parent();
}
return 0;
@@ -1089,20 +1089,20 @@ QWidget *WidgetFactory::layoutParent( QLayout *layout )
tabwidget. So in this case this function returns the current page of
the tabwidget.)
*/
-QWidget* WidgetFactory::containerOfWidget( QWidget *w )
+TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
{
if ( !w )
return w;
- if ( ::qt_cast<QTabWidget*>(w) )
- return ((QTabWidget*)w)->currentPage();
- if ( ::qt_cast<QWizard*>(w) )
- return ((QWizard*)w)->currentPage();
- if ( ::qt_cast<QWidgetStack*>(w) )
- return ((QWidgetStack*)w)->visibleWidget();
- if ( ::qt_cast<QToolBox*>(w) )
- return ((QToolBox*)w)->currentItem();
- if ( ::qt_cast<QMainWindow*>(w) )
- return ((QMainWindow*)w)->centralWidget();
+ if ( ::qt_cast<TQTabWidget*>(w) )
+ return ((TQTabWidget*)w)->currentPage();
+ if ( ::qt_cast<TQWizard*>(w) )
+ return ((TQWizard*)w)->currentPage();
+ if ( ::qt_cast<TQWidgetStack*>(w) )
+ return ((TQWidgetStack*)w)->visibleWidget();
+ if ( ::qt_cast<TQToolBox*>(w) )
+ return ((TQToolBox*)w)->currentItem();
+ if ( ::qt_cast<TQMainWindow*>(w) )
+ return ((TQMainWindow*)w)->centralWidget();
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) )
return w;
@@ -1114,7 +1114,7 @@ QWidget* WidgetFactory::containerOfWidget( QWidget *w )
iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 );
if ( !iface2 )
return w;
- QWidget *c = iface2->containerOfWidget( w->className(), w );
+ TQWidget *c = iface2->containerOfWidget( w->className(), w );
iface2->release();
iface->release();
if ( c )
@@ -1131,13 +1131,13 @@ QWidget* WidgetFactory::containerOfWidget( QWidget *w )
function returns the tabwidget then.)
*/
-QWidget* WidgetFactory::widgetOfContainer( QWidget *w )
+TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
{
- if ( w && ::qt_cast<QWidgetStack*>(w->parentWidget()) )
+ if ( w && ::qt_cast<TQWidgetStack*>(w->parentWidget()) )
w = w->parentWidget();
if ( w->parentWidget() && w->parentWidget()->parentWidget() &&
w->parentWidget()->parentWidget()->parentWidget() &&
- ::qt_cast<QToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) )
+ ::qt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) )
return w->parentWidget()->parentWidget()->parentWidget();
while ( w ) {
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) );
@@ -1154,27 +1154,27 @@ QWidget* WidgetFactory::widgetOfContainer( QWidget *w )
*/
bool WidgetFactory::lastWasAPassiveInteractor = FALSE;
-QGuardedPtr<QObject> *WidgetFactory::lastPassiveInteractor = new QGuardedPtr<QObject>();
+TQGuardedPtr<TQObject> *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr<TQObject>();
-bool WidgetFactory::isPassiveInteractor( QObject* o )
+bool WidgetFactory::isPassiveInteractor( TQObject* o )
{
- if ( lastPassiveInteractor && *lastPassiveInteractor && (QObject*)(*lastPassiveInteractor) == o )
+ if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o )
return lastWasAPassiveInteractor;
lastWasAPassiveInteractor = FALSE;
(*lastPassiveInteractor) = o;
- if ( QApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things
+ if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things
return ( lastWasAPassiveInteractor = TRUE );
- if ( ::qt_cast<QTabBar*>(o) )
+ if ( ::qt_cast<TQTabBar*>(o) )
return ( lastWasAPassiveInteractor = TRUE );
- else if ( ::qt_cast<QSizeGrip*>(o) )
+ else if ( ::qt_cast<TQSizeGrip*>(o) )
return ( lastWasAPassiveInteractor = TRUE );
- else if ( ::qt_cast<QButton*>(o) &&
- ( ::qt_cast<QTabBar*>(o->parent()) || ::qt_cast<QToolBox*>(o->parent()) ) )
+ else if ( ::qt_cast<TQButton*>(o) &&
+ ( ::qt_cast<TQTabBar*>(o->parent()) || ::qt_cast<TQToolBox*>(o->parent()) ) )
return ( lastWasAPassiveInteractor = TRUE );
- else if ( ::qt_cast<QPushButton*>(o) && ::qt_cast<QWizard*>(o->parent()) )
+ else if ( ::qt_cast<TQPushButton*>(o) && ::qt_cast<TQWizard*>(o->parent()) )
return ( lastWasAPassiveInteractor = TRUE );
- else if ( ::qt_cast<QMenuBar*>(o) && ::qt_cast<QMainWindow*>(o->parent()) )
+ else if ( ::qt_cast<TQMenuBar*>(o) && ::qt_cast<TQMainWindow*>(o->parent()) )
return ( lastWasAPassiveInteractor = TRUE );
// else if ( ::qt_cast<QDockWindowHandle*>(o) )
else if ( o->inherits( "QDockWindowHandle" ) )
@@ -1188,7 +1188,7 @@ bool WidgetFactory::isPassiveInteractor( QObject* o )
if ( !o->isWidgetType() )
return ( lastWasAPassiveInteractor = FALSE );
WidgetInterface *iface = 0;
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
while ( !iface && w && !::qt_cast<FormWindow*>(w) ) {
widgetManager()->queryInterface( classNameOf( w ), &iface );
w = w->parentWidget();
@@ -1199,13 +1199,13 @@ bool WidgetFactory::isPassiveInteractor( QObject* o )
iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 );
if ( !iface2 )
return ( lastWasAPassiveInteractor = FALSE );
- QWidget *fw = MainWindow::self->isAFormWindowChild( (QWidget*)o );
+ TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o );
if ( !fw )
return ( lastWasAPassiveInteractor = FALSE );
- QWidget *dw = ( (FormWindow*)fw )->designerWidget( (QWidget*)o );
+ TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o );
if ( !dw )
return ( lastWasAPassiveInteractor = FALSE );
- lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (QWidget*)o );
+ lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o );
iface2->release();
iface->release();
#endif // QT_CONTAINER_CUSTOM_WIDGETS
@@ -1216,84 +1216,84 @@ bool WidgetFactory::isPassiveInteractor( QObject* o )
/*!
Returns the class name of object \a o that should be used for externally (i.e. for saving)
*/
-const char* WidgetFactory::classNameOf( QObject* o )
+const char* WidgetFactory::classNameOf( TQObject* o )
{
if ( o->isA( "PropertyObject" ) )
return o->className();
if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className())))
return o->className();
else if ( ::qt_cast<QDesignerTabWidget*>(o) )
- return "QTabWidget";
+ return "TQTabWidget";
else if ( ::qt_cast<QDesignerWidgetStack*>(o) )
- return "QWidgetStack";
- else if ( ::qt_cast<QWidgetStack*>(o) )
+ return "TQWidgetStack";
+ else if ( ::qt_cast<TQWidgetStack*>(o) )
return "QWeDoNotWantToBreakTabWidget";
else if ( ::qt_cast<QDesignerDialog*>(o) )
- return "QDialog";
+ return "TQDialog";
else if ( ::qt_cast<QDesignerWidget*>(o) )
- return "QWidget";
+ return "TQWidget";
else if ( o->inherits( "CustomWidget" ) )
return ( (CustomWidget*)o )->realClassName().latin1();
else if ( ::qt_cast<QDesignerLabel*>(o) )
- return "QLabel";
+ return "TQLabel";
else if ( ::qt_cast<QDesignerWizard*>(o) )
- return "QWizard";
+ return "TQWizard";
else if ( ::qt_cast<QDesignerPushButton*>(o) )
- return "QPushButton";
+ return "TQPushButton";
else if ( ::qt_cast<QDesignerToolButton*>(o) )
- return "QToolButton";
+ return "TQToolButton";
else if ( ::qt_cast<QDesignerRadioButton*>(o) )
- return "QRadioButton";
+ return "TQRadioButton";
else if ( ::qt_cast<QDesignerCheckBox*>(o) )
- return "QCheckBox";
+ return "TQCheckBox";
else if ( ::qt_cast<MenuBarEditor*>(o) )
- return "QMenuBar";
+ return "TQMenuBar";
else if ( ::qt_cast<QDesignerToolBar*>(o) )
- return "QToolBar";
+ return "TQToolBar";
else if ( ::qt_cast<QDesignerAction*>(o) )
- return "QAction";
+ return "TQAction";
else if ( ::qt_cast<QDesignerActionGroup*>(o) )
- return "QActionGroup";
+ return "TQActionGroup";
else if ( ::qt_cast<PopupMenuEditor*>(o) )
- return "QPopupMenu";
+ return "TQPopupMenu";
else if ( ::qt_cast<QDesignerToolBox*>(o) )
- return "QToolBox";
+ return "TQToolBox";
#ifndef QT_NO_SQL
else if ( ::qt_cast<QDesignerDataBrowser*>(o) )
- return "QDataBrowser";
+ return "TQDataBrowser";
else if ( ::qt_cast<QDesignerDataView*>(o) )
- return "QDataView";
+ return "TQDataView";
#endif
return o->className();
}
-QString WidgetFactory::defaultSignal( QObject *w )
+TQString WidgetFactory::defaultSignal( TQObject *w )
{
- if ( ::qt_cast<QRadioButton*>(w) || ::qt_cast<QCheckBox*>(w) )
+ if ( ::qt_cast<TQRadioButton*>(w) || ::qt_cast<TQCheckBox*>(w) )
return "toggled";
- else if ( ::qt_cast<QButton*>(w) || ::qt_cast<QButtonGroup*>(w) )
+ else if ( ::qt_cast<TQButton*>(w) || ::qt_cast<TQButtonGroup*>(w) )
return "clicked";
- else if ( ::qt_cast<QTextBrowser*>(w) )
+ else if ( ::qt_cast<TQTextBrowser*>(w) )
return "linkClicked";
- else if ( ::qt_cast<QLineEdit*>(w) || ::qt_cast<QTextEdit*>(w) )
+ else if ( ::qt_cast<TQLineEdit*>(w) || ::qt_cast<TQTextEdit*>(w) )
return "textChanged";
- else if ( ::qt_cast<QListView*>(w) || ::qt_cast<QIconView*>(w) ||
- ::qt_cast<QListBox*>(w) || ::qt_cast<QTable*>(w) )
+ else if ( ::qt_cast<TQListView*>(w) || ::qt_cast<TQIconView*>(w) ||
+ ::qt_cast<TQListBox*>(w) || ::qt_cast<TQTable*>(w) )
return "selectionChanged";
- else if ( ::qt_cast<QTabWidget*>(w) )
+ else if ( ::qt_cast<TQTabWidget*>(w) )
return "selected";
- else if ( ::qt_cast<QToolBox*>(w) )
+ else if ( ::qt_cast<TQToolBox*>(w) )
return "currentChanged";
- else if ( ::qt_cast<QWidgetStack*>(w) )
+ else if ( ::qt_cast<TQWidgetStack*>(w) )
return "aboutToShow";
- else if ( ::qt_cast<QSpinBox*>(w) || ::qt_cast<QSlider*>(w) ||
- ::qt_cast<QScrollBar*>(w) || ::qt_cast<QDateEdit*>(w) ||
+ else if ( ::qt_cast<TQSpinBox*>(w) || ::qt_cast<TQSlider*>(w) ||
+ ::qt_cast<TQScrollBar*>(w) || ::qt_cast<QDateEdit*>(w) ||
::qt_cast<QTimeEdit*>(w) || ::qt_cast<QDateTimeEdit*>(w) ||
- ::qt_cast<QDial*>(w) )
+ ::qt_cast<TQDial*>(w) )
return "valueChanged";
- else if ( ::qt_cast<QComboBox*>(w) )
+ else if ( ::qt_cast<TQComboBox*>(w) )
return "activated";
- return QString::null;
+ return TQString::null;
}
/*! As some properties are set by default when creating a widget this
@@ -1301,7 +1301,7 @@ QString WidgetFactory::defaultSignal( QObject *w )
createWidget()!
*/
-void WidgetFactory::initChangedProperties( QObject *o )
+void WidgetFactory::initChangedProperties( TQObject *o )
{
if ( MainWindow::self && MainWindow::self->currProject() &&
MainWindow::self->currProject()->fakeFormFileFor( o ) )
@@ -1310,11 +1310,11 @@ void WidgetFactory::initChangedProperties( QObject *o )
if ( !::qt_cast<QDesignerToolBar*>(o) && !::qt_cast<MenuBarEditor*>(o) )
MetaDataBase::setPropertyChanged( o, "geometry", TRUE );
- if ( ::qt_cast<QPushButton*>(o) ||
- ::qt_cast<QRadioButton*>(o) ||
- ::qt_cast<QCheckBox*>(o) ||
- ::qt_cast<QToolButton*>(o) ) {
- if (::qt_cast<QToolButton*>(o) && ::qt_cast<QToolBox*>(widgetOfContainer((QWidget*)o->parent()))) {
+ if ( ::qt_cast<TQPushButton*>(o) ||
+ ::qt_cast<TQRadioButton*>(o) ||
+ ::qt_cast<TQCheckBox*>(o) ||
+ ::qt_cast<TQToolButton*>(o) ) {
+ if (::qt_cast<TQToolButton*>(o) && ::qt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {
MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
@@ -1323,19 +1323,19 @@ void WidgetFactory::initChangedProperties( QObject *o )
MetaDataBase::setPropertyChanged( o, "text", TRUE );
}
}
- else if ( ::qt_cast<QGroupBox*>(o) )
+ else if ( ::qt_cast<TQGroupBox*>(o) )
MetaDataBase::setPropertyChanged( o, "title", TRUE );
- else if ( o->isA( "QFrame" ) ) {
+ else if ( o->isA( "TQFrame" ) ) {
MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE );
MetaDataBase::setPropertyChanged( o, "frameShape", TRUE );
- } else if ( ::qt_cast<QTabWidget*>(o) || ::qt_cast<QWizard*>(o) ) {
+ } else if ( ::qt_cast<TQTabWidget*>(o) || ::qt_cast<TQWizard*>(o) ) {
MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE );
MetaDataBase::setPropertyChanged( o, "pageName", TRUE );
MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );
- } else if ( ::qt_cast<QWidgetStack*>(o) ) {
+ } else if ( ::qt_cast<TQWidgetStack*>(o) ) {
MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );
MetaDataBase::setPropertyChanged( o, "pageName", TRUE );
- } else if ( ::qt_cast<QToolBox*>(o) ) {
+ } else if ( ::qt_cast<TQToolBox*>(o) ) {
MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE );
MetaDataBase::setPropertyChanged( o, "itemName", TRUE );
MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE );
@@ -1343,21 +1343,21 @@ void WidgetFactory::initChangedProperties( QObject *o )
MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE );
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE );
#ifndef QT_NO_TABLE
- } else if ( ::qt_cast<QTable*>(o) ) {
+ } else if ( ::qt_cast<TQTable*>(o) ) {
# ifndef QT_NO_SQL
- if (!::qt_cast<QDataTable*>(o) )
+ if (!::qt_cast<TQDataTable*>(o) )
# endif
{
MetaDataBase::setPropertyChanged( o, "numRows", TRUE );
MetaDataBase::setPropertyChanged( o, "numCols", TRUE );
- QTable *t = (QTable*)o;
+ TQTable *t = (TQTable*)o;
for ( int i = 0; i < 3; ++i ) {
- t->horizontalHeader()->setLabel( i, QString::number( i + 1 ) );
- t->verticalHeader()->setLabel( i, QString::number( i + 1 ) );
+ t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) );
+ t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) );
}
}
#endif
- } else if ( ::qt_cast<QSplitter*>(o) ) {
+ } else if ( ::qt_cast<TQSplitter*>(o) ) {
MetaDataBase::setPropertyChanged( o, "orientation", TRUE );
} else if ( ::qt_cast<QDesignerToolBar*>(o) ) {
MetaDataBase::setPropertyChanged( o, "label", TRUE );
@@ -1368,9 +1368,9 @@ void WidgetFactory::initChangedProperties( QObject *o )
}
}
-bool WidgetFactory::hasSpecialEditor( int id, QObject *editorWidget )
+bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget )
{
- QString className = WidgetDatabase::className( id );
+ TQString className = WidgetDatabase::className( id );
if ( className.contains( "ListBox" ) )
return TRUE;
@@ -1380,32 +1380,32 @@ bool WidgetFactory::hasSpecialEditor( int id, QObject *editorWidget )
return TRUE;
if ( className.contains( "IconView" ) )
return TRUE;
- if ( className == "QTextEdit" || className == "QMultiLineEdit" )
+ if ( className == "TQTextEdit" || className == "TQMultiLineEdit" )
return TRUE;
- if ( ::qt_cast<QTable*>(editorWidget) != 0 )
+ if ( ::qt_cast<TQTable*>(editorWidget) != 0 )
return TRUE;
return FALSE;
}
-bool WidgetFactory::hasItems( int id, QObject *editorWidget )
+bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
{
- QString className = WidgetDatabase::className( id );
+ TQString className = WidgetDatabase::className( id );
if ( className.contains( "ListBox" ) || className.contains( "ListView" ) ||
className.contains( "IconView" ) || className.contains( "ComboBox" ) ||
- ::qt_cast<QTable*>(editorWidget) != 0 )
+ ::qt_cast<TQTable*>(editorWidget) != 0 )
return TRUE;
return FALSE;
}
-void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw )
+void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
{
- QString className = WidgetDatabase::className( id );
+ TQString className = WidgetDatabase::className( id );
if ( className.contains( "ListBox" ) ) {
- if ( !::qt_cast<QListBox*>(editWidget) )
+ if ( !::qt_cast<TQListBox*>(editWidget) )
return;
ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw );
e->exec();
@@ -1414,9 +1414,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
}
if ( className.contains( "ComboBox" ) ) {
- if ( !::qt_cast<QComboBox*>(editWidget) )
+ if ( !::qt_cast<TQComboBox*>(editWidget) )
return;
- QComboBox *cb = (QComboBox*)editWidget;
+ TQComboBox *cb = (TQComboBox*)editWidget;
ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw );
e->exec();
delete e;
@@ -1425,9 +1425,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
}
if ( className.contains( "ListView" ) ) {
- if ( !::qt_cast<QListView*>(editWidget) )
+ if ( !::qt_cast<TQListView*>(editWidget) )
return;
- QListView *lv = (QListView*)editWidget;
+ TQListView *lv = (TQListView*)editWidget;
ListViewEditor *e = new ListViewEditor( parent, lv, fw );
e->exec();
delete e;
@@ -1435,7 +1435,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
}
if ( className.contains( "IconView" ) ) {
- if ( !::qt_cast<QIconView*>(editWidget) )
+ if ( !::qt_cast<TQIconView*>(editWidget) )
return;
IconViewEditor *e = new IconViewEditor( parent, editWidget, fw );
e->exec();
@@ -1443,14 +1443,14 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
return;
}
- if ( className == "QMultiLineEdit" || className == "QTextEdit" ) {
+ if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) {
MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw );
e->exec();
delete e;
return;
}
#ifndef QT_NO_TABLE
- if (::qt_cast<QTable*>(editWidget) != 0) {
+ if (::qt_cast<TQTable*>(editWidget) != 0) {
TableEditor *e = new TableEditor( parent, editWidget, fw );
e->exec();
delete e;
@@ -1459,44 +1459,44 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
#endif
}
-bool WidgetFactory::canResetProperty( QObject *w, const QString &propName )
+bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
{
if ( propName == "name" || propName == "geometry" )
return FALSE;
- QStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
+ TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
return l.findIndex( propName ) == -1;
}
-bool WidgetFactory::resetProperty( QObject *w, const QString &propName )
+bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
{
- const QMetaProperty *p = w->metaObject()->property( w->metaObject()->
+ const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->
findProperty( propName, TRUE ), TRUE );
if (!p )
return FALSE;
return p->reset( w );
}
-QVariant WidgetFactory::defaultValue( QObject *w, const QString &propName )
+TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )
{
if ( propName == "wordwrap" ) {
int v = defaultValue( w, "alignment" ).toInt();
- return QVariant( ( v & WordBreak ) == WordBreak, 0 );
+ return TQVariant( ( v & WordBreak ) == WordBreak, 0 );
} else if ( propName == "toolTip" || propName == "whatsThis" ) {
- return QVariant( QString::fromLatin1( "" ) );
+ return TQVariant( TQString::fromLatin1( "" ) );
} else if ( w->inherits( "CustomWidget" ) ) {
- return QVariant();
+ return TQVariant();
} else if ( propName == "frameworkCode" ) {
- return QVariant( TRUE, 0 );
+ return TQVariant( TRUE, 0 );
} else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) {
- return QVariant( -1 );
+ return TQVariant( -1 );
}
return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName );
}
-QString WidgetFactory::defaultCurrentItem( QObject *w, const QString &propName )
+TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName )
{
- const QMetaProperty *p = w->metaObject()->
+ const TQMetaProperty *p = w->metaObject()->
property( w->metaObject()->findProperty( propName, TRUE ), TRUE );
if ( !p ) {
int v = defaultValue( w, "alignment" ).toInt();
@@ -1521,23 +1521,23 @@ QString WidgetFactory::defaultCurrentItem( QObject *w, const QString &propName )
} else if ( propName == "resizeMode" ) {
return "Auto";
}
- return QString::null;
+ return TQString::null;
}
return p->valueToKey( defaultValue( w, propName ).toInt() );
}
-QWidget *WidgetFactory::createCustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *w )
+TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w )
{
if ( !w )
return 0;
return new CustomWidget( parent, name, w );
}
-QVariant WidgetFactory::property( QObject *w, const char *name )
+TQVariant WidgetFactory::property( TQObject *w, const char *name )
{
int id = w->metaObject()->findProperty( name, TRUE );
- const QMetaProperty* p = w->metaObject()->property( id, TRUE );
+ const TQMetaProperty* p = w->metaObject()->property( id, TRUE );
if ( !p || !p->isValid() )
return MetaDataBase::fakeProperty( w, name );
return w->property( name );
@@ -1549,70 +1549,70 @@ void QDesignerLabel::updateBuddy()
if ( myBuddy.isEmpty() )
return;
- QObjectList *l = topLevelWidget()->queryList( "QWidget", myBuddy, FALSE, TRUE );
+ TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, FALSE, TRUE );
if ( !l || !l->first() ) {
delete l;
return;
}
- QLabel::setBuddy( (QWidget*)l->first() );
+ TQLabel::setBuddy( (TQWidget*)l->first() );
delete l;
}
-void QDesignerWidget::resizeEvent( QResizeEvent* e)
+void QDesignerWidget::resizeEvent( TQResizeEvent* e)
{
if ( need_frame ) {
- QPainter p(this);
+ TQPainter p(this);
p.setPen( backgroundColor() );
- p.drawRect( QRect( QPoint(0,0), e->oldSize() ) );
+ p.drawRect( TQRect( TQPoint(0,0), e->oldSize() ) );
}
}
-void QDesignerWidget::paintEvent( QPaintEvent *e )
+void QDesignerWidget::paintEvent( TQPaintEvent *e )
{
if ( need_frame ) {
- QPainter p(this);
+ TQPainter p(this);
p.setPen( backgroundColor().dark() );
p.drawRect( rect() );
}
formwindow->paintGrid( this, e );
}
-void QDesignerDialog::paintEvent( QPaintEvent *e )
+void QDesignerDialog::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}
-QSizePolicy QLayoutWidget::sizePolicy() const
+TQSizePolicy QLayoutWidget::sizePolicy() const
{
return sp;
}
-bool QLayoutWidget::event( QEvent *e )
+bool QLayoutWidget::event( TQEvent *e )
{
- if ( e && ( e->type() == QEvent::ChildInserted ||
- e->type() == QEvent::ChildRemoved ||
- e->type() == QEvent::LayoutHint ||
- e->type() == QEvent::Reparent ) )
+ if ( e && ( e->type() == TQEvent::ChildInserted ||
+ e->type() == TQEvent::ChildRemoved ||
+ e->type() == TQEvent::LayoutHint ||
+ e->type() == TQEvent::Reparent ) )
updateSizePolicy();
- return QWidget::event( e );
+ return TQWidget::event( e );
}
/*
This function must be called on QLayoutWidget creation and whenever
the QLayoutWidget's parent layout changes (e.g., from a QHBoxLayout
- to a QVBoxLayout), because of the (illogical) way layouting works.
+ to a TQVBoxLayout), because of the (illogical) way layouting works.
*/
void QLayoutWidget::updateSizePolicy()
{
if ( !children() || children()->count() == 0 ) {
- sp = QWidget::sizePolicy();
+ sp = TQWidget::sizePolicy();
return;
}
/*
- QSizePolicy::MayShrink & friends are private. Here we assume the
+ TQSizePolicy::MayShrink & friends are private. Here we assume the
following:
Fixed = 0
@@ -1621,111 +1621,111 @@ void QLayoutWidget::updateSizePolicy()
Preferred = MayShrink | MayGrow
*/
- int ht = (int) QSizePolicy::Preferred;
- int vt = (int) QSizePolicy::Preferred;
+ int ht = (int) TQSizePolicy::Preferred;
+ int vt = (int) TQSizePolicy::Preferred;
if ( layout() ) {
/*
parentLayout is set to the parent layout if there is one and if it is
top level, in which case layouting is illogical.
*/
- QLayout *parentLayout = 0;
+ TQLayout *parentLayout = 0;
if ( parent() && parent()->isWidgetType() ) {
- parentLayout = ((QWidget *)parent())->layout();
+ parentLayout = ((TQWidget *)parent())->layout();
if ( parentLayout &&
::qt_cast<QLayoutWidget*>(parentLayout->mainWidget()) )
parentLayout = 0;
}
- QObjectListIt it( *children() );
- QObject *o;
+ TQObjectListIt it( *children() );
+ TQObject *o;
- if ( ::qt_cast<QVBoxLayout*>(layout()) ) {
- if ( ::qt_cast<QHBoxLayout*>(parentLayout) )
- vt = QSizePolicy::Minimum;
+ if ( ::qt_cast<TQVBoxLayout*>(layout()) ) {
+ if ( ::qt_cast<TQHBoxLayout*>(parentLayout) )
+ vt = TQSizePolicy::Minimum;
else
- vt = QSizePolicy::Fixed;
+ vt = TQSizePolicy::Fixed;
while ( ( o = it.current() ) ) {
++it;
- if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) )
+ if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) )
continue;
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
if ( !w->sizePolicy().mayGrowHorizontally() )
- ht &= ~QSizePolicy::Minimum;
+ ht &= ~TQSizePolicy::Minimum;
if ( !w->sizePolicy().mayShrinkHorizontally() )
- ht &= ~QSizePolicy::Maximum;
+ ht &= ~TQSizePolicy::Maximum;
if ( w->sizePolicy().mayGrowVertically() )
- vt |= QSizePolicy::Minimum;
+ vt |= TQSizePolicy::Minimum;
if ( w->sizePolicy().mayShrinkVertically() )
- vt |= QSizePolicy::Maximum;
+ vt |= TQSizePolicy::Maximum;
}
- } else if ( ::qt_cast<QHBoxLayout*>(layout()) ) {
- if ( ::qt_cast<QVBoxLayout*>(parentLayout) )
- ht = QSizePolicy::Minimum;
+ } else if ( ::qt_cast<TQHBoxLayout*>(layout()) ) {
+ if ( ::qt_cast<TQVBoxLayout*>(parentLayout) )
+ ht = TQSizePolicy::Minimum;
else
- ht = QSizePolicy::Fixed;
+ ht = TQSizePolicy::Fixed;
while ( ( o = it.current() ) ) {
++it;
- if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) )
+ if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) )
continue;
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
if ( w->sizePolicy().mayGrowHorizontally() )
- ht |= QSizePolicy::Minimum;
+ ht |= TQSizePolicy::Minimum;
if ( w->sizePolicy().mayShrinkHorizontally() )
- ht |= QSizePolicy::Maximum;
+ ht |= TQSizePolicy::Maximum;
if ( !w->sizePolicy().mayGrowVertically() )
- vt &= ~QSizePolicy::Minimum;
+ vt &= ~TQSizePolicy::Minimum;
if ( !w->sizePolicy().mayShrinkVertically() )
- vt &= ~QSizePolicy::Maximum;
+ vt &= ~TQSizePolicy::Maximum;
}
- } else if ( ::qt_cast<QGridLayout*>(layout()) ) {
- ht = QSizePolicy::Fixed;
- vt = QSizePolicy::Fixed;
+ } else if ( ::qt_cast<TQGridLayout*>(layout()) ) {
+ ht = TQSizePolicy::Fixed;
+ vt = TQSizePolicy::Fixed;
if ( parentLayout ) {
- if ( ::qt_cast<QVBoxLayout*>(parentLayout) )
- ht = QSizePolicy::Minimum;
- else if ( ::qt_cast<QHBoxLayout*>(parentLayout) )
- vt = QSizePolicy::Minimum;
+ if ( ::qt_cast<TQVBoxLayout*>(parentLayout) )
+ ht = TQSizePolicy::Minimum;
+ else if ( ::qt_cast<TQHBoxLayout*>(parentLayout) )
+ vt = TQSizePolicy::Minimum;
}
while ( ( o = it.current() ) ) {
++it;
- if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) )
+ if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) )
continue;
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
if ( w->sizePolicy().mayGrowHorizontally() )
- ht |= QSizePolicy::Minimum;
+ ht |= TQSizePolicy::Minimum;
if ( w->sizePolicy().mayShrinkHorizontally() )
- ht |= QSizePolicy::Maximum;
+ ht |= TQSizePolicy::Maximum;
if ( w->sizePolicy().mayGrowVertically() )
- vt |= QSizePolicy::Minimum;
+ vt |= TQSizePolicy::Minimum;
if ( w->sizePolicy().mayShrinkVertically() )
- vt |= QSizePolicy::Maximum;
+ vt |= TQSizePolicy::Maximum;
}
}
- if ( layout()->expanding() & QSizePolicy::Horizontally )
- ht = QSizePolicy::Expanding;
- if ( layout()->expanding() & QSizePolicy::Vertically )
- vt = QSizePolicy::Expanding;
+ if ( layout()->expanding() & TQSizePolicy::Horizontally )
+ ht = TQSizePolicy::Expanding;
+ if ( layout()->expanding() & TQSizePolicy::Vertically )
+ vt = TQSizePolicy::Expanding;
layout()->invalidate();
}
- sp = QSizePolicy( (QSizePolicy::SizeType) ht, (QSizePolicy::SizeType) vt );
+ sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt );
updateGeometry();
}
-void CustomWidget::paintEvent( QPaintEvent *e )
+void CustomWidget::paintEvent( TQPaintEvent *e )
{
if ( ::qt_cast<FormWindow*>(parentWidget()) ) {
( (FormWindow*)parentWidget() )->paintGrid( this, e );
} else {
- QPainter p( this );
+ TQPainter p( this );
p.fillRect( rect(), colorGroup().dark() );
p.setPen( colorGroup().light() );
p.drawText( 2, 2, width() - 4, height() - 4, Qt::AlignAuto | Qt::AlignTop, cusw->className );
@@ -1740,7 +1740,7 @@ CustomWidgetFactory::CustomWidgetFactory()
{
}
-QWidget *CustomWidgetFactory::createWidget( const QString &className, QWidget *parent, const char *name ) const
+TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name ) const
{
MetaDataBase::CustomWidget *w = MetaDataBase::customWidget( WidgetDatabase::idFromClassName( className ) );
if ( !w )
@@ -1749,27 +1749,27 @@ QWidget *CustomWidgetFactory::createWidget( const QString &className, QWidget *p
}
-QDesignerToolBox::QDesignerToolBox( QWidget *parent, const char *name )
- : QToolBox( parent, name )
+QDesignerToolBox::QDesignerToolBox( TQWidget *parent, const char *name )
+ : TQToolBox( parent, name )
{
}
-QString QDesignerToolBox::itemLabel() const
+TQString QDesignerToolBox::itemLabel() const
{
- return QToolBox::itemLabel( currentIndex() );
+ return TQToolBox::itemLabel( currentIndex() );
}
-void QDesignerToolBox::setItemLabel( const QString &l )
+void QDesignerToolBox::setItemLabel( const TQString &l )
{
- QToolBox::setItemLabel( currentIndex(), l );
+ TQToolBox::setItemLabel( currentIndex(), l );
}
-QCString QDesignerToolBox::itemName() const
+TQCString QDesignerToolBox::itemName() const
{
return currentItem() ? currentItem()->name() : 0;
}
-void QDesignerToolBox::setItemName( const QCString &n )
+void QDesignerToolBox::setItemName( const TQCString &n )
{
if (currentItem())
currentItem()->setName( n );
@@ -1784,7 +1784,7 @@ Qt::BackgroundMode QDesignerToolBox::itemBackgroundMode() const
void QDesignerToolBox::setItemBackgroundMode( BackgroundMode bmode )
{
for (int i = 0; i < count(); ++i) {
- QWidget *w = item(i);
+ TQWidget *w = item(i);
w->setBackgroundMode( bmode );
w->update();
}
diff --git a/kdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h
index b235b8f4..dcf18e6c 100644
--- a/kdevdesigner/designer/widgetfactory.h
+++ b/kdevdesigner/designer/widgetfactory.h
@@ -27,30 +27,30 @@
#ifndef WIDGETFACTORY_H
#define WIDGETFACTORY_H
-#include <qvariant.h>
-#include <qiconset.h>
-#include <qstring.h>
-#include <qintdict.h>
-#include <qtabwidget.h>
-#include <qpixmap.h>
-#include <qsize.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qlabel.h>
-#include <qwizard.h>
-#include <qptrdict.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qwidgetstack.h>
-#include <qguardedptr.h>
-#include <qtoolbox.h>
+#include <tqvariant.h>
+#include <tqiconset.h>
+#include <tqstring.h>
+#include <tqintdict.h>
+#include <tqtabwidget.h>
+#include <tqpixmap.h>
+#include <tqsize.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqlabel.h>
+#include <tqwizard.h>
+#include <tqptrdict.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqwidgetstack.h>
+#include <tqguardedptr.h>
+#include <tqtoolbox.h>
#include "metadatabase.h"
-#include "qwidgetfactory.h"
+#include "tqwidgetfactory.h"
class QWidget;
class QLayout;
@@ -60,7 +60,7 @@ class CustomWidgetFactory : public QWidgetFactory
{
public:
CustomWidgetFactory();
- QWidget *createWidget( const QString &className, QWidget *parent, const char *name ) const;
+ TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const;
};
@@ -76,45 +76,45 @@ public:
NoLayout
};
- static QWidget *create( int id, QWidget *parent, const char *name = 0, bool init = TRUE,
- const QRect *rect = 0, Qt::Orientation orient = Qt::Horizontal );
- static QLayout *createLayout( QWidget *widget, QLayout* layout, LayoutType type );
- static void deleteLayout( QWidget *widget );
+ static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE,
+ const TQRect *rect = 0, Qt::Orientation orient = Qt::Horizontal );
+ static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
+ static void deleteLayout( TQWidget *widget );
- static LayoutType layoutType( QWidget *w );
- static LayoutType layoutType( QWidget *w, QLayout *&layout );
- static LayoutType layoutType( QLayout *layout );
- static QWidget *layoutParent( QLayout *layout );
+ static LayoutType layoutType( TQWidget *w );
+ static LayoutType layoutType( TQWidget *w, TQLayout *&layout );
+ static LayoutType layoutType( TQLayout *layout );
+ static TQWidget *layoutParent( TQLayout *layout );
- static QWidget* containerOfWidget( QWidget *w );
- static QWidget* widgetOfContainer( QWidget *w );
+ static TQWidget* containerOfWidget( TQWidget *w );
+ static TQWidget* widgetOfContainer( TQWidget *w );
- static bool isPassiveInteractor( QObject* o );
- static const char* classNameOf( QObject* o );
+ static bool isPassiveInteractor( TQObject* o );
+ static const char* classNameOf( TQObject* o );
- static void initChangedProperties( QObject *o );
+ static void initChangedProperties( TQObject *o );
- static bool hasSpecialEditor( int id, QObject *editorWidget );
- static bool hasItems( int id, QObject *editorWidget );
- static void editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw );
+ static bool hasSpecialEditor( int id, TQObject *editorWidget );
+ static bool hasItems( int id, TQObject *editorWidget );
+ static void editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
- static bool canResetProperty( QObject *w, const QString &propName );
- static bool resetProperty( QObject *w, const QString &propName );
- static QVariant defaultValue( QObject *w, const QString &propName );
- static QString defaultCurrentItem( QObject *w, const QString &propName );
+ static bool canResetProperty( TQObject *w, const TQString &propName );
+ static bool resetProperty( TQObject *w, const TQString &propName );
+ static TQVariant defaultValue( TQObject *w, const TQString &propName );
+ static TQString defaultCurrentItem( TQObject *w, const TQString &propName );
- static QVariant property( QObject *w, const char *name );
- static void saveDefaultProperties( QObject *w, int id );
- static void saveChangedProperties( QObject *w, int id );
+ static TQVariant property( TQObject *w, const char *name );
+ static void saveDefaultProperties( TQObject *w, int id );
+ static void saveChangedProperties( TQObject *w, int id );
- static QString defaultSignal( QObject *w );
+ static TQString defaultSignal( TQObject *w );
private:
- static QWidget *createWidget( const QString &className, QWidget *parent, const char *name, bool init,
- const QRect *r = 0, Qt::Orientation orient = Qt::Horizontal );
- static QWidget *createCustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *w );
+ static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
+ const TQRect *r = 0, Qt::Orientation orient = Qt::Horizontal );
+ static TQWidget *createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w );
- static QGuardedPtr<QObject> *lastPassiveInteractor;
+ static TQGuardedPtr<TQObject> *lastPassiveInteractor;
static bool lastWasAPassiveInteractor;
};
@@ -123,28 +123,28 @@ class QDesignerTabWidget : public QTabWidget
{
Q_OBJECT
Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- QDesignerTabWidget( QWidget *parent, const char *name );
+ QDesignerTabWidget( TQWidget *parent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
- QString pageTitle() const;
- void setPageTitle( const QString& title );
- QCString pageName() const;
- void setPageName( const QCString& name );
+ TQString pageTitle() const;
+ void setPageTitle( const TQString& title );
+ TQCString pageName() const;
+ void setPageName( const TQCString& name );
int count() const;
- QTabBar *tabBar() const { return QTabWidget::tabBar(); }
+ TQTabBar *tabBar() const { return TQTabWidget::tabBar(); }
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
private:
- QPoint pressPoint;
- QWidget *dropIndicator;
- QWidget *dragPage;
- QString dragLabel;
+ TQPoint pressPoint;
+ TQWidget *dropIndicator;
+ TQWidget *dragPage;
+ TQString dragLabel;
bool mousePressed;
};
@@ -152,32 +152,32 @@ class QDesignerWidgetStack : public QWidgetStack
{
Q_OBJECT
Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- QDesignerWidgetStack( QWidget *parent, const char *name );
+ QDesignerWidgetStack( TQWidget *parent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
- QCString pageName() const;
- void setPageName( const QCString& name );
+ TQCString pageName() const;
+ void setPageName( const TQCString& name );
int count() const;
- QWidget* page( int i ) const;
+ TQWidget* page( int i ) const;
- int insertPage( QWidget *p, int i = -1 );
- int removePage( QWidget *p );
+ int insertPage( TQWidget *p, int i = -1 );
+ int removePage( TQWidget *p );
public slots:
void updateButtons();
protected:
- void resizeEvent( QResizeEvent *e ) {
- QWidgetStack::resizeEvent( e );
+ void resizeEvent( TQResizeEvent *e ) {
+ TQWidgetStack::resizeEvent( e );
updateButtons();
}
- void showEvent( QShowEvent *e ) {
- QWidgetStack::showEvent( e );
+ void showEvent( TQShowEvent *e ) {
+ TQWidgetStack::showEvent( e );
updateButtons();
}
@@ -186,8 +186,8 @@ private slots:
void nextPage();
private:
- QPtrList<QWidget> pages;
- QToolButton *prev, *next;
+ TQPtrList<TQWidget> pages;
+ TQToolButton *prev, *next;
};
@@ -195,25 +195,25 @@ class QDesignerWizard : public QWizard
{
Q_OBJECT
Q_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( QString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( QCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
Q_OVERRIDE( bool modal READ isModal WRITE setModal )
public:
- QDesignerWizard( QWidget *parent, const char *name )
- : QWizard( parent, name ), modal(FALSE) {}
+ QDesignerWizard( TQWidget *parent, const char *name )
+ : TQWizard( parent, name ), modal(FALSE) {}
int currentPageNum() const;
void setCurrentPage( int i );
- QString pageTitle() const;
- void setPageTitle( const QString& title );
- QCString pageName() const;
- void setPageName( const QCString& name );
- int pageNum( QWidget *page );
- void addPage( QWidget *p, const QString & );
- void removePage( QWidget *p );
- void insertPage( QWidget *p, const QString &t, int index );
- bool isPageRemoved( QWidget *p ) { return (removedPages.find( p ) != 0); }
+ TQString pageTitle() const;
+ void setPageTitle( const TQString& title );
+ TQCString pageName() const;
+ void setPageName( const TQCString& name );
+ int pageNum( TQWidget *page );
+ void addPage( TQWidget *p, const TQString & );
+ void removePage( TQWidget *p );
+ void insertPage( TQWidget *p, const TQString &t, int index );
+ bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); }
bool isModal() const { return modal; }
void setModal(bool b) { modal = b; }
@@ -223,12 +223,12 @@ public:
private:
struct Page
{
- Page( QWidget *a, const QString &b ) : p( a ), t( b ) {}
- Page() : p( 0 ), t( QString::null ) {}
- QWidget *p;
- QString t;
+ Page( TQWidget *a, const TQString &b ) : p( a ), t( b ) {}
+ Page() : p( 0 ), t( TQString::null ) {}
+ TQWidget *p;
+ TQString t;
};
- QPtrDict<QWidget> removedPages;
+ TQPtrDict<TQWidget> removedPages;
bool modal;
};
@@ -238,15 +238,15 @@ class QLayoutWidget : public QWidget
Q_OBJECT
public:
- QLayoutWidget( QWidget *parent, const char *name ) : QWidget( parent, name ), sp( QWidget::sizePolicy() ) {}
+ QLayoutWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ), sp( TQWidget::sizePolicy() ) {}
- QSizePolicy sizePolicy() const;
+ TQSizePolicy sizePolicy() const;
void updateSizePolicy();
protected:
- void paintEvent( QPaintEvent * );
- bool event( QEvent * );
- QSizePolicy sp;
+ void paintEvent( TQPaintEvent * );
+ bool event( TQEvent * );
+ TQSizePolicy sp;
};
@@ -256,26 +256,26 @@ class CustomWidget : public QWidget
Q_OBJECT
public:
- CustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *cw )
- : QWidget( parent, name ), cusw( cw ) {
+ CustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *cw )
+ : TQWidget( parent, name ), cusw( cw ) {
alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" );
setSizePolicy( cw->sizePolicy );
if ( !alwaysExpand )
setBackgroundMode( PaletteDark );
}
- QSize sizeHint() const {
- QSize sh = cusw->sizeHint;
+ TQSize sizeHint() const {
+ TQSize sh = cusw->sizeHint;
if ( sh.isValid() )
return sh;
- return QWidget::sizeHint();
+ return TQWidget::sizeHint();
}
- QString realClassName() { return cusw->className; }
+ TQString realClassName() { return cusw->className; }
MetaDataBase::CustomWidget *customWidget() const { return cusw; }
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
MetaDataBase::CustomWidget *cusw;
bool alwaysExpand;
@@ -290,11 +290,11 @@ class Line : public QFrame
Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
Q_OVERRIDE( int frameWidth DESIGNABLE false )
Q_OVERRIDE( Shape frameShape DESIGNABLE false )
- Q_OVERRIDE( QRect frameRect DESIGNABLE false )
- Q_OVERRIDE( QRect contentsRect DESIGNABLE false )
+ Q_OVERRIDE( TQRect frameRect DESIGNABLE false )
+ Q_OVERRIDE( TQRect contentsRect DESIGNABLE false )
public:
- Line( QWidget *parent, const char *name )
- : QFrame( parent, name, WMouseNoMask ) {
+ Line( TQWidget *parent, const char *name )
+ : TQFrame( parent, name, WMouseNoMask ) {
setFrameStyle( HLine | Sunken );
}
@@ -313,23 +313,23 @@ class QDesignerLabel : public QLabel
{
Q_OBJECT
- Q_PROPERTY( QCString buddy READ buddyWidget WRITE setBuddyWidget )
+ Q_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget )
public:
- QDesignerLabel( QWidget *parent = 0, const char *name = 0 )
- : QLabel( parent, name ) { myBuddy = 0; }
+ QDesignerLabel( TQWidget *parent = 0, const char *name = 0 )
+ : TQLabel( parent, name ) { myBuddy = 0; }
- void setBuddyWidget( const QCString &b ) {
+ void setBuddyWidget( const TQCString &b ) {
myBuddy = b;
updateBuddy();
}
- QCString buddyWidget() const {
+ TQCString buddyWidget() const {
return myBuddy;
};
protected:
- void showEvent( QShowEvent *e ) {
- QLabel::showEvent( e );
+ void showEvent( TQShowEvent *e ) {
+ TQLabel::showEvent( e );
updateBuddy();
}
@@ -337,7 +337,7 @@ protected:
private:
void updateBuddy();
- QCString myBuddy;
+ TQCString myBuddy;
};
@@ -346,14 +346,14 @@ class QDesignerWidget : public QWidget
Q_OBJECT
public:
- QDesignerWidget( FormWindow *fw, QWidget *parent, const char *name )
- : QWidget( parent, name, WResizeNoErase ), formwindow( fw ) {
+ QDesignerWidget( FormWindow *fw, TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WResizeNoErase ), formwindow( fw ) {
need_frame = parent && parent->inherits("QDesignerWidgetStack" );
}
protected:
- void resizeEvent( QResizeEvent* e);
- void paintEvent( QPaintEvent *e );
+ void resizeEvent( TQResizeEvent* e);
+ void paintEvent( TQPaintEvent *e );
private:
FormWindow *formwindow;
@@ -367,14 +367,14 @@ class QDesignerDialog : public QDialog
Q_OVERRIDE( bool modal READ isModal WRITE setModal )
public:
- QDesignerDialog( FormWindow *fw, QWidget *parent, const char *name )
- : QDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ), modal(FALSE) {}
+ QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name )
+ : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ), modal(FALSE) {}
bool isModal() const { return modal; }
void setModal(bool b) { modal = b; }
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
private:
FormWindow *formwindow;
@@ -388,19 +388,19 @@ class QDesignerToolButton : public QToolButton
Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerToolButton( QWidget *parent, const char *name )
- : QToolButton( parent, name ) {}
+ QDesignerToolButton( TQWidget *parent, const char *name )
+ : TQToolButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
- ( (QButtonGroup*)parentWidget() )->remove( this );
- ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
+ ( (TQButtonGroup*)parentWidget() )->remove( this );
+ ( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
}
};
@@ -411,19 +411,19 @@ class QDesignerRadioButton : public QRadioButton
Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerRadioButton( QWidget *parent, const char *name )
- : QRadioButton( parent, name ) {}
+ QDesignerRadioButton( TQWidget *parent, const char *name )
+ : TQRadioButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
- ( (QButtonGroup*)parentWidget() )->remove( this );
- ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
+ ( (TQButtonGroup*)parentWidget() )->remove( this );
+ ( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
}
@@ -435,19 +435,19 @@ class QDesignerPushButton : public QPushButton
Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerPushButton( QWidget *parent, const char *name )
- : QPushButton( parent, name ) {}
+ QDesignerPushButton( TQWidget *parent, const char *name )
+ : TQPushButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
- ( (QButtonGroup*)parentWidget() )->remove( this );
- ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
+ ( (TQButtonGroup*)parentWidget() )->remove( this );
+ ( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
}
@@ -459,19 +459,19 @@ class QDesignerCheckBox : public QCheckBox
Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerCheckBox( QWidget *parent, const char *name )
- : QCheckBox( parent, name ) {}
+ QDesignerCheckBox( TQWidget *parent, const char *name )
+ : TQCheckBox( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) {
- ( (QButtonGroup*)parentWidget() )->remove( this );
- ( (QButtonGroup*)parentWidget() )->insert( this, id );
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
+ ( (TQButtonGroup*)parentWidget() )->remove( this );
+ ( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
}
@@ -480,17 +480,17 @@ public:
class QDesignerToolBox : public QToolBox
{
Q_OBJECT
- Q_PROPERTY( QString itemLabel READ itemLabel WRITE setItemLabel STORED false DESIGNABLE true )
- Q_PROPERTY( QCString itemName READ itemName WRITE setItemName STORED false DESIGNABLE true )
+ Q_PROPERTY( TQString itemLabel READ itemLabel WRITE setItemLabel STORED false DESIGNABLE true )
+ Q_PROPERTY( TQCString itemName READ itemName WRITE setItemName STORED false DESIGNABLE true )
Q_PROPERTY( BackgroundMode itemBackgroundMode READ itemBackgroundMode WRITE setItemBackgroundMode STORED false DESIGNABLE true )
public:
- QDesignerToolBox( QWidget *parent, const char *name );
+ QDesignerToolBox( TQWidget *parent, const char *name );
- QString itemLabel() const;
- void setItemLabel( const QString &l );
- QCString itemName() const;
- void setItemName( const QCString &n );
+ TQString itemLabel() const;
+ void setItemLabel( const TQString &l );
+ TQCString itemName() const;
+ void setItemName( const TQCString &n );
BackgroundMode itemBackgroundMode() const;
void setItemBackgroundMode( BackgroundMode );
diff --git a/kdevdesigner/designer/wizardeditorimpl.cpp b/kdevdesigner/designer/wizardeditorimpl.cpp
index 089bf746..21e20c63 100644
--- a/kdevdesigner/designer/wizardeditorimpl.cpp
+++ b/kdevdesigner/designer/wizardeditorimpl.cpp
@@ -31,29 +31,29 @@
#include "listboxdnd.h"
#include "listboxrename.h"
-#include <qwizard.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qinputdialog.h>
+#include <tqwizard.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqinputdialog.h>
#include <klocale.h>
-WizardEditor::WizardEditor( QWidget *parent, QWizard *w, FormWindow *fw )
+WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw )
: WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w ), draggedItem( 0 )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
fillListBox();
// Add drag and drop
ListBoxDnd *listBoxDnd = new ListBoxDnd( listBox );
listBoxDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move );
- QObject::connect( listBoxDnd, SIGNAL( dropped( QListBoxItem * ) ),
- listBoxDnd, SLOT( confirmDrop( QListBoxItem * ) ) );
+ TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
+ listBoxDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) );
- QObject::connect( listBoxDnd, SIGNAL( dragged( QListBoxItem * ) ),
- this, SLOT( itemDragged( QListBoxItem * ) ) );
- QObject::connect( listBoxDnd, SIGNAL( dropped( QListBoxItem * ) ),
- this, SLOT( itemDropped( QListBoxItem * ) ) );
+ TQObject::connect( listBoxDnd, TQT_SIGNAL( dragged( TQListBoxItem * ) ),
+ this, TQT_SLOT( itemDragged( TQListBoxItem * ) ) );
+ TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
+ this, TQT_SLOT( itemDropped( TQListBoxItem * ) ) );
// Add in-place rename
new ListBoxRename( listBox );
@@ -90,7 +90,7 @@ void WizardEditor::applyClicked()
// fix wizard buttons
for ( int i = 0; i < wizard->pageCount(); i++ ) {
- QWidget * page = wizard->page( i );
+ TQWidget * page = wizard->page( i );
if ( i == 0 ) { // first page
wizard->setBackEnabled( page, FALSE );
@@ -163,7 +163,7 @@ void WizardEditor::upClicked()
int index2 = index1 - 1;
// swap listbox items
- QString item1 = listBox->text( index1 );
+ TQString item1 = listBox->text( index1 );
listBox->removeItem( index1 );
listBox->insertItem( item1, index2 );
listBox->setCurrentItem( index2 );
@@ -183,7 +183,7 @@ void WizardEditor::downClicked()
int index2 = index1 + 1;
// swap listbox items
- QString item1 = listBox->text( index1 );
+ TQString item1 = listBox->text( index1 );
listBox->removeItem( index1 );
listBox->insertItem( item1, index2 );
listBox->setCurrentItem( index2 );
@@ -217,7 +217,7 @@ void WizardEditor::itemSelected( int index )
if ( index < 0 ) return;
// Called when Qt::Key_Enter was pressed.
// ListBoxRename has renamed the list item, so we only need to rename the page to the same name.
- QString pn( i18n( "Rename page %1 of %2" ).arg( wizard->title( wizard->page( index ) ) ).arg( wizard->name() ) );
+ TQString pn( i18n( "Rename page %1 of %2" ).arg( wizard->title( wizard->page( index ) ) ).arg( wizard->name() ) );
RenameWizardPageCommand *cmd = new RenameWizardPageCommand( pn, formwindow, wizard, index, listBox->text( index ) );
commands.append( cmd );
}
@@ -234,13 +234,13 @@ void WizardEditor::updateButtons()
buttonRemove->setEnabled( FALSE );
}
-void WizardEditor::itemDragged( QListBoxItem * i )
+void WizardEditor::itemDragged( TQListBoxItem * i )
{
// Store item index
draggedItem = listBox->index( i );
}
-void WizardEditor::itemDropped( QListBoxItem * i )
+void WizardEditor::itemDropped( TQListBoxItem * i )
{
if ( draggedItem < 0 ) return;
// The reorder the pages acording to the listBox list of items
diff --git a/kdevdesigner/designer/wizardeditorimpl.h b/kdevdesigner/designer/wizardeditorimpl.h
index 0089cb39..52d10752 100644
--- a/kdevdesigner/designer/wizardeditorimpl.h
+++ b/kdevdesigner/designer/wizardeditorimpl.h
@@ -30,7 +30,7 @@
class QWizard;
class FormWindow;
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "wizardeditor.h"
#include "command.h"
@@ -40,7 +40,7 @@ class WizardEditor : public WizardEditorBase
Q_OBJECT
public:
- WizardEditor( QWidget *parent, QWizard *wizard, FormWindow *fw );
+ WizardEditor( TQWidget *parent, TQWizard *wizard, FormWindow *fw );
~WizardEditor();
protected slots:
@@ -57,8 +57,8 @@ protected slots:
void itemHighlighted( int );
void itemSelected( int );
- void itemDragged( QListBoxItem * );
- void itemDropped( QListBoxItem * );
+ void itemDragged( TQListBoxItem * );
+ void itemDropped( TQListBoxItem * );
private:
void updateButtons();
@@ -66,8 +66,8 @@ private:
private:
FormWindow *formwindow;
- QWizard *wizard;
- QPtrList<Command> commands;
+ TQWizard *wizard;
+ TQPtrList<Command> commands;
int draggedItem;
};
diff --git a/kdevdesigner/designer/workspace.cpp b/kdevdesigner/designer/workspace.cpp
index db9bd7be..9977c2ab 100644
--- a/kdevdesigner/designer/workspace.cpp
+++ b/kdevdesigner/designer/workspace.cpp
@@ -24,7 +24,7 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "workspace.h"
#include "formwindow.h"
#include "mainwindow.h"
@@ -39,22 +39,22 @@
#include <kiconloader.h>
#include "kdevdesigner_part.h"
-#include <qheader.h>
-#include <qdragobject.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qobjectlist.h>
-#include <qworkspace.h>
-#include <qpopupmenu.h>
-#include <qtextstream.h>
+#include <tqheader.h>
+#include <tqdragobject.h>
+#include <tqfileinfo.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqobjectlist.h>
+#include <tqworkspace.h>
+#include <tqpopupmenu.h>
+#include <tqtextstream.h>
#include "qcompletionedit.h"
#include <klocale.h>
-WorkspaceItem::WorkspaceItem( QListView *parent, Project* p )
- : QListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p )
+ : TQListViewItem( parent )
{
init();
project = p;
@@ -63,8 +63,8 @@ WorkspaceItem::WorkspaceItem( QListView *parent, Project* p )
setExpandable( FALSE );
}
-WorkspaceItem::WorkspaceItem( QListViewItem *parent, SourceFile* sf )
- : QListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf )
+ : TQListViewItem( parent )
{
init();
sourceFile = sf;
@@ -72,27 +72,27 @@ WorkspaceItem::WorkspaceItem( QListViewItem *parent, SourceFile* sf )
setPixmap( 0, SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) );
}
-WorkspaceItem::WorkspaceItem( QListViewItem *parent, QObject *o, Project *p )
- : QListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p )
+ : TQListViewItem( parent )
{
init();
object = o;
project = p;
t = ObjectType;
setPixmap( 0, SmallIcon( "designer_object.png" , KDevDesignerPartFactory::instance()) );
- QObject::connect( p->fakeFormFileFor( o ), SIGNAL( somethingChanged(FormFile*) ),
- listView(), SLOT( update() ) );
+ TQObject::connect( p->fakeFormFileFor( o ), TQT_SIGNAL( somethingChanged(FormFile*) ),
+ listView(), TQT_SLOT( update() ) );
}
-WorkspaceItem::WorkspaceItem( QListViewItem *parent, FormFile* ff, Type type )
- : QListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
+ : TQListViewItem( parent )
{
init();
formFile = ff;
t = type;
if ( type == FormFileType ) {
setPixmap( 0, SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) );
- QObject::connect( ff, SIGNAL( somethingChanged(FormFile*) ), listView(), SLOT( update(FormFile*) ) );
+ TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) );
if ( formFile->supportsCodeFile() ) {
(void) new WorkspaceItem( this, formFile, FormSourceType );
}
@@ -111,31 +111,31 @@ void WorkspaceItem::init()
formFile = 0;
}
-void WorkspaceItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align )
{
- QColorGroup g( cg );
- g.setColor( QColorGroup::Base, backgroundColor() );
- g.setColor( QColorGroup::Foreground, Qt::black );
+ TQColorGroup g( cg );
+ g.setColor( TQColorGroup::Base, backgroundColor() );
+ g.setColor( TQColorGroup::Foreground, Qt::black );
if ( type() == FormSourceType &&
( !formFile->hasFormCode() || ( formFile->codeFileState() == FormFile::Deleted && formFile->formWindow() ) ) &&
parent() && parent()->parent() && ( (WorkspaceItem*)parent()->parent() )->project &&
( (WorkspaceItem*)parent()->parent() )->project->isCpp() ) {
- g.setColor( QColorGroup::Text, listView()->palette().disabled().color( QColorGroup::Text) );
- g.setColor( QColorGroup::HighlightedText, listView()->palette().disabled().color( QColorGroup::Text) );
+ g.setColor( TQColorGroup::Text, listView()->palette().disabled().color( TQColorGroup::Text) );
+ g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) );
} else {
- g.setColor( QColorGroup::Text, Qt::black );
+ g.setColor( TQColorGroup::Text, Qt::black );
}
p->save();
if ( isModified() ) {
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold( TRUE );
p->setFont( f );
}
- QListViewItem::paintCell( p, g, column, width, align );
- p->setPen( QPen( cg.dark(), 1 ) );
+ TQListViewItem::paintCell( p, g, column, width, align );
+ p->setPen( TQPen( cg.dark(), 1 ) );
if ( column == 0 )
p->drawLine( 0, 0, 0, height() - 1 );
if ( listView()->firstChild() != this ) {
@@ -149,16 +149,16 @@ void WorkspaceItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
p->restore();
}
-QString WorkspaceItem::text( int column ) const
+TQString WorkspaceItem::text( int column ) const
{
if ( column != 0 )
- return QListViewItem::text( column );
+ return TQListViewItem::text( column );
switch( t ) {
case ProjectType:
if ( project->isDummy() ) {
return i18n("<No Project>" );
} else if ( MainWindow::self->singleProjectMode() ) {
- return QFileInfo( project->fileName() ).baseName();
+ return TQFileInfo( project->fileName() ).baseName();
}
return project->makeRelative( project->fileName() );
case FormFileType:
@@ -177,10 +177,10 @@ QString WorkspaceItem::text( int column ) const
return project->qualifiedName( object );
}
- return QString::null; // shut up compiler
+ return TQString::null; // shut up compiler
}
-void WorkspaceItem::fillCompletionList( QStringList& completion )
+void WorkspaceItem::fillCompletionList( TQStringList& completion )
{
switch( t ) {
case ProjectType:
@@ -200,7 +200,7 @@ void WorkspaceItem::fillCompletionList( QStringList& completion )
}
}
-bool WorkspaceItem::checkCompletion( const QString& completion )
+bool WorkspaceItem::checkCompletion( const TQString& completion )
{
switch( t ) {
case ProjectType:
@@ -237,9 +237,9 @@ bool WorkspaceItem::isModified() const
return FALSE; // shut up compiler
}
-QString WorkspaceItem::key( int column, bool ) const
+TQString WorkspaceItem::key( int column, bool ) const
{
- QString key = text( column );
+ TQString key = text( column );
if ( t == FormFileType )
key.prepend( "0" );
else if ( t == ObjectType )
@@ -249,7 +249,7 @@ QString WorkspaceItem::key( int column, bool ) const
return key;
}
-QColor WorkspaceItem::backgroundColor()
+TQColor WorkspaceItem::backgroundColor()
{
bool b = useOddColor;
if ( t == FormSourceType && parent() )
@@ -260,18 +260,18 @@ QColor WorkspaceItem::backgroundColor()
void WorkspaceItem::setOpen( bool b )
{
- QListViewItem::setOpen( b );
+ TQListViewItem::setOpen( b );
autoOpen = FALSE;
}
void WorkspaceItem::setAutoOpen( bool b )
{
- QListViewItem::setOpen( b );
+ TQListViewItem::setOpen( b );
autoOpen = b;
}
-Workspace::Workspace( QWidget *parent, MainWindow *mw )
- : QListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+Workspace::Workspace( TQWidget *parent, MainWindow *mw )
+ : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ),
project( 0 ), completionDirty( FALSE )
{
@@ -283,21 +283,21 @@ Workspace::Workspace( QWidget *parent, MainWindow *mw )
header()->setStretchEnabled( TRUE );
header()->hide();
setSorting( 0 );
- setResizePolicy( QScrollView::Manual );
+ setResizePolicy( TQScrollView::Manual );
#ifndef Q_WS_MAC
- QPalette p( palette() );
- p.setColor( QColorGroup::Base, QColor( *backColor2 ) );
+ TQPalette p( palette() );
+ p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) );
(void)*selectedBack; // hack
setPalette( p );
#endif
addColumn( i18n( "Files" ) );
setAllColumnsShowFocus( TRUE );
- connect( this, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ),
- this, SLOT( itemClicked( int, QListViewItem *, const QPoint& ) ) ),
- connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
- this, SLOT( itemDoubleClicked( QListViewItem * ) ) ),
- connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( rmbClicked( QListViewItem *, const QPoint& ) ) ),
+ connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ),
+ connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ),
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ),
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
viewport()->setAcceptDrops( TRUE );
@@ -306,7 +306,7 @@ Workspace::Workspace( QWidget *parent, MainWindow *mw )
}
-void Workspace::projectDestroyed( QObject* o )
+void Workspace::projectDestroyed( TQObject* o )
{
if ( o == project ) {
project = 0;
@@ -319,23 +319,23 @@ void Workspace::setCurrentProject( Project *pro )
if ( project == pro )
return;
if ( project ) {
- disconnect( project, SIGNAL( sourceFileAdded(SourceFile*) ), this, SLOT( sourceFileAdded(SourceFile*) ) );
- disconnect( project, SIGNAL( sourceFileRemoved(SourceFile*) ), this, SLOT( sourceFileRemoved(SourceFile*) ) );
- disconnect( project, SIGNAL( formFileAdded(FormFile*) ), this, SLOT( formFileAdded(FormFile*) ) );
- disconnect( project, SIGNAL( formFileRemoved(FormFile*) ), this, SLOT( formFileRemoved(FormFile*) ) );
- disconnect( project, SIGNAL( objectAdded(QObject*) ), this, SLOT( objectAdded(QObject*) ) );
- disconnect( project, SIGNAL( objectRemoved(QObject*) ), this, SLOT( objectRemoved(QObject*) ) );
- disconnect( project, SIGNAL( projectModified() ), this, SLOT( update() ) );
+ disconnect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) );
+ disconnect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) );
+ disconnect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) );
+ disconnect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) );
+ disconnect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) );
+ disconnect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) );
+ disconnect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) );
}
project = pro;
- connect( project, SIGNAL( sourceFileAdded(SourceFile*) ), this, SLOT( sourceFileAdded(SourceFile*) ) );
- connect( project, SIGNAL( sourceFileRemoved(SourceFile*) ), this, SLOT( sourceFileRemoved(SourceFile*) ) );
- connect( project, SIGNAL( formFileAdded(FormFile*) ), this, SLOT( formFileAdded(FormFile*) ) );
- connect( project, SIGNAL( formFileRemoved(FormFile*) ), this, SLOT( formFileRemoved(FormFile*) ) );
- connect( project, SIGNAL( destroyed(QObject*) ), this, SLOT( projectDestroyed(QObject*) ) );
- connect( project, SIGNAL( objectAdded(QObject*) ), this, SLOT( objectAdded(QObject*) ) );
- connect( project, SIGNAL( objectRemoved(QObject*) ), this, SLOT( objectRemoved(QObject*) ) );
- connect( project, SIGNAL( projectModified() ), this, SLOT( update() ) );
+ connect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) );
+ connect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) );
+ connect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) );
+ connect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) );
+ connect( project, TQT_SIGNAL( destroyed(TQObject*) ), this, TQT_SLOT( projectDestroyed(TQObject*) ) );
+ connect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) );
+ connect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) );
+ connect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) );
clear();
if ( bufferEdit )
@@ -345,13 +345,13 @@ void Workspace::setCurrentProject( Project *pro )
projectItem->setOpen( TRUE );
- for ( QPtrListIterator<SourceFile> sources = project->sourceFiles();
+ for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
(void) new WorkspaceItem( projectItem, f );
}
- for ( QPtrListIterator<FormFile> forms = project->formFiles();
+ for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
FormFile* f = forms.current();
if ( f->isFake() )
@@ -360,10 +360,10 @@ void Workspace::setCurrentProject( Project *pro )
(void) new WorkspaceItem( projectItem, f );
}
- QObjectList l = project->objects();
- QObjectListIt objs( l );
+ TQObjectList l = project->objects();
+ TQObjectListIt objs( l );
for ( ;objs.current(); ++objs ) {
- QObject* o = objs.current();
+ TQObject* o = objs.current();
(void) new WorkspaceItem( projectItem, o, project );
}
@@ -397,13 +397,13 @@ void Workspace::formFileRemoved( FormFile* ff )
updateColors();
}
-void Workspace::objectAdded( QObject *o )
+void Workspace::objectAdded( TQObject *o )
{
(void) new WorkspaceItem( projectItem, o, project );
updateColors();
}
-void Workspace::objectRemoved( QObject *o )
+void Workspace::objectRemoved( TQObject *o )
{
delete findItem( o );
updateColors();
@@ -417,7 +417,7 @@ void Workspace::update()
void Workspace::update( FormFile* ff )
{
- QListViewItem* i = findItem( ff );
+ TQListViewItem* i = findItem( ff );
if ( i ) {
i->repaint();
if ( (i = i->firstChild()) )
@@ -466,7 +466,7 @@ void Workspace::activeEditorChanged( SourceEditor *se )
WorkspaceItem *Workspace::findItem( FormFile* ff)
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
if ( ( (WorkspaceItem*)it.current() )->formFile == ff )
return (WorkspaceItem*)it.current();
@@ -476,7 +476,7 @@ WorkspaceItem *Workspace::findItem( FormFile* ff)
WorkspaceItem *Workspace::findItem( SourceFile *sf )
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
if ( ( (WorkspaceItem*)it.current() )->sourceFile == sf )
return (WorkspaceItem*)it.current();
@@ -484,9 +484,9 @@ WorkspaceItem *Workspace::findItem( SourceFile *sf )
return 0;
}
-WorkspaceItem *Workspace::findItem( QObject *o )
+WorkspaceItem *Workspace::findItem( TQObject *o )
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
if ( ( (WorkspaceItem*)it.current() )->object == o )
return (WorkspaceItem*)it.current();
@@ -496,7 +496,7 @@ WorkspaceItem *Workspace::findItem( QObject *o )
void Workspace::closeAutoOpenItems()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
WorkspaceItem* i = (WorkspaceItem*) it.current();
WorkspaceItem* ip = (WorkspaceItem*) i->parent();
@@ -510,18 +510,18 @@ void Workspace::closeAutoOpenItems()
}
-void Workspace::closeEvent( QCloseEvent *e )
+void Workspace::closeEvent( TQCloseEvent *e )
{
e->accept();
}
-void Workspace::itemDoubleClicked( QListViewItem *i )
+void Workspace::itemDoubleClicked( TQListViewItem *i )
{
if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType )
i->setOpen( TRUE );
}
-void Workspace::itemClicked( int button, QListViewItem *i, const QPoint& )
+void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& )
{
if ( !i || button != LeftButton )
return;
@@ -552,46 +552,46 @@ void Workspace::itemClicked( int button, QListViewItem *i, const QPoint& )
}
}
-void Workspace::contentsDropEvent( QDropEvent *e )
+void Workspace::contentsDropEvent( TQDropEvent *e )
{
- if ( !QUriDrag::canDecode( e ) ) {
+ if ( !TQUriDrag::canDecode( e ) ) {
e->ignore();
} else {
- QStringList files;
- QUriDrag::decodeLocalFiles( e, files );
+ TQStringList files;
+ TQUriDrag::decodeLocalFiles( e, files );
if ( !files.isEmpty() ) {
- for ( QStringList::Iterator it = files.begin(); it != files.end(); ++it ) {
- QString fn = *it;
+ for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) {
+ TQString fn = *it;
mainWindow->fileOpen( "", "", fn );
}
}
}
}
-void Workspace::contentsDragEnterEvent( QDragEnterEvent *e )
+void Workspace::contentsDragEnterEvent( TQDragEnterEvent *e )
{
- if ( !QUriDrag::canDecode( e ) )
+ if ( !TQUriDrag::canDecode( e ) )
e->ignore();
else
e->accept();
}
-void Workspace::contentsDragMoveEvent( QDragMoveEvent *e )
+void Workspace::contentsDragMoveEvent( TQDragMoveEvent *e )
{
- if ( !QUriDrag::canDecode( e ) )
+ if ( !TQUriDrag::canDecode( e ) )
e->ignore();
else
e->accept();
}
-void Workspace::rmbClicked( QListViewItem *i, const QPoint& pos )
+void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
{
if ( !i )
return;
WorkspaceItem* wi = (WorkspaceItem*)i;
enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM,
OPEN_FORM_SOURCE, REMOVE_FORM_SOURCE, OPEN_OBJECT_SOURCE };
- QPopupMenu menu( this );
+ TQPopupMenu menu( this );
menu.setCheckable( TRUE );
switch ( wi->type() ) {
case WorkspaceItem::SourceFileType:
@@ -645,19 +645,19 @@ void Workspace::rmbClicked( QListViewItem *i, const QPoint& pos )
}
}
-bool Workspace::eventFilter( QObject *o, QEvent * e )
+bool Workspace::eventFilter( TQObject *o, TQEvent * e )
{
// Reggie, on what type of events do we have to execute updateBufferEdit()
- if ( o ==bufferEdit && e->type() != QEvent::ChildRemoved )
+ if ( o ==bufferEdit && e->type() != TQEvent::ChildRemoved )
updateBufferEdit();
- return QListView::eventFilter( o, e );
+ return TQListView::eventFilter( o, e );
}
void Workspace::setBufferEdit( QCompletionEdit *edit )
{
bufferEdit = edit;
- connect( bufferEdit, SIGNAL( chosen( const QString & ) ),
- this, SLOT( bufferChosen( const QString & ) ) );
+ connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ),
+ this, TQT_SLOT( bufferChosen( const TQString & ) ) );
bufferEdit->installEventFilter( this );
}
@@ -666,8 +666,8 @@ void Workspace::updateBufferEdit()
if ( !bufferEdit || !completionDirty || !MainWindow::self)
return;
completionDirty = FALSE;
- QStringList completion = MainWindow::self->projectFileNames();
- QListViewItemIterator it( this );
+ TQStringList completion = MainWindow::self->projectFileNames();
+ TQListViewItemIterator it( this );
while ( it.current() ) {
( (WorkspaceItem*)it.current())->fillCompletionList( completion );
++it;
@@ -676,7 +676,7 @@ void Workspace::updateBufferEdit()
bufferEdit->setCompletionList( completion );
}
-void Workspace::bufferChosen( const QString &buffer )
+void Workspace::bufferChosen( const TQString &buffer )
{
if ( bufferEdit )
bufferEdit->setText( "" );
@@ -686,10 +686,10 @@ void Workspace::bufferChosen( const QString &buffer )
return;
}
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) {
- itemClicked( LeftButton, it.current(), QPoint() );
+ itemClicked( LeftButton, it.current(), TQPoint() );
break;
}
++it;
@@ -698,7 +698,7 @@ void Workspace::bufferChosen( const QString &buffer )
void Workspace::updateColors()
{
- QListViewItem* i = firstChild();
+ TQListViewItem* i = firstChild();
if ( i )
i = i->firstChild();
bool b = TRUE;
diff --git a/kdevdesigner/designer/workspace.h b/kdevdesigner/designer/workspace.h
index 8e710725..4e4f0d1a 100644
--- a/kdevdesigner/designer/workspace.h
+++ b/kdevdesigner/designer/workspace.h
@@ -27,7 +27,7 @@
#ifndef WORKSPACE_H
#define WORKSPACE_H
-#include <qlistview.h>
+#include <tqlistview.h>
class FormWindow;
class QResizeEvent;
@@ -47,28 +47,28 @@ class WorkspaceItem : public QListViewItem
public:
enum Type { ProjectType, FormFileType, FormSourceType, SourceFileType, ObjectType };
- WorkspaceItem( QListView *parent, Project* p );
- WorkspaceItem( QListViewItem *parent, SourceFile* sf );
- WorkspaceItem( QListViewItem *parent, FormFile* ff, Type t = FormFileType );
- WorkspaceItem( QListViewItem *parent, QObject *o, Project *p );
+ WorkspaceItem( TQListView *parent, Project* p );
+ WorkspaceItem( TQListViewItem *parent, SourceFile* sf );
+ WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type t = FormFileType );
+ WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p );
- void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
+ void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
Type type() const { return t; }
bool isModified() const;
- QString text( int ) const;
+ TQString text( int ) const;
- void fillCompletionList( QStringList& completion );
- bool checkCompletion( const QString& completion );
+ void fillCompletionList( TQStringList& completion );
+ bool checkCompletion( const TQString& completion );
- QString key( int, bool ) const; // column sorting key
+ TQString key( int, bool ) const; // column sorting key
Project* project;
SourceFile* sourceFile;
FormFile* formFile;
- QObject *object;
+ TQObject *object;
void setOpen( bool );
@@ -80,7 +80,7 @@ public:
private:
void init();
bool autoOpen;
- QColor backgroundColor();
+ TQColor backgroundColor();
Type t;
};
@@ -89,13 +89,13 @@ class Workspace : public QListView
Q_OBJECT
public:
- Workspace( QWidget *parent , MainWindow *mw );
+ Workspace( TQWidget *parent , MainWindow *mw );
void setCurrentProject( Project *pro );
- void contentsDropEvent( QDropEvent *e );
- void contentsDragEnterEvent( QDragEnterEvent *e );
- void contentsDragMoveEvent( QDragMoveEvent *e );
+ void contentsDropEvent( TQDropEvent *e );
+ void contentsDragEnterEvent( TQDragEnterEvent *e );
+ void contentsDragMoveEvent( TQDragMoveEvent *e );
void setBufferEdit( QCompletionEdit *edit );
@@ -108,17 +108,17 @@ public slots:
void activeEditorChanged( SourceEditor *se );
protected:
- void closeEvent( QCloseEvent *e );
- bool eventFilter( QObject *, QEvent * );
+ void closeEvent( TQCloseEvent *e );
+ bool eventFilter( TQObject *, TQEvent * );
private slots:
- void itemClicked( int, QListViewItem *i, const QPoint& pos );
- void itemDoubleClicked( QListViewItem *i );
- void rmbClicked( QListViewItem *i, const QPoint& pos );
- void bufferChosen( const QString &buffer );
+ void itemClicked( int, TQListViewItem *i, const TQPoint& pos );
+ void itemDoubleClicked( TQListViewItem *i );
+ void rmbClicked( TQListViewItem *i, const TQPoint& pos );
+ void bufferChosen( const TQString &buffer );
- void projectDestroyed( QObject* );
+ void projectDestroyed( TQObject* );
void sourceFileAdded( SourceFile* );
void sourceFileRemoved( SourceFile* );
@@ -126,13 +126,13 @@ private slots:
void formFileAdded( FormFile* );
void formFileRemoved( FormFile* );
- void objectAdded( QObject* );
- void objectRemoved( QObject * );
+ void objectAdded( TQObject* );
+ void objectRemoved( TQObject * );
private:
WorkspaceItem *findItem( FormFile *ff );
WorkspaceItem *findItem( SourceFile *sf );
- WorkspaceItem *findItem( QObject *o );
+ WorkspaceItem *findItem( TQObject *o );
void closeAutoOpenItems();