summaryrefslogtreecommitdiffstats
path: root/kommander/editor
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/editor
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor')
-rw-r--r--kommander/editor/actiondnd.cpp500
-rw-r--r--kommander/editor/actiondnd.h222
-rw-r--r--kommander/editor/actioneditorimpl.cpp88
-rw-r--r--kommander/editor/actioneditorimpl.h12
-rw-r--r--kommander/editor/actionlistview.cpp46
-rw-r--r--kommander/editor/actionlistview.h18
-rw-r--r--kommander/editor/asciivalidator.cpp20
-rw-r--r--kommander/editor/asciivalidator.h12
-rw-r--r--kommander/editor/assistproc.cpp14
-rw-r--r--kommander/editor/assistproc.h16
-rw-r--r--kommander/editor/assoctexteditorimpl.cpp126
-rw-r--r--kommander/editor/assoctexteditorimpl.h48
-rw-r--r--kommander/editor/choosewidgetimpl.cpp56
-rw-r--r--kommander/editor/choosewidgetimpl.h12
-rw-r--r--kommander/editor/command.cpp472
-rw-r--r--kommander/editor/command.h374
-rw-r--r--kommander/editor/connectioneditorimpl.cpp118
-rw-r--r--kommander/editor/connectioneditorimpl.h24
-rw-r--r--kommander/editor/defs.cpp50
-rw-r--r--kommander/editor/defs.h10
-rw-r--r--kommander/editor/filechooser.cpp32
-rw-r--r--kommander/editor/filechooser.h16
-rw-r--r--kommander/editor/formfile.cpp56
-rw-r--r--kommander/editor/formfile.h18
-rw-r--r--kommander/editor/formsettingsimpl.cpp6
-rw-r--r--kommander/editor/formsettingsimpl.h2
-rw-r--r--kommander/editor/formwindow.cpp852
-rw-r--r--kommander/editor/formwindow.h212
-rw-r--r--kommander/editor/functionsimpl.cpp106
-rw-r--r--kommander/editor/functionsimpl.h26
-rw-r--r--kommander/editor/globaldefs.h14
-rw-r--r--kommander/editor/hierarchyview.cpp294
-rw-r--r--kommander/editor/hierarchyview.h94
-rw-r--r--kommander/editor/iconvieweditorimpl.cpp36
-rw-r--r--kommander/editor/iconvieweditorimpl.h8
-rw-r--r--kommander/editor/layout.cpp226
-rw-r--r--kommander/editor/layout.h66
-rw-r--r--kommander/editor/listboxeditorimpl.cpp56
-rw-r--r--kommander/editor/listboxeditorimpl.h8
-rw-r--r--kommander/editor/listvieweditorimpl.cpp148
-rw-r--r--kommander/editor/listvieweditorimpl.h34
-rw-r--r--kommander/editor/mainwindow.cpp598
-rw-r--r--kommander/editor/mainwindow.h110
-rw-r--r--kommander/editor/mainwindowactions.cpp322
-rw-r--r--kommander/editor/messagelog.cpp48
-rw-r--r--kommander/editor/messagelog.h12
-rw-r--r--kommander/editor/metadatabase.cpp362
-rw-r--r--kommander/editor/metadatabase.h206
-rw-r--r--kommander/editor/multilineeditorimpl.cpp20
-rw-r--r--kommander/editor/multilineeditorimpl.h8
-rw-r--r--kommander/editor/newformimpl.cpp72
-rw-r--r--kommander/editor/newformimpl.h20
-rw-r--r--kommander/editor/orderindicator.cpp36
-rw-r--r--kommander/editor/orderindicator.h12
-rw-r--r--kommander/editor/paletteeditoradvancedimpl.cpp208
-rw-r--r--kommander/editor/paletteeditoradvancedimpl.h38
-rw-r--r--kommander/editor/paletteeditorimpl.cpp134
-rw-r--r--kommander/editor/paletteeditorimpl.h20
-rw-r--r--kommander/editor/parser.cpp26
-rw-r--r--kommander/editor/parser.h4
-rw-r--r--kommander/editor/pics/images.h12
-rw-r--r--kommander/editor/pixmapchooser.cpp142
-rw-r--r--kommander/editor/pixmapchooser.h44
-rw-r--r--kommander/editor/previewframe.cpp18
-rw-r--r--kommander/editor/previewframe.h14
-rw-r--r--kommander/editor/previewwidgetimpl.cpp32
-rw-r--r--kommander/editor/previewwidgetimpl.h6
-rw-r--r--kommander/editor/propertyeditor.cpp1172
-rw-r--r--kommander/editor/propertyeditor.h286
-rw-r--r--kommander/editor/qcompletionedit.cpp68
-rw-r--r--kommander/editor/qcompletionedit.h26
-rw-r--r--kommander/editor/resource.cpp1174
-rw-r--r--kommander/editor/resource.h144
-rw-r--r--kommander/editor/sizehandle.cpp52
-rw-r--r--kommander/editor/sizehandle.h38
-rw-r--r--kommander/editor/styledbutton.cpp136
-rw-r--r--kommander/editor/styledbutton.h50
-rw-r--r--kommander/editor/tableeditorimpl.cpp108
-rw-r--r--kommander/editor/tableeditorimpl.h20
-rw-r--r--kommander/editor/timestamp.cpp24
-rw-r--r--kommander/editor/timestamp.h18
-rw-r--r--kommander/editor/widgetdatabase.cpp176
-rw-r--r--kommander/editor/widgetdatabase.h36
-rw-r--r--kommander/editor/widgetfactory.cpp926
-rw-r--r--kommander/editor/widgetfactory.h304
-rw-r--r--kommander/editor/wizardeditorimpl.cpp20
-rw-r--r--kommander/editor/wizardeditorimpl.h8
-rw-r--r--kommander/editor/workspace.cpp192
-rw-r--r--kommander/editor/workspace.h46
89 files changed, 6048 insertions, 6048 deletions
diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp
index 0da7c650..17d8af3f 100644
--- a/kommander/editor/actiondnd.cpp
+++ b/kommander/editor/actiondnd.cpp
@@ -18,19 +18,19 @@
**
**********************************************************************/
-#include <qaction.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qdragobject.h>
+#include <tqaction.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqdragobject.h>
#include <kinputdialog.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 <tqlayout.h>
+#include <tqmainwindow.h>
+#include <tqmenudata.h>
+#include <tqmessagebox.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include "actiondnd.h"
#include "command.h"
@@ -42,23 +42,23 @@
#include <klocale.h>
-bool QDesignerAction::addTo( QWidget *w )
+bool QDesignerAction::addTo( TQWidget *w )
{
if ( !widgetToInsert )
- return QAction::addTo( w );
+ return TQAction::addTo( w );
- if ( w->inherits( "QPopupMenu" ) )
+ if ( w->inherits( "TQPopupMenu" ) )
return false;
- widgetToInsert->reparent( w, QPoint( 0, 0 ), false );
+ widgetToInsert->reparent( w, TQPoint( 0, 0 ), false );
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;
@@ -69,19 +69,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 )
@@ -89,67 +89,67 @@ 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 ( w->inherits( "QToolBar" ) ) {
- QToolBar *tb = (QToolBar*)w;
+ if ( w->inherits( "TQToolBar" ) ) {
+ TQToolBar *tb = (TQToolBar*)w;
wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
return true;
- } else if ( w->inherits( "QPopupMenu" ) ) {
- idx = ( (QPopupMenu*)w )->count();
- ( (QPopupMenu*)w )->insertSeparator( idx );
+ } else if ( w->inherits( "TQPopupMenu" ) ) {
+ idx = ( (TQPopupMenu*)w )->count();
+ ( (TQPopupMenu*)w )->insertSeparator( idx );
return true;
}
return false;
}
-bool QSeparatorAction::removeFrom( QWidget *w )
+bool QSeparatorAction::removeFrom( TQWidget *w )
{
- if ( w->inherits( "QToolBar" ) ) {
+ if ( w->inherits( "TQToolBar" ) ) {
delete wid;
return true;
- } else if ( w->inherits( "QPopupMenu" ) ) {
- ( (QPopupMenu*)w )->removeItemAt( idx );
+ } else if ( w->inherits( "TQPopupMenu" ) ) {
+ ( (TQPopupMenu*)w )->removeItemAt( idx );
return true;
}
return false;
}
-QWidget *QSeparatorAction::widget() const
+TQWidget *QSeparatorAction::widget() const
{
return wid;
}
@@ -157,14 +157,14 @@ QWidget *QSeparatorAction::widget() const
-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 );
@@ -173,8 +173,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;
@@ -190,7 +190,7 @@ QDesignerToolBar::QDesignerToolBar( QMainWindow *mw, Dock dock )
void QDesignerToolBar::findFormWindow()
{
- QWidget *w = this;
+ TQWidget *w = this;
while ( w ) {
if ( w->inherits( "FormWindow" ) )
formWindow = (FormWindow*)w;
@@ -198,11 +198,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 ( a->inherits( "QActionGroup" ) ) {
+ connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) );
+ if ( a->inherits( "TQActionGroup" ) ) {
( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
} else if ( a->inherits( "QSeparatorAction" ) ) {
@@ -214,83 +214,83 @@ void QDesignerToolBar::addAction( QAction *a )
}
}
-static void fixObject( QObject *&o )
+static void fixObject( TQObject *&o )
{
while ( o && o->parent() && !o->parent()->inherits( "QDesignerToolBar" ) )
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 ( de->provides( "application/x-designer-actions" ) ||
de->provides( "application/x-designer-actiongroup" ) ||
de->provides( "application/x-designer-separator" ) )
de->accept();
- } else if ( e->type() == QEvent::DragMove ) {
- QDragMoveEvent *de = (QDragMoveEvent*)e;
+ } else if ( e->type() == TQEvent::DragMove ) {
+ TQDragMoveEvent *de = (TQDragMoveEvent*)e;
if ( de->provides( "application/x-designer-actions" ) ||
de->provides( "application/x-designer-actiongroup" ) ||
de->provides( "application/x-designer-separator" ) )
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 ) {
@@ -301,7 +301,7 @@ void QDesignerToolBar::contextMenuEvent( QContextMenuEvent *e )
}
}
-void QDesignerToolBar::mousePressEvent( QMouseEvent *e )
+void QDesignerToolBar::mousePressEvent( TQMouseEvent *e )
{
widgetInserting = false;
if ( e->button() == LeftButton &&
@@ -318,14 +318,14 @@ void QDesignerToolBar::mousePressEvent( QMouseEvent *e )
}
}
-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() ) );
@@ -336,14 +336,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() && (*it)->inherits( "QSeparatorAction" ) )
menu.insertItem( i18n("Delete Separator" ), ID_DELETE );
else
@@ -353,10 +353,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'" ).
@@ -366,7 +366,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;
@@ -387,7 +387,7 @@ void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o
}
}
-void QDesignerToolBar::buttonMousePressEvent( QMouseEvent *e, QObject * )
+void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
{
widgetInserting = false;
@@ -411,12 +411,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'" ).
@@ -424,20 +424,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 );
@@ -447,14 +447,14 @@ void QDesignerToolBar::buttonMouseMoveEvent( QMouseEvent *e, QObject *o )
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
adjustSize();
- QString type = a->inherits( "QActionGroup" ) ? QString( "application/x-designer-actiongroup" ) :
- a->inherits( "QSeparatorAction" ) ? QString( "application/x-designer-separator" ) : QString( "application/x-designer-actions" );
- QStoredDrag *drag = new QStoredDrag( type, this );
- QString s = QString::number( (long)a ); // #### huha, that is evil
- drag->setEncodedData( QCString( s.latin1() ) );
+ TQString type = a->inherits( "TQActionGroup" ) ? TQString( "application/x-designer-actiongroup" ) :
+ a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
+ TQStoredDrag *drag = new TQStoredDrag( type, this );
+ TQString s = TQString::number( (long)a ); // #### huha, that is evil
+ drag->setEncodedData( TQCString( s.latin1() ) );
drag->setPixmap( a->iconSet().pixmap() );
if ( a->inherits( "QDesignerAction" ) ) {
if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) )
@@ -467,23 +467,23 @@ 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 ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
e->provides( "application/x-designer-separator" ) )
e->accept();
}
-void QDesignerToolBar::dragMoveEvent( QDragMoveEvent *e )
+void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e )
{
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
@@ -494,14 +494,14 @@ void QDesignerToolBar::dragMoveEvent( QDragMoveEvent *e )
drawIndicator( calcIndicatorPos( e->pos() ) );
}
-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 ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
@@ -509,16 +509,16 @@ void QDesignerToolBar::dropEvent( QDropEvent *e )
e->accept();
else
return;
- QString s;
+ TQString s;
if ( e->provides( "application/x-designer-actiongroup" ) )
- s = QString( e->encodedData( "application/x-designer-actiongroup" ) );
+ s = TQString( e->encodedData( "application/x-designer-actiongroup" ) );
else if ( e->provides( "application/x-designer-separator" ) )
- s = QString( e->encodedData( "application/x-designer-separator" ) );
+ s = TQString( e->encodedData( "application/x-designer-separator" ) );
else
- s = QString( e->encodedData( "application/x-designer-actions" ) );
+ s = TQString( e->encodedData( "application/x-designer-actions" ) );
indicator->hide();
- QAction *a = 0;
+ TQAction *a = 0;
int index = actionList.findRef( *actionMap.find( insertAnchor ) );
if ( index != -1 && afterAnchor )
++index;
@@ -535,7 +535,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() ) );
@@ -548,19 +548,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 ( a->inherits( "QActionGroup" ) ) {
+ if ( a->inherits( "TQActionGroup" ) ) {
actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
if ( ( (QDesignerActionGroup*)a )->widget() )
( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
@@ -572,31 +572,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;
@@ -606,19 +606,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;
@@ -630,36 +630,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() );
@@ -678,34 +678,34 @@ 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 ( a->inherits( "QDesignerAction" ) )
( (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;
}
-QDesignerMenuBar::QDesignerMenuBar( QWidget *mw )
- : QMenuBar( mw, 0 )
+QDesignerMenuBar::QDesignerMenuBar( TQWidget *mw )
+ : TQMenuBar( mw, 0 )
{
show();
setAcceptDrops( true );
MetaDataBase::addEntry( this );
itemNum = 0;
mousePressed = false;
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1;
indicator = new QDesignerIndicatorWidget( this );
indicator->hide();
@@ -714,7 +714,7 @@ QDesignerMenuBar::QDesignerMenuBar( QWidget *mw )
void QDesignerMenuBar::findFormWindow()
{
- QWidget *w = this;
+ TQWidget *w = this;
while ( w ) {
if ( w->inherits( "FormWindow" ) )
formWindow = (FormWindow*)w;
@@ -722,7 +722,7 @@ void QDesignerMenuBar::findFormWindow()
}
}
-void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e )
+void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e )
{
e->accept();
int itm = itemAtPos( e->pos() );
@@ -731,15 +731,15 @@ void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e )
formWindow->mainWindow()->popupFormWindowMenu( e->globalPos(), formWindow );
return;
}
- QPopupMenu menu( this );
+ TQPopupMenu menu( this );
menu.insertItem( i18n("Delete Item" ), 1 );
menu.insertItem( i18n("Rename Item..." ), 2 );
int res = menu.exec( e->globalPos() );
if ( res == 1 ) {
- QMenuItem *item = findItem( idAt( itm ) );
+ TQMenuItem *item = findItem( idAt( itm ) );
RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).arg( item->text() ),
formWindow,
- (QMainWindow*)parentWidget(), this,
+ (TQMainWindow*)parentWidget(), this,
(QDesignerPopupMenu*)item->popup(),
idAt( itm ), itm, item->text() );
formWindow->commandHistory()->addCommand( cmd );
@@ -749,8 +749,8 @@ void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e )
parentWidget()->layout()->activate();
} else if ( res == 2 ) {
bool ok;
- QString old = text( idAt( itm ) );
- QString txt = KInputDialog::getText( i18n("Rename Menu Item" ), i18n("Menu text:" ),
+ TQString old = text( idAt( itm ) );
+ TQString txt = KInputDialog::getText( i18n("Rename Menu Item" ), i18n("Menu text:" ),
text( idAt( itm ) ), &ok, 0 );
if ( ok ) {
RenameMenuCommand *cmd = new RenameMenuCommand(
@@ -762,43 +762,43 @@ void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e )
}
}
-void QDesignerMenuBar::mousePressEvent( QMouseEvent *e )
+void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e )
{
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1;
mousePressed = true;
if ( e->button() == MidButton || e->button() == RightButton )
return;
dragStartPos = e->pos();
- QMenuBar::mousePressEvent( e );
+ TQMenuBar::mousePressEvent( e );
}
-void QDesignerMenuBar::mouseMoveEvent( QMouseEvent *e )
+void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e )
{
if ( !mousePressed || e->state() == NoButton ) {
- QMenuBar::mouseMoveEvent( e );
+ TQMenuBar::mouseMoveEvent( e );
return;
}
- if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() )
+ if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
return;
hidePopups();
activateItemAt( -1 );
int itm = itemAtPos( dragStartPos );
if ( itm == -1 )
return;
- QPopupMenu *popup = findItem( idAt( itm ) )->popup();
- QString txt = findItem( idAt( itm ) )->text();
+ TQPopupMenu *popup = findItem( idAt( itm ) )->popup();
+ TQString txt = findItem( idAt( itm ) )->text();
removeItemAt( itm );
- QStoredDrag *drag = new QStoredDrag( "application/x-designer-menuitem", this );
- QString s = QString::number( (long)popup );
+ TQStoredDrag *drag = new TQStoredDrag( "application/x-designer-menuitem", this );
+ TQString s = TQString::number( (long)popup );
s += "/" + txt;
- drag->setEncodedData( QCString( s.latin1() ) );
- QSize sz( fontMetrics().boundingRect( txt ).size() );
- QPixmap pix( sz.width() + 20, sz.height() * 2 );
+ drag->setEncodedData( TQCString( s.latin1() ) );
+ TQSize sz( fontMetrics().boundingRect( txt ).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, txt );
p.end();
pix.setMask( pix.createHeuristicMask() );
@@ -807,20 +807,20 @@ void QDesignerMenuBar::mouseMoveEvent( QMouseEvent *e )
if ( !drag->drag() ) {
insertItem( txt, popup, -1, itm );
}
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
indicator->hide();
mousePressed = false;
}
-void QDesignerMenuBar::mouseReleaseEvent( QMouseEvent *e )
+void QDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e )
{
- QMenuBar::mouseReleaseEvent( e );
+ TQMenuBar::mouseReleaseEvent( e );
mousePressed = false;
}
#ifndef QT_NO_DRAGANDDROP
-void QDesignerMenuBar::dragEnterEvent( QDragEnterEvent *e )
+void QDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e )
{
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
@@ -828,11 +828,11 @@ void QDesignerMenuBar::dragEnterEvent( QDragEnterEvent *e )
e->accept();
if ( e->provides( "application/x-designer-menuitem" ) )
e->accept();
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1;
}
-void QDesignerMenuBar::dragMoveEvent( QDragMoveEvent *e )
+void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e )
{
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-menuitem" ) ||
@@ -845,12 +845,12 @@ void QDesignerMenuBar::dragMoveEvent( QDragMoveEvent *e )
e->provides( "application/x-designer-actiongroup" ) ||
e->provides( "application/x-designer-separator" ) ) {
int item = itemAtPos( e->pos() );
- bool uieffect = QApplication::isEffectEnabled( UI_AnimateMenu );
- QApplication::setEffectEnabled( UI_AnimateMenu, false );
+ bool uieffect = TQApplication::isEffectEnabled( UI_AnimateMenu );
+ TQApplication::setEffectEnabled( UI_AnimateMenu, false );
if ( !qApp->activePopupWidget() )
actItem = -1;
activateItemAt( item );
- QApplication::setEffectEnabled( UI_AnimateMenu, uieffect );
+ TQApplication::setEffectEnabled( UI_AnimateMenu, uieffect );
if ( item == -1 )
hidePopups();
} else {
@@ -858,24 +858,24 @@ void QDesignerMenuBar::dragMoveEvent( QDragMoveEvent *e )
}
}
-void QDesignerMenuBar::dragLeaveEvent( QDragLeaveEvent * )
+void QDesignerMenuBar::dragLeaveEvent( TQDragLeaveEvent * )
{
mousePressed = false;
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1;
}
-void QDesignerMenuBar::dropEvent( QDropEvent *e )
+void QDesignerMenuBar::dropEvent( TQDropEvent *e )
{
mousePressed = false;
if ( !e->provides( "application/x-designer-menuitem" ) )
return;
e->accept();
- QString s( e->encodedData( "application/x-designer-menuitem" ) );
- QString s1 = s.left( s.find( "/" ) );
- QString s2 = s.mid( s.find( "/" ) + 1 );
- QPopupMenu *popup = (QPopupMenu*)s1.toLong(); // #### huha, that is evil
- QString txt = s2;
+ TQString s( e->encodedData( "application/x-designer-menuitem" ) );
+ TQString s1 = s.left( s.find( "/" ) );
+ TQString s2 = s.mid( s.find( "/" ) + 1 );
+ TQPopupMenu *popup = (TQPopupMenu*)s1.toLong(); // #### huha, that is evil
+ TQString txt = s2;
insertItem( txt, popup, -1, insertAt );
MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).arg( txt ), formWindow,
@@ -888,12 +888,12 @@ void QDesignerMenuBar::dropEvent( QDropEvent *e )
#endif
-QPoint QDesignerMenuBar::calcIndicatorPos( const QPoint &pos )
+TQPoint QDesignerMenuBar::calcIndicatorPos( const TQPoint &pos )
{
int w = frameWidth();
insertAt = count();
for ( int i = 0; i < (int)count(); ++i ) {
- QRect r = itemRect( i );
+ TQRect r = itemRect( i );
if ( pos.x() < w + r.width() / 2 ) {
insertAt = i;
break;
@@ -901,10 +901,10 @@ QPoint QDesignerMenuBar::calcIndicatorPos( const QPoint &pos )
w += r.width();
}
- return QPoint( w, 0 );
+ return TQPoint( w, 0 );
}
-void QDesignerMenuBar::drawIndicator( const QPoint &pos )
+void QDesignerMenuBar::drawIndicator( const TQPoint &pos )
{
if ( lastIndicatorPos == pos )
return;
@@ -915,7 +915,7 @@ void QDesignerMenuBar::drawIndicator( const QPoint &pos )
indicator->raise();
lastIndicatorPos = pos;
if ( !wasVsisible )
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
}
void QDesignerMenuBar::setItemNumber( int num )
@@ -928,28 +928,28 @@ int QDesignerMenuBar::itemNumber() const
return itemNum;
}
-void QDesignerMenuBar::setItemText( const QString &s )
+void QDesignerMenuBar::setItemText( const TQString &s )
{
if ( itemNum < 0 || itemNum >= (int)count() )
return;
changeItem( idAt( itemNum ), s );
}
-QString QDesignerMenuBar::itemText() const
+TQString QDesignerMenuBar::itemText() const
{
if ( itemNum < 0 || (int)itemNum >= (int)count() )
- return QString::null;
+ return TQString::null;
return text( idAt( itemNum ) );
}
-void QDesignerMenuBar::setItemName( const QCString &s )
+void QDesignerMenuBar::setItemName( const TQCString &s )
{
if ( itemNum < 0 || itemNum >= (int)count() )
return;
findItem( idAt( itemNum ) )->popup()->setName( s );
}
-QCString QDesignerMenuBar::itemName() const
+TQCString QDesignerMenuBar::itemName() const
{
if ( itemNum < 0 || itemNum >= (int)count() )
return "";
@@ -958,31 +958,31 @@ QCString QDesignerMenuBar::itemName() const
-QDesignerPopupMenu::QDesignerPopupMenu( QWidget *w )
- : QPopupMenu( w, 0 ),
+QDesignerPopupMenu::QDesignerPopupMenu( TQWidget *w )
+ : TQPopupMenu( w, 0 ),
popupMenu( 0 )
{
findFormWindow();
setAcceptDrops( true );
insertAt = -1;
mousePressed = false;
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
indicator = new QDesignerIndicatorWidget( this );
indicator->hide();
}
-void QDesignerPopupMenu::contextMenuEvent( QContextMenuEvent *e )
+void QDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e )
{
#if defined( Q_WS_MAC ) //the mac needs us to use context menu rather than right click
e->accept();
- QMouseEvent me( QEvent::MouseButtonPress, e->pos(), e->globalPos(), RightButton, RightButton );
+ TQMouseEvent me( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), RightButton, RightButton );
mousePressEvent(&me);
#else
Q_UNUSED( e );
#endif
}
-void QDesignerPopupMenu::mousePressEvent( QMouseEvent *e )
+void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == MidButton )
return;
@@ -996,18 +996,18 @@ void QDesignerPopupMenu::mousePressEvent( QMouseEvent *e )
popupMenu->close();
}
e->accept();
- QTimer::singleShot( 0, this, SLOT(createPopupMenu()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(createPopupMenu()) );
return;
}
mousePressed = true;
dragStartPos = e->pos();
- QPopupMenu::mousePressEvent( e );
+ TQPopupMenu::mousePressEvent( e );
}
void QDesignerPopupMenu::createPopupMenu()
{
// actually creates our popup for the popupmenu.
- QPopupMenu menu( 0 );
+ TQPopupMenu menu( 0 );
popupMenu = &menu;
int itm;
const int ID_DELETE = 1;
@@ -1015,7 +1015,7 @@ void QDesignerPopupMenu::createPopupMenu()
itm = itemAtPos( popupLocalPos, false );
if ( itm == -1 )
return;
- QAction *a = actionList.at( itm );
+ TQAction *a = actionList.at( itm );
if ( a && a->inherits( "QSeparatorAction" ) )
menu.insertItem( i18n("Delete Separator" ), ID_DELETE );
else
@@ -1023,7 +1023,7 @@ void QDesignerPopupMenu::createPopupMenu()
menu.insertItem( i18n("Insert Separator" ), ID_SEP );
int res = menu.exec( popupPos );
if ( res == ID_DELETE ) {
- QAction *a = actionList.at( itm );
+ TQAction *a = actionList.at( itm );
if ( !a )
return;
RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand(
@@ -1033,37 +1033,37 @@ void QDesignerPopupMenu::createPopupMenu()
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
} else if ( res == ID_SEP ) {
- QPoint p( pos() );
+ TQPoint p( pos() );
calcIndicatorPos( mapFromGlobal( popupPos ) );
- QAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
AddActionToPopupCommand *cmd = new AddActionToPopupCommand(
i18n("Add Separator to Popup Menu '%1'" ).
arg( name() ),
formWindow, a, this, insertAt );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->hidePopups();
- ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 );
+ ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->hidePopups();
+ ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 );
popup( p );
}
// set this back to zero so we know a popup (will soon) not exist.
popupMenu = 0;
}
-void QDesignerPopupMenu::mouseMoveEvent( QMouseEvent *e )
+void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e )
{
if ( !mousePressed || e->state() == NoButton ) {
- QPopupMenu::mouseMoveEvent( e );
+ TQPopupMenu::mouseMoveEvent( e );
return;
}
- if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() ) {
- QPopupMenu::mouseMoveEvent( e );
+ if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) {
+ TQPopupMenu::mouseMoveEvent( e );
return;
}
int itm = itemAtPos( dragStartPos, false );
if ( itm == -1 )
return;
- QAction *a = actionList.at( itm );
+ TQAction *a = actionList.at( itm );
if ( !a )
return;
RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand( i18n("Delete Action '%1' From Popup Menu '%2'" ).
@@ -1072,11 +1072,11 @@ void QDesignerPopupMenu::mouseMoveEvent( QMouseEvent *e )
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- QString type = a->inherits( "QActionGroup" ) ? QString( "application/x-designer-actiongroup" ) :
- a->inherits( "QSeparatorAction" ) ? QString( "application/x-designer-separator" ) : QString( "application/x-designer-actions" );
- QStoredDrag *drag = new QStoredDrag( type, this );
- QString s = QString::number( (long)a ); // #### huha, that is evil
- drag->setEncodedData( QCString( s.latin1() ) );
+ TQString type = a->inherits( "TQActionGroup" ) ? TQString( "application/x-designer-actiongroup" ) :
+ a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
+ TQStoredDrag *drag = new TQStoredDrag( type, this );
+ TQString s = TQString::number( (long)a ); // #### huha, that is evil
+ drag->setEncodedData( TQCString( s.latin1() ) );
drag->setPixmap( a->iconSet().pixmap() );
if ( !drag->drag() ) {
AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Action '%1' to Popup Menu '%2'" ).
@@ -1086,29 +1086,29 @@ void QDesignerPopupMenu::mouseMoveEvent( QMouseEvent *e )
cmd->execute();
}
indicator->hide();
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
mousePressed = false;
}
-void QDesignerPopupMenu::mouseReleaseEvent( QMouseEvent *e )
+void QDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
{
mousePressed = false;
- QPopupMenu::mouseReleaseEvent( e );
+ TQPopupMenu::mouseReleaseEvent( e );
}
#ifndef QT_NO_DRAGANDDROP
-void QDesignerPopupMenu::dragEnterEvent( QDragEnterEvent *e )
+void QDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e )
{
mousePressed = false;
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
e->provides( "application/x-designer-separator" ) )
e->accept();
}
-void QDesignerPopupMenu::dragMoveEvent( QDragMoveEvent *e )
+void QDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e )
{
mousePressed = false;
if ( e->provides( "application/x-designer-actions" ) ||
@@ -1120,14 +1120,14 @@ void QDesignerPopupMenu::dragMoveEvent( QDragMoveEvent *e )
drawIndicator( calcIndicatorPos( e->pos() ) );
}
-void QDesignerPopupMenu::dragLeaveEvent( QDragLeaveEvent * )
+void QDesignerPopupMenu::dragLeaveEvent( TQDragLeaveEvent * )
{
mousePressed = false;
indicator->hide();
insertAt = -1;
}
-void QDesignerPopupMenu::dropEvent( QDropEvent *e )
+void QDesignerPopupMenu::dropEvent( TQDropEvent *e )
{
mousePressed = false;
if ( e->provides( "application/x-designer-actions" ) ||
@@ -1137,24 +1137,24 @@ void QDesignerPopupMenu::dropEvent( QDropEvent *e )
else
return;
- QPoint p = pos();
- QAction *a = 0;
+ TQPoint p = pos();
+ TQAction *a = 0;
if ( e->provides( "application/x-designer-actiongroup" ) ) {
- QString s( e->encodedData( "application/x-designer-actiongroup" ) );
+ TQString s( e->encodedData( "application/x-designer-actiongroup" ) );
a = (QDesignerActionGroup*)s.toLong();
} else {
- QString s;
+ TQString s;
if ( e->provides( "application/x-designer-separator" ) ) {
- s = QString( e->encodedData( "application/x-designer-separator" ) );
+ s = TQString( e->encodedData( "application/x-designer-separator" ) );
a = (QSeparatorAction*)s.toLong();
} else {
- s = QString( e->encodedData( "application/x-designer-actions" ) );
+ s = TQString( e->encodedData( "application/x-designer-actions" ) );
a = (QDesignerAction*)s.toLong();
}
}
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 menu.\n"
"An Action may only occur once in a given menu." ).
arg( a->name() ) );
@@ -1167,8 +1167,8 @@ void QDesignerPopupMenu::dropEvent( QDropEvent *e )
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->hidePopups();
- ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 );
+ ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->hidePopups();
+ ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 );
indicator->hide();
popup( p );
}
@@ -1178,11 +1178,11 @@ void QDesignerPopupMenu::dropEvent( QDropEvent *e )
void QDesignerPopupMenu::reInsert()
{
clear();
- for ( QAction *a = actionList.first(); a; a = actionList.next() )
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() )
a->addTo( this );
}
-void QDesignerPopupMenu::drawIndicator( const QPoint &pos )
+void QDesignerPopupMenu::drawIndicator( const TQPoint &pos )
{
if ( lastIndicatorPos == pos )
return;
@@ -1193,15 +1193,15 @@ void QDesignerPopupMenu::drawIndicator( const QPoint &pos )
indicator->raise();
lastIndicatorPos = pos;
if ( !wasVsisible )
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
}
-QPoint QDesignerPopupMenu::calcIndicatorPos( const QPoint &pos )
+TQPoint QDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos )
{
int h = frameWidth();
insertAt = count();
for ( int i = 0; i < (int)count(); ++i ) {
- QRect r = itemGeometry( i );
+ TQRect r = itemGeometry( i );
if ( pos.y() < h + r.height() / 2 ) {
insertAt = i;
break;
@@ -1209,31 +1209,31 @@ QPoint QDesignerPopupMenu::calcIndicatorPos( const QPoint &pos )
h += r.height();
}
- return QPoint( 0, h );
+ return TQPoint( 0, h );
}
-void QDesignerPopupMenu::addAction( QAction *a )
+void QDesignerPopupMenu::addAction( TQAction *a )
{
actionList.append( a );
- connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) );
+ connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) );
}
void QDesignerPopupMenu::actionRemoved()
{
- actionList.removeRef( (QAction*)sender() );
+ actionList.removeRef( (TQAction*)sender() );
}
-void QDesignerPopupMenu::paintEvent( QPaintEvent *e )
+void QDesignerPopupMenu::paintEvent( TQPaintEvent *e )
{
- QPopupMenu::paintEvent( e );
+ TQPopupMenu::paintEvent( e );
if ( e->rect() != rect() )
return;
- lastIndicatorPos = QPoint( -1, -1 );
+ lastIndicatorPos = TQPoint( -1, -1 );
}
void QDesignerPopupMenu::findFormWindow()
{
- QWidget *w = this;
+ TQWidget *w = this;
while ( w ) {
if ( w->inherits( "FormWindow" ) )
formWindow = (FormWindow*)w;
diff --git a/kommander/editor/actiondnd.h b/kommander/editor/actiondnd.h
index d99cc54c..f821807e 100644
--- a/kommander/editor/actiondnd.h
+++ b/kommander/editor/actiondnd.h
@@ -21,14 +21,14 @@
#ifndef ACTIONDND_H
#define ACTIONDND_H
-#include <qaction.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 <tqmap.h>
+#include <tqmenubar.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqtoolbar.h>
+#include <tqguardedptr.h>
class QDesignerPopupMenu;
class QDesignerIndicatorWidget;
@@ -39,27 +39,27 @@ class QDesignerActionGroup : public QActionGroup
Q_OBJECT
public:
- QDesignerActionGroup( QObject *parent )
- : QActionGroup( !parent || parent->inherits( "QActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ) {}
+ QDesignerActionGroup( TQObject *parent )
+ : TQActionGroup( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ) {}
- 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:
- 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;
};
@@ -69,32 +69,32 @@ class QDesignerAction : public QAction
Q_OBJECT
public:
- QDesignerAction( QObject *parent )
- : QAction( !parent || parent->inherits( "QActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {}
- QDesignerAction( QWidget *w, QObject *parent )
- : QAction( !parent || parent->inherits( "QActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {}
+ QDesignerAction( TQObject *parent )
+ : TQAction( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {}
+ QDesignerAction( TQWidget *w, TQObject *parent )
+ : TQAction( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {}
- 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;
};
@@ -103,15 +103,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;
};
@@ -122,15 +122,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;
};
@@ -140,53 +140,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;
@@ -199,41 +199,41 @@ class QDesignerMenuBar : public QMenuBar
friend class QDesignerPopupMenu;
Q_PROPERTY( int itemNumber WRITE setItemNumber READ itemNumber )
- Q_PROPERTY( QString itemText WRITE setItemText READ itemText )
- Q_PROPERTY( QCString itemName WRITE setItemName READ itemName )
+ Q_PROPERTY( TQString itemText WRITE setItemText READ itemText )
+ Q_PROPERTY( TQCString itemName WRITE setItemName READ itemName )
public:
- QDesignerMenuBar( QWidget *mw );
+ QDesignerMenuBar( TQWidget *mw );
void setItemNumber( int num );
int itemNumber() const;
- void setItemText( const QString &s );
- QString itemText() const;
- void setItemName( const QCString &s );
- QCString itemName() const;
+ void setItemText( const TQString &s );
+ TQString itemText() const;
+ void setItemName( const TQCString &s );
+ TQCString itemName() const;
protected:
- void mousePressEvent( QMouseEvent *e );
- void mouseMoveEvent( QMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
- void contextMenuEvent( QContextMenuEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
+ void mouseMoveEvent( TQMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
+ void contextMenuEvent( TQContextMenuEvent *e );
#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
private:
- void drawIndicator( const QPoint &pos );
- QPoint calcIndicatorPos( const QPoint &pos );
+ void drawIndicator( const TQPoint &pos );
+ TQPoint calcIndicatorPos( const TQPoint &pos );
void findFormWindow();
private:
int itemNum;
- QPoint dragStartPos;
+ TQPoint dragStartPos;
bool mousePressed;
- QPoint lastIndicatorPos;
+ TQPoint lastIndicatorPos;
int insertAt;
QDesignerIndicatorWidget *indicator;
FormWindow *formWindow;
@@ -246,24 +246,24 @@ class QDesignerPopupMenu : public QPopupMenu
Q_OBJECT
public:
- QDesignerPopupMenu( QWidget *w );
- QPtrList<QAction> insertedActions() const { return actionList; }
- void addAction( QAction *a );
+ QDesignerPopupMenu( TQWidget *w );
+ TQPtrList<TQAction> insertedActions() const { return actionList; }
+ void addAction( TQAction *a );
void reInsert();
- void insertAction( int index, QAction *a ) { actionList.insert( index, a ); }
- void removeAction( QAction *a ) { actionList.remove( a ); }
+ void insertAction( int index, TQAction *a ) { actionList.insert( index, a ); }
+ void removeAction( TQAction *a ) { actionList.remove( a ); }
protected:
- void mousePressEvent( QMouseEvent *e );
- void mouseMoveEvent( QMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
- void contextMenuEvent( QContextMenuEvent *e );
- void paintEvent( QPaintEvent * );
+ void mousePressEvent( TQMouseEvent *e );
+ void mouseMoveEvent( TQMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
+ void contextMenuEvent( TQContextMenuEvent *e );
+ 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
private slots:
@@ -271,21 +271,21 @@ private slots:
void createPopupMenu();
private:
- void drawIndicator( const QPoint &pos );
- QPoint calcIndicatorPos( const QPoint &pos );
+ void drawIndicator( const TQPoint &pos );
+ TQPoint calcIndicatorPos( const TQPoint &pos );
void findFormWindow();
private:
- QPoint lastIndicatorPos;
+ TQPoint lastIndicatorPos;
int insertAt;
- QPtrList<QAction> actionList;
- QPoint dragStartPos;
+ TQPtrList<TQAction> actionList;
+ TQPoint dragStartPos;
bool mousePressed;
QDesignerIndicatorWidget *indicator;
FormWindow *formWindow;
- QGuardedPtr<QPopupMenu> popupMenu;
- QPoint popupPos;
- QPoint popupLocalPos;
+ TQGuardedPtr<TQPopupMenu> popupMenu;
+ TQPoint popupPos;
+ TQPoint popupLocalPos;
};
@@ -294,8 +294,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 );
}
diff --git a/kommander/editor/actioneditorimpl.cpp b/kommander/editor/actioneditorimpl.cpp
index 0d694250..9c1ae76d 100644
--- a/kommander/editor/actioneditorimpl.cpp
+++ b/kommander/editor/actioneditorimpl.cpp
@@ -25,46 +25,46 @@
#include "connectioneditorimpl.h"
#include "mainwindow.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 )
{
listActions->addColumn( i18n("Actions" ) );
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 )
@@ -81,14 +81,14 @@ void ActionEditor::deleteAction()
if ( !currentAction )
return;
- QListViewItemIterator it( listActions );
+ TQListViewItemIterator it( listActions );
while ( it.current() ) {
if ( ( (ActionItem*)it.current() )->action() == currentAction ) {
formWindow->actionList().removeRef( currentAction );
delete currentAction;
- QValueList<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, currentAction );
- 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 );
@@ -97,9 +97,9 @@ void ActionEditor::deleteAction()
} else if ( ( (ActionItem*)it.current() )->actionGroup() == currentAction ) {
formWindow->actionList().removeRef( currentAction );
delete currentAction;
- QValueList<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, currentAction );
- 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 );
@@ -118,7 +118,7 @@ void ActionEditor::newAction()
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
if ( !actionParent->actionGroup() ||
- !actionParent->actionGroup()->inherits( "QActionGroup" ) )
+ !actionParent->actionGroup()->inherits( "TQActionGroup" ) )
actionParent = (ActionItem*)actionParent->parent();
}
@@ -128,7 +128,7 @@ void ActionEditor::newAction()
else
i = new ActionItem( listActions, (bool)false );
MetaDataBase::addEntry( i->action() );
- QString n = "Action";
+ TQString n = "Action";
formWindow->unify( i->action(), n, true );
i->setText( 0, n );
i->action()->setName( n );
@@ -150,7 +150,7 @@ void ActionEditor::newActionGroup()
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
if ( !actionParent->actionGroup() ||
- !actionParent->actionGroup()->inherits( "QActionGroup" ) )
+ !actionParent->actionGroup()->inherits( "TQActionGroup" ) )
actionParent = (ActionItem*)actionParent->parent();
}
@@ -162,7 +162,7 @@ void ActionEditor::newActionGroup()
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 );
@@ -187,18 +187,18 @@ void ActionEditor::setFormWindow( FormWindow *fw )
formWindow = fw;
if ( !formWindow ||
!formWindow->mainContainer() ||
- !formWindow->mainContainer()->inherits( "QMainWindow" ) ) {
+ !formWindow->mainContainer()->inherits( "TQMainWindow" ) ) {
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 ( a->parent() && a->parent()->inherits( "QAction" ) )
+ if ( a->parent() && a->parent()->inherits( "TQAction" ) )
continue;
i = new ActionItem( listActions, a );
i->setText( 0, a->name() );
i->setPixmap( 0, a->iconSet().pixmap() );
- if ( a->inherits( "QActionGroup" ) ) {
+ if ( a->inherits( "TQActionGroup" ) ) {
insertChildActions( i );
}
}
@@ -213,25 +213,25 @@ 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 ( !o->inherits( "QAction" ) )
+ if ( !o->inherits( "TQAction" ) )
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() );
- if ( a->inherits( "QActionGroup" ) )
+ if ( a->inherits( "TQActionGroup" ) )
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() );
@@ -241,9 +241,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() );
diff --git a/kommander/editor/actioneditorimpl.h b/kommander/editor/actioneditorimpl.h
index 9ecfaaa5..d6ad72fb 100644
--- a/kommander/editor/actioneditorimpl.h
+++ b/kommander/editor/actioneditorimpl.h
@@ -32,17 +32,17 @@ 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; }
protected:
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
protected slots:
- void currentActionChanged( QListViewItem * );
+ void currentActionChanged( TQListViewItem * );
void deleteAction();
void newAction();
void newActionGroup();
@@ -56,7 +56,7 @@ private:
void insertChildActions( ActionItem *i );
private:
- QAction *currentAction;
+ TQAction *currentAction;
FormWindow *formWindow;
};
diff --git a/kommander/editor/actionlistview.cpp b/kommander/editor/actionlistview.cpp
index 0db57f76..6513daf0 100644
--- a/kommander/editor/actionlistview.cpp
+++ b/kommander/editor/actionlistview.cpp
@@ -19,35 +19,35 @@
**********************************************************************/
#include "actionlistview.h"
-#include <qdragobject.h>
-#include <qheader.h>
+#include <tqdragobject.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 )
{
header()->setStretchEnabled( true );
setRootIsDecorated( true );
setSorting( -1 );
- 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 )
{
- if ( ac->inherits( "QActionGroup" ) )
+ if ( ac->inherits( "TQActionGroup" ) )
g = (QDesignerActionGroup*)ac;
else
a = (QDesignerAction*)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 )
{
- if ( ac->inherits( "QActionGroup" ) )
+ if ( ac->inherits( "TQActionGroup" ) )
g = (QDesignerActionGroup*)ac;
else
a = (QDesignerAction*)ac;
@@ -57,36 +57,36 @@ 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 QStoredDrag( "application/x-designer-actions", viewport() );
- QString s = QString::number( (long)i->action() ); // #### huha, that is evil
- drag->setEncodedData( QCString( s.latin1() ) );
+ drag = new TQStoredDrag( "application/x-designer-actions", viewport() );
+ TQString s = TQString::number( (long)i->action() ); // #### huha, that is evil
+ drag->setEncodedData( TQCString( s.latin1() ) );
drag->setPixmap( i->action()->iconSet().pixmap() );
} else {
- drag = new QStoredDrag( "application/x-designer-actiongroup", viewport() );
- QString s = QString::number( (long)i->actionGroup() ); // #### huha, that is evil
- drag->setEncodedData( QCString( s.latin1() ) );
+ drag = new TQStoredDrag( "application/x-designer-actiongroup", viewport() );
+ TQString s = TQString::number( (long)i->actionGroup() ); // #### huha, that is evil
+ drag->setEncodedData( TQCString( s.latin1() ) );
drag->setPixmap( i->actionGroup()->iconSet().pixmap() );
}
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/kommander/editor/actionlistview.h b/kommander/editor/actionlistview.h
index 33709068..160d2abb 100644
--- a/kommander/editor/actionlistview.h
+++ b/kommander/editor/actionlistview.h
@@ -21,20 +21,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(); }
@@ -55,13 +55,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/kommander/editor/asciivalidator.cpp b/kommander/editor/asciivalidator.cpp
index 776e6e9f..6f63e626 100644
--- a/kommander/editor/asciivalidator.cpp
+++ b/kommander/editor/asciivalidator.cpp
@@ -20,20 +20,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 )
{
}
@@ -41,7 +41,7 @@ AsciiValidator::~AsciiValidator()
{
}
-QValidator::State AsciiValidator::validate( QString &s, int & ) const
+TQValidator::State AsciiValidator::validate( TQString &s, int & ) const
{
bool inParen = false;
if ( !s.isEmpty() && s[0].row() == 0 && s[0].cell() >= '0' && s[0].cell() <= '9' ) {
@@ -54,7 +54,7 @@ QValidator::State AsciiValidator::validate( QString &s, int & ) const
if ( c != ')' )
continue;
s.truncate( i + 1 );
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
}
if ( r == 0 && ( ( c >= '0' && c <= '9' ) ||
( c >= 'a' && c <= 'z' ) ||
@@ -72,6 +72,6 @@ QValidator::State AsciiValidator::validate( QString &s, int & ) const
s[i] = '_';
}
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
}
#include "asciivalidator.moc"
diff --git a/kommander/editor/asciivalidator.h b/kommander/editor/asciivalidator.h
index 50d273c2..20131f01 100644
--- a/kommander/editor/asciivalidator.h
+++ b/kommander/editor/asciivalidator.h
@@ -22,23 +22,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/kommander/editor/assistproc.cpp b/kommander/editor/assistproc.cpp
index 58ac4f78..f5f765d8 100644
--- a/kommander/editor/assistproc.cpp
+++ b/kommander/editor/assistproc.cpp
@@ -19,21 +19,21 @@
**********************************************************************/
#include "assistproc.h"
-AssistProc::AssistProc( QObject *parent, const char *name, const QString &path )
- : QProcess( parent, name )
+AssistProc::AssistProc( TQObject *parent, const char *name, const TQString &path )
+ : TQProcess( parent, name )
{
assistantPath = path;
- connect( this, SIGNAL(readyReadStdout()), this, SLOT(processOutput()) );
- connect( this, SIGNAL(readyReadStderr()), this, SLOT(processErrOutput()) );
+ connect( this, TQT_SIGNAL(readyReadStdout()), this, TQT_SLOT(processOutput()) );
+ connect( this, TQT_SIGNAL(readyReadStderr()), this, TQT_SLOT(processErrOutput()) );
}
AssistProc::~AssistProc()
{
tryTerminate();
- QTimer::singleShot( 5000, this, SLOT(kill())); // If busy, kill in 5 sec...
+ TQTimer::singleShot( 5000, this, TQT_SLOT(kill())); // If busy, kill in 5 sec...
}
-bool AssistProc::run( const QString &path )
+bool AssistProc::run( const TQString &path )
{
if ( !path.isEmpty() )
assistantPath = path;
@@ -49,7 +49,7 @@ bool AssistProc::run( const QString &path )
return true;
}
-bool AssistProc::sendRequest( const QString &data )
+bool AssistProc::sendRequest( const TQString &data )
{
if ( isRunning() ) {
writeToStdin( data );
diff --git a/kommander/editor/assistproc.h b/kommander/editor/assistproc.h
index 1f584daf..f457a8e8 100644
--- a/kommander/editor/assistproc.h
+++ b/kommander/editor/assistproc.h
@@ -20,28 +20,28 @@
#ifndef ASSISTPROC_H
#define ASSISTPROC_H
-#include <qprocess.h>
-#include <qtimer.h>
-#include <qsocket.h>
-#include <qstring.h>
+#include <tqprocess.h>
+#include <tqtimer.h>
+#include <tqsocket.h>
+#include <tqstring.h>
class AssistProc : public QProcess
{
Q_OBJECT
public:
- AssistProc( QObject *parent=0, const char * name = 0, const QString &path = QString::null );
+ AssistProc( TQObject *parent=0, const char * name = 0, const TQString &path = TQString::null );
~AssistProc();
- bool run( const QString &path = QString::null );
+ bool run( const TQString &path = TQString::null );
public slots:
- bool sendRequest( const QString &data );
+ bool sendRequest( const TQString &data );
private slots:
void processOutput();
void processErrOutput();
private:
- QString assistantPath;
+ TQString assistantPath;
};
#endif // ASSISTPROC_H
diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp
index 25ac7f30..cb5502a2 100644
--- a/kommander/editor/assoctexteditorimpl.cpp
+++ b/kommander/editor/assoctexteditorimpl.cpp
@@ -39,16 +39,16 @@
#include <kparts/partmanager.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qmetaobject.h>
-#include <qcombobox.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqmetaobject.h>
+#include <tqcombobox.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqvaluelist.h>
/* OTHER INCLUDES */
#include <cstdio>
@@ -61,10 +61,10 @@
#include "choosewidgetimpl.h"
#include "functionsimpl.h"
-QValueList<QWidget *> openedWidgets;
+TQValueList<TQWidget *> openedWidgets;
-AssocTextEditor::AssocTextEditor(QWidget *a_widget, FormWindow* a_form,
- PropertyEditor* a_property, KParts::PartManager *partManager, QWidget *a_parent, const char *a_name, bool a_modal)
+AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
+ PropertyEditor* a_property, KParts::PartManager *partManager, TQWidget *a_parent, const char *a_name, bool a_modal)
: AssocTextEditorBase(a_parent, a_name, a_modal)
{
// text editor
@@ -90,7 +90,7 @@ AssocTextEditor::AssocTextEditor(QWidget *a_widget, FormWindow* a_form,
}
doc = KTextEditor::createDocument ("libkatepart", a_parent, "KTextEditor::Document");
- QGridLayout *layout = new QGridLayout(editorFrame, 1, 1);
+ TQGridLayout *layout = new TQGridLayout(editorFrame, 1, 1);
view = doc->createView(editorFrame);
layout->addWidget(view, 1,1);
partManager->addPart(doc, true);
@@ -138,7 +138,7 @@ AssocTextEditor::AssocTextEditor(QWidget *a_widget, FormWindow* a_form,
readOnlyAction = view->actionCollection()->action("tools_toggle_write_lock");
popup->insertSeparator();
highlightPopup = new KPopupMenu(popup);
- connect(highlightPopup, SIGNAL(activated(int)), SLOT(slotHighlightingChanged(int)));
+ connect(highlightPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(slotHighlightingChanged(int)));
popup->insertItem(i18n("&Highlighting"), highlightPopup);
@@ -151,13 +151,13 @@ AssocTextEditor::AssocTextEditor(QWidget *a_widget, FormWindow* a_form,
readOnlyAction->activate();
setWidget(a_widget);
- connect(doc, SIGNAL(textChanged()), SLOT(textEditChanged()));
- connect(widgetsComboBox, SIGNAL(activated(int)), SLOT(widgetChanged(int)));
- connect(stateComboBox, SIGNAL(activated(int)), SLOT(stateChanged(int)));
- connect(filePushButton, SIGNAL(clicked()), SLOT(insertFile()));
- connect(functionButton, SIGNAL(clicked()), SLOT(insertFunction()));
- connect(widgetComboBox, SIGNAL(activated(int)), SLOT(insertWidgetName(int)));
- connect(treeWidgetButton, SIGNAL(clicked()), SLOT(selectWidget()));
+ connect(doc, TQT_SIGNAL(textChanged()), TQT_SLOT(textEditChanged()));
+ connect(widgetsComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(widgetChanged(int)));
+ connect(stateComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(stateChanged(int)));
+ connect(filePushButton, TQT_SIGNAL(clicked()), TQT_SLOT(insertFile()));
+ connect(functionButton, TQT_SIGNAL(clicked()), TQT_SLOT(insertFunction()));
+ connect(widgetComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(insertWidgetName(int)));
+ connect(treeWidgetButton, TQT_SIGNAL(clicked()), TQT_SLOT(selectWidget()));
view->setFocus();
}
@@ -170,7 +170,7 @@ AssocTextEditor::~AssocTextEditor()
openedWidgets.remove(m_widget);
}
-void AssocTextEditor::setWidget(QWidget *a_widget)
+void AssocTextEditor::setWidget(TQWidget *a_widget)
{
KommanderWidget *a_atw = dynamic_cast<KommanderWidget *>(a_widget);
if (!a_widget || !a_atw)
@@ -197,10 +197,10 @@ void AssocTextEditor::setWidget(QWidget *a_widget)
stateComboBox->insertItem("population");
// set states and population scripts
- QStringList at = a_atw->associatedText();
+ TQStringList at = a_atw->associatedText();
m_atdict.clear();
- QStringList::iterator at_it = at.begin();
- for(QStringList::ConstIterator s_it = m_states.begin(); s_it != m_states.end(); ++s_it)
+ TQStringList::iterator at_it = at.begin();
+ for(TQStringList::ConstIterator s_it = m_states.begin(); s_it != m_states.end(); ++s_it)
{
if(at_it != at.end())
{
@@ -208,7 +208,7 @@ void AssocTextEditor::setWidget(QWidget *a_widget)
++at_it;
}
else
- m_atdict[(*s_it)] = QString::null;
+ m_atdict[(*s_it)] = TQString::null;
}
m_populationText = a_atw->populationText();
@@ -268,20 +268,20 @@ void AssocTextEditor::save() const
if (atw->associatedText() != associatedText())
{
- QString text = i18n("Set the \'text association\' of \'%1\'").arg(m_widget->name());
+ TQString text = i18n("Set the \'text association\' of \'%1\'").arg(m_widget->name());
SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow,
m_widget, m_propertyEditor, "associations", atw->associatedText(),
- associatedText(), QString::null, QString::null, false);
+ associatedText(), TQString::null, TQString::null, false);
cmd->execute();
m_formWindow->commandHistory()->addCommand(cmd);
MetaDataBase::setPropertyChanged(m_widget, "associations", true);
}
if (atw->populationText() != populationText())
{
- QString text = i18n("Set the \'population text\' of \'%1\'").arg(m_widget->name());
+ TQString text = i18n("Set the \'population text\' of \'%1\'").arg(m_widget->name());
SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow, m_widget,
m_propertyEditor, "populationText", atw->populationText(),
- populationText(), QString::null, QString::null, false);
+ populationText(), TQString::null, TQString::null, false);
cmd->execute();
m_formWindow->commandHistory()->addCommand(cmd);
MetaDataBase::setPropertyChanged(m_widget, "populationText", true);
@@ -289,46 +289,46 @@ void AssocTextEditor::save() const
}
-QStringList AssocTextEditor::associatedText() const
+TQStringList AssocTextEditor::associatedText() const
{
- QStringList at;
- for(QStringList::ConstIterator it = m_states.begin(); it != m_states.end(); ++it)
+ TQStringList at;
+ for(TQStringList::ConstIterator it = m_states.begin(); it != m_states.end(); ++it)
at.append(m_atdict[(*it)]);
return at;
}
-QString AssocTextEditor::populationText() const
+TQString AssocTextEditor::populationText() const
{
return m_populationText;
}
-QStringList AssocTextEditor::buildWidgetList()
+TQStringList AssocTextEditor::buildWidgetList()
{
- QStringList widgetList;
- QObject* thisObject = m_formWindow->mainContainer();
- QObjectList *objectList = thisObject->queryList();
+ TQStringList widgetList;
+ TQObject* thisObject = m_formWindow->mainContainer();
+ TQObjectList *objectList = thisObject->queryList();
objectList->prepend(thisObject);
- for (QObjectListIt it(*objectList); it.current(); ++it)
+ for (TQObjectListIt it(*objectList); it.current(); ++it)
{
// There is a warning message with the property() function if it does not exist.
// Verify the property exists with the meta information first */
bool pExists = false;
- QMetaObject *metaObj = it.current()->metaObject();
+ TQMetaObject *metaObj = it.current()->metaObject();
if(metaObj)
{
int id = metaObj->findProperty("KommanderWidget", true);
- const QMetaProperty *metaProp = metaObj->property(id, true);
+ const TQMetaProperty *metaProp = metaObj->property(id, true);
if(metaProp && metaProp->isValid())
pExists = true;
}
if(pExists)
{
- QVariant flag = (it.current())->property("KommanderWidget");
- if(flag.isValid() && !(QString(it.current()->name()).startsWith("qt_")))
+ TQVariant flag = (it.current())->property("KommanderWidget");
+ if(flag.isValid() && !(TQString(it.current()->name()).startsWith("qt_")))
{
- widgetList.append( widgetToString( (QWidget*)it.current()) );
- m_widgetList.insert(it.current()->name(), (QWidget*)it.current());
+ widgetList.append( widgetToString( (TQWidget*)it.current()) );
+ m_widgetList.insert(it.current()->name(), (TQWidget*)it.current());
}
}
}
@@ -352,7 +352,7 @@ void AssocTextEditor::stateChanged(int a_index)
KTextEditor::ViewCursorInterface *viewCursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>(view);
viewCursorIf->setCursorPositionReal(0, 0);
highlightPopup->clear();
- QString hlType = "Kommander (old parser)";
+ TQString hlType = "Kommander (old parser)";
if (useInternalParser())
hlType = "Kommander (new parser)";
KTextEditor::HighlightingInterface *hlIf = dynamic_cast<KTextEditor::HighlightingInterface*>(doc);
@@ -381,7 +381,7 @@ void AssocTextEditor::textEditChanged()
m_atdict[m_currentState] = associatedTextEdit->text();
int index = stateComboBox->currentItem();
if (associatedTextEdit->text().isEmpty())
- stateComboBox->changeItem(QPixmap(), stateComboBox->currentText(), index);
+ stateComboBox->changeItem(TQPixmap(), stateComboBox->currentText(), index);
else if (!stateComboBox->pixmap(index) || stateComboBox->pixmap(index)->isNull())
stateComboBox->changeItem(scriptPixmap, stateComboBox->currentText(), index);
}
@@ -397,7 +397,7 @@ void AssocTextEditor::selectWidget()
ChooseWidget cDialog(this);
cDialog.setWidget(m_formWindow->mainContainer());
if (cDialog.exec()) {
- QString newWidget = cDialog.selection();
+ TQString newWidget = cDialog.selection();
for (int i = 0; i<widgetsComboBox->count(); i++)
if (widgetsComboBox->text(i) == newWidget) {
widgetsComboBox->setCurrentItem(i);
@@ -409,7 +409,7 @@ void AssocTextEditor::selectWidget()
-void AssocTextEditor::insertAssociatedText(const QString& a_text)
+void AssocTextEditor::insertAssociatedText(const TQString& a_text)
{
uint line, col;
KTextEditor::ViewCursorInterface *viewCursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>(view);
@@ -419,28 +419,28 @@ void AssocTextEditor::insertAssociatedText(const QString& a_text)
void AssocTextEditor::insertFile()
{
- QString fileName = KFileDialog::getOpenFileName();
+ TQString fileName = KFileDialog::getOpenFileName();
if(fileName.isEmpty())
return;
- QFile insertFile(fileName);
+ TQFile insertFile(fileName);
if(!insertFile.open(IO_ReadOnly))
{
KMessageBox::error( this, i18n("<qt>Cannot open file<br><b>%1</b></qt").arg( fileName ) );
return;
}
- QTextStream insertStream(&insertFile);
- QString insertText = insertStream.read();
+ TQTextStream insertStream(&insertFile);
+ TQString insertText = insertStream.read();
insertAssociatedText(insertText);
insertFile.close();
}
void AssocTextEditor::insertWidgetName(int index)
{
- QString prefix;
+ TQString prefix;
if (!useInternalParser())
- prefix = QString(QChar(ESCCHAR));
+ prefix = TQString(TQChar(ESCCHAR));
insertAssociatedText(prefix + widgetToString(widgetFromString(widgetComboBox->text(index)), false));
}
@@ -451,19 +451,19 @@ void AssocTextEditor::insertFunction()
insertAssociatedText(pDialog.functionText());
}
-QString AssocTextEditor::widgetToString(QWidget* widget, bool formatted)
+TQString AssocTextEditor::widgetToString(TQWidget* widget, bool formatted)
{
if (!widget)
- return QString::null;
+ return TQString::null;
else if (formatted)
- return QString("%1 (%2)").arg(widget->name()).arg(widget->className());
+ return TQString("%1 (%2)").arg(widget->name()).arg(widget->className());
else
return widget->name();
}
-QWidget* AssocTextEditor::widgetFromString(const QString& name)
+TQWidget* AssocTextEditor::widgetFromString(const TQString& name)
{
- QString realname = name;
+ TQString realname = name;
int i = realname.find(' ');
if (i != -1)
realname.truncate(i);
@@ -482,7 +482,7 @@ void AssocTextEditor::slotHighlightingChanged(int mode)
bool AssocTextEditor::useInternalParser()
{
- QString s = "";
+ TQString s = "";
int line = -1;
while (s.isEmpty() && line < (int)associatedTextEdit->numLines())
{
@@ -497,7 +497,7 @@ bool AssocTextEditor::useInternalParser()
return false;
}
-void AssocTextEditor::closeEvent ( QCloseEvent * e )
+void AssocTextEditor::closeEvent ( TQCloseEvent * e )
{
deleteLater();
e->accept();
diff --git a/kommander/editor/assoctexteditorimpl.h b/kommander/editor/assoctexteditorimpl.h
index 65879cef..37c582ab 100644
--- a/kommander/editor/assoctexteditorimpl.h
+++ b/kommander/editor/assoctexteditorimpl.h
@@ -17,14 +17,14 @@
#ifndef _HAVE_ASSOCTEXTEDITORIMPL_H_
#define _HAVE_ASSOCTEXTEDITORIMPL_H_
-#include <qdict.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qobject.h>
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qpixmap.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqpixmap.h>
#include "assoctexteditor.h"
@@ -50,16 +50,16 @@ class AssocTextEditor : public AssocTextEditorBase
{
Q_OBJECT
public:
- AssocTextEditor(QWidget*, FormWindow*, PropertyEditor*, KParts::PartManager *partManager, QWidget*, const char* = 0, bool = true);
+ AssocTextEditor(TQWidget*, FormWindow*, PropertyEditor*, KParts::PartManager *partManager, TQWidget*, const char* = 0, bool = true);
~AssocTextEditor();
// Set interface for given widget.
- void setWidget(QWidget *);
+ void setWidget(TQWidget *);
// Save changes for current widget
void save() const;
// Return population text for current widget
- QString populationText() const;
+ TQString populationText() const;
// Return associated text for current widget
- QStringList associatedText() const;
+ TQStringList associatedText() const;
public slots:
// Current script text has changed - save it in m_atdict
@@ -74,7 +74,7 @@ public slots:
// Functions for script editing:
// Insert given text at cursor position for current widget and state
- void insertAssociatedText(const QString&);
+ void insertAssociatedText(const TQString&);
// Select file and insert its content at cursor position
void insertFile();
// Open function browser and insert chosen function at cursor position
@@ -83,7 +83,7 @@ public slots:
void insertWidgetName(int);
protected:
- virtual void closeEvent(QCloseEvent * e);
+ virtual void closeEvent(TQCloseEvent * e);
protected slots:
@@ -93,33 +93,33 @@ private:
bool useInternalParser();
// Current widget
- QWidget *m_widget;
+ TQWidget *m_widget;
KommanderWidget* m_kommanderWidget;
//FIXME: could it be done more cleanly?
// Current form and property editor
FormWindow* m_formWindow;
PropertyEditor* m_propertyEditor;
// Current state
- QString m_currentState;
+ TQString m_currentState;
// List of states for current widget
- QStringList m_states;
+ TQStringList m_states;
// Current widget list
- QDict<QWidget> m_widgetList;
+ TQDict<TQWidget> m_widgetList;
// Dictionary for current widget; contains pairs (state, script associated with current state)
- QMap<QString, QString> m_atdict;
+ TQMap<TQString, TQString> m_atdict;
// Current population text
- QString m_populationText;
+ TQString m_populationText;
// Non-enmpty script pixmap
- QPixmap scriptPixmap;
+ TQPixmap scriptPixmap;
// Create list of all widgets on the same dialog as current widget
// Set store to true, to update m_widgetList;
- QStringList buildWidgetList();
+ TQStringList buildWidgetList();
// Convert widget to string displayed in combos
// If formatted, return formatted string, else just widget's name
- QString widgetToString(QWidget* widget, bool formatted = true);
+ TQString widgetToString(TQWidget* widget, bool formatted = true);
// Conver combo string to widget
- QWidget* widgetFromString(const QString& name);
+ TQWidget* widgetFromString(const TQString& name);
KTextEditor::EditInterface *associatedTextEdit;
KTextEditor::Document *doc;
diff --git a/kommander/editor/choosewidgetimpl.cpp b/kommander/editor/choosewidgetimpl.cpp
index 53580a6e..527137b4 100644
--- a/kommander/editor/choosewidgetimpl.cpp
+++ b/kommander/editor/choosewidgetimpl.cpp
@@ -19,21 +19,21 @@
#include <klocale.h>
/** QT INCLUDES */
-#include <qptrstack.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qlineedit.h>
-#include "qmetaobject.h"
+#include <tqptrstack.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqlineedit.h>
+#include "tqmetaobject.h"
/** OTHER INCLUDES */
#include "choosewidgetimpl.h"
#include "choosewidgetimpl.moc"
-ChooseWidget::ChooseWidget(QWidget* a_parent, const char* a_name, bool a_modal)
+ChooseWidget::ChooseWidget(TQWidget* a_parent, const char* a_name, bool a_modal)
: ChooseWidgetBase(a_parent, a_name, a_modal)
{
- connect( nameEdit, SIGNAL(textChanged(const QString&)), SLOT(textChanged(const QString&)) );
- connect( widgetView, SIGNAL(executed(QListViewItem*)), SLOT(selectedItem(QListViewItem*)));
+ connect( nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(textChanged(const TQString&)) );
+ connect( widgetView, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(selectedItem(TQListViewItem*)));
widgetView->setFullWidth(true);
widgetView->addColumn(i18n("Widgets"));
widgetView->setRootIsDecorated(true);
@@ -45,17 +45,17 @@ ChooseWidget::~ChooseWidget()
}
-void ChooseWidget::setWidget(QWidget* w)
+void ChooseWidget::setWidget(TQWidget* w)
{
widgetView->clear();
if (!w)
return;
- QListViewItem* item;
- QPtrStack<QWidget> p_widgets;
- QPtrStack<QListViewItem> p_items;
+ TQListViewItem* item;
+ TQPtrStack<TQWidget> p_widgets;
+ TQPtrStack<TQListViewItem> p_items;
- item = new QListViewItem(widgetView, QString("%1 (%2)").arg(w->name()).arg(w->className()));
+ item = new TQListViewItem(widgetView, TQString("%1 (%2)").arg(w->name()).arg(w->className()));
item->setOpen(true);
p_widgets.push(w);
@@ -64,13 +64,13 @@ void ChooseWidget::setWidget(QWidget* w)
while (!p_widgets.isEmpty()) {
w = p_widgets.pop();
item = p_items.pop();
- QObjectList *objectList = w->queryList(0, 0, true, false);
- for (QObjectListIt it(*objectList); it.current(); ++it) {
- QListViewItem* newItem = item;
+ TQObjectList *objectList = w->queryList(0, 0, true, false);
+ for (TQObjectListIt it(*objectList); it.current(); ++it) {
+ TQListViewItem* newItem = item;
if (isKommanderWidget(*it))
- newItem = new QListViewItem(item, QString("%1 (%2)").arg((*it)->name()).arg((*it)->className()));
+ newItem = new TQListViewItem(item, TQString("%1 (%2)").arg((*it)->name()).arg((*it)->className()));
if ((*it)->children()) {
- p_widgets.push((QWidget*)(*it));
+ p_widgets.push((TQWidget*)(*it));
p_items.push(newItem);
}
}
@@ -83,44 +83,44 @@ void ChooseWidget::setWidget(QWidget* w)
}
-QString ChooseWidget::selection()
+TQString ChooseWidget::selection()
{
if (widgetView->currentItem())
return widgetView->currentItem()->text(0);
else
- return QString::null;
+ return TQString::null;
}
-void ChooseWidget::textChanged(const QString& text)
+void ChooseWidget::textChanged(const TQString& text)
{
- QListViewItem* item = widgetView->findItem(text, 0, Qt::BeginsWith);
+ TQListViewItem* item = widgetView->findItem(text, 0, Qt::BeginsWith);
if (item) {
widgetView->setCurrentItem(item);
widgetView->ensureItemVisible(item);
}
}
-bool ChooseWidget::isKommanderWidget(QObject* w)
+bool ChooseWidget::isKommanderWidget(TQObject* w)
{
bool pExists = false;
- QMetaObject *metaObj = w->metaObject();
+ TQMetaObject *metaObj = w->metaObject();
if (metaObj)
{
int id = metaObj->findProperty("KommanderWidget", true);
- const QMetaProperty *metaProp = metaObj->property(id, true);
+ const TQMetaProperty *metaProp = metaObj->property(id, true);
if (metaProp && metaProp->isValid())
pExists = true;
}
if (pExists)
{
- QVariant flag = (w)->property("KommanderWidget");
- if(flag.isValid() && !(QString(w->name()).startsWith("qt_")))
+ TQVariant flag = (w)->property("KommanderWidget");
+ if(flag.isValid() && !(TQString(w->name()).startsWith("qt_")))
return true;
}
return false;
}
-void ChooseWidget::selectedItem(QListViewItem* item)
+void ChooseWidget::selectedItem(TQListViewItem* item)
{
if (item)
accept();
diff --git a/kommander/editor/choosewidgetimpl.h b/kommander/editor/choosewidgetimpl.h
index 877bcd07..4dea4c77 100644
--- a/kommander/editor/choosewidgetimpl.h
+++ b/kommander/editor/choosewidgetimpl.h
@@ -23,21 +23,21 @@ class ChooseWidget : public ChooseWidgetBase
{
Q_OBJECT
public:
- ChooseWidget(QWidget*, const char* = 0, bool=true);
+ ChooseWidget(TQWidget*, const char* = 0, bool=true);
~ChooseWidget();
// Put current widget and all of its children in a tree
- void setWidget(QWidget *);
+ void setWidget(TQWidget *);
// Return current widget
- QString selection();
+ TQString selection();
public slots:
// Filter text changed - find matching widget
- void textChanged(const QString&);
+ void textChanged(const TQString&);
// Double clicked on listviwew
- void selectedItem(QListViewItem *);
+ void selectedItem(TQListViewItem *);
private:
// Check if given widget is a Kommander widget
- bool isKommanderWidget(QObject* w);
+ bool isKommanderWidget(TQObject* w);
};
diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp
index b6bbe82c..4d8e369d 100644
--- a/kommander/editor/command.cpp
+++ b/kommander/editor/command.cpp
@@ -31,22 +31,22 @@
#include "actiondnd.h"
#include "formfile.h"
-#include <qmap.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 <qmultilineedit.h>
-#include <qptrstack.h>
-#include <qheader.h>
+#include <tqmap.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 <tqmultilineedit.h>
+#include <tqptrstack.h>
+#include <tqheader.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
-#include <qaction.h>
+#include <tqaction.h>
#include <klocale.h>
@@ -84,7 +84,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 ) {
@@ -156,11 +156,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 );
@@ -194,7 +194,7 @@ void CommandHistory::checkCompressedCommand()
// ------------------------------------------------------------
-Command::Command( const QString &n, FormWindow *fw )
+Command::Command( const TQString &n, FormWindow *fw )
: cmdName( n ), formWin( fw )
{
}
@@ -203,7 +203,7 @@ Command::~Command()
{
}
-QString Command::name() const
+TQString Command::name() const
{
return cmdName;
}
@@ -225,8 +225,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 )
{
}
@@ -251,21 +251,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();
@@ -285,11 +285,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 )
{
@@ -311,10 +311,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 );
@@ -332,10 +332,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 );
@@ -353,8 +353,8 @@ void MoveCommand::unexecute()
// ------------------------------------------------------------
-DeleteCommand::DeleteCommand( const QString &n, FormWindow *fw,
- const QWidgetList &w )
+DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &w )
: Command( n, fw ), widgets( w )
{
widgets.setAutoDelete( false );
@@ -364,16 +364,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 );
@@ -389,15 +389,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 );
@@ -410,11 +410,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 )
@@ -460,7 +460,7 @@ void SetPropertyCommand::unexecute()
bool SetPropertyCommand::canMerge( Command *c )
{
SetPropertyCommand *cmd = (SetPropertyCommand*)c;
- const QMetaProperty *p =
+ const TQMetaProperty *p =
widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
if ( propName == "toolTip" || propName == "whatsThis" )
@@ -469,8 +469,8 @@ bool SetPropertyCommand::canMerge( Command *c )
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)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;
}
@@ -478,9 +478,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 )
@@ -493,9 +493,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"
@@ -507,7 +507,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'." ).
@@ -517,12 +517,12 @@ bool SetPropertyCommand::checkProperty()
}
if ( widget->parent() && widget->parent()->inherits( "FormWindow" ) )
- formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (QWidget*)widget )->parentWidget() );
+ formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (TQWidget*)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 ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select )
formWindow()->selectWidget( widget );
@@ -531,7 +531,7 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
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" ) {
@@ -539,23 +539,23 @@ 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" ) {
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), v.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), v.toInt() );
} else if ( propName == "layoutMargin" ) {
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), v.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), v.toInt() );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@@ -569,7 +569,7 @@ 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*)widget, MetaDataBase::fakeProperty( widget, "database" ).toStringList() );
+ formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (TQWidget*)widget, MetaDataBase::fakeProperty( widget, "database" ).toStringList() );
#endif
return;
}
@@ -579,11 +579,11 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
} else if ( p->isEnumType() ) {
widget->setProperty( propName, p->keyToValue( 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() )
@@ -591,21 +591,21 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString &currentI
widget->property( propName ).toPixmap().serialNumber(),
MetaDataBase::pixmapKey( formWindow(), oldSerNum ) );
if ( propName == "cursor" )
- MetaDataBase::setCursor( (QWidget*)widget, v.toCursor() );
+ MetaDataBase::setCursor( (TQWidget*)widget, v.toCursor() );
if ( propName == "name" && widget->isWidgetType() ) {
- formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( (QWidget*)widget, ov );
+ formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( (TQWidget*)widget, ov );
if ( formWindow()->isMainContainer( widget ) )
formWindow()->setName( v.toCString() );
}
- if ( propName == "name" && widget->inherits( "QAction" ) &&
+ if ( propName == "name" && widget->inherits( "TQAction" ) &&
formWindow()->mainContainer() &&
- formWindow()->mainContainer()->inherits( "QMainWindow" ) ) {
- formWindow()->mainWindow()->actioneditor()->updateActionName( (QAction*)widget );
+ formWindow()->mainContainer()->inherits( "TQMainWindow" ) ) {
+ formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)widget );
}
- if ( propName == "iconSet" && widget->inherits( "QAction" ) &&
+ if ( propName == "iconSet" && widget->inherits( "TQAction" ) &&
formWindow()->mainContainer() &&
- formWindow()->mainContainer()->inherits( "QMainWindow" ) ) {
- formWindow()->mainWindow()->actioneditor()->updateActionIcon( (QAction*)widget );
+ formWindow()->mainContainer()->inherits( "TQMainWindow" ) ) {
+ formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)widget );
}
if ( propName == "caption" ) {
if ( formWindow()->isMainContainer( widget ) )
@@ -627,9 +627,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 )
{
}
@@ -650,9 +650,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 )
{
}
@@ -673,9 +673,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 )
{
}
@@ -696,9 +696,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 )
{
}
@@ -719,10 +719,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) ) )
{
}
@@ -742,8 +742,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 );
@@ -751,11 +751,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, layoutBase->inherits( "QSplitter" ) );
+ layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "TQSplitter" ) );
else if ( lay == WidgetFactory::VBox )
- layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "QSplitter" ) );
+ layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "TQSplitter" ) );
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()
@@ -765,7 +765,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() ) );
}
@@ -782,8 +782,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 )
{
}
@@ -802,8 +802,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, "tab" );
@@ -833,8 +833,8 @@ void AddTabPageCommand::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 ), label( _label )
{
page = new QDesignerWidget( formWindow(), toolBox, "tab" );
@@ -863,8 +863,8 @@ void AddToolBoxPageCommand::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;
@@ -891,8 +891,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();
@@ -917,8 +917,8 @@ void DeleteTabPageCommand::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 ), page( _page )
{
label = ( (EditorToolBox*)toolBox )->pageTitle();
@@ -943,8 +943,8 @@ void DeleteToolBoxPageCommand::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, "page" );
@@ -975,8 +975,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;
@@ -1003,8 +1003,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 )
{
@@ -1013,7 +1013,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;
@@ -1027,17 +1027,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 );
@@ -1053,7 +1053,7 @@ void SwapWizardPagesCommand::unexecute()
// ------------------------------------------------------------
-AddConnectionCommand::AddConnectionCommand( const QString &name, FormWindow *fw,
+AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw,
MetaDataBase::Connection c )
: Command( name, fw ), connection( c )
{
@@ -1087,7 +1087,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 )
{
@@ -1122,8 +1122,8 @@ void RemoveConnectionCommand::unexecute()
// ------------------------------------------------------------
/* TODO : We don't need these commands. */
-AddSlotCommand::AddSlotCommand( const QString &name, FormWindow *fw, const QCString &s,
- const QString& spec, const QString &a, const QString &l, const QString &rt )
+AddSlotCommand::AddSlotCommand( const TQString &name, FormWindow *fw, const TQCString &s,
+ const TQString& spec, const TQString &a, const TQString &l, const TQString &rt )
: Command( name, fw ), slot( s ), specifier( spec ), access( a ), language( l ), returnType( rt )
{
// qDebug("AddSlotCommand::AddSlotCommand()");
@@ -1151,8 +1151,8 @@ void AddSlotCommand::unexecute()
// ------------------------------------------------------------
-RemoveSlotCommand::RemoveSlotCommand( const QString &name, FormWindow *fw, const QCString &s,
- const QString& spec, const QString &a, const QString &l, const QString &rt )
+RemoveSlotCommand::RemoveSlotCommand( const TQString &name, FormWindow *fw, const TQCString &s,
+ const TQString& spec, const TQString &a, const TQString &l, const TQString &rt )
: Command( name, fw ), slot( s ), specifier( spec ), access( a ), language( l ), returnType( rt )
{
// qDebug("RemoveSlotCommand::RemoveSlotCommand()");
@@ -1180,14 +1180,14 @@ void RemoveSlotCommand::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 );
}
@@ -1196,7 +1196,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 );
}
@@ -1204,14 +1204,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 );
}
@@ -1220,7 +1220,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 );
}
@@ -1228,15 +1228,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 );
@@ -1246,7 +1246,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 );
@@ -1256,8 +1256,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 )
{
}
@@ -1285,11 +1285,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() )
@@ -1302,12 +1302,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();
}
@@ -1315,24 +1315,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() )
@@ -1347,9 +1347,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
}
@@ -1358,23 +1358,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 );
}
@@ -1391,12 +1391,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() )
@@ -1405,25 +1405,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 ) )
@@ -1438,12 +1438,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 ) )
@@ -1460,12 +1460,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 ) )
@@ -1485,8 +1485,8 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to )
// ------------------------------------------------------------
-PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const QString &n, FormWindow *fw,
- QMultiLineEdit *mle, const QString &txt )
+PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw,
+ TQMultiLineEdit *mle, const TQString &txt )
: Command( n, fw ), newText( txt ), mlined( mle )
{
oldText = mlined->text();
@@ -1509,14 +1509,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 );
@@ -1538,10 +1538,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 );
@@ -1549,7 +1549,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
}
@@ -1557,10 +1557,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 );
@@ -1568,15 +1568,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 )
{
}
@@ -1586,9 +1586,9 @@ void AddActionToToolBarCommand::execute()
action->addTo( toolBar );
if ( action->inherits( "QDesignerAction" ) ) {
- 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 );
}
}
@@ -1605,21 +1605,21 @@ void AddActionToToolBarCommand::execute()
toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
}
- if ( !action->inherits( "QActionGroup" ) || ( (QActionGroup*)action )->usesDropDown()) {
+ if ( !action->inherits( "TQActionGroup" ) || ( (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 {
- QObjectListIt it( *action->children() );
+ TQObjectListIt it( *action->children() );
if ( action->children() ) {
int i = 0;
while ( it.current() ) {
- QObject *o = it.current();
+ TQObject *o = it.current();
++it;
- if ( !o->inherits( "QAction" ) )
+ if ( !o->inherits( "TQAction" ) )
continue;
// ### fix it for nested actiongroups
if ( o->inherits( "QDesignerAction" ) ) {
@@ -1634,34 +1634,34 @@ void AddActionToToolBarCommand::execute()
}
}
toolBar->reInsert();
- QObject::connect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
}
}
void AddActionToToolBarCommand::unexecute()
{
if ( action->inherits( "QDesignerAction" ) ) {
- 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 ( !action->inherits( "QActionGroup" ) || ( (QActionGroup*)action )->usesDropDown()) {
+ TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ if ( !action->inherits( "TQActionGroup" ) || ( (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 ( !o->inherits( "QAction" ) )
+ if ( !o->inherits( "TQAction" ) )
continue;
if ( o->inherits( "QDesignerAction" ) ) {
o->removeEventFilter( toolBar );
- toolBar->removeAction( (QAction*)o );
+ toolBar->removeAction( (TQAction*)o );
}
}
}
@@ -1670,27 +1670,27 @@ void AddActionToToolBarCommand::unexecute()
// ------------------------------------------------------------
-AddActionToPopupCommand::AddActionToPopupCommand( const QString &n, FormWindow *fw,
- QAction *a, QDesignerPopupMenu *p, int idx )
+AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, FormWindow *fw,
+ TQAction *a, QDesignerPopupMenu *p, int idx )
: Command( n, fw ), action( a ), popup( p ), index( idx )
{
}
void AddActionToPopupCommand::execute()
{
- if ( action->inherits( "QActionGroup" ) ) {
- if ( ( (QActionGroup*)action )->usesDropDown() ) {
+ if ( action->inherits( "TQActionGroup" ) ) {
+ if ( ( (TQActionGroup*)action )->usesDropDown() ) {
action->addTo( popup );
popup->insertAction( index, action );
} else {
action->addTo( popup );
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 ( !o->inherits( "QAction" ) )
+ if ( !o->inherits( "TQAction" ) )
continue;
QDesignerAction *ac = (QDesignerAction*)o;
popup->insertAction( index + (i++), ac );
@@ -1698,13 +1698,13 @@ void AddActionToPopupCommand::execute()
}
}
popup->reInsert();
- QObject::connect( action, SIGNAL( destroyed() ), popup, SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) );
} else {
if ( !action->inherits( "QDesignerAction" ) || ( (QDesignerAction*)action )->supportsMenu() ) {
action->addTo( popup );
popup->insertAction( index, action );
popup->reInsert();
- QObject::connect( action, SIGNAL( destroyed() ), popup, SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) );
}
}
}
@@ -1713,20 +1713,20 @@ void AddActionToPopupCommand::unexecute()
{
action->removeFrom( popup );
popup->removeAction( action );
- QObject::disconnect( action, SIGNAL( destroyed() ), popup, SLOT( actionRemoved() ) );
- if ( !action->inherits( "QActionGroup" ) || ( (QActionGroup*)action )->usesDropDown()) {
+ TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) );
+ if ( !action->inherits( "TQActionGroup" ) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( popup );
} 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 ( !o->inherits( "QAction" ) )
+ if ( !o->inherits( "TQAction" ) )
continue;
if ( o->inherits( "QDesignerAction" ) ) {
o->removeEventFilter( popup );
- popup->removeAction( (QAction*)o );
+ popup->removeAction( (TQAction*)o );
}
}
}
@@ -1735,7 +1735,7 @@ void AddActionToPopupCommand::unexecute()
// ------------------------------------------------------------
-AddMenuCommand::AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw )
+AddMenuCommand::AddMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw )
: Command( n, fw ), menuBar( 0 ), popup( 0 ), mainWindow( mw ), id( -1 ), name( "Menu" )
{
}
@@ -1743,13 +1743,13 @@ AddMenuCommand::AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *m
void AddMenuCommand::execute()
{
if ( !popup ) {
- QString n = "PopupMenu";
+ TQString n = "PopupMenu";
popup = new QDesignerPopupMenu( mainWindow );
formWindow()->unify( popup, n, true );
popup->setName( n );
}
- if ( !mainWindow->child( 0, "QMenuBar" ) ) {
- menuBar = new QDesignerMenuBar( (QWidget*)mainWindow );
+ if ( !mainWindow->child( 0, "TQMenuBar" ) ) {
+ menuBar = new QDesignerMenuBar( (TQWidget*)mainWindow );
menuBar->setName( "menubar" );
} else {
menuBar = (QDesignerMenuBar*)mainWindow->menuBar();
@@ -1771,8 +1771,8 @@ void AddMenuCommand::unexecute()
// ------------------------------------------------------------
-RenameMenuCommand::RenameMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,
- int i, const QString &on, const QString &nn )
+RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ int i, const TQString &on, const TQString &nn )
: Command( n, fw ), menuBar( mb ), id( i ), oldName( on ), newName( nn )
{
}
@@ -1791,8 +1791,8 @@ void RenameMenuCommand::unexecute()
// ------------------------------------------------------------
-MoveMenuCommand::MoveMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,
- QDesignerPopupMenu *p, int fidx, int tidx, const QString &txt )
+MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt )
: Command( n, fw ), menuBar( mb ), popup( p ), fromIdx( fidx ), toIdx( tidx ), text( txt )
{
}
@@ -1813,7 +1813,7 @@ void MoveMenuCommand::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 )
{
}
@@ -1822,7 +1822,7 @@ 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 );
diff --git a/kommander/editor/command.h b/kommander/editor/command.h
index 80a3e569..0c86fc63 100644
--- a/kommander/editor/command.h
+++ b/kommander/editor/command.h
@@ -24,14 +24,14 @@
#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 <tqstring.h>
+#include <tqrect.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
+#include <tqobject.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
class QWizard;
class QTabWidget;
@@ -53,7 +53,7 @@ class QToolBox;
class Command : public Qt
{
public:
- Command( const QString &n, FormWindow *fw );
+ Command( const TQString &n, FormWindow *fw );
virtual ~Command();
enum Type {
@@ -103,7 +103,7 @@ public:
DeleteToolBoxPage
};
- QString name() const;
+ TQString name() const;
virtual void execute() = 0;
virtual void unexecute() = 0;
@@ -114,7 +114,7 @@ public:
FormWindow *formWindow() const;
private:
- QString cmdName;
+ TQString cmdName;
FormWindow *formWin;
};
@@ -141,11 +141,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;
@@ -156,42 +156,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; }
@@ -199,35 +199,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();
@@ -238,13 +238,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 );
- QObject *widget;
+ TQObject *widget;
PropertyEditor *editor;
- QString propName;
- QVariant oldValue, newValue;
- QString oldCurrentItemText, newCurrentItemText;
+ TQString propName;
+ TQVariant oldValue, newValue;
+ TQString oldCurrentItemText, newCurrentItemText;
bool wasChanged;
bool isResetCommand;
@@ -253,9 +253,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();
@@ -269,9 +269,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();
@@ -285,9 +285,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();
@@ -301,9 +301,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();
@@ -317,9 +317,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();
@@ -333,8 +333,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();
@@ -344,183 +344,183 @@ 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 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 *page;
- QString label;
+ TQWidget *page;
+ TQString label;
};
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 *page;
- QString label;
+ TQWidget *page;
+ TQString label;
};
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 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;
};
@@ -528,7 +528,7 @@ private:
class AddConnectionCommand : public Command
{
public:
- AddConnectionCommand( const QString &name, FormWindow *fw,
+ AddConnectionCommand( const TQString &name, FormWindow *fw,
MetaDataBase::Connection c );
void execute();
@@ -543,7 +543,7 @@ private:
class RemoveConnectionCommand : public Command
{
public:
- RemoveConnectionCommand( const QString &name, FormWindow *fw,
+ RemoveConnectionCommand( const TQString &name, FormWindow *fw,
MetaDataBase::Connection c );
void execute();
@@ -558,87 +558,87 @@ private:
class AddSlotCommand : public Command
{
public:
- AddSlotCommand( const QString &name, FormWindow *fw, const QCString &s, const QString& spec,
- const QString &a, const QString &l, const QString &rt );
+ AddSlotCommand( const TQString &name, FormWindow *fw, const TQCString &s, const TQString& spec,
+ const TQString &a, const TQString &l, const TQString &rt );
void execute();
void unexecute();
Type type() const { return AddSlot; }
private:
- QCString slot;
- QString specifier;
- QString access;
- QString language;
- QString returnType;
+ TQCString slot;
+ TQString specifier;
+ TQString access;
+ TQString language;
+ TQString returnType;
};
class RemoveSlotCommand : public Command
{
public:
- RemoveSlotCommand( const QString &name, FormWindow *fw, const QCString &s, const QString& spec,
- const QString &a, const QString &l, const QString &rt );
+ RemoveSlotCommand( const TQString &name, FormWindow *fw, const TQCString &s, const TQString& spec,
+ const TQString &a, const TQString &l, const TQString &rt );
void execute();
void unexecute();
Type type() const { return RemoveSlot; }
private:
- QCString slot;
- QString specifier;
- QString access;
- QString language;
- QString returnType;
+ TQCString slot;
+ TQString specifier;
+ TQString access;
+ TQString language;
+ TQString returnType;
};
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();
@@ -647,7 +647,7 @@ public:
bool canMerge( Command *c );
private:
- QWidgetList oldOrder, newOrder;
+ TQWidgetList oldOrder, newOrder;
};
@@ -656,15 +656,15 @@ class PopulateListBoxCommand : public Command
public:
struct Item
{
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Item & ) const { return FALSE; }
#endif
};
- 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; }
@@ -672,8 +672,8 @@ public:
bool operator==( const PopulateListBoxCommand & ) const;
private:
- QValueList<Item> oldItems, newItems;
- QListBox *listbox;
+ TQValueList<Item> oldItems, newItems;
+ TQListBox *listbox;
};
@@ -682,15 +682,15 @@ class PopulateIconViewCommand : public Command
public:
struct Item
{
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Item & ) const { return FALSE; }
#endif
};
- 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; }
@@ -698,41 +698,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,
- QMultiLineEdit *mle, const QString &txt );
+ PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw,
+ TQMultiLineEdit *mle, const TQString &txt );
void execute();
void unexecute();
Type type() const { return PopulateMultiLineEdit; }
private:
- QString newText, oldText;
- QMultiLineEdit *mlined;
+ TQString newText, oldText;
+ TQMultiLineEdit *mlined;
bool wasChanged;
};
@@ -742,8 +742,8 @@ class PopulateTableCommand : public Command
public:
struct Row
{
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Row& ) const { return FALSE; }
#endif
@@ -751,41 +751,41 @@ public:
struct Column
{
- QString text;
- QPixmap pix;
- QString field;
+ TQString text;
+ TQPixmap pix;
+ TQString field;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Column& ) const { return FALSE; }
#endif
};
- 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;
@@ -794,8 +794,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(); }
@@ -807,15 +807,15 @@ public:
class AddActionToPopupCommand : public Command
{
public:
- AddActionToPopupCommand( const QString &n, FormWindow *fw,
- QAction *a, QDesignerPopupMenu *p, int idx );
+ AddActionToPopupCommand( const TQString &n, FormWindow *fw,
+ TQAction *a, QDesignerPopupMenu *p, int idx );
void execute();
void unexecute();
Type type() const { return AddActionToPopup; }
private:
- QAction *action;
+ TQAction *action;
QDesignerPopupMenu *popup;
int index;
@@ -824,8 +824,8 @@ private:
class RemoveActionFromPopupCommand : public AddActionToPopupCommand
{
public:
- RemoveActionFromPopupCommand( const QString &n, FormWindow *fw,
- QAction *a, QDesignerPopupMenu *p, int idx )
+ RemoveActionFromPopupCommand( const TQString &n, FormWindow *fw,
+ TQAction *a, QDesignerPopupMenu *p, int idx )
: AddActionToPopupCommand( n, fw, a, p, idx ) {}
void execute() { AddActionToPopupCommand::unexecute(); }
@@ -837,7 +837,7 @@ public:
class AddMenuCommand : public Command
{
public:
- AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw );
+ AddMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw );
void execute();
void unexecute();
@@ -846,18 +846,18 @@ public:
protected:
QDesignerMenuBar *menuBar;
QDesignerPopupMenu *popup;
- QMainWindow *mainWindow;
+ TQMainWindow *mainWindow;
int id;
int index;
- QString name;
+ TQString name;
};
class RemoveMenuCommand : public AddMenuCommand
{
public:
- RemoveMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw,
- QDesignerMenuBar *mb, QDesignerPopupMenu *p, int i, int idx, const QString &mn )
+ RemoveMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw,
+ QDesignerMenuBar *mb, QDesignerPopupMenu *p, int i, int idx, const TQString &mn )
: AddMenuCommand( n, fw, mw ) { menuBar = mb; popup = p; id = i; index = idx, name = mn; }
void execute() { AddMenuCommand::unexecute(); }
@@ -869,8 +869,8 @@ public:
class RenameMenuCommand : public Command
{
public:
- RenameMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,
- int i, const QString &on, const QString &nn );
+ RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ int i, const TQString &on, const TQString &nn );
void execute();
void unexecute();
@@ -879,15 +879,15 @@ public:
private:
QDesignerMenuBar *menuBar;
int id;
- QString oldName, newName;
+ TQString oldName, newName;
};
class MoveMenuCommand : public Command
{
public:
- MoveMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,
- QDesignerPopupMenu *p, int fidx, int tidx, const QString &txt );
+ MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt );
void execute();
void unexecute();
@@ -897,14 +897,14 @@ private:
QDesignerMenuBar *menuBar;
QDesignerPopupMenu *popup;
int fromIdx, toIdx;
- QString text;
+ TQString text;
};
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();
@@ -912,14 +912,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(); }
diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp
index dafae5a7..a430290e 100644
--- a/kommander/editor/connectioneditorimpl.cpp
+++ b/kommander/editor/connectioneditorimpl.cpp
@@ -23,9 +23,9 @@
#include "command.h"
#include "widgetfactory.h"
#include "pixmapchooser.h"
-#include <qmetaobject.h>
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqmetaobject.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include <klistbox.h>
#include <klistview.h>
@@ -35,23 +35,23 @@
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)",
"repaint(int,int,int,int)",
- "repaint(const QRect&)",
- "repaint(const QRegion&)",
+ "repaint(const TQRect&)",
+ "repaint(const TQRegion&)",
//"show()",
//"hide()",
"iconify()",
@@ -63,17 +63,17 @@ 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()",
@@ -82,14 +82,14 @@ static const char *const ignore_slots[] = {
static const char *const ignore_signals[] = {
"destroyed()",
- "destroyed(QObject*)",
+ "destroyed(TQObject*)",
"accessibilityChanged(int)",
"accessibilityChanged(int,int)",
0
};
-ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr, FormWindow* fw)
+ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* rcvr, FormWindow* fw)
: ConnectionEditorBase(parent, 0, true), m_formWindow(fw)
{
if (!rcvr || rcvr == m_formWindow)
@@ -100,9 +100,9 @@ ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr
m_receiver = rcvr;
/* Create widget list */
- QStringList lst;
+ TQStringList lst;
lst << m_formWindow->name();
- for (QPtrDictIterator<QWidget> it(*m_formWindow->widgets()); it.current(); ++it)
+ for (TQPtrDictIterator<TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
{
if (it.current()->isVisibleTo(this) &&
!it.current()->inherits("QLayoutWidget") &&
@@ -117,7 +117,7 @@ ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr
// fillWidgetList(comboReceiver, lst, m_receiver->name());
// Fill receiver combos with widget and action list
- for (QPtrListIterator<QAction> it(m_formWindow->actionList()); it.current(); ++it)
+ for (TQPtrListIterator<TQAction> it(m_formWindow->actionList()); it.current(); ++it)
lst << it.current()->name();
lst.sort();
fillWidgetList(comboReceiver, lst, m_receiver->name());
@@ -128,16 +128,16 @@ ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr
updateDisconnectButton();
// Connections
- connect(comboSender, SIGNAL(activated(const QString&)), SLOT(senderChanged(const QString&)));
- connect(comboReceiver, SIGNAL(activated(const QString&)), SLOT(receiverChanged(const QString&)));
- connect(signalBox, SIGNAL(selectionChanged()), SLOT(updateConnectButton()));
- connect(slotBox, SIGNAL(selectionChanged()), SLOT(updateConnectButton()));
- connect(connectButton, SIGNAL(clicked()), SLOT(connectClicked()));
- connect(disconnectButton, SIGNAL(clicked()), SLOT(disconnectClicked()));
- connect(okButton, SIGNAL(clicked()), SLOT(okClicked()));
- connect(cancelButton, SIGNAL(clicked()), SLOT(cancelClicked()));
- connect(signalBox, SIGNAL(doubleClicked(QListBoxItem*)), SLOT(connectClicked()));
- connect(slotBox, SIGNAL(doubleClicked(QListBoxItem*)), SLOT(connectClicked()));
+ connect(comboSender, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(senderChanged(const TQString&)));
+ connect(comboReceiver, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(receiverChanged(const TQString&)));
+ connect(signalBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateConnectButton()));
+ connect(slotBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateConnectButton()));
+ connect(connectButton, TQT_SIGNAL(clicked()), TQT_SLOT(connectClicked()));
+ connect(disconnectButton, TQT_SIGNAL(clicked()), TQT_SLOT(disconnectClicked()));
+ connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(okClicked()));
+ connect(cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(cancelClicked()));
+ connect(signalBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), TQT_SLOT(connectClicked()));
+ connect(slotBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), TQT_SLOT(connectClicked()));
}
ConnectionEditor::~ConnectionEditor()
@@ -155,15 +155,15 @@ bool ConnectionEditor::isSignalIgnored(const char *signal) const
bool ConnectionEditor::isSlotIgnored(const QMetaData* md)
{
if (md->access != QMetaData::Public && (md->access != QMetaData::Protected ||
- !m_formWindow->isMainContainer((QWidget*)m_receiver)))
+ !m_formWindow->isMainContainer((TQWidget*)m_receiver)))
return true;
for (int i = 0; ignore_slots[i]; i++)
if (!qstrcmp(md->name, ignore_slots[i]))
return true;
- if (!m_formWindow->isMainContainer((QWidget *)m_receiver) && !qstrcmp(md->name, "close()"))
+ if (!m_formWindow->isMainContainer((TQWidget *)m_receiver) && !qstrcmp(md->name, "close()"))
return true;
if (!qstrcmp(md->name, "setFocus()") && m_receiver->isWidgetType() &&
- ((QWidget*)m_receiver)->focusPolicy() == QWidget::NoFocus)
+ ((TQWidget*)m_receiver)->focusPolicy() == TQWidget::NoFocus)
return true;
for (int i = 0; i<comboSender->count(); i++)
if (checkConnectArgs(MetaDataBase::normalizeSlot(signalBox->text(i)).latin1(), m_receiver, md->name))
@@ -171,14 +171,14 @@ bool ConnectionEditor::isSlotIgnored(const QMetaData* md)
return true;
}
-QObject* ConnectionEditor::objectByName(const QString& s) const
+TQObject* ConnectionEditor::objectByName(const TQString& s) const
{
- for (QPtrDictIterator <QWidget> it(*m_formWindow->widgets()); it.current(); ++it)
- if (QString(it.current()->name()) == s)
+ for (TQPtrDictIterator <TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
+ if (TQString(it.current()->name()) == s)
return it.current();
- for (QPtrListIterator<QAction> it(m_formWindow->actionList()); it.current(); ++it)
- if (QString(it.current()->name()) == s)
+ for (TQPtrListIterator<TQAction> it(m_formWindow->actionList()); it.current(); ++it)
+ if (TQString(it.current()->name()) == s)
return it.current();
return 0;
@@ -209,11 +209,11 @@ void ConnectionEditor::connectClicked()
void ConnectionEditor::disconnectClicked()
{
- QListViewItem *p_item = connectionView->currentItem();
+ TQListViewItem *p_item = connectionView->currentItem();
if (!p_item)
return;
- QMap <QListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.find(p_item);
+ TQMap <TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.find(p_item);
if (it != m_connections.end())
m_connections.remove(it);
delete p_item;
@@ -226,20 +226,20 @@ void ConnectionEditor::disconnectClicked()
void ConnectionEditor::okClicked()
{
MacroCommand* rmConn = 0, *addConn = 0;
- QString n = i18n("Connect/Disconnect the signals and slots of '%1' and '%2'").arg(m_sender->name()).
+ TQString n = i18n("Connect/Disconnect the signals and slots of '%1' and '%2'").arg(m_sender->name()).
arg(m_receiver->name());
- QValueList <MetaDataBase::Connection>::Iterator cit;
+ TQValueList <MetaDataBase::Connection>::Iterator cit;
if (!m_oldConnections.isEmpty())
{
- QPtrList <Command> commands;
+ TQPtrList <Command> commands;
for (cit = m_oldConnections.begin(); cit != m_oldConnections.end(); ++cit)
commands.append(new RemoveConnectionCommand(i18n("Remove Connection"), m_formWindow, *cit));
rmConn = new MacroCommand(i18n("Remove Connections"), m_formWindow, commands);
}
if (!m_connections.isEmpty())
{
- QMap<QListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.begin();
- QPtrList<Command> commands;
+ TQMap<TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.begin();
+ TQPtrList<Command> commands;
for (; it != m_connections.end(); ++it)
{
MetaDataBase::Connection conn = *it;
@@ -250,7 +250,7 @@ void ConnectionEditor::okClicked()
if (rmConn || addConn)
{
- QPtrList < Command > commands;
+ TQPtrList < Command > commands;
if (rmConn)
commands.append(rmConn);
if (addConn)
@@ -268,15 +268,15 @@ void ConnectionEditor::cancelClicked()
reject();
}
-void ConnectionEditor::senderChanged(const QString& s)
+void ConnectionEditor::senderChanged(const TQString& s)
{
- QObject* p_object = objectByName(s);
+ TQObject* p_object = objectByName(s);
if (!p_object)
return;
m_sender = p_object;
- QStrList p_sigs = m_sender->metaObject()->signalNames(true);
+ TQStrList p_sigs = m_sender->metaObject()->signalNames(true);
signalBox->clear();
- for (QStrListIterator it(p_sigs); it.current(); ++it)
+ for (TQStrListIterator it(p_sigs); it.current(); ++it)
if (!isSignalIgnored(it.current()) && !signalBox->findItem(it.current(), Qt::ExactMatch))
signalBox->insertItem(it.current());
if (m_sender == m_formWindow->mainContainer())
@@ -287,9 +287,9 @@ void ConnectionEditor::senderChanged(const QString& s)
receiverChanged(m_receiver->name());
}
-void ConnectionEditor::receiverChanged(const QString& s)
+void ConnectionEditor::receiverChanged(const TQString& s)
{
- QObject* p_object = objectByName(s);
+ TQObject* p_object = objectByName(s);
if (!p_object)
return;
m_receiver = p_object;
@@ -321,10 +321,10 @@ void ConnectionEditor::updateDisconnectButton()
disconnectButton->setEnabled((connectionView->currentItem()));
}
-bool ConnectionEditor::hasConnection(const QString& snder, const QString& signal,
- const QString& rcvr, const QString& slot) const
+bool ConnectionEditor::hasConnection(const TQString& snder, const TQString& signal,
+ const TQString& rcvr, const TQString& slot) const
{
- for (QListViewItemIterator it(connectionView); it.current(); ++it)
+ for (TQListViewItemIterator it(connectionView); it.current(); ++it)
if (it.current()->text(0) == snder &&
it.current()->text(1) == signal &&
it.current()->text(2) == rcvr && it.current()->text(3) == slot)
@@ -339,10 +339,10 @@ void ConnectionEditor::fillConnectionsList()
m_oldConnections = MetaDataBase::connections(m_formWindow);
if (!m_oldConnections.isEmpty())
{
- QValueList <MetaDataBase::Connection>::Iterator it = m_oldConnections.begin();
+ TQValueList <MetaDataBase::Connection>::Iterator it = m_oldConnections.begin();
for (; it != m_oldConnections.end(); ++it)
{
- if (m_formWindow->isMainContainer((QWidget*)(*it).receiver) &&
+ if (m_formWindow->isMainContainer((TQWidget*)(*it).receiver) &&
!MetaDataBase::hasSlot(m_formWindow, MetaDataBase::normalizeSlot((*it).slot).latin1()))
continue;
MetaDataBase::Connection conn = *it;
@@ -357,7 +357,7 @@ void ConnectionEditor::fillConnectionsList()
connectionView->setSelected(connectionView->currentItem(), true);
}
-void ConnectionEditor::fillWidgetList(KComboBox* a_combo, const QStringList& items, const QString& defaultWidget)
+void ConnectionEditor::fillWidgetList(KComboBox* a_combo, const TQStringList& items, const TQString& defaultWidget)
{
a_combo->insertStringList(items);
for (int i = 0; i < a_combo->count(); ++i)
diff --git a/kommander/editor/connectioneditorimpl.h b/kommander/editor/connectioneditorimpl.h
index 95c6887b..116e4b42 100644
--- a/kommander/editor/connectioneditorimpl.h
+++ b/kommander/editor/connectioneditorimpl.h
@@ -24,7 +24,7 @@
#include "connectioneditor.h"
#include "metadatabase.h"
-#include <qmap.h>
+#include <tqmap.h>
class QListViewItem;
class FormWindow;
@@ -32,7 +32,7 @@ class FormWindow;
class ConnectionEditor : public ConnectionEditorBase
{
Q_OBJECT public:
- ConnectionEditor(QWidget* parent, QObject* sender, QObject* receiver, FormWindow* fw);
+ ConnectionEditor(TQWidget* parent, TQObject* sender, TQObject* receiver, FormWindow* fw);
~ConnectionEditor();
protected slots:
@@ -43,11 +43,11 @@ protected slots:
// Lists all connections defined in current dialog
void fillConnectionsList();
// Lists all widgets in sender or receiver combo
- void fillWidgetList(KComboBox* a_combo, const QStringList& items, const QString& defaultWidget);
+ void fillWidgetList(KComboBox* a_combo, const TQStringList& items, const TQString& defaultWidget);
// Sender widget was changed - update signal list
- void senderChanged(const QString & s);
+ void senderChanged(const TQString & s);
// Receiver widget was changed - update slot list
- void receiverChanged(const QString & s);
+ void receiverChanged(const TQString & s);
// Enable/disable 'Connect' button when pair <signal,slot> changes
void updateConnectButton();
// Enable/disable 'Disconnect' button when selection changes
@@ -63,13 +63,13 @@ private:
// Whether given slot should appear in the slot list
bool isSlotIgnored(const QMetaData* md);
// Finds widget by name
- QObject* objectByName(const QString& s) const;
- bool hasConnection(const QString & snder, const QString & signal,
- const QString & rcvr, const QString & slot) const;
- QMap <QListViewItem*, MetaDataBase::Connection> m_connections;
- QValueList <MetaDataBase::Connection> m_oldConnections;
- QObject* m_sender;
- QObject* m_receiver;
+ TQObject* objectByName(const TQString& s) const;
+ bool hasConnection(const TQString & snder, const TQString & signal,
+ const TQString & rcvr, const TQString & slot) const;
+ TQMap <TQListViewItem*, MetaDataBase::Connection> m_connections;
+ TQValueList <MetaDataBase::Connection> m_oldConnections;
+ TQObject* m_sender;
+ TQObject* m_receiver;
FormWindow* m_formWindow;
};
diff --git a/kommander/editor/defs.cpp b/kommander/editor/defs.cpp
index fdf06ce9..9f158b6d 100644
--- a/kommander/editor/defs.cpp
+++ b/kommander/editor/defs.cpp
@@ -20,59 +20,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 0;
}
-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/kommander/editor/defs.h b/kommander/editor/defs.h
index ade3fa4b..03cffd98 100644
--- a/kommander/editor/defs.h
+++ b/kommander/editor/defs.h
@@ -21,15 +21,15 @@
#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
-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/kommander/editor/filechooser.cpp b/kommander/editor/filechooser.cpp
index 14bedb95..dfb8575b 100644
--- a/kommander/editor/filechooser.cpp
+++ b/kommander/editor/filechooser.cpp
@@ -1,27 +1,27 @@
#include "filechooser.h"
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <kfiledialog.h>
-#include <qlayout.h>
+#include <tqlayout.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 );
}
@@ -36,21 +36,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/kommander/editor/filechooser.h b/kommander/editor/filechooser.h
index e6bc98e3..f051eea4 100644
--- a/kommander/editor/filechooser.h
+++ b/kommander/editor/filechooser.h
@@ -1,7 +1,7 @@
#ifndef FILECHOOSER_H
#define FILECHOOSER_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLineEdit;
class QPushButton;
@@ -12,29 +12,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/kommander/editor/formfile.cpp b/kommander/editor/formfile.cpp
index 645b04ef..0f5ab63c 100644
--- a/kommander/editor/formfile.cpp
+++ b/kommander/editor/formfile.cpp
@@ -27,10 +27,10 @@
#include "workspace.h"
// Qt includes
-#include <qfile.h>
-#include <qregexp.h>
-#include <qstatusbar.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqstatusbar.h>
+#include <tqtimer.h>
// KDE includes
#include <kdebug.h>
@@ -42,18 +42,18 @@
#include <sys/stat.h>
-FormFile::FormFile(const QString &fn, bool temp)
+FormFile::FormFile(const TQString &fn, bool temp)
: filename(fn), fileNameTemp(temp), fw(0)
{
- QTimer::singleShot(0, this, SLOT(init()));
+ TQTimer::singleShot(0, this, TQT_SLOT(init()));
}
void FormFile::init()
{
- connect(this, SIGNAL(addedFormFile(FormFile *)), MainWindow::self->workspace(),
- SLOT(formFileAdded(FormFile*)));
- connect(this, SIGNAL(removedFormFile(FormFile *)), MainWindow::self->workspace(),
- SLOT(formFileRemoved(FormFile*)));
+ connect(this, TQT_SIGNAL(addedFormFile(FormFile *)), MainWindow::self->workspace(),
+ TQT_SLOT(formFileAdded(FormFile*)));
+ connect(this, TQT_SIGNAL(removedFormFile(FormFile *)), MainWindow::self->workspace(),
+ TQT_SLOT(formFileRemoved(FormFile*)));
emit addedFormFile(this);
}
@@ -74,7 +74,7 @@ void FormFile::setFormWindow(FormWindow *f)
fw->setFormFile(this);
}
-void FormFile::setFileName(const QString &fn)
+void FormFile::setFileName(const TQString &fn)
{
if (fn == filename)
return;
@@ -92,12 +92,12 @@ FormWindow *FormFile::formWindow() const
return fw;
}
-QString FormFile::fileName() const
+TQString FormFile::fileName() const
{
return filename;
}
-QString FormFile::absFileName() const
+TQString FormFile::absFileName() const
{
return filename;
}
@@ -119,7 +119,7 @@ bool FormFile::save(bool withMsgBox)
if (!resource.save(filename, false))
{
if (KMessageBox::questionYesNo(MainWindow::self, i18n("Failed to save file '%1'.\n"
- "Do you want to use another file name?").arg(filename), QString::null, i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
+ "Do you want to use another file name?").arg(filename), TQString::null, i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
return saveAs();
else
return false;
@@ -132,23 +132,23 @@ bool FormFile::save(bool withMsgBox)
bool FormFile::saveAs()
{
- QString f = fileName();
+ TQString f = fileName();
if(fileNameTemp)
- f = QString(formWindow()->name()).lower() + ".kmdr";
+ f = TQString(formWindow()->name()).lower() + ".kmdr";
bool saved = false;
while (!saved) {
- QString fn = KFileDialog::getSaveFileName(QString::null,
+ TQString fn = KFileDialog::getSaveFileName(TQString::null,
i18n("*.kmdr|Kommander Files"), MainWindow::self,
i18n("Save Form '%1' As").arg(formWindow()->name()));
if (fn.isEmpty())
return false;
- QFileInfo fi(fn);
+ TQFileInfo fi(fn);
if (fi.extension() != "kmdr")
fn += ".kmdr";
fileNameTemp = false;
filename = fn;
- QFileInfo relfi(filename);
+ TQFileInfo relfi(filename);
if (relfi.exists()) {
if (KMessageBox::warningContinueCancel(MainWindow::self,
i18n("The file already exists. Do you wish to overwrite it?"),
@@ -176,7 +176,7 @@ bool FormFile::closeEvent()
if (!isModified())
{
emit removedFormFile(this);
- QFile f(filename + ".backup");
+ TQFile f(filename + ".backup");
f.remove();
return true;
}
@@ -197,7 +197,7 @@ bool FormFile::closeEvent()
emit removedFormFile(this);
setModified(false);
- QFile f(filename + ".backup");
+ TQFile f(filename + ".backup");
f.remove();
return true;
}
@@ -239,12 +239,12 @@ void FormFile::showFormWindow()
static int ui_counter = 0;
-QString FormFile::createUnnamedFileName()
+TQString FormFile::createUnnamedFileName()
{
- return i18n("unnamed") + QString::number(++ui_counter) + QString(".kmdr");
+ return i18n("unnamed") + TQString::number(++ui_counter) + TQString(".kmdr");
}
-QString FormFile::formName() const
+TQString FormFile::formName() const
{
FormFile* that = (FormFile*) this;
if (formWindow()) {
@@ -253,12 +253,12 @@ QString FormFile::formName() const
}
if (!cachedFormName.isNull())
return cachedFormName;
- QFile f(filename);
+ TQFile f(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();
diff --git a/kommander/editor/formfile.h b/kommander/editor/formfile.h
index 39fecc67..89ba2f1d 100644
--- a/kommander/editor/formfile.h
+++ b/kommander/editor/formfile.h
@@ -20,7 +20,7 @@
#ifndef FORMFILE_H
#define FORMFILE_H
-#include <qobject.h>
+#include <tqobject.h>
#include "timestamp.h"
#include "metadatabase.h"
@@ -31,23 +31,23 @@ class FormFile : public QObject
Q_OBJECT
public:
- FormFile(const QString &fn, bool temp);
+ FormFile(const TQString &fn, bool temp);
~FormFile();
void setFormWindow( FormWindow *f );
- void setFileName( const QString &fn );
+ void setFileName( const TQString &fn );
void setModified(bool m);
FormWindow *formWindow() const;
- QString fileName() const;
- QString absFileName() const;
+ TQString fileName() const;
+ TQString absFileName() const;
bool save( bool withMsgBox = TRUE );
bool saveAs();
bool close();
bool closeEvent();
bool isModified();
void showFormWindow();
- static QString createUnnamedFileName();
- QString formName() const;
+ static TQString createUnnamedFileName();
+ TQString formName() const;
bool hasTempFileName() const {return fileNameTemp;}
signals:
@@ -64,10 +64,10 @@ private:
void setFormWindowModified( bool m );
private:
- QString filename;
+ TQString filename;
bool fileNameTemp;
FormWindow *fw;
- QString cachedFormName;
+ TQString cachedFormName;
};
diff --git a/kommander/editor/formsettingsimpl.cpp b/kommander/editor/formsettingsimpl.cpp
index 4daec8ba..f3f7c3c2 100644
--- a/kommander/editor/formsettingsimpl.cpp
+++ b/kommander/editor/formsettingsimpl.cpp
@@ -23,11 +23,11 @@
#include "asciivalidator.h"
#include "mainwindow.h"
-#include <qmultilineedit.h>
+#include <tqmultilineedit.h>
#include <klineedit.h>
-#include <qspinbox.h>
+#include <tqspinbox.h>
-FormSettings::FormSettings( QWidget *parent, FormWindow *fw )
+FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
: FormSettingsBase( parent, 0, true ), formwindow( fw )
{
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(fw);
diff --git a/kommander/editor/formsettingsimpl.h b/kommander/editor/formsettingsimpl.h
index f33c2194..194f168a 100644
--- a/kommander/editor/formsettingsimpl.h
+++ b/kommander/editor/formsettingsimpl.h
@@ -30,7 +30,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/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp
index 0aa9b122..631def85 100644
--- a/kommander/editor/formwindow.cpp
+++ b/kommander/editor/formwindow.cpp
@@ -18,28 +18,28 @@
**********************************************************************/
// Qt includes
-#include <qaccel.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qevent.h>
-#include <qfeatures.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qmetaobject.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qpen.h>
-#include <qpixmapcache.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qsizegrip.h>
-#include <qspinbox.h>
-#include <qstatusbar.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqaccel.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqevent.h>
+#include <tqfeatures.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqmetaobject.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqpen.h>
+#include <tqpixmapcache.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqsizegrip.h>
+#include <tqspinbox.h>
+#include <tqstatusbar.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
// KDE includes
#include <klocale.h>
@@ -67,30 +67,30 @@
#include <stdlib.h>
-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() && !o->inherits("SizeHandle"))
- 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() && !o->inherits("SizeHandle"))
- restoreCursors(((QWidget*)o), fw);
+ restoreCursors(((TQWidget*)o), fw);
}
}
@@ -110,8 +110,8 @@ static void restoreCursors(QWidget *start, FormWindow *fw)
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)
{
ff = f;
@@ -119,8 +119,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;
@@ -142,30 +142,30 @@ 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);
- connect(showPropertiesTimer, SIGNAL(timeout()),
- this, SLOT(showPropertiesTimerDone()));
- selectionChangedTimer = new QTimer(this);
- connect(selectionChangedTimer, SIGNAL(timeout()),
- this, SLOT(selectionChangedTimerDone()));
+ 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, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(showPropertiesTimerDone()));
+ selectionChangedTimer = new TQTimer(this);
+ connect(selectionChangedTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(selectionChangedTimerDone()));
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(PixmapChooser::loadPixmap("form.xpm", PixmapChooser::Mini));
- 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;
@@ -195,7 +195,7 @@ FormWindow::~FormWindow()
ff->setFormWindow(0);
}
-void FormWindow::closeEvent(QCloseEvent *e)
+void FormWindow::closeEvent(TQCloseEvent *e)
{
if (ff->closeEvent() && mainwindow->unregisterClient(this))
e->accept();
@@ -203,29 +203,29 @@ void FormWindow::closeEvent(QCloseEvent *e)
e->ignore();
}
-void FormWindow::paintGrid(QWidget *w, QPaintEvent *e)
+void FormWindow::paintGrid(TQWidget *w, TQPaintEvent *e)
{
if (!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())
p.drawPoint(x, y);
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);
}
@@ -245,7 +245,7 @@ void FormWindow::beginUnclippedPainter(bool doNot)
clearWFlags(WPaintUnclipped);
if (doNot)
{
- unclippedPainter->setPen(QPen(color0, 2));
+ unclippedPainter->setPen(TQPen(color0, 2));
unclippedPainter->setRasterOp(NotROP);
}
}
@@ -258,32 +258,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();
@@ -296,53 +296,53 @@ 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"))
- ((QLabel*)w)->setPixmap(PixmapChooser::loadPixmap("image.xpm"));
+ ((TQLabel*)w)->setPixmap(PixmapChooser::loadPixmap("image.xpm"));
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, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
+ TQWhatsThis::add(w, i18n("<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)
{
r.setWidth(w->sizeHint().width());
@@ -354,30 +354,30 @@ 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)
+ if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo(this) &&
+ insertedWidgets.find((TQWidget*)o) && o != w)
{
- QRect r2(((QWidget*)o)->pos(), ((QWidget*)o)->size());
+ 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);
- QValueList<QPoint> op, np;
- for (QWidget *i = lst.first(); i; i = lst.next())
+ TQWidget *pw = WidgetFactory::containerOfWidget(w);
+ 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);
}
@@ -389,7 +389,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);
@@ -410,10 +410,10 @@ void FormWindow::insertWidget()
}
}
-void FormWindow::insertWidget(QWidget *w, bool checkName)
+void FormWindow::insertWidget(TQWidget *w, bool checkName)
{
if (checkName) {
- QString s = w->name();
+ TQString s = w->name();
unify(w, s, true);
w->setName(s);
}
@@ -422,21 +422,21 @@ void FormWindow::insertWidget(QWidget *w, bool checkName)
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, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
+ TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
}
restoreCursors(w, this);
@@ -444,13 +444,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)
{
switch (currTool) {
case POINTER_TOOL:
@@ -459,12 +459,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 (mainContainer()->inherits("QMainWindow") &&
- ((QMainWindow*)mainContainer())->centralWidget() == realWidget)
+ if (mainContainer()->inherits("TQMainWindow") &&
+ ((TQMainWindow*)mainContainer())->centralWidget() == realWidget)
{
e->accept();
mainwindow->popupFormWindowMenu(e->globalPos(), this);
@@ -487,15 +487,15 @@ void FormWindow::handleContextMenu(QContextMenuEvent *e, QWidget *w)
}
}
-void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w)
+void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
{
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) {
@@ -508,7 +508,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w)
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;
}
@@ -524,14 +524,14 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w)
// 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;
@@ -558,7 +558,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;
@@ -580,12 +580,12 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w)
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);
}
}
@@ -607,7 +607,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *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)
@@ -616,7 +616,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w)
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();
@@ -631,12 +631,12 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w)
// 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()) &&
- !wid->inherits("QLayoutWidget") && !wid->inherits("QSplitter"))
+ !wid->inherits("QLayoutWidget") && !wid->inherits("TQSplitter"))
{
insertParent = WidgetFactory::containerOfWidget(wid); // found another parent, store it
break;
@@ -655,7 +655,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w)
}
}
-void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *w)
+void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *w)
{
switch (currTool) {
case ORDER_TOOL:
@@ -663,7 +663,7 @@ void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *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)
@@ -672,7 +672,7 @@ void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *w)
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);
@@ -683,12 +683,12 @@ void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *w)
}
}
-void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w)
+void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
{
if ((e->state() & LeftButton) != LeftButton)
return;
- QWidget *newReceiver = (QWidget*)connectReceiver, *oldReceiver = (QWidget*)connectReceiver, *wid;
+ TQWidget *newReceiver = (TQWidget*)connectReceiver, *oldReceiver = (TQWidget*)connectReceiver, *wid;
bool drawRecRect;
switch (currTool) {
case POINTER_TOOL:
@@ -699,9 +699,9 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w)
WidgetFactory::NoLayout || !insertedWidgets.find(w)))
w = w->parentWidget();
// calc correct position
- QPoint pos = w->mapFromGlobal(e->globalPos());
+ TQPoint pos = w->mapFromGlobal(e->globalPos());
// 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())
@@ -718,7 +718,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() || y - p.y())
{ // if we actually have to move
@@ -734,8 +734,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<ulong, QPoint> it = moving.begin();
- QWidget* wa = containerAt(e->globalPos(), ((QWidget*)it.key()));
+ TQMapConstIterator<ulong, TQPoint> it = moving.begin();
+ TQWidget* wa = containerAt(e->globalPos(), ((TQWidget*)it.key()));
if (wa && !isMainContainer(wa) && !isCentralWidget(wa))
{
wa = WidgetFactory::containerOfWidget(wa);
@@ -767,9 +767,9 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w)
// finally move the selected widgets and show/update preview label
moveSelectedWidgets(x - p.x(), y - p.y());
- sizePreviewLabel->setText(QString("%1/%2").arg(w->pos().x()).arg(w->pos().y()));
+ sizePreviewLabel->setText(TQString("%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();
@@ -777,7 +777,7 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w)
}
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());
}
@@ -797,7 +797,7 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w)
newReceiver = wid;
if (newReceiver && (newReceiver->inherits("QLayoutWidget")
|| newReceiver->inherits("Spacer")))
- newReceiver = (QWidget*)connectReceiver;
+ newReceiver = (TQWidget*)connectReceiver;
drawRecRect = newReceiver != connectReceiver;
currentConnectPos = mapFromGlobal(e->globalPos());
if (newReceiver && (isMainContainer(newReceiver)
@@ -807,8 +807,8 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w)
arg(connectReceiver->name()));
qApp->processEvents();
if (drawRecRect)
- restoreRect(QRect(mapToForm(((QWidget*)oldReceiver)->parentWidget(),
- ((QWidget*)oldReceiver)->pos()), ((QWidget*)oldReceiver)->size()));
+ restoreRect(TQRect(mapToForm(((TQWidget*)oldReceiver)->parentWidget(),
+ ((TQWidget*)oldReceiver)->pos()), ((TQWidget*)oldReceiver)->size()));
drawConnectLine();
break;
case ORDER_TOOL:
@@ -820,7 +820,7 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w)
}
}
-void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w)
+void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
{
if (e->button() != LeftButton)
return;
@@ -847,18 +847,18 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w)
if (propertyWidget && propertyWidget->isWidgetType() && !isMainContainer(propertyWidget))
emitUpdateProperties(propertyWidget);
- QMapConstIterator < ulong, QPoint > it = moving.begin();
- QWidget *oldParent = ((QWidget *) it.key())->parentWidget();
- QWidget *newParent = oldParent;
+ TQMapConstIterator < ulong, TQPoint > it = moving.begin();
+ TQWidget *oldParent = ((TQWidget *) it.key())->parentWidget();
+ TQWidget *newParent = oldParent;
// check whether we have to reparent the selection
- QWidget *wa = containerAt(e->globalPos(), ((QWidget *) it.key()));
+ TQWidget *wa = containerAt(e->globalPos(), ((TQWidget *) it.key()));
if (wa)
{
wa = WidgetFactory::containerOfWidget(wa);
// ok, looks like we moved onto a container
// check whether we really have different parents.
- if (wa == ((QWidget *) it.key())->parentWidget())
+ if (wa == ((TQWidget *) it.key())->parentWidget())
goto make_move_command;
// break layout if necessary
@@ -878,22 +878,22 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w)
}
// doesn't need to be a command, the MoveCommand does reparenting too
bool emitSelChanged = false;
- for (QMap < ulong, QPoint >::Iterator it = moving.begin(); it != moving.end(); ++it)
+ for (TQMap < ulong, TQPoint >::Iterator it = moving.begin(); it != moving.end(); ++it)
{
- QWidget *i = (QWidget *) it.key();
- if (!emitSelChanged && i->inherits("QButton"))
+ TQWidget *i = (TQWidget *) it.key();
+ if (!emitSelChanged && i->inherits("TQButton"))
{
- if (i->parentWidget() && i->parentWidget()->inherits("QButtonGroup") ||
- wa->inherits("QButtonGroup"))
+ if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup") ||
+ wa->inherits("TQButtonGroup"))
emitSelChanged = true;
- if (!wa->inherits("QButtonGroup"))
+ if (!wa->inherits("TQButtonGroup"))
{
MetaDataBase::setPropertyChanged(i, "buttonGroupId", false);
- if (i->parentWidget() && i->parentWidget()->inherits("QButtonGroup"))
- ((QButtonGroup *) i->parentWidget())->remove((QButton *) i);
+ if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup"))
+ ((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);
@@ -910,13 +910,13 @@ 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((QWidget *) it.key());
+ widgets.append((TQWidget *) it.key());
oldPos.append(*it);
- newPos.append(((QWidget *) it.key())->pos());
+ newPos.append(((TQWidget *) it.key())->pos());
}
// add move command, don't execute it, this is just a summary of the operations we did during the move-event handling
commandHistory()->addCommand(new MoveCommand(i18n("Move"),
@@ -935,11 +935,11 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w)
case CONNECT_TOOL:
restoreConnectionLine();
if (connectSender)
- restoreRect(QRect(mapToForm(((QWidget *) connectSender)->parentWidget(),
- ((QWidget *) connectSender)->pos()), ((QWidget *) connectSender)->size()));
+ restoreRect(TQRect(mapToForm(((TQWidget *) connectSender)->parentWidget(),
+ ((TQWidget *) connectSender)->pos()), ((TQWidget *) connectSender)->size()));
if (connectReceiver)
- restoreRect(QRect(mapToForm(((QWidget *) connectReceiver)->parentWidget(),
- ((QWidget *) connectReceiver)->pos()), ((QWidget *) connectReceiver)->size()));
+ restoreRect(TQRect(mapToForm(((TQWidget *) connectReceiver)->parentWidget(),
+ ((TQWidget *) connectReceiver)->pos()), ((TQWidget *) connectReceiver)->size()));
endUnclippedPainter();
qApp->processEvents();
if (connectSender && connectReceiver)
@@ -983,7 +983,7 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w)
buffer = 0;
}
-void FormWindow::handleKeyPress(QKeyEvent * e, QWidget * w)
+void FormWindow::handleKeyPress(TQKeyEvent * e, TQWidget * w)
{
e->ignore();
checkSelectionsTimer->stop();
@@ -991,12 +991,12 @@ void FormWindow::handleKeyPress(QKeyEvent * e, QWidget * w)
(e->key() == Key_Left ||
e->key() == Key_Right ||
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())
@@ -1048,7 +1048,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())
@@ -1061,7 +1061,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)
@@ -1071,38 +1071,38 @@ 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)
{
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 (mainContainer()->inherits("QMainWindow") &&
- w == ((QMainWindow *) mainContainer())->centralWidget())
+ if (mainContainer()->inherits("TQMainWindow") &&
+ w == ((TQMainWindow *) mainContainer())->centralWidget())
{
- QObject *opw = propertyWidget;
+ TQObject *opw = propertyWidget;
propertyWidget = mainContainer();
if (opw->isWidgetType())
- repaintSelection((QWidget *) opw);
+ repaintSelection((TQWidget *) opw);
emitShowProperties(propertyWidget);
return;
}
@@ -1112,10 +1112,10 @@ void FormWindow::selectWidget(QObject * o, bool select)
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);
@@ -1146,27 +1146,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()->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))
@@ -1175,14 +1175,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)
@@ -1191,54 +1191,54 @@ 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("%1/%2");
+ TQString t("%1/%2");
t = t.arg(r.width() - 1).arg(r.height() - 1);
drawSizePreview(pos, t);
return;
@@ -1252,11 +1252,11 @@ void FormWindow::continueRectDraw(const QPoint & p, const QPoint & global, QWidg
currRect = r;
if (t == Insert)
{
- QString t("%1/%2");
+ TQString t("%1/%2");
t = t.arg(r.width() - 1).arg(r.height() - 1);
drawSizePreview(pos, t);
}
- unclippedPainter->setClipRegion(QRegion(rect()).subtract(QRect(sizePreviewPos,
+ unclippedPainter->setClipRegion(TQRegion(rect()).subtract(TQRect(sizePreviewPos,
sizePreviewPixmap.size())));
unclippedPainter->drawRect(currRect);
unclippedPainter->setClipping(false);
@@ -1275,24 +1275,24 @@ 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())
+ for (TQObject * o = l->first(); o; o = l->next())
{
- if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
+ 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;
@@ -1300,20 +1300,20 @@ 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;
@@ -1338,16 +1338,16 @@ 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)
@@ -1356,29 +1356,29 @@ 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);
+ if (o->isWidgetType() && 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)
{
@@ -1406,11 +1406,11 @@ void FormWindow::checkSelectionsForMove(QWidget * w)
void FormWindow::deleteWidgets()
{
- 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
@@ -1427,17 +1427,17 @@ 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);
@@ -1445,14 +1445,14 @@ void FormWindow::editAdjustSize()
}
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));
}
@@ -1467,28 +1467,28 @@ void FormWindow::editAdjustSize()
}
-QWidgetList FormWindow::selectedWidgets() const
+TQWidgetList FormWindow::selectedWidgets() const
{
- QWidgetList widgets;
- for (QPtrDictIterator<WidgetSelection> it(usedSelections); it.current(); ++it)
+ TQWidgetList widgets;
+ for (TQPtrDictIterator<WidgetSelection> it(usedSelections); 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);
+ updateSelection((TQWidget*)w);
}
-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;
}
@@ -1498,79 +1498,79 @@ void FormWindow::invalidCheckedSelections()
checkedSelectionsForMove = false;
}
-void FormWindow::checkPreviewGeometry(QRect & r)
+void FormWindow::checkPreviewGeometry(TQRect & r)
{
if (rect().contains(r))
return;
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 (mContainer)
{
- QVariant prop = mContainer->property("useInternalParser");
+ TQVariant prop = mContainer->property("useInternalParser");
KommanderWidget::useInternalParser = prop.toBool();
}
}
-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())
formFile()->setModified(true);
}
-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);
}
-void FormWindow::emitUpdateProperties(QObject * w)
+void FormWindow::emitUpdateProperties(TQObject * w)
{
if (w == propertyWidget)
{
@@ -1618,11 +1618,11 @@ void FormWindow::currentToolChanged()
case CONNECT_TOOL:
restoreConnectionLine();
if (connectSender)
- restoreRect(QRect(mapToForm(((QWidget *) connectSender)->parentWidget(),
- ((QWidget *) connectSender)->pos()), ((QWidget *) connectSender)->size()));
+ restoreRect(TQRect(mapToForm(((TQWidget *) connectSender)->parentWidget(),
+ ((TQWidget *) connectSender)->pos()), ((TQWidget *) connectSender)->size()));
if (connectReceiver)
- restoreRect(QRect(mapToForm(((QWidget *) connectReceiver)->parentWidget(),
- ((QWidget *) connectReceiver)->pos()), ((QWidget *) connectReceiver)->size()));
+ restoreRect(TQRect(mapToForm(((TQWidget *) connectReceiver)->parentWidget(),
+ ((TQWidget *) connectReceiver)->pos()), ((TQWidget *) connectReceiver)->size()));
endUnclippedPainter();
break;
case POINTER_TOOL:
@@ -1686,14 +1686,14 @@ 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())
+ for (TQObject * o = l->first(); o; o = l->next())
{
- QWidget *w = (QWidget *) o;
+ TQWidget *w = (TQWidget *) o;
if (w->isVisibleTo(w->parentWidget()) &&
insertedWidgets[(void *) w] && w->focusPolicy() != NoFocus)
{
@@ -1716,7 +1716,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);
@@ -1737,13 +1737,13 @@ 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;
}
@@ -1767,7 +1767,7 @@ int FormWindow::numSelectedWidgets() const
return usedSelections.count();
}
-QString FormWindow::copy()
+TQString FormWindow::copy()
{
Resource resource(mainWindow());
resource.setWidget(this);
@@ -1776,8 +1776,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());
@@ -1786,44 +1786,44 @@ void FormWindow::lowerWidgets()
commandHistory()->addCommand(cmd);
}
-static void find_accel(const QString & txt, QMap < QChar, QWidgetList > &accels, QWidget * w)
+static 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);
}
}
void FormWindow::checkAccels()
{
- 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())
+ for (TQObject * o = l->first(); o; o = l->next())
{
- if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
+ 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);
@@ -1837,8 +1837,8 @@ 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)
{
@@ -1862,8 +1862,8 @@ void FormWindow::checkAccels()
void FormWindow::raiseWidgets()
{
- QWidgetList widgets;
- QPtrDictIterator < WidgetSelection > it(usedSelections);
+ TQWidgetList widgets;
+ TQPtrDictIterator < WidgetSelection > it(usedSelections);
for (; it.current(); ++it)
widgets.append(it.current()->widget());
@@ -1872,7 +1872,7 @@ void FormWindow::raiseWidgets()
commandHistory()->addCommand(cmd);
}
-void FormWindow::paste(const QString & cb, QWidget * parent)
+void FormWindow::paste(const TQString & cb, TQWidget * parent)
{
Resource resource(mainWindow());
resource.setWidget(this);
@@ -1883,14 +1883,14 @@ 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())
+ for (TQObject * o = l->first(); o; o = l->next())
{
- if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
+ if (((TQWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
{
- selectWidget((QWidget *) o);
+ selectWidget((TQWidget *) o);
}
}
delete l;
@@ -1905,7 +1905,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);
@@ -1915,7 +1915,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);
@@ -1925,7 +1925,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);
@@ -1936,7 +1936,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);
@@ -1950,7 +1950,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);
@@ -1958,19 +1958,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);
@@ -1979,19 +1979,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);
@@ -2000,22 +2000,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);
@@ -2024,12 +2024,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 (;;)
{
@@ -2041,7 +2041,7 @@ void FormWindow::breakLayout(QWidget * w)
Command *cmd = breakLayoutCommand(w);
if (cmd)
commands.insert(0, cmd);
- if (!w->inherits("QLayoutWidget") && !w->inherits("QSplitter"))
+ if (!w->inherits("QLayoutWidget") && !w->inherits("TQSplitter"))
break;
}
w = w->parentWidget();
@@ -2056,19 +2056,19 @@ void FormWindow::breakLayout(QWidget * w)
cmd->execute();
}
-BreakLayoutCommand *FormWindow::breakLayoutCommand(QWidget * w)
+BreakLayoutCommand *FormWindow::breakLayoutCommand(TQWidget * w)
{
- 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);
@@ -2076,7 +2076,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand(QWidget * w)
int FormWindow::numVisibleWidgets() const
{
- QPtrDictIterator < QWidget > it(insertedWidgets);
+ TQPtrDictIterator < TQWidget > it(insertedWidgets);
int visible = 0;
for (; it.current(); ++it)
{
@@ -2086,23 +2086,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())
- if (o->isWidgetType() && ((QWidget*)o)->isVisibleTo((FormWindow*)this) &&
- insertedWidgets.find((QWidget*)o))
+ for (TQObject *o = l->first(); o; o = l->next())
+ if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo((FormWindow*)this) &&
+ insertedWidgets.find((TQWidget*)o))
{
delete l;
return true;
@@ -2111,7 +2111,7 @@ bool FormWindow::hasInsertedChildren(QWidget *w) const
return false;
}
-bool FormWindow::allowMove(QWidget *w)
+bool FormWindow::allowMove(TQWidget *w)
{
w = w->parentWidget();
while (w)
@@ -2143,8 +2143,8 @@ void FormWindow::editConnections()
void FormWindow::saveBackground()
{
delete buffer;
- buffer = new QPixmap(width(), height());
- *buffer = QPixmap::grabWindow(winId());
+ buffer = new TQPixmap(width(), height());
+ *buffer = TQPixmap::grabWindow(winId());
}
void FormWindow::restoreConnectionLine()
@@ -2154,7 +2154,7 @@ void FormWindow::restoreConnectionLine()
int a =QABS(connectStartPos.x() - currentConnectPos.x());
int b = QABS(connectStartPos.y() - currentConnectPos.y());
- QRect r(connectStartPos, currentConnectPos);
+ TQRect r(connectStartPos, currentConnectPos);
if (a < 32 || b < 32)
{ // special case: vertical or horizontal line
@@ -2181,7 +2181,7 @@ void FormWindow::restoreConnectionLine()
}
int dx = 2 * w / 3;
int dy = 2 * h / 3;
- QPoint p(connectStartPos);
+ TQPoint p(connectStartPos);
if (r.x() > r.right())
{
@@ -2199,7 +2199,7 @@ void FormWindow::restoreConnectionLine()
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);
@@ -2209,13 +2209,13 @@ void FormWindow::restoreConnectionLine()
connectStartPos.x() - 10, connectStartPos.y() - 10, 20, 20);
}
-void FormWindow::restoreRect(const QRect &rect)
+void FormWindow::restoreRect(const TQRect &rect)
{
if (!unclippedPainter)
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);
unclippedPainter->drawPixmap(r.x() - 2, r.y() + r.height() - 3, *buffer, r.x() - 2,
@@ -2228,32 +2228,32 @@ void FormWindow::drawConnectLine()
{
if (!unclippedPainter)
return;
- unclippedPainter->setPen(QPen(white, 2));
+ unclippedPainter->setPen(TQPen(white, 2));
unclippedPainter->drawLine(connectStartPos, currentConnectPos);
- unclippedPainter->setPen(QPen(darkCyan, 1));
+ unclippedPainter->setPen(TQPen(darkCyan, 1));
unclippedPainter->drawLine(connectStartPos, currentConnectPos);
- unclippedPainter->setPen(QPen(magenta, 1));
+ unclippedPainter->setPen(TQPen(magenta, 1));
if (connectSender)
{
- QWidget *w = (QWidget*)connectSender;
- QPoint p = mapToForm(w, QPoint(0,0));
- unclippedPainter->drawRect(QRect(p + QPoint(2, 2), w->size() - QSize(4, 4)));
+ TQWidget *w = (TQWidget*)connectSender;
+ TQPoint p = mapToForm(w, TQPoint(0,0));
+ unclippedPainter->drawRect(TQRect(p + TQPoint(2, 2), w->size() - TQSize(4, 4)));
}
if (connectReceiver)
{
- QWidget *w = (QWidget*)connectReceiver;
- QPoint p = mapToForm(w, QPoint(0,0));
- unclippedPainter->drawRect(QRect(p + QPoint(2, 2), w->size() - QSize(4, 4)));
+ TQWidget *w = (TQWidget*)connectReceiver;
+ TQPoint p = mapToForm(w, TQPoint(0,0));
+ unclippedPainter->drawRect(TQRect(p + TQPoint(2, 2), w->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);
@@ -2265,21 +2265,21 @@ 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());
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()))
{
found = true;
if (!changeIt)
break;
- s = orig + "_" + QString::number(++num);
+ s = orig + "_" + TQString::number(++num);
it.toFirst();
}
else
@@ -2287,14 +2287,14 @@ bool FormWindow::unify(QObject *w, QString &s, bool changeIt)
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())
@@ -2304,38 +2304,38 @@ 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 (mainContainer()->inherits("QMainWindow"))
+ if (mainContainer()->inherits("TQMainWindow"))
{
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()))
{
found = true;
if (!changeIt)
break;
- s = orig + "_" + QString::number(++num);
+ s = orig + "_" + TQString::number(++num);
o = l->first();
}
delete l;
}
if (!found)
{
- QObjectList *l = mainContainer()->queryList("QDesignerPopupMenu", 0, true);
- for (QObject *o = l->first(); o; o = l->next())
+ TQObjectList *l = mainContainer()->queryList("QDesignerPopupMenu", 0, true);
+ for (TQObject *o = l->first(); o; o = l->next())
if (o != w && !qstrcmp(o->name(), s.latin1()))
{
found = true;
if (!changeIt)
break;
- s = orig + "_" + QString::number(++num);
+ s = orig + "_" + TQString::number(++num);
o = l->first();
}
delete l;
@@ -2349,7 +2349,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") && !qstrcmp(WidgetFactory::classNameOf(it.current()),
w->className.utf8()))
@@ -2360,12 +2360,12 @@ 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;
}
@@ -2376,8 +2376,8 @@ 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
@@ -2403,11 +2403,11 @@ 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();
@@ -2415,7 +2415,7 @@ QPoint FormWindow::mapToForm(const QWidget* w, const QPoint& pos) const
return mapFromGlobal(w->mapToGlobal(pos));
}
-static int widgetDepth(QWidget *w)
+static int widgetDepth(TQWidget *w)
{
int d = -1;
while (w && !w->isTopLevel())
@@ -2427,7 +2427,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())
{
@@ -2438,12 +2438,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();
@@ -2453,7 +2453,7 @@ QWidget *FormWindow::containerAt(const QPoint &pos, QWidget *notParentOf)
for (; it.current(); ++it) {
if (it.current()->inherits("QLayoutWidget"))
continue;
- if (it.current()->inherits("QSplitter"))
+ if (it.current()->inherits("TQSplitter"))
continue;
if (!it.current()->isVisibleTo(this))
continue;
@@ -2464,7 +2464,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))))
@@ -2474,9 +2474,9 @@ QWidget *FormWindow::containerAt(const QPoint &pos, QWidget *notParentOf)
if (w && !w->isTopLevel()) continue; // we did not get through the full while loop
int wd = widgetDepth(it.current());
- if (wd == depth && container && ((QObjectList*)it.current()->parentWidget()->
+ if (wd == depth && container && ((TQObjectList*)it.current()->parentWidget()->
children())->find(it.current()) >
- ((QObjectList*)container->parentWidget()->children())->find(container))
+ ((TQObjectList*)container->parentWidget()->children())->find(container))
wd++;
if (wd > depth && !isChildOf(it.current(), notParentOf)) {
depth = wd;
@@ -2487,12 +2487,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)
@@ -2503,14 +2503,14 @@ 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);
}
}
@@ -2519,7 +2519,7 @@ bool FormWindow::savePixmapInline() const
return pixInline;
}
-QString FormWindow::pixmapLoaderFunction() const
+TQString FormWindow::pixmapLoaderFunction() const
{
return pixLoader;
}
@@ -2529,48 +2529,48 @@ void FormWindow::setSavePixmapInline(bool b)
pixInline = b;
}
-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;
}
-QAction *FormWindow::findAction(const QString &name)
+TQAction *FormWindow::findAction(const TQString &name)
{
- for (QAction *a = actionList().first(); a; a = actionList().next())
+ for (TQAction *a = actionList().first(); a; a = actionList().next())
{
- if (QString(a->name()) == name)
+ 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;
}
-bool FormWindow::isCentralWidget(QObject *w) const
+bool FormWindow::isCentralWidget(TQObject *w) const
{
- if (!mainContainer()->inherits("QMainWindow"))
+ if (!mainContainer()->inherits("TQMainWindow"))
return false;
- return w == ((QMainWindow*)mainContainer())->centralWidget();
+ return w == ((TQMainWindow*)mainContainer())->centralWidget();
}
-QObject *FormWindow::connectableObject(QObject *w, QObject *)
+TQObject *FormWindow::connectableObject(TQObject *w, TQObject *)
{
return w;
}
@@ -2604,6 +2604,6 @@ 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()));
}
#include "formwindow.moc"
diff --git a/kommander/editor/formwindow.h b/kommander/editor/formwindow.h
index c6d871b0..611e543d 100644
--- a/kommander/editor/formwindow.h
+++ b/kommander/editor/formwindow.h
@@ -26,12 +26,12 @@
#include "actiondnd.h"
-#include <qwidget.h>
-#include <qmap.h>
-#include <qptrdict.h>
-#include <qpixmap.h>
-#include <qwidgetlist.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqptrdict.h>
+#include <tqpixmap.h>
+#include <tqwidgetlist.h>
+#include <tqmap.h>
class QPaintEvent;
class QMouseEvent;
@@ -58,28 +58,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();
@@ -90,53 +90,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();
@@ -144,38 +144,38 @@ 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 );
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 killAccels( QObject *top );
+ void killAccels( TQObject *top );
int layoutDefaultSpacing() const;
int layoutDefaultMargin() const;
@@ -187,27 +187,27 @@ public:
void setFormFile( FormFile *f );
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 undoRedoChanged( bool undoAvailable, bool redoAvailable, const QString &undoCmd,
- const QString &redoCmd );
+ void showProperties( TQObject *w );
+ void updateProperties( TQObject *w );
+ void undoRedoChanged( bool undoAvailable, bool redoAvailable, 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 )
+ 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() ); }
private:
@@ -216,32 +216,32 @@ private:
virtual void beginUnclippedPainter( bool doNot );
virtual void endUnclippedPainter();
virtual void drawConnectLine();
- virtual void drawSizePreview( const QPoint &pos, const QString& text );
+ virtual void drawSizePreview( const TQPoint &pos, const TQString& text );
virtual void insertWidget();
virtual void moveSelectedWidgets( int dx, int dy );
- virtual void startRectDraw( const QPoint &p, const QPoint &global, QWidget *w, RectType t );
- virtual void continueRectDraw( const QPoint &p, const QPoint &global, QWidget *w, RectType t );
+ virtual void startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t );
+ virtual void continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t );
virtual void endRectDraw();
- virtual void checkSelectionsForMove( QWidget *w );
- virtual BreakLayoutCommand *breakLayoutCommand( QWidget *w );
+ virtual void checkSelectionsForMove( TQWidget *w );
+ virtual BreakLayoutCommand *breakLayoutCommand( TQWidget *w );
- virtual bool allowMove( QWidget *w );
+ virtual bool allowMove( TQWidget *w );
virtual void saveBackground();
virtual void restoreConnectionLine();
- virtual void restoreRect( const QRect &rect ) ;
+ virtual void restoreRect( const TQRect &rect ) ;
virtual void showOrderIndicators();
virtual void updateOrderIndicators();
virtual void repositionOrderIndicators();
virtual void hideOrderIndicators();
- virtual QWidget *containerAt( const QPoint &pos, QWidget *notParentOf );
+ virtual TQWidget *containerAt( const TQPoint &pos, TQWidget *notParentOf );
- QObject *connectableObject( QObject *w, QObject *fallback );
+ TQObject *connectableObject( TQObject *w, TQObject *fallback );
private slots:
virtual void invalidCheckedSelections();
@@ -252,38 +252,38 @@ private slots:
private:
int currTool;
bool oldRectValid, widgetPressed, drawRubber, checkedSelectionsForMove;
- 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<ulong, QPoint> moving;
- QWidget *insertParent;
- QObject *propertyWidget;
- QLabel *sizePreviewLabel;
- QTimer *checkSelectionsTimer;
- QPtrDict<QWidget> insertedWidgets;
+ TQMap<ulong, TQPoint> moving;
+ TQWidget *insertParent;
+ TQObject *propertyWidget;
+ TQLabel *sizePreviewLabel;
+ TQTimer *checkSelectionsTimer;
+ TQPtrDict<TQWidget> insertedWidgets;
bool propShowBlocked;
- QTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer;
- QPoint connectStartPos, currentConnectPos;
- QObject *connectSender, *connectReceiver;
- QPixmap *buffer;
- QPtrList<OrderIndicator> orderIndicators;
- QWidgetList orderedWidgets;
- QWidgetList stackedWidgets;
- QWidget *mContainer;
+ TQTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer;
+ TQPoint connectStartPos, currentConnectPos;
+ TQObject *connectSender, *connectReceiver;
+ TQPixmap *buffer;
+ TQPtrList<OrderIndicator> orderIndicators;
+ TQWidgetList orderedWidgets;
+ TQWidgetList stackedWidgets;
+ TQWidget *mContainer;
bool pixInline;
- QString pixLoader;
+ TQString pixLoader;
bool toolFixed;
- QPtrList<QAction> actions;
- QWidget* targetContainer;
- QPalette restorePalette;
+ TQPtrList<TQAction> actions;
+ TQWidget* targetContainer;
+ TQPalette restorePalette;
bool hadOwnPalette;
int defSpacing, defMargin;
FormFile *ff;
diff --git a/kommander/editor/functionsimpl.cpp b/kommander/editor/functionsimpl.cpp
index ad4924e5..a758ab30 100644
--- a/kommander/editor/functionsimpl.cpp
+++ b/kommander/editor/functionsimpl.cpp
@@ -14,11 +14,11 @@
***************************************************************************/
/* QT INCLUDES */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qmetaobject.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqmetaobject.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
/* KDE INCLUDES */
#include <kcombobox.h>
@@ -41,7 +41,7 @@
const int MaxFunctionArgs = 6;
-FunctionsDialog::FunctionsDialog(QWidget* a_parent, const QDict<QWidget>& a_widgetList, bool useInternalParser, char* a_name,
+FunctionsDialog::FunctionsDialog(TQWidget* a_parent, const TQDict<TQWidget>& a_widgetList, bool useInternalParser, char* a_name,
bool a_modal)
: FunctionsDialogBase(a_parent, a_name, a_modal), m_widgetList(a_widgetList), m_useInternalParser(useInternalParser)
{
@@ -49,21 +49,21 @@ FunctionsDialog::FunctionsDialog(QWidget* a_parent, const QDict<QWidget>& a_widg
copyButton->setPixmap(KGlobal::iconLoader()->loadIcon("1downarrow", KIcon::Toolbar));
groupComboBox->insertStringList(SpecialInformation::groups());
- connect(groupComboBox, SIGNAL(activated(int)), SLOT(groupChanged(int)));
- connect(widgetComboBox, SIGNAL(activated(int)), SLOT(groupChanged(int)));
- connect(functionListBox, SIGNAL(highlighted(int)), SLOT(functionChanged(int)));
- connect(copyButton, SIGNAL(clicked()), SLOT(copyText()));
- connect(clearButton, SIGNAL(clicked()), insertedText, SLOT(clear()));
+ connect(groupComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(groupChanged(int)));
+ connect(widgetComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(groupChanged(int)));
+ connect(functionListBox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(functionChanged(int)));
+ connect(copyButton, TQT_SIGNAL(clicked()), TQT_SLOT(copyText()));
+ connect(clearButton, TQT_SIGNAL(clicked()), insertedText, TQT_SLOT(clear()));
// build widget name list
- for (QDictIterator<QWidget> It(m_widgetList); It.current(); ++It)
+ for (TQDictIterator<TQWidget> It(m_widgetList); It.current(); ++It)
m_widgetNames.append(It.currentKey());
m_widgetNames.sort();
widgetComboBox->insertStringList(m_widgetNames);
for (int j = 0; j < WidgetDatabase::count(); j++)
{
- QString group = WidgetDatabase::group(j);
+ TQString group = WidgetDatabase::group(j);
if (group == "Kommander" || group == "Custom")
m_widgetTypes << WidgetDatabase::className(j);
}
@@ -108,16 +108,16 @@ FunctionsDialog::~FunctionsDialog()
{
}
-QString FunctionsDialog::functionText() const
+TQString FunctionsDialog::functionText() const
{
return insertedText->text();
}
-QString FunctionsDialog::currentFunctionText()
+TQString FunctionsDialog::currentFunctionText()
{
- QString prefix, function;
+ TQString prefix, function;
int index = groupComboBox->currentItem();
- QString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
+ TQString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
if (m_useInternalParser)
{
function = SpecialInformation::parserGroupName(s);
@@ -130,12 +130,12 @@ QString FunctionsDialog::currentFunctionText()
function = s + ".";
}
if (groupComboBox->currentText() == "Kommander")
- return QString("%1%2%3").arg(prefix).arg(functionListBox->currentText()).arg(params());
+ return TQString("%1%2%3").arg(prefix).arg(functionListBox->currentText()).arg(params());
else if (groupComboBox->currentItem() == m_DCOP || groupComboBox->currentItem() == m_Slots)
- return QString("%1%2.%3%4").arg(prefix).arg(widgetComboBox->currentText().section(' ', 0, 0))
+ return TQString("%1%2.%3%4").arg(prefix).arg(widgetComboBox->currentText().section(' ', 0, 0))
.arg(functionListBox->currentText().left(functionListBox->currentText().find('('))).arg(params());
else
- return QString("%1%2%3%4").arg(prefix).arg(function)
+ return TQString("%1%2%3%4").arg(prefix).arg(function)
.arg(functionListBox->currentText()).arg(params());
}
@@ -147,14 +147,14 @@ void FunctionsDialog::groupChanged(int index)
if (index == m_Slots)
{
KommanderWidget* a_atw = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
- QStringList pFunctions = QStringList::fromStrList(a_atw->object()->metaObject()->slotNames(true));
+ TQStringList pFunctions = TQStringList::fromStrList(a_atw->object()->metaObject()->slotNames(true));
for (uint i=0; i<pFunctions.count(); i++)
{
- QString slot = pFunctions[i];
- QString slotArgStr = slot.section(QRegExp("\\(|\\)"), 1);
+ TQString slot = pFunctions[i];
+ TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1);
if (slotArgStr.isEmpty() || m_acceptedSlots.contains(slotArgStr))
{
- QString name = slot.remove("()");
+ TQString name = slot.remove("()");
if (!m_slotList.contains(name))
{
m_slotList[name] = slot;
@@ -164,8 +164,8 @@ void FunctionsDialog::groupChanged(int index)
}
} else
{
- QString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
- QStringList pFunctions = SpecialInformation::functions(s);
+ TQString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
+ TQStringList pFunctions = SpecialInformation::functions(s);
KommanderWidget* a_atw = 0;
if (index == m_DCOP)
a_atw = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
@@ -194,10 +194,10 @@ void FunctionsDialog::functionChanged(int)
if (groupComboBox->currentItem() == m_Slots)
{
KommanderWidget* w = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
- QObject *o = w->object();
- QString slotHelp = i18n("To learn more about the slot, look at the documentation of the base Qt/KDE class, most probably <i>%1</i>.").arg(o->metaObject()->superClassName() ? QString(o->metaObject()->superClassName()) : QString(o->className()) );
- QString slotName = functionListBox->currentText();
- QString slot = m_slotList[slotName];
+ TQObject *o = w->object();
+ TQString slotHelp = i18n("To learn more about the slot, look at the documentation of the base Qt/KDE class, most probably <i>%1</i>.").arg(o->metaObject()->superClassName() ? TQString(o->metaObject()->superClassName()) : TQString(o->className()) );
+ TQString slotName = functionListBox->currentText();
+ TQString slot = m_slotList[slotName];
descriptionText->clear();
descriptionText->setText(i18n("<qt><h3>%1</h3>"
"<p><b>Description:</b> %2\n<p><b>Syntax:</b> <i>%3</i>%4</qt>")
@@ -205,10 +205,10 @@ void FunctionsDialog::functionChanged(int)
} else
{
int index = groupComboBox->currentItem();
- QString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
+ TQString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP";
m_function = SpecialInformation::functionObject(s,
functionListBox->currentText());
- QString defArgs;
+ TQString defArgs;
if (m_function.minArg() < m_function.argumentCount())
if (!m_function.minArg())
defArgs = i18n("<p>Parameters are not obligatory.");
@@ -233,7 +233,7 @@ void FunctionsDialog::functionChanged(int)
void FunctionsDialog::copyText()
{
- QString text = currentFunctionText();
+ TQString text = currentFunctionText();
int para, i;
insertedText->getCursorPosition(&para, &i);
// int cursorPos = insertedText->cursorPosition();
@@ -244,25 +244,25 @@ void FunctionsDialog::copyText()
void FunctionsDialog::showParameters()
{
KLineEdit* edits[MaxFunctionArgs] = {arg1Edit, arg2Edit, arg3Edit, arg4Edit, arg5Edit, arg6Edit};
- QLabel* labels[MaxFunctionArgs] = {argLabel1, argLabel2, argLabel3, argLabel4, argLabel5, argLabel6};
+ TQLabel* labels[MaxFunctionArgs] = {argLabel1, argLabel2, argLabel3, argLabel4, argLabel5, argLabel6};
KComboBox* combos[MaxFunctionArgs] = {combo1, combo2, combo3, combo4, combo5, combo6};
- QCheckBox* quotes[MaxFunctionArgs] = {quote1, quote2, quote3, quote4, quote5, quote6};
+ TQCheckBox* quotes[MaxFunctionArgs] = {quote1, quote2, quote3, quote4, quote5, quote6};
if (groupComboBox->currentItem() == m_Slots)
{
widgetComboBox->setShown(true);
widgetLabel->setShown(true);
- QString slot = m_slotList[functionListBox->currentText()];
- QStringList slotArgs = QStringList::split(',', slot.section(QRegExp("\\(|\\)"), 1), false);
+ TQString slot = m_slotList[functionListBox->currentText()];
+ TQStringList slotArgs = TQStringList::split(',', slot.section(TQRegExp("\\(|\\)"), 1), false);
int argsCount = slotArgs.count();
for (int i = 0; i < MaxFunctionArgs; i++)
{
labels[i]->setShown(i < argsCount);
- QString type;
+ TQString type;
if (i < argsCount)
{
- type = slotArgs[i].remove(QRegExp("\\*|\\&|const\\s"));
- labels[i]->setText(QString("%1:").arg(type));
+ type = slotArgs[i].remove(TQRegExp("\\*|\\&|const\\s"));
+ labels[i]->setText(TQString("%1:").arg(type));
}
quotes[i]->setChecked(true);
quotes[i]->setShown(false);
@@ -279,7 +279,7 @@ void FunctionsDialog::showParameters()
combos[i]->setShown(false);
edits[i]->setShown(i < argsCount);
edits[i]->clear();
- if (type == "QString")
+ if (type == "TQString")
{
quotes[i]->setShown(i < argsCount);
}
@@ -303,7 +303,7 @@ void FunctionsDialog::showParameters()
{
labels[i]->setShown(i < argsCount);
if (i < argsCount)
- labels[i]->setText(QString("%1:").arg(m_function.argumentName(i)));
+ labels[i]->setText(TQString("%1:").arg(m_function.argumentName(i)));
quotes[i]->setChecked(true);
quotes[i]->setShown(false);
if (m_function.argumentType(i) == "bool")
@@ -336,7 +336,7 @@ void FunctionsDialog::showParameters()
combos[i]->setShown(false);
edits[i]->setShown(i < argsCount);
edits[i]->clear();
- if (m_function.argumentType(i) == "QString")
+ if (m_function.argumentType(i) == "TQString")
{
quotes[i]->setShown(i < argsCount);
}
@@ -346,24 +346,24 @@ void FunctionsDialog::showParameters()
}
}
-QString FunctionsDialog::params()
+TQString FunctionsDialog::params()
{
- QLabel* labels[MaxFunctionArgs] = {argLabel1, argLabel2, argLabel3, argLabel4, argLabel5, argLabel6};
+ TQLabel* labels[MaxFunctionArgs] = {argLabel1, argLabel2, argLabel3, argLabel4, argLabel5, argLabel6};
KLineEdit* edits[MaxFunctionArgs] = {arg1Edit, arg2Edit, arg3Edit, arg4Edit, arg5Edit, arg6Edit};
KComboBox* combos[MaxFunctionArgs] = {combo1, combo2, combo3, combo4, combo5, combo6};
- QStringList pars;
- QCheckBox* quotes[MaxFunctionArgs] = {quote1, quote2, quote3, quote4, quote5, quote6};
+ TQStringList pars;
+ TQCheckBox* quotes[MaxFunctionArgs] = {quote1, quote2, quote3, quote4, quote5, quote6};
bool params = false;
bool slotsShown = (groupComboBox->currentItem() == m_Slots);
for (int i=0; i<MaxFunctionArgs; i++)
{
if (edits[i]->isShown())
{
- QString s = edits[i]->text();
+ TQString s = edits[i]->text();
if (!s.isEmpty() || i < m_function.minArg())
{
- if (quotes[i]->isChecked() && ( (!slotsShown && m_function.argumentType(i) == "QString")
- || (slotsShown && labels[i]->text().startsWith("QString")) ) )
+ if (quotes[i]->isChecked() && ( (!slotsShown && m_function.argumentType(i) == "TQString")
+ || (slotsShown && labels[i]->text().startsWith("TQString")) ) )
s = '"' + s + '"';
pars.append(s);
}
@@ -371,7 +371,7 @@ QString FunctionsDialog::params()
} else
if (combos[i]->isShown())
{
- QString s = combos[i]->currentText();
+ TQString s = combos[i]->currentText();
if (!s.isEmpty() || i < m_function.minArg())
{
if (s != "true" && s !="false")
@@ -381,9 +381,9 @@ QString FunctionsDialog::params()
params = true;
}
}
- QString a_param = pars.join(", ");
+ TQString a_param = pars.join(", ");
if (params)
- return QString("(%1)").arg(a_param);
+ return TQString("(%1)").arg(a_param);
else
return a_param;
}
diff --git a/kommander/editor/functionsimpl.h b/kommander/editor/functionsimpl.h
index fab8661d..05df768f 100644
--- a/kommander/editor/functionsimpl.h
+++ b/kommander/editor/functionsimpl.h
@@ -15,10 +15,10 @@
#ifndef _HAVE_FUNCTIONSIMPL_H_
#define _HAVE_FUNCTIONSIMPL_H_
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqdict.h>
#include "functions.h"
#include "specialinformation.h"
@@ -27,12 +27,12 @@ class FunctionsDialog : public FunctionsDialogBase
{
Q_OBJECT
public:
- FunctionsDialog(QWidget*, const QDict<QWidget>&, bool m_useInternalParser, char* = 0, bool = true);
+ FunctionsDialog(TQWidget*, const TQDict<TQWidget>&, bool m_useInternalParser, char* = 0, bool = true);
~FunctionsDialog();
// Return current content of text box
- QString functionText() const;
+ TQString functionText() const;
// Return current function and parameters
- QString currentFunctionText();
+ TQString currentFunctionText();
public slots:
// Update list of function availabe for given group
void groupChanged(int);
@@ -44,16 +44,16 @@ public slots:
void showParameters();
private:
// Calculate current parameters
- QString params();
+ TQString params();
SpecialFunction m_function;
int m_DCOP;
int m_Slots;
- const QDict<QWidget> m_widgetList;
- QStringList m_widgetNames;
- QStringList m_widgetTypes;
+ const TQDict<TQWidget> m_widgetList;
+ TQStringList m_widgetNames;
+ TQStringList m_widgetTypes;
bool m_useInternalParser;
- QStringList m_acceptedSlots;
- QMap<QString, QString> m_slotList;
+ TQStringList m_acceptedSlots;
+ TQMap<TQString, TQString> m_slotList;
};
diff --git a/kommander/editor/globaldefs.h b/kommander/editor/globaldefs.h
index cc6ed400..aebf63c3 100644
--- a/kommander/editor/globaldefs.h
+++ b/kommander/editor/globaldefs.h
@@ -21,23 +21,23 @@
#ifndef GLOBALDEFS_H
#define GLOBALDEFS_H
-#include <qcolor.h>
+#include <tqcolor.h>
#define BOXLAYOUT_DEFAULT_MARGIN 11
#define BOXLAYOUT_DEFAULT_SPACING 6
#ifndef NO_STATIC_COLORS
-static QColor *backColor1 = 0;
-static QColor *backColor2 = 0;
-static QColor *selectedBack = 0;
+static TQColor *backColor1 = 0;
+static TQColor *backColor2 = 0;
+static TQColor *selectedBack = 0;
static void init_colors()
{
if ( backColor1 )
return;
- backColor1 = new QColor( 236, 245, 255 );
- backColor2 = new QColor( 250, 250, 250 );
- selectedBack = new QColor( 221, 221, 221 );
+ backColor1 = new TQColor( 236, 245, 255 );
+ backColor2 = new TQColor( 250, 250, 250 );
+ selectedBack = new TQColor( 221, 221, 221 );
}
#endif
diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp
index b3f17713..c11a365c 100644
--- a/kommander/editor/hierarchyview.cpp
+++ b/kommander/editor/hierarchyview.cpp
@@ -29,19 +29,19 @@
#include "propertyeditor.h"
#include "listeditor.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 <qworkspace.h>
-#include <qaccel.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 <tqworkspace.h>
+#include <tqaccel.h>
#include <klocale.h>
@@ -72,27 +72,27 @@ static const char * const folder_xpm[]={
".dddddddddddddd.",
"................"};
-QListViewItem *newItem = 0;
+TQListViewItem *newItem = 0;
-HierarchyItem::HierarchyItem( Type type, QListViewItem *parent,
- const QString &txt1, const QString &txt2, const QString &txt3 )
- : QListViewItem( parent, txt1, txt2, txt3 ), typ( type )
+HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent,
+ const TQString &txt1, const TQString &txt2, const TQString &txt3 )
+ : TQListViewItem( parent, txt1, txt2, txt3 ), typ( type )
{
}
-HierarchyItem::HierarchyItem( Type type, QListView *parent,
- const QString &txt1, const QString &txt2, const QString &txt3 )
- : QListViewItem( parent, txt1, txt2, txt3 ), typ( type )
+HierarchyItem::HierarchyItem( Type type, TQListView *parent,
+ const TQString &txt1, const TQString &txt2, const TQString &txt3 )
+ : TQListViewItem( parent, 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() == Slot &&
( txt == "init()" || txt == "destroy()" ) ) {
listView()->setUpdatesEnabled( false );
@@ -100,14 +100,14 @@ void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
setText( 0, txt + " " + i18n( "(Constructor)" ) );
else
setText( 0, txt + " " + i18n( "(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 ) {
@@ -121,7 +121,7 @@ void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
p->restore();
}
-QColor HierarchyItem::backgroundColor()
+TQColor HierarchyItem::backgroundColor()
{
updateBackColor();
return backColor;
@@ -134,7 +134,7 @@ void HierarchyItem::updateBackColor()
return;
}
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
--it;
if ( it.current() ) {
if ( ( ( HierarchyItem*)it.current() )->backColor == *backColor1 )
@@ -146,12 +146,12 @@ void HierarchyItem::updateBackColor()
}
}
-void HierarchyItem::setWidget( QWidget *w )
+void HierarchyItem::setWidget( TQWidget *w )
{
wid = w;
}
-QWidget *HierarchyItem::widget() const
+TQWidget *HierarchyItem::widget() const
{
return wid;
}
@@ -160,25 +160,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 )
{
init_colors();
@@ -189,62 +189,62 @@ 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( 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( 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 );
}
-void HierarchyList::objectClicked( QListViewItem *i )
+void HierarchyList::objectClicked( TQListViewItem *i )
{
if ( !i )
return;
- QWidget *w = findWidget( i );
+ TQWidget *w = findWidget( i );
if ( !w )
return;
if ( formWindow == w ) {
@@ -255,15 +255,15 @@ void HierarchyList::objectClicked( QListViewItem *i )
}
if ( !formWindow->widgets()->find( w ) ) {
- if ( w->parent() && w->parent()->inherits( "QWidgetStack" ) &&
+ if ( w->parent() && w->parent()->inherits( "TQWidgetStack" ) &&
w->parent()->parent() &&
- ( w->parent()->parent()->inherits( "QTabWidget" ) ||
- w->parent()->parent()->inherits( "QWizard" ) ) ) {
- if ( w->parent()->parent()->inherits( "QTabWidget" ) )
- ( (QTabWidget*)w->parent()->parent() )->showPage( w );
+ ( w->parent()->parent()->inherits( "TQTabWidget" ) ||
+ w->parent()->parent()->inherits( "TQWizard" ) ) ) {
+ if ( w->parent()->parent()->inherits( "TQTabWidget" ) )
+ ( (TQTabWidget*)w->parent()->parent() )->showPage( w );
else
( (QDesignerWizard*)w->parent()->parent() )->setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
- w = (QWidget*)w->parent()->parent();
+ w = (TQWidget*)w->parent()->parent();
formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else {
return;
@@ -276,14 +276,14 @@ void HierarchyList::objectClicked( QListViewItem *i )
formWindow->selectWidget( w, true );
}
-QWidget *HierarchyList::findWidget( QListViewItem *i )
+TQWidget *HierarchyList::findWidget( TQListViewItem *i )
{
return ( (HierarchyItem*)i )->widget();
}
-QListViewItem *HierarchyList::findItem( QWidget *w )
+TQListViewItem *HierarchyList::findItem( TQWidget *w )
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (HierarchyItem*)it.current() )->widget() == w )
return it.current();
@@ -292,28 +292,28 @@ QListViewItem *HierarchyList::findItem( QWidget *w )
return 0;
}
-QWidget *HierarchyList::current() const
+TQWidget *HierarchyList::current() const
{
if ( currentItem() )
return ( (HierarchyItem*)currentItem() )->widget();
return 0;
}
-void HierarchyList::changeNameOf( QWidget *w, const QString &name )
+void HierarchyList::changeNameOf( TQWidget *w, const TQString &name )
{
- QListViewItem *item = findItem( w );
+ TQListViewItem *item = findItem( w );
if ( !item )
return;
item->setText( 0, name );
}
-void HierarchyList::changeDatabaseOf( QWidget *w, const QString & info )
+void HierarchyList::changeDatabaseOf( TQWidget *w, const TQString & info )
{
#ifndef QT_NO_SQL
if ( !formWindow->isDatabaseAware() )
return;
- QListViewItem *item = findItem( w );
+ TQListViewItem *item = findItem( w );
if ( !item )
return;
item->setText( 2, info );
@@ -328,7 +328,7 @@ void HierarchyList::setup()
if ( !formWindow )
return;
clear();
- QWidget *w = formWindow->mainContainer();
+ TQWidget *w = formWindow->mainContainer();
#ifndef QT_NO_SQL
if ( formWindow->isDatabaseAware() ) {
if ( columns() == 2 ) {
@@ -348,25 +348,25 @@ void HierarchyList::setup()
insertObject( w, 0 );
}
-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 )
{
bool fakeMainWindow = false;
- if ( o && o->inherits( "QMainWindow" ) ) {
- QObject *cw = ( (QMainWindow*)o )->centralWidget();
+ if ( o && o->inherits( "TQMainWindow" ) ) {
+ 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 ( o->inherits( "QLayoutWidget" ) ) {
- switch ( WidgetFactory::layoutType( (QWidget*)o ) ) {
+ switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) {
case WidgetFactory::HBox:
className = "HBox";
break;
@@ -381,29 +381,29 @@ 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 ( o->parent() && o->parent()->inherits( "QWidgetStack" ) &&
+ TQString name = o->name();
+ if ( o->parent() && o->parent()->inherits( "TQWidgetStack" ) &&
o->parent()->parent() ) {
- if ( o->parent()->parent()->inherits( "QTabWidget" ) )
- name = ( (QTabWidget*)o->parent()->parent() )->tabLabel( (QWidget*)o );
- else if ( o->parent()->parent()->inherits( "QWizard" ) )
- name = ( (QWizard*)o->parent()->parent() )->title( (QWidget*)o );
+ if ( o->parent()->parent()->inherits( "TQTabWidget" ) )
+ name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
+ else if ( o->parent()->parent()->inherits( "TQWizard" ) )
+ 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 )
@@ -416,43 +416,43 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
item->setPixmap( 0, PixmapChooser::loadPixmap( "layout.xpm", PixmapChooser::Small ) );
else
item->setPixmap( 0, WidgetDatabase::iconSet( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ).
- pixmap( QIconSet::Small, QIconSet::Normal ) );
- ( (HierarchyItem*)item )->setWidget( (QWidget*)o );
+ pixmap( TQIconSet::Small, TQIconSet::Normal ) );
+ ( (HierarchyItem*)item )->setWidget( (TQWidget*)o );
- const QObjectList *l = o->children();
+ const TQObjectList *l = o->children();
if ( !l )
return;
- QObjectListIt it( *l );
+ TQObjectListIt it( *l );
it.toLast();
for ( ; it.current(); --it ) {
- if ( !it.current()->isWidgetType() || ( (QWidget*)it.current() )->isHidden() )
+ if ( !it.current()->isWidgetType() || ( (TQWidget*)it.current() )->isHidden() )
continue;
- if ( !formWindow->widgets()->find( (QWidget*)it.current() ) ) {
+ if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
if ( it.current()->parent() &&
- ( it.current()->parent()->inherits( "QTabWidget" ) ||
- it.current()->parent()->inherits( "QWizard" ) ) &&
- it.current()->inherits( "QWidgetStack" ) ) {
- QObject *obj = it.current();
- QObjectList *l2 = obj->queryList( "QWidget", 0, true, false );
+ ( it.current()->parent()->inherits( "TQTabWidget" ) ||
+ it.current()->parent()->inherits( "TQWizard" ) ) &&
+ it.current()->inherits( "TQWidgetStack" ) ) {
+ TQObject *obj = it.current();
+ TQObjectList *l2 = obj->queryList( "TQWidget", 0, true, false );
QDesignerTabWidget *tw = 0;
QDesignerWizard *dw = 0;
- if ( it.current()->parent()->inherits( "QTabWidget" ) )
+ if ( it.current()->parent()->inherits( "TQTabWidget" ) )
tw = (QDesignerTabWidget*)it.current()->parent();
- if ( it.current()->parent()->inherits( "QWizard" ) )
+ if ( it.current()->parent()->inherits( "TQWizard" ) )
dw = (QDesignerWizard*)it.current()->parent();
- QWidgetStack *stack = (QWidgetStack*)obj;
+ TQWidgetStack *stack = (TQWidgetStack*)obj;
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;
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 );
}
@@ -465,9 +465,9 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent )
item->setOpen( true );
}
-void HierarchyList::setCurrent( QWidget *w )
+void HierarchyList::setCurrent( TQWidget *w )
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (HierarchyItem*)it.current() )->widget() == w ) {
blockSignals( true );
@@ -480,13 +480,13 @@ void HierarchyList::setCurrent( QWidget *w )
}
}
-void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p )
+void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
{
if ( !i )
return;
- QWidget *w = findWidget( i );
+ TQWidget *w = findWidget( i );
if ( !w )
return;
@@ -495,15 +495,15 @@ void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p )
return;
if ( w->isVisibleTo( formWindow ) ) {
- if ( !w->inherits( "QTabWidget" ) && !w->inherits( "QWizard" ) ) {
+ if ( !w->inherits( "TQTabWidget" ) && !w->inherits( "TQWizard" ) ) {
if ( !normalMenu )
normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this );
normalMenu->popup( p );
} else {
if ( !tabWidgetMenu )
tabWidgetMenu =
- formWindow->mainWindow()->setupTabWidgetHierarchyMenu( this, SLOT( addTabPage() ),
- SLOT( removeTabPage() ) );
+ formWindow->mainWindow()->setupTabWidgetHierarchyMenu( this, TQT_SLOT( addTabPage() ),
+ TQT_SLOT( removeTabPage() ) );
tabWidgetMenu->popup( p );
}
}
@@ -511,17 +511,17 @@ void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p )
void HierarchyList::addTabPage()
{
- QWidget *w = current();
+ TQWidget *w = current();
if ( !w )
return;
- if ( w->inherits( "QTabWidget" ) ) {
- QTabWidget *tw = (QTabWidget*)w;
+ if ( w->inherits( "TQTabWidget" ) ) {
+ 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 ( w->inherits( "QWizard" ) ) {
- QWizard *wiz = (QWizard*)formWindow->mainContainer();
+ } else if ( w->inherits( "TQWizard" ) ) {
+ TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wiz->name() ), formWindow,
wiz, "Page" );
formWindow->commandHistory()->addCommand( cmd );
@@ -531,11 +531,11 @@ void HierarchyList::addTabPage()
void HierarchyList::removeTabPage()
{
- QWidget *w = current();
+ TQWidget *w = current();
if ( !w )
return;
- if ( w->inherits( "QTabWidget" ) ) {
- QTabWidget *tw = (QTabWidget*)w;
+ if ( w->inherits( "TQTabWidget" ) ) {
+ TQTabWidget *tw = (TQTabWidget*)w;
if ( tw->currentPage() ) {
QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n("Delete Page %1 of %2" ).
@@ -544,8 +544,8 @@ void HierarchyList::removeTabPage()
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
- } else if ( w->inherits( "QWizard" ) ) {
- QWizard *wiz = (QWizard*)formWindow->mainContainer();
+ } else if ( w->inherits( "TQWizard" ) ) {
+ TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) {
QDesignerWizard *dw = (QDesignerWizard*)wiz;
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" ).
@@ -584,10 +584,10 @@ 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 )
{
HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, s,
- QString::null, QString::null );
+ TQString::null, TQString::null );
if ( !pix.isNull() )
item->setPixmap( 0, pix );
item->setRenameEnabled( 0, true );
@@ -598,8 +598,8 @@ void HierarchyList::insertEntry( QListViewItem *i, const QPixmap &pix, const QSt
item->startRename( 0 );
}
-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;
@@ -617,7 +617,7 @@ void HierarchyView::clear()
listview->clear();
}
-void HierarchyView::setFormWindow( FormWindow *fw, QWidget *w )
+void HierarchyView::setFormWindow( FormWindow *fw, TQWidget *w )
{
if (fw == 0 || w == 0)
{
@@ -648,45 +648,45 @@ 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 ( w->inherits( "QMainWindow" ) )
- w2 = ( (QMainWindow*)w )->centralWidget();
+ TQWidget *w2 = w;
+ if ( w->inherits( "TQMainWindow" ) )
+ 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 );
#else
Q_UNUSED(w);
@@ -695,17 +695,17 @@ void HierarchyView::databasePropertyChanged( QWidget *w, const QStringList& info
}
-void HierarchyView::tabsChanged( QTabWidget * )
+void HierarchyView::tabsChanged( TQTabWidget * )
{
listview->setup();
}
-void HierarchyView::tabsChanged( QToolBox * )
+void HierarchyView::tabsChanged( TQToolBox * )
{
listview->setup();
}
-void HierarchyView::pagesChanged( QWizard * )
+void HierarchyView::pagesChanged( TQWizard * )
{
listview->setup();
}
diff --git a/kommander/editor/hierarchyview.h b/kommander/editor/hierarchyview.h
index 54889ec2..debdf6a6 100644
--- a/kommander/editor/hierarchyview.h
+++ b/kommander/editor/hierarchyview.h
@@ -21,10 +21,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>
class FormWindow;
@@ -52,18 +52,18 @@ public:
EventFunction
};
- HierarchyItem(Type type, QListViewItem * parent,
- const QString & txt1, const QString & txt2, const QString & txt3);
- HierarchyItem(Type type, QListView * parent,
- const QString & txt1, const QString & txt2, const QString & txt3);
+ HierarchyItem(Type type, TQListViewItem * parent,
+ const TQString & txt1, const TQString & txt2, const TQString & txt3);
+ HierarchyItem(Type type, TQListView * parent,
+ 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 setWidget(QWidget * w);
- QWidget *widget() const;
+ void setWidget(TQWidget * w);
+ TQWidget *widget() 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;}
private:
@@ -71,9 +71,9 @@ private:
void cancelRename(int col);
private:
- QColor backgroundColor();
- QColor backColor;
- QWidget *wid;
+ TQColor backgroundColor();
+ TQColor backColor;
+ TQWidget *wid;
Type typ;
};
@@ -81,42 +81,42 @@ 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(QWidget * w);
- void setOpen(QListViewItem * i, bool b);
- void changeNameOf(QWidget * w, const QString & name);
- void changeDatabaseOf(QWidget * w, const QString & info);
+ virtual void setCurrent(TQWidget * w);
+ void setOpen(TQListViewItem * i, bool b);
+ void changeNameOf(TQWidget * w, const TQString & name);
+ void changeDatabaseOf(TQWidget * w, const TQString & info);
void setFormWindow(FormWindow * fw) {formWindow = fw;}
- void drawContentsOffset(QPainter * p, int ox, int oy, int cx, int cy, int cw, int ch)
+ 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); }
- void insertEntry(QListViewItem * i, const QPixmap & pix = QPixmap(), const QString & s =
- QString::null);
+ TQListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch); }
+ 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);
- QWidget *findWidget(QListViewItem * i);
- QListViewItem *findItem(QWidget * w);
- QWidget *current() const;
+ void insertObject(TQObject * o, TQListViewItem * parent);
+ TQWidget *findWidget(TQListViewItem * i);
+ TQListViewItem *findItem(TQWidget * w);
+ TQWidget *current() const;
- private slots: virtual void objectClicked(QListViewItem * i);
- virtual void showRMBMenu(QListViewItem *, const QPoint &);
+ private slots: virtual void objectClicked(TQListViewItem * i);
+ virtual void showRMBMenu(TQListViewItem *, const TQPoint &);
protected:
FormWindow * formWindow;
- QPopupMenu *normalMenu, *tabWidgetMenu;
+ TQPopupMenu *normalMenu, *tabWidgetMenu;
bool deselect;
};
@@ -125,28 +125,28 @@ class HierarchyView : public QTabWidget
Q_OBJECT
public:
- HierarchyView( QWidget *parent );
+ HierarchyView( TQWidget *parent );
~HierarchyView();
- void setFormWindow( FormWindow *fw, QWidget *w );
+ void setFormWindow( FormWindow *fw, TQWidget *w );
FormWindow *formWindow() const;
void clear();
- 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 tabsChanged( QToolBox *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 tabsChanged( TQToolBox *w );
+ void pagesChanged( TQWizard *w );
void rebuild();
void closed( FormWindow *fw );
protected slots:
protected:
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
signals:
void hidden();
diff --git a/kommander/editor/iconvieweditorimpl.cpp b/kommander/editor/iconvieweditorimpl.cpp
index f7552cee..9bff67ae 100644
--- a/kommander/editor/iconvieweditorimpl.cpp
+++ b/kommander/editor/iconvieweditorimpl.cpp
@@ -23,19 +23,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 );
@@ -43,9 +43,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() )
@@ -54,7 +54,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 );
}
@@ -66,7 +66,7 @@ void IconViewEditor::deleteCurrentItem()
preview->setSelected( preview->currentItem(), true );
}
-void IconViewEditor::currentItemChanged( QIconViewItem *i )
+void IconViewEditor::currentItemChanged( TQIconViewItem *i )
{
itemText->blockSignals( true );
itemText->setText( "" );
@@ -90,7 +90,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;
@@ -111,8 +111,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() )
@@ -132,11 +132,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;
@@ -151,7 +151,7 @@ void IconViewEditor::deletePixmap()
if ( !preview->currentItem() )
return;
- preview->currentItem()->setPixmap( QPixmap() );
+ preview->currentItem()->setPixmap( TQPixmap() );
itemPixmap->setText( "" );
itemDeletePixmap->setEnabled( false );
}
diff --git a/kommander/editor/iconvieweditorimpl.h b/kommander/editor/iconvieweditorimpl.h
index 120f0bb6..ffde0403 100644
--- a/kommander/editor/iconvieweditorimpl.h
+++ b/kommander/editor/iconvieweditorimpl.h
@@ -30,13 +30,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();
@@ -44,7 +44,7 @@ protected slots:
void deletePixmap();
private:
- QIconView *iconview;
+ TQIconView *iconview;
FormWindow *formwindow;
};
diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp
index da4669f1..b0e226c0 100644
--- a/kommander/editor/layout.cpp
+++ b/kommander/editor/layout.cpp
@@ -23,14 +23,14 @@
#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 <tqlayout.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqbitmap.h>
+#include <tqsplitter.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->();
}
@@ -53,7 +53,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 );
@@ -70,11 +70,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
@@ -88,13 +88,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();
@@ -105,7 +105,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 );
@@ -120,7 +120,7 @@ void Layout::setup()
layoutBase != formWindow->mainContainer() ) )
) ) {
widgets.clear();
- startPoint = QPoint( 0, 0 );
+ startPoint = TQPoint( 0, 0 );
return;
}
@@ -134,11 +134,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
@@ -149,23 +149,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 || layoutBase->inherits( "QLayoutWidget" ) || layoutBase->inherits( "QSplitter" );
+ needReparent = needMove || layoutBase->inherits( "QLayoutWidget" ) || layoutBase->inherits( "TQSplitter" );
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 );
@@ -174,11 +174,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 )
@@ -188,9 +188,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 );
}
}
@@ -199,7 +199,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;
@@ -208,9 +208,9 @@ void Layout::undoLayout()
}
formWindow->selectWidget( layoutBase, false );
WidgetFactory::deleteLayout( layoutBase );
- if ( parent != layoutBase && !layoutBase->inherits( "QMainWindow" ) ) {
+ if ( parent != layoutBase && !layoutBase->inherits( "TQMainWindow" ) ) {
layoutBase->hide();
- QString n = layoutBase->name();
+ TQString n = layoutBase->name();
n.prepend( "qt_dead_widget_" );
layoutBase->setName( n );
} else {
@@ -224,35 +224,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 {
@@ -267,12 +267,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() )
@@ -282,7 +282,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 )
@@ -303,11 +303,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() );
@@ -319,8 +319,8 @@ void HorizontalLayout::doLayout()
w->show();
}
- if ( layoutBase->inherits( "QSplitter" ) )
- ( (QSplitter*)layoutBase )->setOrientation( Qt::Horizontal );
+ if ( layoutBase->inherits( "TQSplitter" ) )
+ ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal );
finishLayout( needMove, layout );
}
@@ -331,12 +331,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() )
@@ -346,7 +346,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 )
@@ -367,11 +367,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() );
@@ -383,8 +383,8 @@ void VerticalLayout::doLayout()
w->show();
}
- if ( layoutBase->inherits( "QSplitter" ) )
- ( (QSplitter*)layoutBase )->setOrientation( Qt::Vertical );
+ if ( layoutBase->inherits( "TQSplitter" ) )
+ ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical );
finishLayout( needMove, layout );
}
@@ -399,20 +399,20 @@ 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; }
+ 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; }
int numRows() const { return nrows; }
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;
@@ -422,7 +422,7 @@ private:
void extendRight();
void extendUp();
void extendDown();
- QWidget** cells;
+ TQWidget** cells;
bool* cols;
bool* rows;
int nrows, ncols;
@@ -432,7 +432,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 ];
@@ -448,7 +448,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++;
@@ -457,20 +457,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 );
@@ -520,7 +520,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);
@@ -531,7 +531,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);
@@ -562,7 +562,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);
@@ -593,7 +593,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);
@@ -623,7 +623,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);
@@ -678,7 +678,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++ ) {
@@ -714,7 +714,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;
@@ -738,12 +738,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, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 );
} else {
@@ -767,8 +767,8 @@ void GridLayout::setup()
void GridLayout::buildGrid()
{
- QWidget* w;
- QRect br;
+ TQWidget* w;
+ TQRect br;
for ( w = widgets.first(); w; w = widgets.next() )
br = br.unite( w->geometry() );
@@ -779,12 +779,12 @@ void GridLayout::buildGrid()
int r,c;
for ( r = 0; r < grid->numRows(); r++ ) {
for ( c = 0; c < grid->numCols(); c++ ) {
- QPoint p( br.left() + c * resolution.width(),
+ TQPoint p( br.left() + c * resolution.width(),
br.top() + r* resolution.height() );
- QRect cr( p, resolution );
+ TQRect cr( p, resolution );
for ( w = widgets.first(); w; w = widgets.next() ) {
// check that the overlap is significant
- QRect intersect = cr.intersect( w->geometry() );
+ TQRect intersect = cr.intersect( w->geometry() );
if ( intersect.size().width() > resolution.width()/2 &&
intersect.size().height() > resolution.height()/2 ) {
grid->setCell( r, c, w );
@@ -801,17 +801,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 ) {
@@ -843,37 +843,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 );
}
@@ -892,14 +892,14 @@ int Spacer::alignment() const
return AlignVCenter;
}
-QSize Spacer::minimumSize() const
+TQSize Spacer::minimumSize() const
{
- return QSize( 20, 20 );
+ return TQSize( 20, 20 );
}
-QSize Spacer::sizeHint() const
+TQSize Spacer::sizeHint() const
{
- QSize s = sh.expandedTo( QSize(0,0) );
+ TQSize s = sh.expandedTo( TQSize(0,0) );
if ( sizeType() == Expanding )
if ( orient == Horizontal )
s.rheight() = 0;
@@ -909,7 +909,7 @@ QSize Spacer::sizeHint() const
}
-void Spacer::setSizeHint( const QSize &s )
+void Spacer::setSizeHint( const TQSize &s )
{
sh = s;
if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
@@ -931,7 +931,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() );
}
@@ -941,16 +941,16 @@ 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_ );
}
#include "layout.moc"
diff --git a/kommander/editor/layout.h b/kommander/editor/layout.h
index 06dce7ac..e9874ca6 100644
--- a/kommander/editor/layout.h
+++ b/kommander/editor/layout.h
@@ -21,12 +21,12 @@
#ifndef LAYOUT_H
#define LAYOUT_H
-#include <qwidget.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qlayout.h>
-#include <qwidgetlist.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqlayout.h>
+#include <tqwidgetlist.h>
class FormWindow;
class QPaintEvent;
@@ -36,23 +36,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;
@@ -67,7 +67,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();
@@ -79,7 +79,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();
@@ -93,7 +93,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();
@@ -103,7 +103,7 @@ protected:
protected:
void buildGrid();
- QSize resolution;
+ TQSize resolution;
Grid* grid;
};
@@ -112,12 +112,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,
@@ -131,36 +131,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
@@ -173,7 +173,7 @@ public:
int colspan;
};
- QMap<QWidget*, Item> items;
+ TQMap<TQWidget*, Item> items;
};
diff --git a/kommander/editor/listboxeditorimpl.cpp b/kommander/editor/listboxeditorimpl.cpp
index 5a2aac9d..1f820081 100644
--- a/kommander/editor/listboxeditorimpl.cpp
+++ b/kommander/editor/listboxeditorimpl.cpp
@@ -24,19 +24,19 @@
#include "pixmapchooser.h"
#include "command.h"
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlineedit.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 );
@@ -44,12 +44,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() )
@@ -58,7 +58,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 );
}
@@ -70,7 +70,7 @@ void ListBoxEditor::deleteCurrentItem()
preview->setSelected( preview->currentItem(), true );
}
-void ListBoxEditor::currentItemChanged( QListBoxItem *i )
+void ListBoxEditor::currentItemChanged( TQListBoxItem *i )
{
itemText->blockSignals( true );
itemText->setText( "" );
@@ -95,7 +95,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;
@@ -121,8 +121,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() )
@@ -142,16 +142,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 );
}
@@ -161,14 +161,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
@@ -185,14 +185,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
@@ -209,7 +209,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/kommander/editor/listboxeditorimpl.h b/kommander/editor/listboxeditorimpl.h
index 294ce33e..8177feb5 100644
--- a/kommander/editor/listboxeditorimpl.h
+++ b/kommander/editor/listboxeditorimpl.h
@@ -31,13 +31,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();
@@ -47,7 +47,7 @@ protected slots:
void deletePixmap();
private:
- QListBox *listbox;
+ TQListBox *listbox;
FormWindow *formwindow;
};
diff --git a/kommander/editor/listvieweditorimpl.cpp b/kommander/editor/listvieweditorimpl.cpp
index 3f30106a..fb2f0a6a 100644
--- a/kommander/editor/listvieweditorimpl.cpp
+++ b/kommander/editor/listvieweditorimpl.cpp
@@ -24,23 +24,23 @@
#include "pixmapchooser.h"
#include "command.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 );
@@ -92,8 +92,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 );
@@ -108,11 +108,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;
@@ -135,7 +135,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 ) );
@@ -155,7 +155,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 )
@@ -177,8 +177,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 );
@@ -187,7 +187,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 ) {
@@ -223,13 +223,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 );
@@ -237,11 +237,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 );
@@ -258,7 +258,7 @@ void ListViewEditor::deleteColumnClicked()
-void ListViewEditor::currentItemChanged( QListViewItem *i )
+void ListViewEditor::currentItemChanged( TQListViewItem *i )
{
if ( !i ) {
itemText->setEnabled( false );
@@ -277,7 +277,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 ) );
@@ -293,7 +293,7 @@ void ListViewEditor::displayItem( QListViewItem *i, int col )
void ListViewEditor::itemColChanged( int col )
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
@@ -303,7 +303,7 @@ void ListViewEditor::itemColChanged( int col )
void ListViewEditor::itemDeleteClicked()
{
- QListViewItem *i = itemsPreview->currentItem();
+ TQListViewItem *i = itemsPreview->currentItem();
if ( !i )
return;
@@ -316,12 +316,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 )
@@ -331,14 +331,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, "Item" );
itemsPreview->setCurrentItem( item );
itemsPreview->setSelected( item, true );
@@ -346,13 +346,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, "Subitem" );
itemsPreview->setCurrentItem( item );
@@ -361,38 +361,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 );
@@ -400,12 +400,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 )
@@ -415,19 +415,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;
@@ -440,19 +440,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 );
}
@@ -462,12 +462,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();
@@ -480,19 +480,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 );
}
@@ -502,19 +502,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 );
}
@@ -533,8 +533,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;
@@ -551,12 +551,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 );
}
@@ -564,7 +564,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" ) ) {
diff --git a/kommander/editor/listvieweditorimpl.h b/kommander/editor/listvieweditorimpl.h
index 91da67c8..37f9154e 100644
--- a/kommander/editor/listvieweditorimpl.h
+++ b/kommander/editor/listvieweditorimpl.h
@@ -23,9 +23,9 @@
#include "listvieweditor.h"
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
class FormWindow;
@@ -34,7 +34,7 @@ class ListViewEditor : public ListViewEditorBase
Q_OBJECT
public:
- ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw );
+ ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw );
protected slots:
void applyClicked();
@@ -43,10 +43,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();
@@ -55,20 +55,20 @@ 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 initTabPage( const TQString &page );
private:
struct Column
{
- QListBoxItem *item;
- QString text;
- QPixmap pixmap;
+ TQListBoxItem *item;
+ TQString text;
+ TQPixmap pixmap;
bool clickable, resizable;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Column& ) const { return FALSE; }
@@ -78,13 +78,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/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp
index a90a3b07..af062f16 100644
--- a/kommander/editor/mainwindow.cpp
+++ b/kommander/editor/mainwindow.cpp
@@ -46,25 +46,25 @@
#include "wizardeditorimpl.h"
#include "workspace.h"
-#include <qaccel.h>
-#include <qbuffer.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qfeatures.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qmetaobject.h>
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qstylefactory.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
-#include <qwizard.h>
-#include <qworkspace.h>
+#include <tqaccel.h>
+#include <tqbuffer.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqfeatures.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqmetaobject.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqstylefactory.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
+#include <tqwizard.h>
+#include <tqworkspace.h>
#include "qcompletionedit.h"
@@ -88,25 +88,25 @@
#include <kparts/partmanager.h>
#include <kio/netaccess.h>
-extern QMap<QWidget*, QString> *qwf_functions;
-extern QMap<QWidget*, QString> *qwf_forms;
-extern QString *qwf_language;
+extern TQMap<TQWidget*, TQString> *qwf_functions;
+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 void set_splash_status(const TQString &txt);
/*### static bool tbSettingsRead = false; */
MainWindow *MainWindow::self = 0;
-QString assistantPath()
+TQString assistantPath()
{
return "assistant";
}
-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);
@@ -121,7 +121,7 @@ MainWindow::MainWindow(bool asClient)
docPath("$QTDIR/doc/html"), client(asClient), databaseAutoEdit(false), previewing(false)
{
m_partManager = new KParts::PartManager(this);
- //connect(m_partManager, SIGNAL(activePartChanged(KParts::Part * )), this, SLOT(slotActivePartChanged(KParts::Part * )));
+ //connect(m_partManager, TQT_SIGNAL(activePartChanged(KParts::Part * )), this, TQT_SLOT(slotActivePartChanged(KParts::Part * )));
init_colors();
inDebugMode = true; //debugging kommander
@@ -138,7 +138,7 @@ MainWindow::MainWindow(bool asClient)
wspace = 0;
statusBar()->clear();
- statusBar()->addWidget(new QLabel(i18n("Welcome to the Kommander Editor"), statusBar()), 1);
+ statusBar()->addWidget(new TQLabel(i18n("Welcome to the Kommander Editor"), statusBar()), 1);
setupMDI();
setupFileActions();
@@ -165,11 +165,11 @@ MainWindow::MainWindow(bool asClient)
lastPressWidget = 0;
kapp->installEventFilter(this);
- QSize as(kapp->desktop()->size());
- as -= QSize(30, 30);
- resize(QSize(1200, 1000).boundedTo(as));
+ TQSize as(kapp->desktop()->size());
+ as -= TQSize(30, 30);
+ resize(TQSize(1200, 1000).boundedTo(as));
- connect(kapp->clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+ connect(kapp->clipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged()));
clipboardChanged();
layoutChilds = false;
layoutSelected = false;
@@ -178,25 +178,25 @@ MainWindow::MainWindow(bool asClient)
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("Dialog"), 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;
assistant = new AssistProc(this, "Internal Assistant", assistantPath());
statusBar()->setSizeGripEnabled(true);
SpecialInformation::registerSpecials();
- backupTimer = new QTimer(this);
- connect(backupTimer, SIGNAL(timeout()), this, SLOT(slotCreateBackups()));
+ backupTimer = new TQTimer(this);
+ connect(backupTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCreateBackups()));
backupTimer->start(1000*60*5); //fire it every five minutes
//createGUI(0);
@@ -209,9 +209,9 @@ MainWindow::~MainWindow()
void MainWindow::setupMDI()
{
- KDockWidget* toolDock = createDockWidget("Workspace", QPixmap(), 0L, "main_workspace");
- QVBox *vbox = new QVBox(toolDock);
- vbox->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ KDockWidget* toolDock = createDockWidget("Workspace", TQPixmap(), 0L, "main_workspace");
+ TQVBox *vbox = new TQVBox(toolDock);
+ vbox->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
vbox->setMargin(1);
vbox->setLineWidth(1);
@@ -221,27 +221,27 @@ void MainWindow::setupMDI()
setView(toolDock);
setMainDockWidget(toolDock);
- qworkspace = new QWorkspace(vbox);
+ qworkspace = new TQWorkspace(vbox);
qworkspace->setBackgroundMode(PaletteDark);
qworkspace->setBackgroundPixmap(PixmapChooser::loadPixmap("background.png",
PixmapChooser::NoSize));
- qworkspace->setPaletteBackgroundColor(QColor(238, 238, 238));
+ qworkspace->setPaletteBackgroundColor(TQColor(238, 238, 238));
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);
}
void MainWindow::setupPropertyEditor()
{
- KDockWidget *dw = createDockWidget("Property Editor", QPixmap(), 0, i18n("Properties"));
+ KDockWidget *dw = createDockWidget("Property Editor", TQPixmap(), 0, i18n("Properties"));
propertyEditor = new PropertyEditor(dw);
//addToolBar(dw, Qt::DockLeft);
dw->setWidget(propertyEditor);
dw->manualDock(getMainDockWidget(), KDockWidget::DockLeft, 20);
dw->setCaption(i18n("Property Editor"));
- QWhatsThis::add(propertyEditor,
+ TQWhatsThis::add(propertyEditor,
i18n("<h2>The Property Editor</h2>"
"<p>You can change the appearance and behavior of the selected widget in the "
"property editor.</p>"
@@ -265,11 +265,11 @@ void MainWindow::setupHierarchyView()
{
if (hierarchyView)
return;
- KDockWidget *dw = createDockWidget("Object Explorer", QPixmap(), 0, i18n("Widgets"));
+ KDockWidget *dw = createDockWidget("Object Explorer", TQPixmap(), 0, i18n("Widgets"));
hierarchyView = new HierarchyView(dw);
dw->setWidget(hierarchyView);
dw->setCaption(i18n("Object Explorer"));
- QWhatsThis::add(hierarchyView,
+ TQWhatsThis::add(hierarchyView,
i18n("<h2>The Object Explorer</h2>"
"<p>The Object Explorer provides an overview of the relationships "
"between the widgets in a form. You can use the clipboard functions using "
@@ -281,29 +281,29 @@ void MainWindow::setupHierarchyView()
void MainWindow::setupWorkspace()
{
- KDockWidget *dw = createDockWidget("Dialogs", QPixmap(), 0, i18n("Dialogs"));
- QVBox *vbox = new QVBox(dw);
+ KDockWidget *dw = createDockWidget("Dialogs", TQPixmap(), 0, i18n("Dialogs"));
+ 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);
dw->setWidget(vbox);
dw->setCaption(i18n("Dialogs"));
- QWhatsThis::add(wspace, i18n("<h2>The File Overview Window</h2>"
+ TQWhatsThis::add(wspace, i18n("<h2>The File Overview Window</h2>"
"<p>The File Overview Window displays all open dialogs.</p>"));
}
void MainWindow::setupActionEditor()
{
- KDockWidget *dw = createDockWidget("Action Editor", QPixmap(), 0, i18n("Actions"));
+ KDockWidget *dw = createDockWidget("Action Editor", TQPixmap(), 0, i18n("Actions"));
actionEditor = new ActionEditor(dw, "ActionEditor");
//addToolBar(dw, Qt::DockLeft);
dw->setWidget(actionEditor);
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 "
@@ -313,7 +313,7 @@ void MainWindow::setupActionEditor()
void MainWindow::setupMessageLog()
{
- KDockWidget *dw = createDockWidget("Message Log", QPixmap(), 0, i18n("Message Log"));
+ KDockWidget *dw = createDockWidget("Message Log", TQPixmap(), 0, i18n("Message Log"));
messageLog = new MessageLog(dw, "MessageLog");
dw->setWidget(messageLog);
dw->setCaption(i18n("Message Log"));
@@ -322,7 +322,7 @@ void MainWindow::setupMessageLog()
void MainWindow::setupRMBMenus()
{
- rmbWidgets = new QPopupMenu(this);
+ rmbWidgets = new TQPopupMenu(this);
actionEditCut->plug(rmbWidgets);
actionEditCopy->plug(rmbWidgets);
actionEditPaste->plug(rmbWidgets);
@@ -338,7 +338,7 @@ void MainWindow::setupRMBMenus()
actionEditBreakLayout->plug(rmbWidgets);
rmbWidgets->insertSeparator();
actionEditConnections->plug(rmbWidgets);
- rmbFormWindow = new QPopupMenu(this);
+ rmbFormWindow = new TQPopupMenu(this);
actionEditPaste->plug(rmbFormWindow);
actionEditSelectAll->plug(rmbFormWindow);
actionEditAccels->plug(rmbFormWindow);
@@ -368,20 +368,20 @@ int MainWindow::currentTool() const
{
if (!actionCurrentTool)
return POINTER_TOOL;
- return QString::fromLatin1(actionCurrentTool->name()).toInt();
+ return TQString::fromLatin1(actionCurrentTool->name()).toInt();
}
void MainWindow::slotCreateBackups()
{
//create a backup of the opened forms
- QWidgetList windows = qworkspace->windowList(QWorkspace::StackingOrder);
+ TQWidgetList windows = qworkspace->windowList(TQWorkspace::StackingOrder);
for (int i = 0; i < (int)windows.count(); ++i)
{
FormWindow* form = dynamic_cast<FormWindow*>(windows.at(i));
if (!form || !form->formFile())
continue;
- QString fileName = form->formFile()->fileName();
- QString backupName = fileName + ".backup";
+ TQString fileName = form->formFile()->fileName();
+ TQString backupName = fileName + ".backup";
bool modified = form->formFile()->isModified();
if (form->formFile()->hasTempFileName())
continue; //no need to create a backup
@@ -410,9 +410,9 @@ void MainWindow::runForm()
if (!form || !form->formFile())
return;
- QObjectList *editors = queryList("AssocTextEditor");
- QObjectListIt it(*editors);
- QObject *editor;
+ TQObjectList *editors = queryList("AssocTextEditor");
+ TQObjectListIt it(*editors);
+ TQObject *editor;
while ((editor = it.current()) != 0L)
{
@@ -431,7 +431,7 @@ void MainWindow::runForm()
m_backupName = m_fileName + ".running";
m_modified = form->formFile()->isModified();
- bool readOnlyFile = !QFileInfo(m_fileName).isWritable();
+ bool readOnlyFile = !TQFileInfo(m_fileName).isWritable();
struct stat statbuf;
::stat(m_fileName.local8Bit(), &statbuf);
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
@@ -451,12 +451,12 @@ void MainWindow::runForm()
::chmod(m_fileName.local8Bit(), S_IRWXU);
KProcess* process = new KProcess;
process->setUseShell(true);
- (*process) << "kmdr-executor" << QString("\"%1\"").arg(form->formFile()->fileName());
- connect(process, SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
- SLOT(receivedStdout(KProcess*, char*, int)));
- connect(process, SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
- SLOT(receivedStderr(KProcess*, char*, int)));
- connect(process, SIGNAL(processExited(KProcess*)), SLOT(closeRunningForm(KProcess*)));
+ (*process) << "kmdr-executor" << TQString("\"%1\"").arg(form->formFile()->fileName());
+ connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
+ TQT_SLOT(receivedStdout(KProcess*, char*, int)));
+ connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
+ TQT_SLOT(receivedStderr(KProcess*, char*, int)));
+ connect(process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(closeRunningForm(KProcess*)));
messageLog->clear(MessageLog::All);
previewing = process->start(KProcess::NotifyOnExit, KProcess::AllOutput);
}
@@ -474,9 +474,9 @@ void MainWindow::runForm4()
if (!form || !form->formFile())
return;
- QObjectList *editors = queryList("AssocTextEditor");
- QObjectListIt it(*editors);
- QObject *editor;
+ TQObjectList *editors = queryList("AssocTextEditor");
+ TQObjectListIt it(*editors);
+ TQObject *editor;
while ((editor = it.current()) != 0L)
{
@@ -495,7 +495,7 @@ void MainWindow::runForm4()
m_backupName = m_fileName + ".running";
m_modified = form->formFile()->isModified();
- bool readOnlyFile = !QFileInfo(m_fileName).isWritable();
+ bool readOnlyFile = !TQFileInfo(m_fileName).isWritable();
struct stat statbuf;
::stat(m_fileName.local8Bit(), &statbuf);
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
@@ -515,12 +515,12 @@ void MainWindow::runForm4()
::chmod(m_fileName.local8Bit(), S_IRWXU);
KProcess* process = new KProcess;
process->setUseShell(true);
- (*process) << "kommander" << QString("\"%1\"").arg(form->formFile()->fileName());
- connect(process, SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
- SLOT(receivedStdout(KProcess*, char*, int)));
- connect(process, SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
- SLOT(receivedStderr(KProcess*, char*, int)));
- connect(process, SIGNAL(processExited(KProcess*)), SLOT(closeRunningForm(KProcess*)));
+ (*process) << "kommander" << TQString("\"%1\"").arg(form->formFile()->fileName());
+ connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
+ TQT_SLOT(receivedStdout(KProcess*, char*, int)));
+ connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
+ TQT_SLOT(receivedStderr(KProcess*, char*, int)));
+ connect(process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(closeRunningForm(KProcess*)));
messageLog->clear(MessageLog::All);
previewing = process->start(KProcess::NotifyOnExit, KProcess::AllOutput);
}
@@ -532,7 +532,7 @@ void MainWindow::closeRunningForm(KProcess* process)
previewing = false;
delete process;
- if (QFileInfo(m_backupName).exists())
+ if (TQFileInfo(m_backupName).exists())
{
struct stat statbuf;
::stat(m_fileName.local8Bit(), &statbuf);
@@ -542,7 +542,7 @@ void MainWindow::closeRunningForm(KProcess* process)
}
}
-void MainWindow::showProperties(QObject *o)
+void MainWindow::showProperties(TQObject *o)
{
if (!o->isWidgetType()) {
propertyEditor->setWidget(o, lastActiveFormWindow);
@@ -552,7 +552,7 @@ 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) {
@@ -575,24 +575,24 @@ void MainWindow::resetTool()
emit currentToolChanged();
}
-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 (!o || !e || !o->isWidgetType())
- return QMainWindow::eventFilter(o, e);
+ return TQMainWindow::eventFilter(o, e);
- QWidget *w = 0;
+ TQWidget *w = 0;
bool passiveInteractor = WidgetFactory::isPassiveInteractor(o);
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 (w->inherits("PropertyList"))
break;
@@ -600,229 +600,229 @@ 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() &&
qWorkspace()->activeWindow()->inherits("SourceEditor")) {
- ((QKeyEvent*)e)->ignore();
+ ((TQKeyEvent*)e)->ignore();
return true;
}
}
break;
- case QEvent::MouseButtonPress:
- if (((QMouseEvent*)e)->button() == MidButton && dynamic_cast<KommanderWidget *>(o))
+ case TQEvent::MouseButtonPress:
+ if (((TQMouseEvent*)e)->button() == MidButton && dynamic_cast<KommanderWidget *>(o))
{
- AssocTextEditor *editor = new AssocTextEditor((QWidget*)o, formWindow(), propertyEditor, m_partManager,
+ AssocTextEditor *editor = new AssocTextEditor((TQWidget*)o, formWindow(), propertyEditor, m_partManager,
this, "AssocTextEditor", false); //deletes itself!
editor->show();
- ((QKeyEvent*)e)->accept();
+ ((TQKeyEvent*)e)->accept();
return true;
}
- case QEvent::ContextMenu:
+ case TQEvent::ContextMenu:
if (o->inherits("QDesignerPopupMenu"))
break;
if (o && currentTool() == POINTER_TOOL && (o->inherits("QDesignerMenuBar") ||
o->inherits("QDesignerToolBar") ||
- (o->inherits("QComboBox") || o->inherits("QToolButton") || o->inherits("QDesignerToolBarSeparator")) &&
+ (o->inherits("TQComboBox") || o->inherits("TQToolButton") || o->inherits("QDesignerToolBarSeparator")) &&
o->parent() && o->parent()->inherits("QDesignerToolBar"))) {
- QWidget *w = (QWidget*)o;
- if (w->inherits("QToolButton") || w->inherits("QComboBox") || w->inherits("QDesignerToolBarSeparator"))
+ TQWidget *w = (TQWidget*)o;
+ if (w->inherits("TQToolButton") || w->inherits("TQComboBox") || w->inherits("QDesignerToolBarSeparator"))
w = w->parentWidget();
- QWidget *pw = w->parentWidget();
+ TQWidget *pw = w->parentWidget();
while (pw) {
if (pw->inherits("FormWindow")) {
((FormWindow*)pw)->emitShowProperties(w);
if (!o->inherits("QDesignerToolBar"))
- return !o->inherits("QToolButton") && !o->inherits("QMenuBar") &&
- !o->inherits("QComboBox") && !o->inherits("QDesignerToolBarSeparator");
+ return !o->inherits("TQToolButton") && !o->inherits("TQMenuBar") &&
+ !o->inherits("TQComboBox") && !o->inherits("QDesignerToolBarSeparator");
}
pw = pw->parentWidget();
}
}
if (o && (o->inherits("QDesignerToolBar") || o->inherits("QDockWindowHandle"))
- && e->type() == QEvent::ContextMenu)
+ && e->type() == TQEvent::ContextMenu)
break;
if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
break;
- if (o && o->inherits("QSizeGrip"))
+ if (o && o->inherits("TQSizeGrip"))
break;
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
if (!w->hasFocus())
w->setFocus();
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)
return true;
return !passiveInteractor;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
lastPressWidget = 0;
if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
break;
- if (o && o->inherits("QSizeGrip"))
+ if (o && o->inherits("TQSizeGrip"))
break;
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
if (!passiveInteractor)
- ((FormWindow*)w)->handleMouseRelease((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o));
+ ((FormWindow*)w)->handleMouseRelease((TQMouseEvent*)e, ((FormWindow*)w)->designerWidget(o));
if (passiveInteractor) {
selectionChanged();
- QTimer::singleShot(0, formWindow(), SLOT(visibilityChanged()));
+ TQTimer::singleShot(0, formWindow(), TQT_SLOT(visibilityChanged()));
}
return !passiveInteractor;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
break;
w = isAFormWindowChild(o);
- if (lastPressWidget != (QWidget*)o && w &&
+ if (lastPressWidget != (TQWidget*)o && w &&
!o->inherits("SizeHandle") && !o->inherits("OrderIndicator") &&
- !o->inherits("QPopupMenu") && !o->inherits("QMenuBar") &&
- !o->inherits("QSizeGrip"))
+ !o->inherits("TQPopupMenu") && !o->inherits("TQMenuBar") &&
+ !o->inherits("TQSizeGrip"))
return true;
- if (o && o->inherits("QSizeGrip"))
+ if (o && o->inherits("TQSizeGrip"))
break;
- if (lastPressWidget != (QWidget*)o ||
+ if (lastPressWidget != (TQWidget*)o ||
(!w || o->inherits("SizeHandle") || o->inherits("OrderIndicator")))
break;
if (!passiveInteractor)
- ((FormWindow*)w)->handleMouseMove((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o));
+ ((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 (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
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)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) {
- if (o && o->inherits("QToolButton") && ((QToolButton*)o)->isOn() &&
- o->parent() && o->parent()->inherits("QToolBar") && formWindow())
+ if (o && o->inherits("TQToolButton") && ((TQToolButton*)o)->isOn() &&
+ o->parent() && o->parent()->inherits("TQToolBar") && formWindow())
formWindow()->setToolFixed();
break;
}
if (currentTool() == ORDER_TOOL) {
- ((FormWindow*)w)->handleMouseDblClick((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o));
+ ((FormWindow*)w)->handleMouseDblClick((TQMouseEvent*)e, ((FormWindow*)w)->designerWidget(o));
return true;
}
if (!WidgetFactory::isPassiveInteractor(o))
return openEditor(((FormWindow*)w)->designerWidget(o), (FormWindow*)w);
return true;
- case QEvent::KeyRelease:
+ case TQEvent::KeyRelease:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
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)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
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)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("QDesignerMenuBar"))
break;
return true;
- case QEvent::Resize:
- case QEvent::Move:
+ case TQEvent::Resize:
+ case TQEvent::Move:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
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:
+ case TQEvent::Close:
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)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
return true;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
if (!o->inherits("FormWindow") && isAFormWindowChild(o))
return true;
break;
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
if (!o->inherits("FormWindow") && 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 (o->parent() && o->parent()->inherits("QWizard") && !o->inherits("QPushButton"))
+ if (o->parent() && o->parent()->inherits("TQWizard") && !o->inherits("TQPushButton"))
return 0;
while (o) {
if (o->inherits("FormWindow"))
- 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 (o->inherits("QDesignerToolBar"))
- return (QWidget*)o;
+ return (TQWidget*)o;
if (o->inherits("FormWindow"))
return 0;
o = o->parent();
@@ -847,7 +847,7 @@ FormWindow *MainWindow::formWindow()
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 "
@@ -859,16 +859,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 &)));
fw->show();
fw->currentToolChanged();
@@ -897,9 +897,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 (w && w->inherits("FormWindow"))
{
FormWindow *fw = (FormWindow *) w;
@@ -934,7 +934,7 @@ 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();
@@ -947,7 +947,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)
{
actionEditUndo->setEnabled(undoAvailable);
actionEditRedo->setEnabled(redoAvailable);
@@ -969,15 +969,15 @@ void MainWindow::updateUndoRedo(bool undoAvailable, bool redoAvailable,
}
}
-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<int> ids;
- QMap<QString, int> commands;
+ TQValueList<int> ids;
+ TQMap<TQString, int> commands;
setupRMBSpecialCommands(ids, commands, fw);
setupRMBProperties(ids, commands, fw);
@@ -988,14 +988,14 @@ void MainWindow::popupFormWindowMenu(const QPoint & gp, FormWindow *fw)
handleRMBProperties(r, commands, fw);
handleRMBSpecialCommands(r, commands, fw);
- for (QValueList<int>::Iterator i = ids.begin(); i != ids.end(); ++i)
+ for (TQValueList<int>::Iterator 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<int> ids;
- QMap<QString, int> commands;
+ TQValueList<int> ids;
+ TQMap<TQString, int> commands;
setupRMBSpecialCommands(ids, commands, w);
setupRMBProperties(ids, commands, w);
@@ -1006,25 +1006,25 @@ void MainWindow::popupWidgetMenu(const QPoint &gp, FormWindow * /*fw*/, QWidget
handleRMBProperties(r, commands, w);
handleRMBSpecialCommands(r, commands, w);
- for (QValueList<int>::Iterator i = ids.begin(); i != ids.end(); ++i)
+ for (TQValueList<int>::Iterator i = ids.begin(); i != ids.end(); ++i)
rmbWidgets->removeItem(*i);
}
-void MainWindow::setupRMBProperties(QValueList<int> &ids, QMap<QString, int> &props, QWidget *w)
+void MainWindow::setupRMBProperties(TQValueList<int> &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) ||
@@ -1038,7 +1038,7 @@ void MainWindow::setupRMBProperties(QValueList<int> &ids, QMap<QString, int> &pr
ids << (id = rmbWidgets->insertItem(i18n("Choose Pixmap..."), -1, 0));
props.insert("pixmap", id);
}
- if (text && text->designable(w) && !w->inherits("QTextEdit")) {
+ if (text && text->designable(w) && !w->inherits("TQTextEdit")) {
ids << (id = rmbWidgets->insertItem(i18n("Edit Text..."), -1, 0));
props.insert("text", id);
}
@@ -1053,7 +1053,7 @@ void MainWindow::setupRMBProperties(QValueList<int> &ids, QMap<QString, int> &pr
}
}
-void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int> &commands, QWidget *w)
+void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString, int> &commands, TQWidget *w)
{
int id;
// KommanderWidget doesn't derive from QObject
@@ -1068,7 +1068,7 @@ void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int
commands.insert("assoc", id);
}
- if (w->inherits("QTabWidget")) {
+ if (w->inherits("TQTabWidget")) {
if (ids.isEmpty())
ids << rmbWidgets->insertSeparator(0);
if (((QDesignerTabWidget*)w)->count() > 1) {
@@ -1078,10 +1078,10 @@ void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int
ids << (id = rmbWidgets->insertItem(i18n("Add Page"), -1, 0));
commands.insert("add", id);
}
- if (w->inherits("QToolBox")) {
+ if (w->inherits("TQToolBox")) {
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);
}
@@ -1097,7 +1097,7 @@ void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int
}
}
-void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int> &commands, FormWindow *fw)
+void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString, int> &commands, FormWindow *fw)
{
int id;
@@ -1113,11 +1113,11 @@ void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int
commands.insert("assoc", id);
}
- if (fw->mainContainer()->inherits("QWizard")) {
+ if (fw->mainContainer()->inherits("TQWizard")) {
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);
}
@@ -1131,7 +1131,7 @@ void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int
ids << (id = rmbFormWindow->insertItem(i18n("Edit Pages..."), -1, 0));
commands.insert("edit", id);
- } else if (fw->mainContainer()->inherits("QMainWindow")) {
+ } else if (fw->mainContainer()->inherits("TQMainWindow")) {
if (ids.isEmpty())
ids << rmbFormWindow->insertSeparator(0);
ids << (id = rmbFormWindow->insertItem(i18n("Add Menu Item"), -1, 0));
@@ -1141,58 +1141,58 @@ void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int
}
}
-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;
- QString text;
- if (w->inherits("QTextView") || w->inherits("QLabel")) {
+ TQString text;
+ if (w->inherits("TQTextView") || w->inherits("TQLabel")) {
text = TextEditor::getText(this, w->property("text").toString());
ok = !text.isEmpty();
} else {
text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this);
}
if (ok) {
- 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 = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
+ TQString title = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
if (ok) {
- QString pn(i18n("Set the 'title' of '%1'").arg(w->name()));
+ TQString pn(i18n("Set the 'title' of '%1'").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 = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), w->property("pageTitle").toString(), &ok, this);
+ TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), w->property("pageTitle").toString(), &ok, this);
if (ok) {
- QString pn(i18n("Set the 'pageTitle' of '%1'").arg(w->name()));
+ TQString pn(i18n("Set the 'pageTitle' of '%1'").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 '%1'").arg(w->name()));
+ TQString pn(i18n("Set the 'pixmap' of '%1'").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);
@@ -1200,7 +1200,7 @@ 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)
{
// associated text menu
// we assume all widgets derive from KommanderWidget [MB02]
@@ -1211,8 +1211,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands,
editor->show();
}
- if (w->inherits("QTabWidget")) {
- QTabWidget *tw = (QTabWidget*)w;
+ if (w->inherits("TQTabWidget")) {
+ TQTabWidget *tw = (TQTabWidget*)w;
if (id == commands[ "add" ]) {
AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
tw, "Tab");
@@ -1229,8 +1229,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands,
}
}
}
- if (w->inherits("QToolBox")) {
- QToolBox *tw = (QToolBox*)w;
+ if (w->inherits("TQToolBox")) {
+ TQToolBox *tw = (TQToolBox*)w;
if (id == commands[ "add" ]) {
AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
tw, "Page");
@@ -1253,7 +1253,7 @@ 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(id == commands["assoc"])
@@ -1264,8 +1264,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands,
}
- if (fw->mainContainer()->inherits("QWizard")) {
- QWizard *wiz = (QWizard*)fw->mainContainer();
+ if (fw->mainContainer()->inherits("TQWizard")) {
+ TQWizard *wiz = (TQWizard*)fw->mainContainer();
if (id == commands[ "add" ]) {
AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").arg(wiz->name()), formWindow(),
wiz, "Page");
@@ -1288,17 +1288,17 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands,
bool ok = false;
QDesignerWizard *dw = (QDesignerWizard*)wiz;
- QString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this);
+ TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), 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);
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
}
}
- } else if (fw->mainContainer()->inherits("QMainWindow")) {
- QMainWindow *mw = (QMainWindow*)fw->mainContainer();
+ } else if (fw->mainContainer()->inherits("TQMainWindow")) {
+ TQMainWindow *mw = (TQMainWindow*)fw->mainContainer();
if (id == commands[ "add_toolbar" ]) {
AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").arg(formWindow()->name()), formWindow(), mw);
formWindow()->commandHistory()->addCommand(cmd);
@@ -1313,8 +1313,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands,
void MainWindow::clipboardChanged()
{
- QString text(kapp->clipboard()->text());
- QString start("<!DOCTYPE UI-SELECTION>");
+ TQString text(kapp->clipboard()->text());
+ TQString start("<!DOCTYPE UI-SELECTION>");
actionEditPaste->setEnabled(text.left(start.length()) == start);
}
@@ -1353,11 +1353,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
@@ -1373,7 +1373,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() ||
@@ -1417,7 +1417,7 @@ void MainWindow::selectionChanged()
}
} else if (selectedWidgets == 0 && formWindow()) {
actionEditAdjustSize->setEnabled(true);
- QWidget *w = formWindow()->mainContainer();
+ TQWidget *w = formWindow()->mainContainer();
if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) {
if (!formWindow()->hasInsertedChildren(w)) {
actionEditHLayout->setEnabled(false);
@@ -1491,7 +1491,7 @@ void MainWindow::readConfig()
restoreConfig = config->readBoolEntry("RestoreWorkspace", true);
splashScreen = config->readBoolEntry("SplashScreen", true);
docPath = config->readEntry("DocPath", docPath);
- templPath = config->readEntry("TemplatePath", QString::null);
+ templPath = config->readEntry("TemplatePath", TQString::null);
config->setGroup("Grid");
sGrid = config->readBoolEntry("Snap", true);
@@ -1503,11 +1503,11 @@ void MainWindow::readConfig()
if (config->readBoolEntry("UsePixmap", true))
qworkspace->setBackgroundPixmap(PixmapChooser::loadPixmap("background.png", PixmapChooser::NoSize));
else
- qworkspace->setBackgroundColor(QColor(config->readEntry("Color", "#f0f0f0")).rgb());
+ qworkspace->setBackgroundColor(TQColor(config->readEntry("Color", "#f0f0f0")).rgb());
/*
config->setGroup("Geometry");
- QSize winSize = size();
+ TQSize winSize = size();
resize(config->readSizeEntry("MainWindow", &winSize));
if (config->readBoolEntry("MainWindowMax", false))
showMaximized();
@@ -1526,7 +1526,7 @@ void MainWindow::readConfig()
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
for(int i = 0; i < args->count(); i++)
{
- QFileInfo fi(args->url(i).path());
+ TQFileInfo fi(args->url(i).path());
if (fi.exists() && openFormWindow(args->url(i).path()))
actionRecent->addURL(args->url(i));
}
@@ -1541,9 +1541,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->plug(menu);
actionEditCopy->plug(menu);
@@ -1553,9 +1553,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);
@@ -1568,13 +1568,13 @@ QPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(QWidget *parent, const char
return menu;
}
-void MainWindow::closeEvent(QCloseEvent *e)
+void MainWindow::closeEvent(TQCloseEvent *e)
{
- 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 (w->inherits("FormWindow"))
{
@@ -1592,7 +1592,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
if (client)
{
- QDir home(QDir::homeDirPath());
+ TQDir home(TQDir::homeDirPath());
home.remove(".designerpid");
}
}
@@ -1618,7 +1618,7 @@ ActionEditor *MainWindow::actioneditor() const
return actionEditor;
}
-bool MainWindow::openEditor(QWidget* w, FormWindow*)
+bool MainWindow::openEditor(TQWidget* w, FormWindow*)
{
if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
statusBar()->message(i18n("Edit %1...").arg(w->className()));
@@ -1627,22 +1627,22 @@ bool MainWindow::openEditor(QWidget* w, FormWindow*)
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;
- QString text;
- if (w->inherits("QTextView") || w->inherits("QLabel")) {
+ TQString text;
+ if (w->inherits("TQTextView") || w->inherits("TQLabel")) {
text = TextEditor::getText(this, w->property("text").toString());
ok = !text.isEmpty();
} else {
text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this);
}
if (ok) {
- QString pn(i18n("Set the 'text' of '%2'").arg(w->name()));
+ TQString pn(i18n("Set the 'text' of '%2'").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);
@@ -1651,13 +1651,13 @@ bool MainWindow::openEditor(QWidget* w, FormWindow*)
}
if (title && title->designable(w)) {
bool ok = false;
- QString text;
+ TQString text;
text = KInputDialog::getText(i18n("Title"), i18n("New title:"), 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);
@@ -1668,13 +1668,13 @@ bool MainWindow::openEditor(QWidget* w, FormWindow*)
return true;
}
-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 (!w->inherits("FormWindow"))
continue;
((FormWindow*)w)->mainContainer()->update();
@@ -1686,8 +1686,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 (!w->inherits("FormWindow"))
continue;
((FormWindow*)w)->mainContainer()->update();
@@ -1701,9 +1701,9 @@ void MainWindow::setSnapGrid(bool b)
snGrid = b;
}
-QString MainWindow::documentationPath() const
+TQString MainWindow::documentationPath() const
{
- QString result = docPath;
+ TQString result = docPath;
if (docPath[0] == '$') {
int fs = docPath.find('/');
@@ -1724,7 +1724,7 @@ QString MainWindow::documentationPath() const
void MainWindow::windowsMenuActivated(int id)
{
- QWidget* w = qworkspace->windowList().at(id);
+ TQWidget* w = qworkspace->windowList().at(id);
if (w)
w->setFocus();
}
@@ -1733,20 +1733,20 @@ void MainWindow::windowsMenuActivated(int id)
void MainWindow::checkTempFiles()
{
- QString s = QDir::homeDirPath() + "/.designer";
- QString baseName = s+ "/saved-form-";
- if (!QFile::exists(baseName + "1.kmdr"))
+ TQString s = TQDir::homeDirPath() + "/.designer";
+ TQString baseName = s+ "/saved-form-";
+ if (!TQFile::exists(baseName + "1.kmdr"))
return;
- QDir d(s);
+ TQDir d(s);
d.setNameFilter("*.kmdr");
- QStringList lst = d.entryList();
- QApplication::restoreOverrideCursor();
+ TQStringList lst = d.entryList();
+ TQApplication::restoreOverrideCursor();
bool load = KMessageBox::questionYesNo(this,
i18n("Kommander found some temporary saved files, which were\n"
"written when Kommander crashed last time. Do you want to\n"
"load these files?"), i18n("Restoring Last Session"), i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes;
- QApplication::setOverrideCursor(waitCursor);
- for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) {
+ TQApplication::setOverrideCursor(waitCursor);
+ for (TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it) {
if (load)
openFormWindow(s + "/" + *it, false);
d.remove(*it);
@@ -1755,10 +1755,10 @@ void MainWindow::checkTempFiles()
void MainWindow::showDialogHelp()
{
- QWidget *w = (QWidget*)sender();
+ TQWidget *w = (TQWidget*)sender();
w = w->topLevelWidget();
- QString link = "designer-manual-12.html#";
+ TQString link = "designer-manual-12.html#";
if (w->inherits("NewFormBase"))
link += "dialog-file-new";
@@ -1809,7 +1809,7 @@ void MainWindow::showDialogHelp()
void MainWindow::fileOpenRecent(const KURL& filename)
{
- if (!QFile::exists(filename.path()))
+ if (!TQFile::exists(filename.path()))
{
KMessageBox::error(this, i18n("<qt>Could not open file:<br><b>%1</b><br>File does not exist.</qt>").
arg(filename.path()), i18n("Open File"));
@@ -1826,9 +1826,9 @@ void MainWindow::setupPlugins()
-void MainWindow::setModified(bool b, QWidget *window)
+void MainWindow::setModified(bool b, TQWidget *window)
{
- QWidget *w = window;
+ TQWidget *w = window;
while (w)
{
if (w->inherits("FormWindow"))
@@ -1851,11 +1851,11 @@ void MainWindow::updateWorkspace()
{
}
-QWidget *MainWindow::findRealForm(QWidget *wid)
+TQWidget *MainWindow::findRealForm(TQWidget *wid)
{
- QWidgetList windows = qWorkspace()->windowList();
- for (QWidget *w = windows.first(); w; w = windows.next()) {
- if (QString(w->name()) == QString(wid->name()))
+ TQWidgetList windows = qWorkspace()->windowList();
+ for (TQWidget *w = windows.first(); w; w = windows.next()) {
+ if (TQString(w->name()) == TQString(wid->name()))
return w;
}
return 0;
@@ -1880,9 +1880,9 @@ int MainWindow::currentLayoutDefaultMargin() const
return BOXLAYOUT_DEFAULT_MARGIN;
}
-QString MainWindow::whatsThisFrom(const QString&)
+TQString MainWindow::whatsThisFrom(const TQString&)
{
- return QString::null;
+ return TQString::null;
}
void MainWindow::slotActivePartChanged(KParts::Part * part)
diff --git a/kommander/editor/mainwindow.h b/kommander/editor/mainwindow.h
index 7a18438f..db685e55 100644
--- a/kommander/editor/mainwindow.h
+++ b/kommander/editor/mainwindow.h
@@ -25,9 +25,9 @@
#include <kparts/dockmainwindow.h>
#include <kdockwidget.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qobjectlist.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqobjectlist.h>
class ActionEditor;
class AssistProc;
@@ -54,7 +54,7 @@ class ReplaceDialog;
class Workspace;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
-#include <qtoolbar.h>
+#include <tqtoolbar.h>
#else
class QToolBar;
#endif
@@ -84,39 +84,39 @@ public:
FormWindow *formWindow();
bool unregisterClient( FormWindow *w );
- 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 );
- 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;
void saveAllTemp();
- QString templatePath() const { return templPath; }
+ TQString templatePath() const { return templPath; }
bool isPreviewing() const { return previewing; }
FormWindow *activeForm() const { return lastActiveFormWindow; }
- void setModified( bool b, QWidget *window );
+ void setModified( bool b, TQWidget *window );
void updateWorkspace();
void formNameChanged( FormWindow *fw );
@@ -126,8 +126,8 @@ public:
public slots:
- void showProperties( QObject *w );
- void updateProperties( QObject *w );
+ void showProperties( TQObject *w );
+ void updateProperties( TQObject *w );
void showDialogHelp();
void slotActivePartChanged(KParts::Part * );
@@ -143,14 +143,14 @@ signals:
void formWindowChanged();
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();
void fileClose();
void fileOpen();
- void fileOpen(const QString &filename);
+ void fileOpen(const TQString &filename);
void fileOpenRecent(const KURL& name);
bool fileSave();
bool fileSaveForm(); // not visible in menu, called from fileSave
@@ -194,8 +194,8 @@ public slots:
void runForm4();
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 toolSelected();
@@ -228,40 +228,40 @@ private:
void setupMessageLog();
void setupPlugins();
- QWidget* previewFormInternal( QStyle* style = 0, QPalette* pal = 0 );
+ TQWidget* previewFormInternal( TQStyle* style = 0, TQPalette* pal = 0 );
void writeConfig();
void readConfig();
- void setupRMBProperties( QValueList<int> &ids, QMap<QString, int> &props, QWidget *w );
- void handleRMBProperties( int id, QMap<QString, int> &props, QWidget *w );
- void setupRMBSpecialCommands( QValueList<int> &ids, QMap<QString, int> &commands, QWidget *w );
- void handleRMBSpecialCommands( int id, QMap<QString, int> &commands, QWidget *w );
- void setupRMBSpecialCommands( QValueList<int> &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<int> &ids, TQMap<TQString, int> &props, TQWidget *w );
+ void handleRMBProperties( int id, TQMap<TQString, int> &props, TQWidget *w );
+ void setupRMBSpecialCommands( TQValueList<int> &ids, TQMap<TQString, int> &commands, TQWidget *w );
+ void handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w );
+ void setupRMBSpecialCommands( TQValueList<int> &ids, TQMap<TQString, int> &commands, FormWindow *w );
+ void handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *w );
+ bool openEditor( TQWidget *w, FormWindow *fw );
void checkTempFiles();
- void addRecentlyOpened(const QString &fn);
- QWidget *findRealForm( QWidget *w );
+ void addRecentlyOpened(const TQString &fn);
+ TQWidget *findRealForm( TQWidget *w );
- QString whatsThisFrom( const QString &key );
+ TQString whatsThisFrom( const TQString &key );
private:
PropertyEditor *propertyEditor;
HierarchyView *hierarchyView;
Workspace *wspace;
- QWidget *lastPressWidget;
- QWorkspace *qworkspace;
+ TQWidget *lastPressWidget;
+ TQWorkspace *qworkspace;
KMenuBar *menubar;
FormWindow *lastActiveFormWindow;
bool breakLayout, layoutChilds, layoutSelected;
- QPoint grd;
+ TQPoint grd;
bool sGrid, snGrid;
bool restoreConfig;
bool backPix;
bool splashScreen;
- QString docPath;
+ TQString docPath;
KAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy,
*actionEditPaste, *actionEditDelete, *actionEditAdjustSize,
@@ -275,42 +275,42 @@ private:
KAction *actionEditFormSettings, *actionEditAccels;
KRecentFilesAction* actionRecent;
- QPopupMenu *rmbWidgets;
- QPopupMenu *rmbFormWindow;
- QPopupMenu *windowMenu, *fileMenu;
+ TQPopupMenu *rmbWidgets;
+ TQPopupMenu *rmbFormWindow;
+ TQPopupMenu *windowMenu, *fileMenu;
- QToolBar *layoutToolBar;
+ TQToolBar *layoutToolBar;
KToolBar *fileTb;
Preferences *prefDia;
- QMap<QString,QString> propertyDocumentation;
+ TQMap<TQString,TQString> propertyDocumentation;
bool client;
- QString templPath;
+ TQString templPath;
ActionEditor *actionEditor;
bool databaseAutoEdit;
- QTimer *updateSlotsTimer;
- QTimer *backupTimer;
+ TQTimer *updateSlotsTimer;
+ TQTimer *backupTimer;
bool inDebugMode;
- QObjectList debuggingForms;
- QString lastOpenFilter;
- QString menuHelpFile;
+ TQObjectList debuggingForms;
+ TQString lastOpenFilter;
+ TQString menuHelpFile;
AssistProc *assistant;
bool previewing;
MessageLog* messageLog;
// Paths of external Kommander tools for Editor
- QStringList m_editorTools;
- QString m_toolOutput;
+ TQStringList m_editorTools;
+ TQString m_toolOutput;
KParts::PartManager *m_partManager;
- QString m_fileName;
- QString m_backupName;
+ TQString m_fileName;
+ TQString m_backupName;
bool m_modified;
public:
- QString lastSaveFilter;
+ TQString lastSaveFilter;
};
diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp
index f7657d26..a4d4c430 100644
--- a/kommander/editor/mainwindowactions.cpp
+++ b/kommander/editor/mainwindowactions.cpp
@@ -19,18 +19,18 @@
#include "mainwindow.h"
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qsignalmapper.h>
-#include <qspinbox.h>
-#include <qstatusbar.h>
-#include <qstylefactory.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qworkspace.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqsignalmapper.h>
+#include <tqspinbox.h>
+#include <tqstatusbar.h>
+#include <tqstylefactory.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqworkspace.h>
#include "defs.h"
#include "widgetdatabase.h"
@@ -76,15 +76,15 @@
#include <stdlib.h>
-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( PixmapChooser::loadPixmap( name, PixmapChooser::Small ) );
- ic.setPixmap( PixmapChooser::loadPixmap( name, PixmapChooser::Disabled ), QIconSet::Small, QIconSet::Disabled );
+ TQIconSet ic( PixmapChooser::loadPixmap( name, PixmapChooser::Small ) );
+ ic.setPixmap( PixmapChooser::loadPixmap( name, PixmapChooser::Disabled ), TQIconSet::Small, TQIconSet::Disabled );
return ic;
}
@@ -92,81 +92,81 @@ int forms = 0;
void MainWindow::setupEditActions()
{
- actionEditUndo = KStdAction::undo(this, SLOT(editUndo()), actionCollection());
+ actionEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
actionEditUndo->setText(i18n("&Undo: Not Available"));
actionEditUndo->setToolTip(i18n("Undoes the last action"));
actionEditUndo->setWhatsThis(whatsThisFrom("Edit|Undo"));
actionEditUndo->setEnabled(false);
- actionEditRedo = KStdAction::redo(this, SLOT(editRedo()), actionCollection());
+ actionEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
actionEditRedo->setText(i18n("&Redo: Not Available"));
actionEditRedo->setToolTip(i18n("Redoes the last undone operation"));
actionEditRedo->setWhatsThis(whatsThisFrom("Edit|Redo"));
actionEditRedo->setEnabled(false);
- actionEditCut = KStdAction::cut(this, SLOT(editCut()), actionCollection());
+ actionEditCut = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection());
actionEditCut->setToolTip(i18n("Cuts the selected widgets and puts them on the clipboard"));
actionEditCut->setWhatsThis(whatsThisFrom("Edit|Cut"));
actionEditCut->setEnabled(false);
- actionEditCopy = KStdAction::copy(this, SLOT(editCopy()), actionCollection());
+ actionEditCopy = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
actionEditCopy->setToolTip(i18n("Copies the selected widgets to the clipboard"));
actionEditCopy->setWhatsThis(whatsThisFrom("Edit|Copy"));
actionEditCopy->setEnabled(false);
- actionEditPaste = KStdAction::paste(this, SLOT(editPaste()), actionCollection());
+ actionEditPaste = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection());
actionEditPaste->setToolTip(i18n("Pastes the clipboard's contents"));
actionEditPaste->setWhatsThis(whatsThisFrom("Edit|Paste"));
actionEditPaste->setEnabled(false);
- actionEditDelete = new KAction(i18n("Delete"), Key_Delete, this, SLOT(editDelete()),
+ actionEditDelete = new KAction(i18n("Delete"), Key_Delete, this, TQT_SLOT(editDelete()),
actionCollection(), "edit_delete");
actionEditDelete->setToolTip(i18n("Deletes the selected widgets"));
actionEditDelete->setWhatsThis(whatsThisFrom("Edit|Delete"));
actionEditDelete->setEnabled(false);
- actionEditSelectAll = KStdAction::selectAll(this, SLOT(editSelectAll()), actionCollection());
+ actionEditSelectAll = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection());
actionEditSelectAll->setToolTip(i18n("Selects all widgets"));
actionEditSelectAll->setWhatsThis(whatsThisFrom("Edit|Select All"));
actionEditRaise = new KAction(i18n("Bring to Front"), createIconSet("editraise.xpm"),
- KShortcut::null(), this, SLOT(editRaise()), actionCollection(), "edit_raise");
+ KShortcut::null(), this, TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
actionEditRaise->setToolTip(i18n("Raises the selected widgets"));
actionEditRaise->setEnabled(false);
actionEditLower = new KAction(i18n("Send to Back"), createIconSet("editlower.xpm"),
- KShortcut::null(), this, SLOT(editLower()), actionCollection(), "edit_lower");
+ KShortcut::null(), this, TQT_SLOT(editLower()), actionCollection(), "edit_lower");
actionEditLower->setToolTip(i18n("Lowers the selected widgets"));
actionEditLower->setWhatsThis(i18n("Lowers the selected widgets"));
actionEditLower->setEnabled(false);
- actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, this, SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
+ actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, this, TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
actionEditFindGlobal->setToolTip(i18n("Search for a text in the whole form."));
actionEditFindGlobal->setWhatsThis(whatsThisFrom("Edit|Find in Form"));
- connect(this, SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, TQT_SLOT(setEnabled(bool)));
- actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, this, SLOT(editAccels()),
+ actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()),
actionCollection(), "edit_check_accel");
actionEditAccels->setToolTip(i18n("Checks if the accelerators used in the form are unique"));
actionEditAccels->setWhatsThis(whatsThisFrom("Edit|Check Accelerator"));
- connect(this, SIGNAL(hasActiveForm(bool)), actionEditAccels, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditAccels, TQT_SLOT(setEnabled(bool)));
actionEditConnections = new KAction(i18n("Connections"), createIconSet("connecttool.xpm"),
- KShortcut::null(), this, SLOT(editConnections()), actionCollection(),
+ KShortcut::null(), this, TQT_SLOT(editConnections()), actionCollection(),
"edit_connections");
actionEditConnections->setToolTip(i18n("Opens a dialog for editing connections"));
actionEditConnections->setWhatsThis(whatsThisFrom("Edit|Connections"));
- connect(this, SIGNAL(hasActiveForm(bool)), actionEditConnections, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditConnections, TQT_SLOT(setEnabled(bool)));
actionEditFormSettings = new KAction(i18n("Form Settings..."), KShortcut::null(),
- this, SLOT(editFormSettings()), actionCollection(), "edit_form");
+ this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
actionEditFormSettings->setToolTip(i18n("Opens a dialog to change the form's settings"));
actionEditFormSettings->setWhatsThis(whatsThisFrom("Edit|Form Settings"));
- connect(this, SIGNAL(hasActiveForm(bool)), actionEditFormSettings, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFormSettings, TQT_SLOT(setEnabled(bool)));
KToolBar *tb = new KToolBar(this, "Edit");
tb->setFullSize(false);
- QWhatsThis::add(tb, i18n("<b>The Edit toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("<b>The Edit toolbar</b>%1").arg(toolbarHelp));
addToolBar(tb, i18n("Edit"));
actionEditUndo->plug(tb);
actionEditRedo->plug(tb);
@@ -175,7 +175,7 @@ void MainWindow::setupEditActions()
actionEditCopy->plug(tb);
actionEditPaste->plug(tb);
- QPopupMenu *menu = new QPopupMenu(this, "Edit");
+ TQPopupMenu *menu = new TQPopupMenu(this, "Edit");
menuBar()->insertItem(i18n("&Edit"), menu);
actionEditUndo->plug(menu);
actionEditRedo->plug(menu);
@@ -198,51 +198,51 @@ void MainWindow::setupEditActions()
void MainWindow::setupLayoutActions()
{
actionEditAdjustSize = new KAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"),
- CTRL + Key_J, this, SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
+ CTRL + Key_J, this, TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
actionEditAdjustSize->setToolTip(i18n("Adjusts the size of the selected widget"));
actionEditAdjustSize->setWhatsThis(whatsThisFrom("Layout|Adjust Size"));
actionEditAdjustSize->setEnabled(false);
actionEditHLayout = new KAction(i18n("Lay Out Horizontally"), createIconSet("edithlayout.xpm"),
- CTRL + Key_H, this, SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
+ CTRL + Key_H, this, TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
actionEditHLayout->setToolTip(i18n("Lays out the selected widgets horizontally"));
actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally"));
actionEditHLayout->setEnabled(false);
actionEditVLayout = new KAction(i18n("Lay Out Vertically"), createIconSet("editvlayout.xpm"),
- CTRL + Key_L, this, SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
+ CTRL + Key_L, this, TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
actionEditVLayout->setToolTip(i18n("Lays out the selected widgets vertically"));
actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically"));
actionEditVLayout->setEnabled(false);
actionEditGridLayout = new KAction(i18n("Lay Out in a Grid"), createIconSet("editgrid.xpm"),
- CTRL + Key_G, this, SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
+ CTRL + Key_G, this, TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
actionEditGridLayout->setToolTip(i18n("Lays out the selected widgets in a grid"));
actionEditGridLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out in a Grid"));
actionEditGridLayout->setEnabled(false);
actionEditSplitHorizontal = new KAction(i18n("Lay Out Horizontally in Splitter"), createIconSet("editvlayoutsplit.xpm"),
- KShortcut::null(), this, SLOT(editLayoutHorizontalSplit()), actionCollection(),
+ KShortcut::null(), this, TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
"edit_split_h");
actionEditSplitHorizontal->setToolTip(i18n("Lays out the selected widgets horizontally in a splitter"));
actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally in Splitter"));
actionEditSplitHorizontal->setEnabled(false);
actionEditSplitVertical = new KAction(i18n("Lay Out Vertically in Splitter"), createIconSet("edithlayoutsplit.xpm"),
- KShortcut::null(), this, SLOT(editLayoutVerticalSplit()), actionCollection(),
+ KShortcut::null(), this, TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
"edit_split_v");
actionEditSplitVertical->setToolTip(i18n("Lays out the selected widgets vertically in a splitter"));
actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically (in Splitter)"));
actionEditSplitVertical->setEnabled(false);
actionEditBreakLayout = new KAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"),
- CTRL + Key_B, this, SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
+ CTRL + Key_B, this, TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
actionEditBreakLayout->setToolTip(i18n("Breaks the selected layout"));
actionEditBreakLayout->setWhatsThis(whatsThisFrom("Layout|Break Layout"));
int id = WidgetDatabase::idFromClassName("Spacer");
- KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), this, SLOT(toolSelected()),
- actionCollection(), QString::number(id).latin1());
+ KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), this, TQT_SLOT(toolSelected()),
+ actionCollection(), TQString::number(id).latin1());
a->setExclusiveGroup("tool");
a->setText(i18n("Add ") + WidgetDatabase::className(id));
a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::toolTip(id)));
@@ -251,7 +251,7 @@ void MainWindow::setupLayoutActions()
"or double click to keep the tool selected.").arg(WidgetDatabase::toolTip(id)).
arg(WidgetDatabase::whatsThis(id)).arg(WidgetDatabase::toolTip(id)));
- QWhatsThis::add(layoutToolBar, i18n("<b>The Layout toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(layoutToolBar, i18n("<b>The Layout toolbar</b>%1").arg(toolbarHelp));
actionEditAdjustSize->plug(layoutToolBar);
layoutToolBar->addSeparator();
actionEditHLayout->plug(layoutToolBar);
@@ -263,7 +263,7 @@ void MainWindow::setupLayoutActions()
layoutToolBar->addSeparator();
a->plug(layoutToolBar);
- QPopupMenu *menu = new QPopupMenu(this, "Layout");
+ TQPopupMenu *menu = new TQPopupMenu(this, "Layout");
menuBar()->insertItem(i18n("&Layout"), menu);
actionEditAdjustSize->plug(menu);
menu->insertSeparator();
@@ -280,36 +280,36 @@ void MainWindow::setupLayoutActions()
void MainWindow::setupToolActions()
{
actionPointerTool = new KToggleAction(i18n("Pointer"), "arrow", Key_F2,
- this, SLOT(toolSelected()), actionCollection(),
- QString::number(POINTER_TOOL).latin1());
+ this, TQT_SLOT(toolSelected()), actionCollection(),
+ TQString::number(POINTER_TOOL).latin1());
actionPointerTool->setToolTip(i18n("Selects the pointer tool"));
actionPointerTool->setWhatsThis(whatsThisFrom("Tools|Pointer"));
actionPointerTool->setExclusiveGroup("tool");
actionConnectTool = new KToggleAction(i18n("Connect Signal/Slots"), createIconSet("connecttool.xpm"),
- Key_F3, this, SLOT(toolSelected()), actionCollection(),
- QString::number(CONNECT_TOOL).latin1());
+ Key_F3, this, TQT_SLOT(toolSelected()), actionCollection(),
+ TQString::number(CONNECT_TOOL).latin1());
actionConnectTool->setToolTip(i18n("Selects the connection tool"));
actionConnectTool->setWhatsThis(whatsThisFrom("Tools|Connect Signals and Slots"));
actionConnectTool->setExclusiveGroup("tool");
actionOrderTool = new KToggleAction(i18n("Tab Order"), createIconSet("ordertool.xpm"),
- Key_F4, this, SLOT(toolSelected()), actionCollection(),
- QString::number(ORDER_TOOL).latin1());
+ Key_F4, this, TQT_SLOT(toolSelected()), actionCollection(),
+ TQString::number(ORDER_TOOL).latin1());
actionOrderTool->setToolTip(i18n("Selects the tab order tool"));
actionOrderTool->setWhatsThis(whatsThisFrom("Tools|Tab Order"));
actionOrderTool->setExclusiveGroup("tool");
KToolBar *tb = new KToolBar(this, "Tools");
tb->setFullSize(false);
- QWhatsThis::add(tb, i18n("<b>The Tools toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("<b>The Tools toolbar</b>%1").arg(toolbarHelp));
- addToolBar(tb, i18n("Tools"), QMainWindow::DockTop, true);
+ addToolBar(tb, i18n("Tools"), TQMainWindow::DockTop, true);
actionPointerTool->plug(tb);
actionConnectTool->plug(tb);
actionOrderTool->plug(tb);
- QPopupMenu *mmenu = new QPopupMenu(this, "Tools");
+ TQPopupMenu *mmenu = new TQPopupMenu(this, "Tools");
menuBar()->insertItem(i18n("&Tools"), mmenu);
actionPointerTool->plug(mmenu);
actionConnectTool->plug(mmenu);
@@ -318,7 +318,7 @@ void MainWindow::setupToolActions()
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;
KToolBar *tb = new KToolBar(this, grp.latin1());
@@ -326,17 +326,17 @@ void MainWindow::setupToolActions()
bool plural = grp[(int) grp.length() - 1] == 's';
if (plural)
{
- QWhatsThis::add(tb, i18n("<b>The %1</b>%2").arg(grp).arg(toolbarHelp).
+ TQWhatsThis::add(tb, i18n("<b>The %1</b>%2").arg(grp).arg(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(toolbarHelp).
+ TQWhatsThis::add(tb, i18n("<b>The %1 Widgets</b>%2").arg(grp).arg(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);
- QPopupMenu *menu = new QPopupMenu(this, grp.latin1());
+ TQPopupMenu *menu = new TQPopupMenu(this, grp.latin1());
mmenu->insertItem(grp, menu);
for (int i = 0; i < WidgetDatabase::count(); ++i)
@@ -344,9 +344,9 @@ void MainWindow::setupToolActions()
if (WidgetDatabase::group(i) != grp)
continue; // only widgets, i.e. not forms and temp stuff
KToggleAction *a = new KToggleAction(WidgetDatabase::className(i), KShortcut::null(),
- this, SLOT(toolSelected()), actionCollection(), QString::number(i).latin1());
+ this, TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
a->setExclusiveGroup("tool");
- 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')
@@ -354,16 +354,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->setToolTip(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")
@@ -374,23 +374,23 @@ void MainWindow::setupToolActions()
// add external Kommander dialogs for Editor
m_editorTools.clear();
- QPopupMenu* editMenu = new QPopupMenu(this);
- QStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/editor");
- for (QStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it)
+ TQPopupMenu* editMenu = new TQPopupMenu(this);
+ TQStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/editor");
+ for (TQStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it)
{
- if (!QFile::exists(*it))
+ if (!TQFile::exists(*it))
continue;
- QDir dir(*it);
- const QFileInfoList* fileList = dir.entryInfoList(QDir::DefaultFilter, QDir::DirsFirst | QDir::Name);
+ TQDir dir(*it);
+ const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
if (fileList)
for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
{
- QFileInfo* fi = fit.current();
+ TQFileInfo* fi = fit.current();
if (!fi->isFile() || fi->extension() != "kmdr")
continue;
- QString name = fi->baseName();
+ TQString name = fi->baseName();
name = name.replace("_", " ");
- editMenu->insertItem(name, this, SLOT(editExternalTool(int)), 0, m_editorTools.count());
+ editMenu->insertItem(name, this, TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
m_editorTools.append(fi->filePath());
}
}
@@ -405,59 +405,59 @@ void MainWindow::setupFileActions()
fileTb = new KToolBar(this, "File");
fileTb->setFullSize(false);
- QWhatsThis::add(fileTb, i18n("<b>The File toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(fileTb, i18n("<b>The File toolbar</b>%1").arg(toolbarHelp));
addToolBar(fileTb, i18n("File"));
- fileMenu = new QPopupMenu(this, "File");
+ fileMenu = new TQPopupMenu(this, "File");
menuBar()->insertItem(i18n("&File"), fileMenu);
- KAction *a = KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
+ KAction *a = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
a->setToolTip(i18n("Creates a new dialog"));
a->setWhatsThis(whatsThisFrom("File|New"));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::open(this, SLOT(fileOpen()), actionCollection());
+ a = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
a->setToolTip(i18n("Opens an existing dialog"));
a->setWhatsThis(whatsThisFrom("File|Open"));
a->plug(fileTb);
a->plug(fileMenu);
- actionRecent = KStdAction::openRecent(this, SLOT(fileOpenRecent(const KURL&)), actionCollection());
+ actionRecent = KStdAction::openRecent(this, TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
actionRecent->setToolTip(i18n("Opens recently open file"));
actionRecent->plug(fileMenu);
fileMenu->insertSeparator();
- a = KStdAction::close(this, SLOT(fileClose()), actionCollection());
+ a = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection());
a->setToolTip(i18n("Closes the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Close"));
- connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileMenu);
fileMenu->insertSeparator();
- a = KStdAction::save(this, SLOT(fileSave()), actionCollection());
+ a = KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
a->setToolTip(i18n("Saves the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Save"));
- connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
+ a = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
a->setToolTip(i18n("Saves the current dialog with a new filename"));
a->setWhatsThis(whatsThisFrom("File|Save As"));
- connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileMenu);
- a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), this, SLOT(fileSaveAll()),
+ a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), this, TQT_SLOT(fileSaveAll()),
actionCollection(), "file_close_all");
a->setToolTip(i18n("Saves all open dialogs"));
a->setWhatsThis(whatsThisFrom("File|Save All"));
- connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileMenu);
fileMenu->insertSeparator();
- a = KStdAction::quit(kapp, SLOT(closeAllWindows()), actionCollection());
+ a = KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
a->setToolTip(i18n("Quits the application and prompts to save any changed dialogs"));
a->setWhatsThis(whatsThisFrom("File|Exit"));
a->plug(fileMenu);
@@ -466,23 +466,23 @@ void MainWindow::setupFileActions()
void MainWindow::setupRunActions()
{
- QPopupMenu *menu = new QPopupMenu(this, "Run");
+ TQPopupMenu *menu = new TQPopupMenu(this, "Run");
menuBar()->insertItem(i18n("&Run"), menu);
KAction* a = new KAction(i18n("Run Dialog"), "run", CTRL + Key_R,
- this, SLOT(runForm()), actionCollection(), "run");
+ this, TQT_SLOT(runForm()), actionCollection(), "run");
a->setToolTip(i18n("Executes dialog"));
a->setWhatsThis(whatsThisFrom("Run|Run dialog"));
- connect(this, SIGNAL(hasActiveForm(bool)), a, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveForm(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileTb);
a->plug(menu);
// add KDE4 executor
KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + Qt::Key_R,
- this, SLOT(runForm4()), actionCollection(), "run4");
+ this, TQT_SLOT(runForm4()), actionCollection(), "run4");
b->setToolTip(i18n("Executes dialog in KDE4"));
b->setWhatsThis(whatsThisFrom("Run|Run dialog"));
- connect(this, SIGNAL(hasActiveForm(bool)), b, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(hasActiveForm(bool)), b, TQT_SLOT(setEnabled(bool)));
b->plug(menu);
}
@@ -493,39 +493,39 @@ void MainWindow::setupWindowActions()
{
windowActionsSetup = true;
- KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), qworkspace, SLOT(tile()),
+ KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), qworkspace, TQT_SLOT(tile()),
actionCollection(), "window_tile");
actionWindowTile->setToolTip(i18n("Tiles the windows so that they are all visible"));
actionWindowTile->setWhatsThis(whatsThisFrom("Window|Tile"));
- KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, SLOT(cascade()),
+ KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_SLOT(cascade()),
actionCollection(), "window_cascade");
actionWindowCascade->setToolTip(i18n("Cascades the windows so that all their title bars are visible"));
actionWindowCascade->setWhatsThis(whatsThisFrom("Window|Cascade"));
- KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, SLOT(closeActiveWindow()),
+ KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_SLOT(closeActiveWindow()),
actionCollection(), "window_close");
actionWindowClose->setToolTip(i18n("Closes the active window"));
actionWindowClose->setWhatsThis(whatsThisFrom("Window|Close"));
KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), qworkspace,
- SLOT(closeAllWindows()), actionCollection(), "window_close_all");
+ TQT_SLOT(closeAllWindows()), actionCollection(), "window_close_all");
actionWindowCloseAll->setToolTip(i18n("Closes all form windows"));
actionWindowCloseAll->setWhatsThis(whatsThisFrom("Window|Close All"));
KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, qworkspace,
- SLOT(activateNextWindow()), actionCollection(), "window_next");
+ TQT_SLOT(activateNextWindow()), actionCollection(), "window_next");
actionWindowNext->setToolTip(i18n("Activates the next window"));
actionWindowNext->setWhatsThis(whatsThisFrom("Window|Next"));
KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, qworkspace,
- SLOT(activatePreviousWindow()), actionCollection(), "window_prev");
+ TQT_SLOT(activatePreviousWindow()), actionCollection(), "window_prev");
actionWindowPrevious->setToolTip(i18n("Activates the previous window"));
actionWindowPrevious->setWhatsThis(whatsThisFrom("Window|Previous"));
windowMenu = new KPopupMenu(this, "Window");
menuBar()->insertItem(i18n("&Window"), windowMenu);
- connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(setupWindowActions()));
+ connect(windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(setupWindowActions()));
actionWindowClose->plug(windowMenu);
actionWindowCloseAll->plug(windowMenu);
@@ -544,25 +544,25 @@ void MainWindow::setupWindowActions()
while (windowMenu->count() > 11)
windowMenu->removeItemAt(windowMenu->count() - 1);
- 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 (!w->inherits("FormWindow") && !w->inherits("SourceEditor"))
continue;
j++;
- QString itemText;
+ TQString itemText;
if (j < 10)
- itemText = QString("&%1 ").arg(j);
+ itemText = TQString("&%1 ").arg(j);
if (w->inherits("FormWindow"))
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));
}
@@ -572,21 +572,21 @@ void MainWindow::setupWindowActions()
void MainWindow::setupSettingsActions()
{
KPopupMenu *settings = new KPopupMenu(this, "Settings");
- KAction* a = KStdAction::keyBindings(this, SLOT(editShortcuts()), actionCollection());
+ KAction* a = KStdAction::keyBindings(this, TQT_SLOT(editShortcuts()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change shortcuts"));
a->plug(settings);
- a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), this, SLOT(editPlugins()),
+ a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), this, TQT_SLOT(editPlugins()),
actionCollection(), "configure_plugins");
a->setToolTip(i18n("Opens a dialog to configure plugins"));
a->plug(settings);
- a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), this, SLOT(configureEditor()),
+ a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), this, TQT_SLOT(configureEditor()),
actionCollection(), "configure_editor");
a->setToolTip(i18n("Configure various aspects of this editor."));
a->plug(settings);
- a = KStdAction::preferences(this, SLOT(editPreferences()), actionCollection());
+ a = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change preferences"));
a->setWhatsThis(whatsThisFrom("Edit|Preferences"));
a->plug(settings);
@@ -604,14 +604,14 @@ void MainWindow::setupHelpActions()
void MainWindow::fileNew()
{
statusBar()->message(i18n("Create a new dialog..."));
- NewForm dlg(this, QString::null);
+ NewForm dlg(this, TQString::null);
dlg.exec();
statusBar()->clear();
}
void MainWindow::fileClose()
{
- QWidget *w = qworkspace->activeWindow();
+ TQWidget *w = qworkspace->activeWindow();
if (w->inherits("FormWindow"))
{
emit removedFormFile(((FormWindow *) w)->formFile());
@@ -624,22 +624,22 @@ void MainWindow::fileOpen() // as called by the menu
fileOpen("");
}
-void MainWindow::fileOpen(const QString & fn)
+void MainWindow::fileOpen(const TQString & fn)
{
statusBar()->message(i18n("Open a file..."));
- QStringList additionalSources;
+ TQStringList additionalSources;
- QStringList filenames;
+ TQStringList filenames;
if (fn.isEmpty())
- filenames = KFileDialog::getOpenFileNames(QString::null, i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
+ filenames = KFileDialog::getOpenFileNames(TQString::null, i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
else
filenames << fn;
- for (QStringList::ConstIterator fit = filenames.constBegin(); fit != filenames.constEnd(); ++fit)
+ for (TQStringList::ConstIterator fit = filenames.constBegin(); fit != filenames.constEnd(); ++fit)
{
- QString filename = *fit;
+ TQString filename = *fit;
if (!filename.isEmpty())
{
- QFileInfo fi(filename);
+ TQFileInfo fi(filename);
if (fi.exists() && openFormWindow(filename))
actionRecent->addURL(filename);
}
@@ -648,36 +648,36 @@ void MainWindow::fileOpen(const QString & fn)
-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)
{
statusBar()->message(i18n("Reading file '%1'...").arg(filename));
- if (QFile::exists(filename))
+ if (TQFile::exists(filename))
{
- QApplication::setOverrideCursor(WaitCursor);
+ TQApplication::setOverrideCursor(WaitCursor);
Resource resource(this);
if (!ff)
ff = new FormFile(filename, false);
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)
{
statusBar()->message(i18n("Loaded file '%1'").arg(filename), 3000);
@@ -716,7 +716,7 @@ bool MainWindow::fileSaveForm()
fw = formWindow();
if (!fw || !fw->formFile()->save())
return false;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return true;
}
@@ -724,7 +724,7 @@ bool MainWindow::fileSaveAs()
{
statusBar()->message(i18n("Enter a filename..."));
- QWidget *w = qworkspace->activeWindow();
+ TQWidget *w = qworkspace->activeWindow();
if (!w)
return true;
if (w->inherits("FormWindow"))
@@ -734,7 +734,7 @@ bool MainWindow::fileSaveAs()
void MainWindow::fileSaveAll()
{
- QWidgetList windows = qworkspace->windowList(QWorkspace::StackingOrder);
+ TQWidgetList windows = qworkspace->windowList(TQWorkspace::StackingOrder);
for (int i = 0; i < (int)windows.count(); ++i)
{
FormWindow* fw = dynamic_cast<FormWindow*>(windows.at(i));
@@ -751,15 +751,15 @@ void MainWindow::saveAllTemp()
return;
inSaveAllTemp = true;
statusBar()->message(i18n("Qt Designer is crashing. Attempting to save files..."));
- QWidgetList windows = qWorkspace()->windowList();
- QString baseName = QDir::homeDirPath() + "/.designer/saved-form-";
+ TQWidgetList windows = qWorkspace()->windowList();
+ TQString baseName = TQDir::homeDirPath() + "/.designer/saved-form-";
int i = 1;
- for (QWidget * w = windows.first(); w; w = windows.next())
+ for (TQWidget * w = windows.first(); w; w = windows.next())
{
if (!w->inherits("FormWindow"))
continue;
- QString fn = baseName + QString::number(i++) + ".kmdr";
+ TQString fn = baseName + TQString::number(i++) + ".kmdr";
((FormWindow *) w)->setFileName(fn);
((FormWindow *) w)->formFile()->save();
}
@@ -781,29 +781,29 @@ void MainWindow::fileCreateTemplate()
for (i = 0; i < WidgetDatabase::count(); ++i)
{
if (WidgetDatabase::isContainer(i) && !WidgetDatabase::isForm(i) &&
- WidgetDatabase::className(i) != "QTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp")
+ WidgetDatabase::className(i) != "TQTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp")
{
dia.listClass->insertItem(WidgetDatabase::className(i));
}
}
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())
{
KMessageBox::information(this, i18n("Could not create the template"), i18n("Create Template"));
return;
}
- QStringList templRoots;
+ TQStringList templRoots;
const char *qtdir = getenv("QTDIR");
if (qtdir)
templRoots << qtdir;
@@ -814,13 +814,13 @@ void MainWindow::createNewTemplate()
templRoots << QT_INSTALL_DATA;
#endif
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)
+ templRoots << TQString(qtdir) + "/tools/designer";
+ TQFile f;
+ for (TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it)
{
- if (QFile::exists((*it) + "/templates/"))
+ if (TQFile::exists((*it) + "/templates/"))
{
- QString tmpfn = (*it) + "/templates/" + fn + ".kmdr";
+ TQString tmpfn = (*it) + "/templates/" + fn + ".kmdr";
f.setName(tmpfn);
if (f.open(IO_WriteOnly))
break;
@@ -831,7 +831,7 @@ void MainWindow::createNewTemplate()
KMessageBox::information(this, i18n("Could not create the template"), i18n("Create Template"));
return;
}
- QTextStream ts(&f);
+ TQTextStream ts(&f);
ts << "<!DOCTYPE UI><UI>" << endl;
ts << "<widget>" << endl;
@@ -884,8 +884,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();
@@ -983,8 +983,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)
@@ -995,8 +995,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)
@@ -1007,8 +1007,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)
@@ -1022,7 +1022,7 @@ void MainWindow::editBreakLayout()
{
return;
}
- QWidget *w = formWindow()->mainContainer();
+ TQWidget *w = formWindow()->mainContainer();
if (formWindow()->currentWidget())
w = formWindow()->currentWidget();
if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
@@ -1033,7 +1033,7 @@ void MainWindow::editBreakLayout()
}
else
{
- QWidgetList widgets = formWindow()->selectedWidgets();
+ TQWidgetList widgets = formWindow()->selectedWidgets();
for (w = widgets.first(); w; w = widgets.next())
{
if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
@@ -1098,7 +1098,7 @@ void MainWindow::editPreferences()
statusBar()->message(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->checkBoxShowGrid->setChecked(sGrid);
@@ -1119,13 +1119,13 @@ void MainWindow::editPreferences()
dia->checkBoxSplash->setChecked(splashScreen);
dia->editDocPath->setText(docPath);
dia->checkAutoEdit->setChecked(!databaseAutoEdit);
- connect(dia->buttonDocPath, SIGNAL(clicked()), this, SLOT(chooseDocPath()));
+ connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseDocPath()));
- if (dia->exec() == QDialog::Accepted)
+ if (dia->exec() == TQDialog::Accepted)
{
setSnapGrid(dia->checkBoxGrid->isChecked());
setShowGrid(dia->checkBoxShowGrid->isChecked());
- setGrid(QPoint(dia->spinGridX->value(), dia->spinGridY->value()));
+ setGrid(TQPoint(dia->spinGridX->value(), dia->spinGridY->value()));
restoreConfig = dia->checkBoxWorkspace->isChecked();
setUsesBigPixmaps(false /*dia->checkBoxBigIcons->isChecked() */ ); // ### disable for now
setUsesTextLabel(dia->checkBoxTextLabels->isChecked());
@@ -1173,8 +1173,8 @@ void MainWindow::editExternalTool(int id)
{
KProcess* process = new KProcess;
(*process) << "kmdr-executor" << m_editorTools[id];
- connect(process, SIGNAL(processExited(KProcess*)), SLOT(editToolExited(KProcess*)));
- connect(process, SIGNAL(receivedStdout(KProcess*, char*, int)), SLOT(editToolOutput(KProcess*, char*, int)));
+ connect(process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(editToolExited(KProcess*)));
+ connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), TQT_SLOT(editToolOutput(KProcess*, char*, int)));
m_toolOutput = '\0';
process->start(KProcess::NotifyOnExit, KProcess::Stdout);
}
@@ -1186,14 +1186,14 @@ void MainWindow::editToolExited(KProcess* process)
void MainWindow::editToolOutput(KProcess*, char* buffer, int buflen)
{
- m_toolOutput += QString::fromLocal8Bit(buffer, buflen);
+ m_toolOutput += TQString::fromLocal8Bit(buffer, buflen);
}
void MainWindow::chooseDocPath()
{
if (!prefDia)
return;
- QString fn = KFileDialog::getExistingDirectory(QString::null, this);
+ TQString fn = KFileDialog::getExistingDirectory(TQString::null, this);
if (!fn.isEmpty())
prefDia->editDocPath->setText(fn);
}
diff --git a/kommander/editor/messagelog.cpp b/kommander/editor/messagelog.cpp
index 952dd19f..ecaed31a 100644
--- a/kommander/editor/messagelog.cpp
+++ b/kommander/editor/messagelog.cpp
@@ -24,26 +24,26 @@
#include <kpopupmenu.h>
#include <kprocess.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
-MessageLog::MessageLog(QWidget* parent, const char* name) : QTabWidget(parent, name)
+MessageLog::MessageLog(TQWidget* parent, const char* name) : TQTabWidget(parent, name)
{
m_popupMenu = new KPopupMenu(this);
- m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, SLOT(copyLine()));
- m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("&Copy Content"), this, SLOT(copyContent()));
- m_popupMenu->insertItem(SmallIconSet("filesaveas"), i18n("&Save As..."), this, SLOT(saveToFile()));
+ m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, TQT_SLOT(copyLine()));
+ m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("&Copy Content"), this, TQT_SLOT(copyContent()));
+ m_popupMenu->insertItem(SmallIconSet("filesaveas"), i18n("&Save As..."), this, TQT_SLOT(saveToFile()));
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(SmallIconSet("editclear"), i18n("Clear"), this, SLOT(clearContent()));
+ m_popupMenu->insertItem(SmallIconSet("editclear"), i18n("Clear"), this, TQT_SLOT(clearContent()));
for (int i = 0; i < m_listCount; i++)
{
m_lists[i] = new KListBox(this);
addTab(m_lists[i], m_listNames[i]);
m_seenEOL[i] = false;
- connect(m_lists[i], SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)),
- this, SLOT(showMenu(QListBoxItem*, const QPoint&)));
+ connect(m_lists[i], TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)),
+ this, TQT_SLOT(showMenu(TQListBoxItem*, const TQPoint&)));
}
}
@@ -51,13 +51,13 @@ MessageLog::~MessageLog()
{
}
-void MessageLog::insertItem(InfoType i, QString text)
+void MessageLog::insertItem(InfoType i, TQString text)
{
bool seenEOL = text.endsWith("\n");
if (seenEOL)
text.truncate(text.length() - 1);
- QStringList items(QStringList::split('\n', text));
- for (QStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
+ TQStringList items(TQStringList::split('\n', text));
+ for (TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
{
if (!m_seenEOL[i] && m_lists[i]->count() && it == items.begin())
m_lists[i]->changeItem(m_lists[i]->text(m_lists[i]->count() - 1) + *it, m_lists[i]->count() - 1);
@@ -69,9 +69,9 @@ void MessageLog::insertItem(InfoType i, QString text)
m_lists[i]->ensureCurrentVisible();
}
-QString MessageLog::content()
+TQString MessageLog::content()
{
- QString p_content;
+ TQString p_content;
KListBox* list = m_lists[currentPageIndex()];
for (uint i=0; i < list->count(); i++)
p_content.append(list->text(i) + "\n");
@@ -92,12 +92,12 @@ void MessageLog::clear(InfoType i)
void MessageLog::receivedStdout(KProcess*, char* buffer, int buflen)
{
- insertItem(Stdout, QString::fromLocal8Bit(buffer, buflen));
+ insertItem(Stdout, TQString::fromLocal8Bit(buffer, buflen));
}
void MessageLog::receivedStderr(KProcess*, char* buffer, int buflen)
{
- insertItem(Stderr, QString::fromLocal8Bit(buffer, buflen));
+ insertItem(Stderr, TQString::fromLocal8Bit(buffer, buflen));
}
void MessageLog::clearContent()
@@ -118,32 +118,32 @@ void MessageLog::copyContent()
void MessageLog::saveToFile()
{
- KURL url=KFileDialog::getSaveURL(QDir::currentDirPath(),
+ KURL url=KFileDialog::getSaveURL(TQDir::currentDirPath(),
i18n("*.log|Log Files (*.log)\n*|All Files"), this, i18n("Save Log File"));
if (url.isEmpty())
return;
- QFileInfo fileinfo(url.path());
+ TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::warningContinueCancel(0,
i18n("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
- .arg(url.path()), QString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ .arg(url.path()), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
return;
- QFile file(url.path());
+ TQFile file(url.path());
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(0, i18n("<qt>Cannot save log file<br><b>%1</b></qt>")
.arg(url.url()));
return;
}
- QTextStream textfile(&file);
+ TQTextStream textfile(&file);
textfile << content();
file.close();
}
-void MessageLog::showMenu(QListBoxItem*, const QPoint& l_point)
+void MessageLog::showMenu(TQListBoxItem*, const TQPoint& l_point)
{
m_popupMenu->exec(l_point);
}
-QString MessageLog::m_listNames[m_listCount] = {i18n("Stdout"), i18n("Stderr")};
+TQString MessageLog::m_listNames[m_listCount] = {i18n("Stdout"), i18n("Stderr")};
#include "messagelog.moc"
diff --git a/kommander/editor/messagelog.h b/kommander/editor/messagelog.h
index 6b071cf4..468a7d23 100644
--- a/kommander/editor/messagelog.h
+++ b/kommander/editor/messagelog.h
@@ -17,7 +17,7 @@
#ifndef MESSAGELOG_H
#define MESSAGELOG_H
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
@@ -31,11 +31,11 @@ class MessageLog : public QTabWidget
Q_OBJECT
public:
enum InfoType {Stdout, Stderr, All};
- MessageLog(QWidget* parent = 0, const char* name = 0);
+ MessageLog(TQWidget* parent = 0, const char* name = 0);
~MessageLog();
- virtual void insertItem(InfoType i, QString text);
+ virtual void insertItem(InfoType i, TQString text);
virtual void clear(InfoType i = All);
- QString content();
+ TQString content();
public slots:
void receivedStdout(KProcess *proc, char *buffer, int buflen);
void receivedStderr(KProcess *proc, char *buffer, int buflen);
@@ -43,10 +43,10 @@ public slots:
void copyLine();
void copyContent();
void saveToFile();
- void showMenu(QListBoxItem*, const QPoint& l_point);
+ void showMenu(TQListBoxItem*, const TQPoint& l_point);
private:
static const int m_listCount = 2;
- static QString m_listNames[m_listCount];
+ static TQString m_listNames[m_listCount];
KListBox* m_lists[m_listCount];
bool m_seenEOL[m_listCount];
KPopupMenu* m_popupMenu;
diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp
index b902f2f4..84072865 100644
--- a/kommander/editor/metadatabase.cpp
+++ b/kommander/editor/metadatabase.cpp
@@ -24,21 +24,21 @@
#include "widgetdatabase.h"
#include "formfile.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>
@@ -46,33 +46,33 @@
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;
- QValueList<MetaDataBase::Connection> connections;
- QValueList<MetaDataBase::Slot> slotList;
- QValueList<MetaDataBase::Include> includes;
- QStringList forwards, variables, sigs;
- QWidgetList tabOrder;
+ TQValueList<MetaDataBase::Connection> connections;
+ TQValueList<MetaDataBase::Slot> slotList;
+ TQValueList<MetaDataBase::Include> includes;
+ TQStringList forwards, variables, sigs;
+ TQWidgetList tabOrder;
MetaDataBase::MetaInfo metaInfo;
- QCursor cursor;
- QMap<int, QString> pixmapArguments;
- QMap<int, QString> pixmapKeys;
- QMap<QString, QString> columnFields;
- QMap<QString, QStringList> eventFunctions;
- QMap<QString, QString> functionBodies;
- QMap<QString, QString> functionComments;
- QValueList<int> breakPoints;
- QString exportMacro;
+ TQCursor cursor;
+ TQMap<int, TQString> pixmapArguments;
+ TQMap<int, TQString> pixmapKeys;
+ TQMap<TQString, TQString> columnFields;
+ TQMap<TQString, TQStringList> eventFunctions;
+ TQMap<TQString, TQString> functionBodies;
+ TQMap<TQString, TQString> functionComments;
+ TQValueList<int> breakPoints;
+ 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;
/*!
\class MetaDataBase metadatabase.h
@@ -90,9 +90,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 );
}
}
@@ -105,7 +105,7 @@ void MetaDataBase::clearDataBase()
cWidgets = 0;
}
-void MetaDataBase::addEntry( QObject *o )
+void MetaDataBase::addEntry( TQObject *o )
{
if ( !o )
return;
@@ -120,13 +120,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();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -163,7 +163,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();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -176,21 +176,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();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -203,20 +203,20 @@ 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();
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->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();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -228,23 +228,23 @@ 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();
MetaDataBaseRecord *r = db->find( (void*)o );
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 );
@@ -256,7 +256,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;
@@ -269,19 +269,19 @@ 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 )
layout->setSpacing( spacing );
}
-int MetaDataBase::spacing( QObject *o )
+int MetaDataBase::spacing( TQObject *o )
{
if ( !o )
return -1;
setupDataBase();
- if ( o->inherits( "QMainWindow" ) )
- o = ( (QMainWindow*)o )->centralWidget();
+ if ( o->inherits( "TQMainWindow" ) )
+ o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@@ -292,7 +292,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;
@@ -305,21 +305,21 @@ 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 );
if ( margin < 1 )
margin = 1;
if ( layout )
layout->setMargin( margin );
}
-int MetaDataBase::margin( QObject *o )
+int MetaDataBase::margin( TQObject *o )
{
if ( !o )
return -1;
setupDataBase();
- if ( o->inherits( "QMainWindow" ) )
- o = ( (QMainWindow*)o )->centralWidget();
+ if ( o->inherits( "TQMainWindow" ) )
+ o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@@ -330,8 +330,8 @@ int MetaDataBase::margin( QObject *o )
return r->margin;
}
-void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot )
+void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -348,8 +348,8 @@ void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &s
r->connections.append( conn );
}
-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 );
@@ -359,7 +359,7 @@ void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString
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 &&
@@ -371,31 +371,31 @@ void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString
}
}
-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 &&
@@ -406,18 +406,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 ||
@@ -427,7 +427,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 );
@@ -437,9 +437,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 ) {
@@ -464,25 +464,25 @@ 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 );
}
}
-void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& specifier,
- const QString &access, const QString &language, const QString &returnType )
+void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& specifier,
+ const TQString &access, const TQString &language, const TQString &returnType )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -498,7 +498,7 @@ void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& spe
s.access = access;
s.language = language;
s.returnType = returnType;
- QValueList<MetaDataBase::Slot>::Iterator it = r->slotList.find( s );
+ TQValueList<MetaDataBase::Slot>::Iterator it = r->slotList.find( s );
if ( it != r->slotList.end() )
r->slotList.remove( it );
r->slotList.append( s );
@@ -507,7 +507,7 @@ void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& spe
#endif
}
-void MetaDataBase::setSlotList( QObject *o, const QValueList<Slot> &slotList )
+void MetaDataBase::setSlotList( TQObject *o, const TQValueList<Slot> &slotList )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -519,8 +519,8 @@ void MetaDataBase::setSlotList( QObject *o, const QValueList<Slot> &slotList )
r->slotList = slotList;
}
-void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString& specifier,
- const QString &access, const QString &language, const QString &returnType )
+void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQString& specifier,
+ const TQString &access, const TQString &language, const TQString &returnType )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -530,7 +530,7 @@ void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString&
return;
}
- for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
Slot s = *it;
if ( s.slot == slot &&
s.specifier == specifier &&
@@ -543,7 +543,7 @@ void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString&
}
}
-void MetaDataBase::removeSlot( QObject *o, const QString &slot )
+void MetaDataBase::removeSlot( TQObject *o, const TQString &slot )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -553,7 +553,7 @@ void MetaDataBase::removeSlot( QObject *o, const QString &slot )
return;
}
- for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
Slot s = *it;
if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) {
r->slotList.remove( it );
@@ -562,20 +562,20 @@ void MetaDataBase::removeSlot( QObject *o, const QString &slot )
}
}
-QValueList<MetaDataBase::Slot> MetaDataBase::slotList( QObject *o )
+TQValueList<MetaDataBase::Slot> 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<Slot>();
+ return TQValueList<Slot>();
}
return r->slotList;
}
-bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot )
+bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -585,15 +585,15 @@ 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;
}
return false;
}
-void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString &newName )
+void MetaDataBase::changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -603,7 +603,7 @@ void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString
return;
}
- for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
Slot s = *it;
if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) {
(*it).slot = newName;
@@ -612,9 +612,9 @@ void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString
}
}
-void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot,
- const QString& specifier, const QString &access,
- const QString &language, const QString &returnType )
+void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot,
+ const TQString& specifier, const TQString &access,
+ const TQString &language, const TQString &returnType )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -624,7 +624,7 @@ void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot,
return;
}
- for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
Slot s = *it;
if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) {
(*it).specifier = specifier;
@@ -636,7 +636,7 @@ void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot,
}
}
-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 );
@@ -647,7 +647,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;
@@ -660,8 +660,8 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
if ( o->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget();
- for ( QValueList<Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
- QCString s = (*it).slot;
+ for ( TQValueList<Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
+ TQCString s = (*it).slot;
if ( !s.data() )
continue;
if ( s == slot )
@@ -670,7 +670,7 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
}
}
- for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
Slot s = *it;
if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) )
return true;
@@ -679,26 +679,26 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom )
return false;
}
-QString MetaDataBase::languageOfSlot( QObject *o, const QCString &slot )
+TQString MetaDataBase::languageOfSlot( TQObject *o, const TQCString &slot )
{
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 sl = slot;
+ TQString sl = slot;
sl = normalizeSlot( sl );
- for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
Slot s = *it;
- QString sl2 = s.slot;
+ TQString sl2 = s.slot;
sl2 = normalizeSlot( sl2 );
if ( sl == sl2 )
return s.language;
}
- return QString::null;
+ return TQString::null;
}
bool MetaDataBase::addCustomWidget( CustomWidget *wid )
@@ -707,15 +707,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<Slot>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) {
+ for ( TQValueList<Slot>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) {
if ( !w->hasSlot( MetaDataBase::normalizeSlot( (*it2).slot ).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 );
}
@@ -729,7 +729,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid )
r->name = wid->className;
r->group = WidgetDatabase::widgetGroup( "Custom" );
r->toolTip = wid->className;
- r->iconSet = new QIconSet( *wid->pixmap, *wid->pixmap );
+ r->iconSet = new TQIconSet( *wid->pixmap, *wid->pixmap );
r->isContainer = wid->isContainer;
wid->id = WidgetDatabase::addCustomWidget( r );
cWidgets->append( wid );
@@ -741,7 +741,7 @@ void MetaDataBase::removeCustomWidget( CustomWidget *w )
cWidgets->removeRef( w );
}
-QPtrList<MetaDataBase::CustomWidget> *MetaDataBase::customWidgets()
+TQPtrList<MetaDataBase::CustomWidget> *MetaDataBase::customWidgets()
{
setupDataBase();
return cWidgets;
@@ -767,7 +767,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 )
@@ -776,7 +776,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 );
@@ -789,20 +789,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 );
@@ -815,20 +815,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 );
@@ -841,20 +841,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::setSignalList( QObject *o, const QStringList &sigs )
+void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -866,8 +866,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 );
@@ -887,20 +887,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 );
@@ -913,7 +913,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 );
@@ -934,10 +934,10 @@ MetaDataBase::CustomWidget::CustomWidget()
className = "MyCustomWidget";
includeFile = "mywidget.h";
includePolicy = Local;
- sizeHint = QSize( -1, -1 );
- pixmap = new QPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) );
+ sizeHint = TQSize( -1, -1 );
+ pixmap = new TQPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) );
id = -1;
- sizePolicy = QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
+ sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred );
isContainer = false;
}
@@ -948,14 +948,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();
MetaDataBaseRecord *r = db->find( (void*)w );
@@ -968,7 +968,7 @@ void MetaDataBase::setCursor( QWidget *w, const QCursor &c )
r->cursor = c;
}
-QCursor MetaDataBase::cursor( QWidget *w )
+TQCursor MetaDataBase::cursor( TQWidget *w )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)w );
@@ -993,7 +993,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;
@@ -1004,45 +1004,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 ( normalizeSlot( *it ) == normalizeSlot( 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( normalizeSlot( slot ) ) != -1 )
return true;
- for ( QValueList<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
if ( normalizeSlot( (*it).slot ) == normalizeSlot( 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;
@@ -1058,22 +1058,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;
@@ -1089,7 +1089,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;
@@ -1105,22 +1105,22 @@ 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();
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->pixmapKeys.find( pixmap );
}
-void MetaDataBase::clearPixmapKeys( QObject *o )
+void MetaDataBase::clearPixmapKeys( TQObject *o )
{
if ( !o )
return;
@@ -1137,7 +1137,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;
@@ -1152,37 +1152,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;
}
-QString MetaDataBase::normalizeSlot( const QString &s )
+TQString MetaDataBase::normalizeSlot( const TQString &s )
{
return Parser::cleanArgs( s );
}
-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::setExportMacro( QObject *o, const QString &macro )
+void MetaDataBase::setExportMacro( TQObject *o, const TQString &macro )
{
if ( !o )
return;
@@ -1197,7 +1197,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 "";
@@ -1212,7 +1212,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/kommander/editor/metadatabase.h b/kommander/editor/metadatabase.h
index 8bb79c38..4fd203b8 100644
--- a/kommander/editor/metadatabase.h
+++ b/kommander/editor/metadatabase.h
@@ -21,15 +21,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"
@@ -41,8 +41,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 ;
@@ -51,11 +51,11 @@ public:
struct Slot
{
- QString returnType;
- QCString slot;
- QString specifier;
- QString access;
- QString language;
+ TQString returnType;
+ TQCString slot;
+ TQString specifier;
+ TQString access;
+ TQString language;
bool operator==( const Slot &s ) const {
return ( returnType == s.returnType &&
slot == s.slot &&
@@ -68,8 +68,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;
@@ -84,20 +84,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<Slot> lstSlots;
- QValueList<Property> lstProperties;
+ TQSize sizeHint;
+ TQSizePolicy sizePolicy;
+ TQPixmap *pixmap;
+ TQValueList<TQCString> lstSignals;
+ TQValueList<Slot> lstSlots;
+ TQValueList<Property> lstProperties;
int id;
bool isContainer;
};
@@ -105,26 +105,26 @@ 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 MetaInfo
{
- QString license;
- QString version;
- QString comment;
- QString author;
+ TQString license;
+ TQString version;
+ TQString comment;
+ TQString author;
};
struct EventDescription
{
- QString name;
- QStringList args;
+ TQString name;
+ TQStringList args;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const EventDescription& ) const { return FALSE; }
#endif
@@ -133,89 +133,89 @@ public:
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 addConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot );
- static void removeConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot );
- 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 addSlot( QObject *o, const QCString &slot, const QString& specifier, const QString &access, const QString &language, const QString &returnType );
- static void removeSlot( QObject *o, const QCString &slot, const QString& specifier, const QString &access, const QString &language, const QString &returnType );
- static void removeSlot( QObject *o, const QString &slot );
- static QValueList<Slot> slotList( QObject *o );
- static bool isSlotUsed( QObject *o, const QCString &slot );
- static bool hasSlot( QObject *o, const QCString &slot, bool onlyCustom = FALSE );
- static void changeSlot( QObject *o, const QCString &slot, const QCString &newName );
- static void changeSlotAttributes( QObject *o, const QCString &slot,
- const QString& specifier, const QString &access,
- const QString &language, const QString &returnType );
- static QString languageOfSlot( QObject *o, const QCString &slot );
- static void setSlotList( QObject *o, const QValueList<Slot> &slotList );
+ 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 addConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot );
+ static void removeConnection( TQObject *o, TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot );
+ 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 addSlot( TQObject *o, const TQCString &slot, const TQString& specifier, const TQString &access, const TQString &language, const TQString &returnType );
+ static void removeSlot( TQObject *o, const TQCString &slot, const TQString& specifier, const TQString &access, const TQString &language, const TQString &returnType );
+ static void removeSlot( TQObject *o, const TQString &slot );
+ static TQValueList<Slot> slotList( TQObject *o );
+ static bool isSlotUsed( TQObject *o, const TQCString &slot );
+ static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = FALSE );
+ static void changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName );
+ static void changeSlotAttributes( TQObject *o, const TQCString &slot,
+ const TQString& specifier, const TQString &access,
+ const TQString &language, const TQString &returnType );
+ static TQString languageOfSlot( TQObject *o, const TQCString &slot );
+ static void setSlotList( TQObject *o, const TQValueList<Slot> &slotList );
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 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 QString normalizeSlot( const QString &slot );
+ static TQString normalizeSlot( const TQString &slot );
- static void clear( QObject *o );
+ static void clear( TQObject *o );
- 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/kommander/editor/multilineeditorimpl.cpp b/kommander/editor/multilineeditorimpl.cpp
index 1b823d3f..2a0ec9b7 100644
--- a/kommander/editor/multilineeditorimpl.cpp
+++ b/kommander/editor/multilineeditorimpl.cpp
@@ -23,16 +23,16 @@
#include "command.h"
#include "mainwindow.h"
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
#include <klocale.h>
-MultiLineEditor::MultiLineEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw )
+MultiLineEditor::MultiLineEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
: MultiLineEditorBase( parent, 0, true ), formwindow( fw )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
- mlined = (QMultiLineEdit*)editWidget;
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ mlined = (TQMultiLineEdit*)editWidget;
// #### complete list of properties here
preview->setAlignment( mlined->alignment() );
preview->setMaxLines( mlined->maxLines() );
@@ -61,7 +61,7 @@ void MultiLineEditor::applyClicked()
}
-TextEditor::TextEditor( QWidget *parent, const QString &text )
+TextEditor::TextEditor( TQWidget *parent, const TQString &text )
: MultiLineEditorBase( parent, 0, true )
{
buttonApply->hide();
@@ -71,11 +71,11 @@ TextEditor::TextEditor( QWidget *parent, const QString &text )
preview->selectAll();
}
-QString TextEditor::getText( QWidget *parent, const QString &text )
+TQString TextEditor::getText( TQWidget *parent, const TQString &text )
{
TextEditor dlg( parent, text );
- if ( dlg.exec() == QDialog::Accepted ) {
- QString txt = dlg.preview->text();
+ if ( dlg.exec() == TQDialog::Accepted ) {
+ TQString txt = dlg.preview->text();
int i = txt.length() - 1;
while ( i >= 0 &&
( txt[ i ] == '\n' || txt[ i ] == ' ' || txt[ i ] == '\t' || txt[ i ].isSpace() ) ) {
@@ -84,7 +84,7 @@ QString TextEditor::getText( QWidget *parent, const QString &text )
}
return txt;
}
- return QString::null;
+ return TQString::null;
}
void TextEditor::okClicked()
diff --git a/kommander/editor/multilineeditorimpl.h b/kommander/editor/multilineeditorimpl.h
index 16314b2a..0f6ff96a 100644
--- a/kommander/editor/multilineeditorimpl.h
+++ b/kommander/editor/multilineeditorimpl.h
@@ -31,14 +31,14 @@ class MultiLineEditor : public MultiLineEditorBase
Q_OBJECT
public:
- MultiLineEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw );
+ MultiLineEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
protected slots:
void okClicked();
void applyClicked();
private:
- QMultiLineEdit *mlined;
+ TQMultiLineEdit *mlined;
FormWindow *formwindow;
};
@@ -48,9 +48,9 @@ class TextEditor : public MultiLineEditorBase
Q_OBJECT
public:
- TextEditor( QWidget *parent, const QString &text );
+ TextEditor( TQWidget *parent, const TQString &text );
- static QString getText( QWidget *parent, const QString &text );
+ static TQString getText( TQWidget *parent, const TQString &text );
protected slots:
void okClicked();
diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp
index 70e7b1df..ee623e48 100644
--- a/kommander/editor/newformimpl.cpp
+++ b/kommander/editor/newformimpl.cpp
@@ -28,16 +28,16 @@
#include "resource.h"
#include "formfile.h"
-#include <qiconview.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
+#include <tqiconview.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqregexp.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>
#include <klocale.h>
#include <kglobal.h>
@@ -47,18 +47,18 @@
static int _forms = 0;
-FormItem::FormItem(QIconView *view, const QString &text) : NewItem(view, text)
+FormItem::FormItem(TQIconView *view, const TQString &text) : NewItem(view, text)
{
}
void FormItem::insert()
{
- QString n = "Form" + QString::number(++_forms);
+ TQString n = "Form" + TQString::number(++_forms);
FormWindow *fw = 0;
FormFile *ff = new FormFile(FormFile::createUnnamedFileName(), true);
fw = new FormWindow(ff, MainWindow::self, MainWindow::self->qWorkspace(), n);
MetaDataBase::addEntry(fw);
- QWidget *w = 0L;
+ TQWidget *w = 0L;
if (fType == Dialog)
{
w = WidgetFactory::create(WidgetDatabase::idFromClassName("Dialog"), fw, n.latin1());
@@ -87,60 +87,60 @@ void FormItem::insert()
-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)
lst << w->name();
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);
}
void CustomFormItem::insert()
{
- 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);
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());
}
}
}
-NewForm::NewForm(QWidget *parent, const QString &templatePath)
+NewForm::NewForm(TQWidget *parent, 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()));
- QIconViewItem *cur = 0;
+ TQIconViewItem *cur = 0;
FormItem *fi = new FormItem(templateView, i18n("Dialog"));
allItems.append(fi);
fi->setFormType(FormItem::Dialog);
@@ -154,25 +154,25 @@ NewForm::NewForm(QWidget *parent, const QString &templatePath)
fi->setDragEnabled(false);
- QStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/templates");
+ TQStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/templates");
if (!templatePath.isEmpty())
searchPaths.append(templatePath);
// search each path
- for (QStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it)
+ for (TQStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it)
{
- if (!QFile::exists(*it))
+ if (!TQFile::exists(*it))
continue;
- QDir dir(*it);
- const QFileInfoList* fileList = dir.entryInfoList(QDir::DefaultFilter, QDir::DirsFirst | QDir::Name);
+ TQDir dir(*it);
+ const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
if (fileList)
for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
{
- QFileInfo* fi = fit.current();
+ TQFileInfo* fi = fit.current();
if (!fi->isFile() || fi->extension() != "kmdr")
continue;
- QString name = fi->baseName();
+ TQString name = fi->baseName();
name = name.replace("_", " ");
CustomFormItem *ci = new CustomFormItem(templateView, name);
allItems.append(ci);
@@ -194,7 +194,7 @@ void NewForm::accept()
}
-void NewForm::itemChanged(QIconViewItem *item)
+void NewForm::itemChanged(TQIconViewItem *item)
{
Q_UNUSED(item);
}
diff --git a/kommander/editor/newformimpl.h b/kommander/editor/newformimpl.h
index 12fec22c..9aad4155 100644
--- a/kommander/editor/newformimpl.h
+++ b/kommander/editor/newformimpl.h
@@ -20,7 +20,7 @@
#define NEWFORMIMPL_H
#include "newform.h"
-#include <qiconview.h>
+#include <tqiconview.h>
class FormFile;
@@ -29,7 +29,7 @@ class NewItem : public QIconViewItem
{
public:
enum Type {Form, CustomForm};
- NewItem( QIconView *view, const QString &text ) : QIconViewItem( view, text ) {}
+ NewItem( TQIconView *view, const TQString &text ) : TQIconViewItem( view, text ) {}
virtual void insert( ) = 0;
};
@@ -37,7 +37,7 @@ class FormItem : public NewItem
{
public:
enum FormType {Dialog, Wizard, MainWindow};
- FormItem( QIconView *view, const QString &text);
+ FormItem( TQIconView *view, const TQString &text);
void insert();
int rtti() const {return (int)Form;}
void setFormType(FormType ft) {fType = ft;}
@@ -49,25 +49,25 @@ private:
class CustomFormItem : public NewItem
{
public:
- CustomFormItem( QIconView *view, const QString &text );
+ CustomFormItem( TQIconView *view, const TQString &text );
void insert();
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 NewForm : public NewFormBase
{
Q_OBJECT
public:
- NewForm( QWidget *parent, const QString &templatePath );
+ NewForm( TQWidget *parent, const TQString &templatePath );
void accept();
protected slots:
- void itemChanged(QIconViewItem *item);
+ void itemChanged(TQIconViewItem *item);
private:
- QPtrList<QIconViewItem> allItems;
+ TQPtrList<TQIconViewItem> allItems;
};
#endif
diff --git a/kommander/editor/orderindicator.cpp b/kommander/editor/orderindicator.cpp
index 31450bbf..fee29150 100644
--- a/kommander/editor/orderindicator.cpp
+++ b/kommander/editor/orderindicator.cpp
@@ -18,17 +18,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;
@@ -43,7 +43,7 @@ OrderIndicator::~OrderIndicator()
}
-void OrderIndicator::setOrder( int i, QWidget* wid )
+void OrderIndicator::setOrder( int i, TQWidget* wid )
{
if ( widget != wid )
return;
@@ -58,9 +58,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 );
@@ -72,27 +72,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() );
@@ -100,8 +100,8 @@ void OrderIndicator::updateMask()
setMask( bm );
}
-void OrderIndicator::mousePressEvent( QMouseEvent *e )
+void OrderIndicator::mousePressEvent( TQMouseEvent *e )
{
- QApplication::sendEvent( widget, e );
+ TQApplication::sendEvent( widget, e );
}
#include "orderindicator.moc"
diff --git a/kommander/editor/orderindicator.h b/kommander/editor/orderindicator.h
index 28cc7816..24cae185 100644
--- a/kommander/editor/orderindicator.h
+++ b/kommander/editor/orderindicator.h
@@ -21,7 +21,7 @@
#ifndef ORDER_INDICATOR_H
#define ORDER_INDICATOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
class FormWindow;
@@ -30,20 +30,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/kommander/editor/paletteeditoradvancedimpl.cpp b/kommander/editor/paletteeditoradvancedimpl.cpp
index 3b5ccffd..69c90c33 100644
--- a/kommander/editor/paletteeditoradvancedimpl.cpp
+++ b/kommander/editor/paletteeditoradvancedimpl.cpp
@@ -23,13 +23,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
@@ -38,36 +38,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 );
@@ -187,58 +187,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:
@@ -261,12 +261,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:
@@ -282,9 +282,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 );
@@ -297,9 +297,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 );
@@ -311,14 +311,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 );
@@ -331,9 +331,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 );
@@ -342,31 +342,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 );
@@ -375,23 +375,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 );
@@ -400,10 +400,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) ) );
@@ -422,10 +422,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);
@@ -433,11 +433,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 );
@@ -446,9 +446,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();
@@ -456,10 +456,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);
@@ -467,20 +467,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:
@@ -501,8 +501,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:
@@ -527,17 +527,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;
}
@@ -599,32 +599,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/kommander/editor/paletteeditoradvancedimpl.h b/kommander/editor/paletteeditoradvancedimpl.h
index a1b56c06..b9c378dd 100644
--- a/kommander/editor/paletteeditoradvancedimpl.h
+++ b/kommander/editor/paletteeditoradvancedimpl.h
@@ -29,12 +29,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);
@@ -51,15 +51,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();
@@ -70,17 +70,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/kommander/editor/paletteeditorimpl.cpp b/kommander/editor/paletteeditorimpl.cpp
index 9264c810..bc3877f4 100644
--- a/kommander/editor/paletteeditorimpl.cpp
+++ b/kommander/editor/paletteeditorimpl.cpp
@@ -25,21 +25,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()
@@ -49,7 +49,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;
@@ -71,59 +71,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) ) );
@@ -133,8 +133,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) ) );
@@ -155,10 +155,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) ) );
@@ -177,10 +177,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);
@@ -188,11 +188,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 );
@@ -201,9 +201,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();
@@ -211,10 +211,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);
@@ -222,20 +222,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:
@@ -258,34 +258,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/kommander/editor/paletteeditorimpl.h b/kommander/editor/paletteeditorimpl.h
index 258d0978..abd68dfc 100644
--- a/kommander/editor/paletteeditorimpl.h
+++ b/kommander/editor/paletteeditorimpl.h
@@ -30,11 +30,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();
@@ -51,17 +51,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/kommander/editor/parser.cpp b/kommander/editor/parser.cpp
index 4fc13c5f..15374aa5 100644
--- a/kommander/editor/parser.cpp
+++ b/kommander/editor/parser.cpp
@@ -19,28 +19,28 @@
**********************************************************************/
#include "parser.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class NormalizeObject : public QObject
{
public:
- NormalizeObject() : QObject() {}
- static QCString normalizeSignalSlot( const char *signalSlot ) { return QObject::normalizeSignalSlot( signalSlot ); }
+ NormalizeObject() : TQObject() {}
+ static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); }
};
-QString Parser::cleanArgs( const QString &func )
+TQString Parser::cleanArgs( const TQString &func )
{
- QString slot( func );
+ TQString slot( func );
int begin = slot.find( "(" ) + 1;
- QString args = slot.mid( begin );
+ TQString args = slot.mid( begin );
args = args.left( args.find( ")" ) );
- QStringList lst = QStringList::split( ',', args );
- QString res = slot.left( begin );
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQStringList lst = TQStringList::split( ',', args );
+ TQString res = slot.left( begin );
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( it != lst.begin() )
res += ",";
- QString arg = *it;
+ TQString arg = *it;
int pos = 0;
if ( ( pos = arg.find( "&" ) ) != -1 ) {
arg = arg.left( pos + 1 );
@@ -50,7 +50,7 @@ QString Parser::cleanArgs( const QString &func )
arg = arg.simplifyWhiteSpace();
if ( ( pos = arg.find( ':' ) ) != -1 )
arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace();
- QStringList l = QStringList::split( ' ', arg );
+ TQStringList l = TQStringList::split( ' ', arg );
if ( l.count() == 2 ) {
if ( l[ 0 ] != "const" && l[ 0 ] != "unsigned" && l[ 0 ] != "var" )
arg = l[ 0 ];
@@ -62,5 +62,5 @@ QString Parser::cleanArgs( const QString &func )
}
res += ")";
- return QString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
+ return TQString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
}
diff --git a/kommander/editor/parser.h b/kommander/editor/parser.h
index 5a5671ad..ace96d9e 100644
--- a/kommander/editor/parser.h
+++ b/kommander/editor/parser.h
@@ -21,12 +21,12 @@
#ifndef PARSER_H
#define PARSER_H
-#include <qstring.h>
+#include <tqstring.h>
class Parser
{
public:
- static QString cleanArgs( const QString &func );
+ static TQString cleanArgs( const TQString &func );
};
diff --git a/kommander/editor/pics/images.h b/kommander/editor/pics/images.h
index adec0936..71009fb6 100644
--- a/kommander/editor/pics/images.h
+++ b/kommander/editor/pics/images.h
@@ -10826,8 +10826,8 @@ static const unsigned char qtlogo_png_data[] = {
0x82
};
-#include <qcstring.h>
-#include <qdict.h>
+#include <tqcstring.h>
+#include <tqdict.h>
static struct Embed {
unsigned int size;
const unsigned char *data;
@@ -10954,10 +10954,10 @@ static struct Embed {
{ 0, 0, 0 }
};
-static const QByteArray& qembed_findData( const char* name )
+static const TQByteArray& qembed_findData( const char* name )
{
- static QDict<QByteArray> dict;
- QByteArray* ba = dict.find( name );
+ static TQDict<TQByteArray> dict;
+ TQByteArray* ba = dict.find( name );
if ( !ba ) {
for ( int i = 0; embed_vec[i].data; i++ ) {
if ( strcmp(embed_vec[i].name, name) == 0 ) {
@@ -10969,7 +10969,7 @@ static const QByteArray& qembed_findData( const char* name )
}
}
if ( !ba ) {
- static QByteArray dummy;
+ static TQByteArray dummy;
return dummy;
}
}
diff --git a/kommander/editor/pixmapchooser.cpp b/kommander/editor/pixmapchooser.cpp
index 1a5a8535..92512c68 100644
--- a/kommander/editor/pixmapchooser.cpp
+++ b/kommander/editor/pixmapchooser.cpp
@@ -18,7 +18,7 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "pixmapchooser.h"
#include "formwindow.h"
@@ -37,13 +37,13 @@
#include "project.h"
#endif
-#include <qapplication.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qiconview.h>
+#include <tqapplication.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqiconview.h>
#include <klocale.h>
@@ -876,30 +876,30 @@ static ImageIconProvider *imageIconProvider = 0;
static PixmapChooser *pixmapChooser = 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 {
@@ -907,63 +907,63 @@ void PixmapView::previewUrl( const QUrl &u )
}
}
-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 = qApp->translate( "qChoosePixmap", "All Pixmaps (" );
- for ( uint i = 0; i < QImageIO::outputFormats().count(); i++ ) {
+ TQString filter;
+ TQString all = qApp->translate( "qChoosePixmap", "All Pixmaps (" );
+ for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
filter += qApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ).
- arg( QImageIO::outputFormats().at( i ) ).
- arg( "*." + QString( QImageIO::outputFormats().at( i ) ).lower() );
- all += "*." + QString( QImageIO::outputFormats().at( i ) ).lower() + ";";
+ arg( TQImageIO::outputFormats().at( i ) ).
+ arg( "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() );
+ all += "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() + ";";
}
filter.prepend( all + qApp->translate( "qChoosePixmap", ")\n" ) );
filter += qApp->translate( "qChoosePixmap", "All Files (*)" );
- 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();
+ 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 = i18n( "All Pixmaps" );
+ TQString filter;
+ TQString all = i18n( "All Pixmaps" );
all += " (";
- for ( uint i = 0; i < QImageIO::outputFormats().count(); i++ ) {
+ for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
filter += i18n( "%1-Pixmaps (%2)\n" ).
- arg( QImageIO::outputFormats().at( i ) ).
- arg( "*." + QString( QImageIO::outputFormats().at( i ) ).lower() );
- all += "*." + QString( QImageIO::outputFormats().at( i ) ).lower() + ";";
+ arg( TQImageIO::outputFormats().at( i ) ).
+ arg( "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() );
+ all += "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() + ";";
}
filter.prepend( all + ")\n" );
filter += i18n( "All Files (*)" );
- 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( i18n( "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() );
@@ -976,8 +976,8 @@ 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;
}
@@ -985,12 +985,12 @@ QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QStr
#endif
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( PixmapChooser::loadPixmap( "image.xpm" ) );
+ if ( dia.exec() == TQDialog::Accepted ) {
+ TQPixmap pix( PixmapChooser::loadPixmap( "image.xpm" ) );
MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() );
return pix;
}
@@ -1000,26 +1000,26 @@ 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( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
+ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name )
+ : TQFileIconProvider( parent, name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
{
- 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 );
}
}
@@ -1032,7 +1032,7 @@ PixmapChooser::PixmapChooser()
largePixDir = "pics/large/";
}
-QString PixmapChooser::pixmapPath( Size size ) const
+TQString PixmapChooser::pixmapPath( Size size ) const
{
if ( size == Small )
return smallPixDir;
@@ -1043,19 +1043,19 @@ QString PixmapChooser::pixmapPath( Size size ) const
return largePixDir;
}
-QPixmap PixmapChooser::loadPixmap( const QString &name, Size size )
+TQPixmap PixmapChooser::loadPixmap( const TQString &name, Size size )
{
#if defined(DESIGNER)
if ( !pixmapChooser )
pixmapChooser = new PixmapChooser;
if ( name == "logo" )
- return QPixmap( logo_xpm );
+ return TQPixmap( logo_xpm );
if ( name[ 0 ] == '/' || name[ 0 ] == '\\' || name[ 1 ] == ':' )
- return QPixmap( name );
+ return TQPixmap( name );
- QString lookup;
+ TQString lookup;
switch ( size ) {
case Small:
lookup = "small/";
@@ -1073,21 +1073,21 @@ QPixmap PixmapChooser::loadPixmap( const QString &name, Size size )
break;
}
- QString lookup_png = lookup + QFileInfo( name ).baseName() + ".png";
+ TQString lookup_png = lookup + TQFileInfo( name ).baseName() + ".png";
lookup += name;
Embed *e = &embed_vec[ 0 ];
while ( e->name ) {
- if ( QString( e->name ) == lookup ) {
- QImage img;
+ if ( TQString( e->name ) == lookup ) {
+ TQImage img;
img.loadFromData( (const uchar*)e->data, e->size );
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( img );
return pix;
- } else if ( QString( e->name ) == lookup_png ) {
- QImage img;
+ } else if ( TQString( e->name ) == lookup_png ) {
+ TQImage img;
img.loadFromData( (const uchar*)e->data, e->size );
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( img );
return pix;
}
@@ -1095,11 +1095,11 @@ QPixmap PixmapChooser::loadPixmap( const QString &name, Size size )
}
// fallback
- return QPixmap( pixmapChooser->pixmapPath( size ) + name );
+ return TQPixmap( pixmapChooser->pixmapPath( size ) + name );
#else
Q_UNUSED( name );
Q_UNUSED( size );
- return QPixmap();
+ return TQPixmap();
#endif
}
#include "pixmapchooser.moc"
diff --git a/kommander/editor/pixmapchooser.h b/kommander/editor/pixmapchooser.h
index 22e5f94c..fe54942e 100644
--- a/kommander/editor/pixmapchooser.h
+++ b/kommander/editor/pixmapchooser.h
@@ -21,26 +21,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;
};
@@ -49,19 +49,19 @@ 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 );
class PixmapChooser
@@ -70,15 +70,15 @@ public:
enum Size { Mini, Small, Large, NoSize, Disabled };
PixmapChooser();
- QString pixmapPath( Size size ) const;
+ TQString pixmapPath( Size size ) const;
- static QPixmap loadPixmap( const QString &name, Size size = Small );
+ static TQPixmap loadPixmap( const TQString &name, Size size = Small );
private:
- QString smallPixDir;
- QString largePixDir;
- QString miniPixDir;
- QString noSizePixDir;
+ TQString smallPixDir;
+ TQString largePixDir;
+ TQString miniPixDir;
+ TQString noSizePixDir;
};
diff --git a/kommander/editor/previewframe.cpp b/kommander/editor/previewframe.cpp
index 9ffd77af..3be0c2ae 100644
--- a/kommander/editor/previewframe.cpp
+++ b/kommander/editor/previewframe.cpp
@@ -18,16 +18,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 );
@@ -36,15 +36,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/kommander/editor/previewframe.h b/kommander/editor/previewframe.h
index b8ff33a4..21ecd9a7 100644
--- a/kommander/editor/previewframe.h
+++ b/kommander/editor/previewframe.h
@@ -21,8 +21,8 @@
#ifndef __previewframe_h__
#define __previewframe_h__
-#include <qvbox.h>
-#include <qworkspace.h>
+#include <tqvbox.h>
+#include <tqworkspace.h>
#include "previewwidgetimpl.h"
@@ -30,12 +30,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
@@ -43,8 +43,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/kommander/editor/previewwidgetimpl.cpp b/kommander/editor/previewwidgetimpl.cpp
index 9febc180..98fb66b7 100644
--- a/kommander/editor/previewwidgetimpl.cpp
+++ b/kommander/editor/previewwidgetimpl.cpp
@@ -18,39 +18,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/kommander/editor/previewwidgetimpl.h b/kommander/editor/previewwidgetimpl.h
index 142a7758..37080916 100644
--- a/kommander/editor/previewwidgetimpl.h
+++ b/kommander/editor/previewwidgetimpl.h
@@ -28,10 +28,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/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp
index 9dfb7759..bb35c570 100644
--- a/kommander/editor/propertyeditor.cpp
+++ b/kommander/editor/propertyeditor.cpp
@@ -18,7 +18,7 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "propertyeditor.h"
#include "pixmapchooser.h"
@@ -40,38 +40,38 @@
#include <limits.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 <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 <kcolordialog.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 <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 "pics/arrow.xbm"
#include "pics/uparrow.xbm"
@@ -90,8 +90,8 @@
#include <klocale.h>
-static QFontDatabase *fontDataBase = 0;
-QString assistantPath();
+static TQFontDatabase *fontDataBase = 0;
+TQString assistantPath();
static void cleanupFontDatabase()
{
@@ -99,7 +99,7 @@ static void cleanupFontDatabase()
fontDataBase = 0;
}
-static QStringList getFontList()
+static TQStringList getFontList()
{
if ( !fontDataBase ) {
fontDataBase = new QFontDatabase;
@@ -113,8 +113,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;
@@ -122,21 +122,21 @@ 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() ) {
- QStringList lst;
- lst << assistantPath() << (QString( "d:" ) + QString( href ));
- QProcess proc( lst );
+ TQStringList lst;
+ lst << assistantPath() << (TQString( "d:" ) + TQString( href ));
+ TQProcess proc( lst );
proc.start();
}
return false; // do not hide window
@@ -158,8 +158,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;
@@ -194,10 +194,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;
}
@@ -218,12 +218,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 );
@@ -234,16 +234,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 )
@@ -261,29 +261,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();
}
@@ -353,12 +353,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;
}
@@ -381,7 +381,7 @@ void PropertyItem::setChanged( bool b, bool updateDb )
updateResetButtonState();
}
-QString PropertyItem::name() const
+TQString PropertyItem::name() const
{
return propertyName;
}
@@ -392,19 +392,19 @@ void PropertyItem::createResetButton()
resetButton->parentWidget()->lower();
return;
}
- 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 );
resetButton->setPixmap( PixmapChooser::loadPixmap( "resetproperty.xpm", PixmapChooser::Mini ) );
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();
}
@@ -422,10 +422,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)
@@ -436,7 +436,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() );
@@ -503,13 +503,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
@@ -517,7 +517,7 @@ int PropertyItem::currentIntItem() const
return -1;
}
-void PropertyItem::setCurrentItem( const QString & )
+void PropertyItem::setCurrentItem( const TQString & )
{
}
@@ -530,12 +530,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() &&
@@ -544,18 +544,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( QRegExp( "\n" ), " " );
- QListViewItem::setText( col, txt );
+ txt = txt.replace( TQRegExp( "\n" ), " " );
+ 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 )
{
@@ -563,28 +563,28 @@ 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( lin, "ascii_validator" ) );
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"
@@ -592,29 +592,29 @@ QLineEdit *PropertyTextItem::lined()
} if ( !hasMultiLines ) {
lin->hide();
} else {
- button = new QPushButton( i18n("..."), box );
+ button = new TQPushButton( i18n("..."), box );
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;
}
@@ -640,11 +640,11 @@ void PropertyTextItem::childValueChanged( PropertyItem *child )
listview->propertyEditor()->formWindow()->commandHistory()->setModified( true );
}
-static QString to_string( const QVariant &v, bool accel )
+static TQString to_string( const TQVariant &v, bool accel )
{
if ( !accel )
return v.toString();
- return QAccel::keyToString( v.toInt() );
+ return TQAccel::keyToString( v.toInt() );
}
void PropertyTextItem::showEditor()
@@ -656,7 +656,7 @@ void PropertyTextItem::showEditor()
lined()->blockSignals( false );
}
- QWidget* w;
+ TQWidget* w;
if ( hasMultiLines )
w = box;
else
@@ -696,7 +696,7 @@ void PropertyTextItem::initChildren()
void PropertyTextItem::hideEditor()
{
PropertyItem::hideEditor();
- QWidget* w;
+ TQWidget* w;
if ( hasMultiLines )
w = box;
else
@@ -705,7 +705,7 @@ void PropertyTextItem::hideEditor()
w->hide();
}
-void PropertyTextItem::setValue( const QVariant &v )
+void PropertyTextItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -726,9 +726,9 @@ void PropertyTextItem::setValue( const QVariant &v )
void PropertyTextItem::setValue()
{
setText( 1, lined()->text() );
- QVariant v;
+ TQVariant v;
if ( accel )
- v = QAccel::stringToKey( lined()->text() );
+ v = TQAccel::stringToKey( lined()->text() );
else
v = lined()->text();
PropertyItem::setValue( v );
@@ -737,7 +737,7 @@ void PropertyTextItem::setValue()
void PropertyTextItem::getText()
{
- QString txt = TextEditor::getText( listview, value().toString() );
+ TQString txt = TextEditor::getText( listview, value().toString() );
if ( !txt.isEmpty() ) {
setText( 1, txt );
PropertyItem::setValue( txt );
@@ -751,30 +751,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;
}
@@ -783,10 +783,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() ) {
@@ -799,11 +799,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;
@@ -811,19 +811,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();
}
@@ -831,7 +831,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;
@@ -842,12 +842,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;
}
@@ -879,7 +879,7 @@ void PropertyDateItem::hideEditor()
lin->hide();
}
-void PropertyDateItem::setValue( const QVariant &v )
+void PropertyDateItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -898,7 +898,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();
@@ -906,7 +906,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;
@@ -917,10 +917,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;
@@ -954,7 +954,7 @@ void PropertyTimeItem::hideEditor()
lin->hide();
}
-void PropertyTimeItem::setValue( const QVariant &v )
+void PropertyTimeItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -973,7 +973,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();
@@ -981,7 +981,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;
@@ -992,10 +992,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;
@@ -1029,7 +1029,7 @@ void PropertyDateTimeItem::hideEditor()
lin->hide();
}
-void PropertyDateTimeItem::setValue( const QVariant &v )
+void PropertyDateTimeItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1048,7 +1048,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();
@@ -1056,36 +1056,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();
}
@@ -1113,7 +1113,7 @@ void PropertyBoolItem::hideEditor()
combo()->hide();
}
-void PropertyBoolItem::setValue( const QVariant &v )
+void PropertyBoolItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1127,7 +1127,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 );
@@ -1140,41 +1140,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;
}
@@ -1202,7 +1202,7 @@ void PropertyIntItem::hideEditor()
spinBox()->hide();
}
-void PropertyIntItem::setValue( const QVariant &v )
+void PropertyIntItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1218,9 +1218,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 );
}
@@ -1228,7 +1228,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
@@ -1239,24 +1239,24 @@ void PropertyIntItem::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;
@@ -1266,7 +1266,7 @@ QComboBox *PropertyListItem::combo()
PropertyListItem::~PropertyListItem()
{
- delete (QComboBox*)comb;
+ delete (TQComboBox*)comb;
comb = 0;
}
@@ -1292,7 +1292,7 @@ void PropertyListItem::hideEditor()
combo()->hide();
}
-void PropertyListItem::setValue( const QVariant &v )
+void PropertyListItem::setValue( const TQVariant &v )
{
if ( comb ) {
combo()->blockSignals( true );
@@ -1309,7 +1309,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 );
@@ -1318,12 +1318,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;
@@ -1345,7 +1345,7 @@ void PropertyListItem::setCurrentItem( const QString &s )
oldString = currentItem();
}
-void PropertyListItem::addItem( const QString &s )
+void PropertyListItem::addItem( const TQString &s )
{
combo()->insertItem( s );
}
@@ -1377,7 +1377,7 @@ int PropertyListItem::currentIntItemFromObject() const
return oldInt;
}
-QString PropertyListItem::currentItemFromObject() const
+TQString PropertyListItem::currentItemFromObject() const
{
return oldString;
}
@@ -1385,18 +1385,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();
@@ -1451,7 +1451,7 @@ void PropertyCoordItem::initChildren()
PropertyCoordItem::~PropertyCoordItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
lin = 0;
}
@@ -1473,22 +1473,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 );
@@ -1503,7 +1503,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.setX( child->value().toInt() );
else if ( child->name() == i18n("y" ) )
@@ -1514,14 +1514,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" ) )
@@ -1534,26 +1534,26 @@ void PropertyCoordItem::childValueChanged( PropertyItem *child )
// --------------------------------------------------------------
PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool isIconSet )
+ const TQString &propName, bool isIconSet )
: PropertyItem( l, after, prop, propName ), iconSet( isIconSet )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- pixPrev = new QLabel( box );
- pixPrev->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum ) );
- pixPrev->setBackgroundColor( pixPrev->colorGroup().color( QColorGroup::Base ) );
- button = new QPushButton( "...", box );
+ pixPrev = new TQLabel( box );
+ pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) );
+ pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) );
+ button = new TQPushButton( "...", box );
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()
@@ -1572,9 +1572,9 @@ void PropertyPixmapItem::hideEditor()
box->hide();
}
-void PropertyPixmapItem::setValue( const QVariant &v )
+void PropertyPixmapItem::setValue( const TQVariant &v )
{
- QString s;
+ TQString s;
if ( !iconSet )
pixPrev->setPixmap( v.toPixmap() );
else
@@ -1585,12 +1585,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 ( !iconSet )
setValue( pix );
else
- setValue( QIconSet( pix ) );
+ setValue( TQIconSet( pix ) );
notifyValueChange();
}
}
@@ -1600,12 +1600,12 @@ bool PropertyPixmapItem::hasCustomContents() const
return true;
}
-void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r )
+void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
- QPixmap pix( (!iconSet ? value().toPixmap() : value().toIconSet().pixmap()) );
+ TQPixmap pix( (!iconSet ? value().toPixmap() : value().toIconSet().pixmap()) );
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 );
@@ -1617,28 +1617,28 @@ 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 );
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()
@@ -1668,7 +1668,7 @@ void PropertyColorItem::initChildren()
PropertyColorItem::~PropertyColorItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyColorItem::showEditor()
@@ -1687,13 +1687,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 );
@@ -1706,7 +1706,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" ) )
@@ -1719,8 +1719,8 @@ void PropertyColorItem::childValueChanged( PropertyItem *child )
void PropertyColorItem::getColor()
{
- QColor c = val.asColor();
- if ( KColorDialog::getColor( c, listview ) == QDialog::Accepted ) {
+ TQColor c = val.asColor();
+ if ( KColorDialog::getColor( c, listview ) == TQDialog::Accepted ) {
setValue( c );
notifyValueChange();
}
@@ -1731,10 +1731,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();
@@ -1742,15 +1742,15 @@ 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 );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
lined->setFrame( false );
lined->setReadOnly( true );
@@ -1758,8 +1758,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()
@@ -1790,19 +1790,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()
@@ -1821,20 +1821,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();
@@ -1848,7 +1848,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" ) )
@@ -1868,15 +1868,15 @@ 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 );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
lined->setFrame( false );
lined->setReadOnly( true );
@@ -1903,18 +1903,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() )
@@ -1926,13 +1926,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 ] );
}
@@ -1940,7 +1940,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
@@ -1949,11 +1949,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
@@ -1965,7 +1965,7 @@ void PropertyDatabaseItem::initChildren()
PropertyDatabaseItem::~PropertyDatabaseItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyDatabaseItem::showEditor()
@@ -1984,13 +1984,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 );
@@ -2004,7 +2004,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 )
@@ -2034,17 +2034,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;
@@ -2052,7 +2052,7 @@ QLineEdit *PropertySizePolicyItem::lined()
void PropertySizePolicyItem::createChildren()
{
- QStringList lst;
+ TQStringList lst;
lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored";
PropertyItem *i = this;
@@ -2071,7 +2071,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" ) )
@@ -2087,7 +2087,7 @@ void PropertySizePolicyItem::initChildren()
PropertySizePolicyItem::~PropertySizePolicyItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
}
void PropertySizePolicyItem::showEditor()
@@ -2106,12 +2106,12 @@ void PropertySizePolicyItem::hideEditor()
lined()->hide();
}
-void PropertySizePolicyItem::setValue( const QVariant &v )
+void PropertySizePolicyItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
- QString s = QString( "%1/%2/%2/%2" );
+ TQString s = TQString( "%1/%2/%2/%2" );
s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ).
arg( size_type_to_string( v.toSizePolicy().verData() ) ).
arg( v.toSizePolicy().horStretch() ).
@@ -2123,7 +2123,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" ) )
@@ -2144,24 +2144,24 @@ 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 );
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()
@@ -2180,9 +2180,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();
@@ -2193,10 +2193,10 @@ void PropertyPaletteItem::getPalette()
if ( !listview->propertyEditor()->widget()->isWidgetType() )
return;
bool ok = false;
- QWidget *w = (QWidget*)listview->propertyEditor()->widget();
- if ( w->inherits( "QScrollView" ) )
- w = ( (QScrollView*)w )->viewport();
- QPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
+ TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
+ if ( w->inherits( "TQScrollView" ) )
+ w = ( (TQScrollView*)w )->viewport();
+ TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
#if defined(QT_NON_COMMERCIAL)
w->backgroundMode(), listview->topLevelWidget(),
#else
@@ -2214,19 +2214,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();
@@ -2235,89 +2235,89 @@ 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;
+ TQBitmap cur;
- cur = QBitmap(arrow_width, arrow_height, arrow_bits, true);
+ cur = TQBitmap(arrow_width, arrow_height, arrow_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Arrow"), QObject::ArrowCursor);
+ comb->insertItem( cur, i18n("Arrow"), TQObject::ArrowCursor);
- cur = QBitmap(uparrow_width, uparrow_height, uparrow_bits, true);
+ cur = TQBitmap(uparrow_width, uparrow_height, uparrow_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Up-Arrow"), QObject::UpArrowCursor );
+ comb->insertItem( cur, i18n("Up-Arrow"), TQObject::UpArrowCursor );
- cur = QBitmap(cross_width, cross_height, cross_bits, true);
+ cur = TQBitmap(cross_width, cross_height, cross_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Cross"), QObject::CrossCursor );
+ comb->insertItem( cur, i18n("Cross"), TQObject::CrossCursor );
- cur = QBitmap(wait_width, wait_height, wait_bits, true);
+ cur = TQBitmap(wait_width, wait_height, wait_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Waiting"), QObject::WaitCursor );
+ comb->insertItem( cur, i18n("Waiting"), TQObject::WaitCursor );
- cur = QBitmap(ibeam_width, ibeam_height, ibeam_bits, true);
+ cur = TQBitmap(ibeam_width, ibeam_height, ibeam_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("iBeam"), QObject::IbeamCursor );
+ comb->insertItem( cur, i18n("iBeam"), TQObject::IbeamCursor );
- cur = QBitmap(sizev_width, sizev_height, sizev_bits, true);
+ cur = TQBitmap(sizev_width, sizev_height, sizev_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size Vertical"), QObject::SizeVerCursor );
+ comb->insertItem( cur, i18n("Size Vertical"), TQObject::SizeVerCursor );
- cur = QBitmap(sizeh_width, sizeh_height, sizeh_bits, true);
+ cur = TQBitmap(sizeh_width, sizeh_height, sizeh_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size Horizontal"), QObject::SizeHorCursor );
+ comb->insertItem( cur, i18n("Size Horizontal"), TQObject::SizeHorCursor );
- cur = QBitmap(sizef_width, sizef_height, sizef_bits, true);
+ cur = TQBitmap(sizef_width, sizef_height, sizef_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size Slash"), QObject::SizeBDiagCursor );
+ comb->insertItem( cur, i18n("Size Slash"), TQObject::SizeBDiagCursor );
- cur = QBitmap(sizeb_width, sizeb_height, sizeb_bits, true);
+ cur = TQBitmap(sizeb_width, sizeb_height, sizeb_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size Backslash"), QObject::SizeFDiagCursor );
+ comb->insertItem( cur, i18n("Size Backslash"), TQObject::SizeFDiagCursor );
- cur = QBitmap(sizeall_width, sizeall_height, sizeall_bits, true);
+ cur = TQBitmap(sizeall_width, sizeall_height, sizeall_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size All"), QObject::SizeAllCursor );
+ comb->insertItem( cur, i18n("Size All"), TQObject::SizeAllCursor );
- cur = QBitmap( 25, 25, 1 );
+ cur = TQBitmap( 25, 25, 1 );
cur.setMask( cur );
- comb->insertItem( cur, i18n("Blank"), QObject::BlankCursor );
+ comb->insertItem( cur, i18n("Blank"), TQObject::BlankCursor );
- cur = QBitmap(vsplit_width, vsplit_height, vsplit_bits, true);
+ cur = TQBitmap(vsplit_width, vsplit_height, vsplit_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Split Vertical"), QObject::SplitVCursor );
+ comb->insertItem( cur, i18n("Split Vertical"), TQObject::SplitVCursor );
- cur = QBitmap(hsplit_width, hsplit_height, hsplit_bits, true);
+ cur = TQBitmap(hsplit_width, hsplit_height, hsplit_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Split Horizontal"), QObject::SplitHCursor );
+ comb->insertItem( cur, i18n("Split Horizontal"), TQObject::SplitHCursor );
- cur = QBitmap(hand_width, hand_height, hand_bits, true);
+ cur = TQBitmap(hand_width, hand_height, hand_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Pointing Hand"), QObject::PointingHandCursor );
+ comb->insertItem( cur, i18n("Pointing Hand"), TQObject::PointingHandCursor );
- cur = QBitmap(no_width, no_height, no_bits, true);
+ cur = TQBitmap(no_width, no_height, no_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Forbidden"), QObject::ForbiddenCursor );
+ comb->insertItem( cur, i18n("Forbidden"), TQObject::ForbiddenCursor );
- connect( comb, SIGNAL( activated( int ) ),
- this, SLOT( setValue() ) );
+ 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()
@@ -2341,7 +2341,7 @@ void PropertyCursorItem::hideEditor()
combo()->hide();
}
-void PropertyCursorItem::setValue( const QVariant &v )
+void PropertyCursorItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -2358,10 +2358,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();
}
@@ -2369,7 +2369,7 @@ void PropertyCursorItem::setValue()
/*!
\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.
@@ -2388,7 +2388,7 @@ void PropertyCursorItem::setValue()
*/
PropertyList::PropertyList( PropertyEditor *e )
- : QListView( e ), editor( e )
+ : TQListView( e ), editor( e )
{
init_colors();
@@ -2396,21 +2396,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 );
@@ -2427,83 +2427,83 @@ 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( QObject *o )
+static bool parent_is_data_aware( TQObject *o )
{
- if ( !o->inherits( "QWidget" ) )
+ if ( !o->inherits( "TQWidget" ) )
return false;
- QWidget *w = (QWidget*)o;
- QWidget *p = w->parentWidget();
+ TQWidget *w = (TQWidget*)o;
+ TQWidget *p = w->parentWidget();
while ( p && !p->isTopLevel() ) {
if ( p->inherits( "QDesignerDataBrowser" ) || p->inherits( "QDesignerDataView" ) )
return true;
@@ -2522,22 +2522,22 @@ void PropertyList::setupProperties()
if ( !editor->widget() )
return;
bool allProperties = !editor->widget()->inherits( "Spacer" );
- 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 ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) {
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
@@ -2557,9 +2557,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
@@ -2618,7 +2618,7 @@ void PropertyList::setupProperties()
continue;
}
}
- if ( w->inherits( "QActionGroup" ) ) {
+ if ( w->inherits( "TQActionGroup" ) ) {
if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
continue;
if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
@@ -2635,15 +2635,15 @@ 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() ||
- !editor->widget()->parent()->inherits( "QButtonGroup" ) )
+ !editor->widget()->parent()->inherits( "TQButtonGroup" ) )
continue;
}
if ( p->designable(w) ) {
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 )
@@ -2654,7 +2654,7 @@ void PropertyList::setupProperties()
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
item->setChanged( true, false );
- if ( !editor->widget()->inherits( "QMultiLineEdit" ) ) {
+ if ( !editor->widget()->inherits( "TQMultiLineEdit" ) ) {
lst.clear();
lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter )
@@ -2665,7 +2665,7 @@ void PropertyList::setupProperties()
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
item->setChanged( true, false );
item = new PropertyBoolItem( this, item, 0, "wordwrap" );
- if ( w->inherits( "QGroupBox" ) )
+ if ( w->inherits( "TQGroupBox" ) )
item->setVisible( false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
@@ -2675,19 +2675,19 @@ void PropertyList::setupProperties()
qWarning( "Sets except 'alignment' not supported yet.... %s.", p->name() );
}
} 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 << l.at( i );
}
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;
}
@@ -2702,8 +2702,8 @@ void PropertyList::setupProperties()
}
}
- if ( !w->inherits( "QSplitter" ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) &&
- w->isWidgetType() && WidgetFactory::layoutType( (QWidget*)w ) != WidgetFactory::NoLayout ) {
+ if ( !w->inherits( "TQSplitter" ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) &&
+ w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyIntItem( this, item, 0, "layoutSpacing", true );
setPropertyValue( item );
item->setChanged( true );
@@ -2713,7 +2713,7 @@ void PropertyList::setupProperties()
}
- if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( "QAction" ) &&
+ if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( "TQAction" ) &&
!w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) {
item = new PropertyTextItem( this, item, 0, "toolTip", true, false );
setPropertyValue( item );
@@ -2726,15 +2726,15 @@ void PropertyList::setupProperties()
}
#ifndef QT_NO_SQL
- if ( !editor->widget()->inherits( "QDataTable" ) && !editor->widget()->inherits( "QDataBrowser" ) &&
- !editor->widget()->inherits( "QDataView" ) && parent_is_data_aware( editor->widget() ) ) {
+ if ( !editor->widget()->inherits( "TQDataTable" ) && !editor->widget()->inherits( "TQDataBrowser" ) &&
+ !editor->widget()->inherits( "TQDataView" ) && parent_is_data_aware( 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 ( editor->widget()->inherits( "QDataTable" ) || editor->widget()->inherits( "QDataBrowser" ) || editor->widget()->inherits( "QDataView" ) ) {
+ if ( editor->widget()->inherits( "TQDataTable" ) || editor->widget()->inherits( "TQDataBrowser" ) || editor->widget()->inherits( "TQDataView" ) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@@ -2749,10 +2749,10 @@ void PropertyList::setupProperties()
if ( w->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget();
if ( cw ) {
- for ( QValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
- if ( unique.contains( QString( (*it).property ) ) )
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
+ 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 ) )
@@ -2775,75 +2775,75 @@ void PropertyList::setupProperties()
updateEditorSize();
}
-bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t )
+bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t )
{
switch ( t ) {
- case QVariant::String:
+ case TQVariant::String:
item = new PropertyTextItem( this, item, 0, name, true,
- editor->widget()->inherits( "QLabel" ) || editor->widget()->inherits( "QTextView" ) );
+ editor->widget()->inherits( "TQLabel" ) || editor->widget()->inherits( "TQTextView" ) );
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
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 PropertyTextItem( this, item, 0, name, false, false, false, true );
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 QVariant::IconSet:
- item = new PropertyPixmapItem( this, item, 0, name, t == QVariant::IconSet );
+ case TQVariant::Pixmap:
+ case TQVariant::IconSet:
+ item = new PropertyPixmapItem( this, item, 0, name, t == TQVariant::IconSet );
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:
@@ -2852,19 +2852,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();
}
@@ -2882,7 +2882,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() ),
@@ -2891,7 +2891,7 @@ void PropertyList::valueChanged( PropertyItem *i )
editor->formWindow()->commandHistory()->addCommand( cmd, true );
}
-void PropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c )
+void PropertyList::itemPressed( TQListViewItem *i, const TQPoint &p, int c )
{
if ( !i )
return;
@@ -2903,7 +2903,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;
@@ -2915,21 +2915,21 @@ 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 ( 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 ( ( !o->inherits( "QLineEdit" ) ||
- ( o->inherits( "QLineEdit" ) && ( (QLineEdit*)o )->isReadOnly() ) ) &&
+ } else if ( ( !o->inherits( "TQLineEdit" ) ||
+ ( o->inherits( "TQLineEdit" ) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
i && i->hasSubItems() ) {
if ( !i->isOpen() &&
( ke->key() == Key_Plus ||
@@ -2939,19 +2939,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 ) && o->inherits( "QComboBox" ) ) {
- QKeyEvent ke2( QEvent::KeyPress, Key_Space, 0, 0 );
- QApplication::sendEvent( o, &ke2 );
+ } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && o->inherits( "TQComboBox" ) ) {
+ TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
+ TQApplication::sendEvent( o, &ke2 );
return true;
}
- } else if ( e->type() == QEvent::FocusOut && o->inherits( "QLineEdit" ) && editor->formWindow() ) {
- QTimer::singleShot( 100, editor->formWindow()->commandHistory(), SLOT( checkCompressedCommand() ) );
+ } else if ( e->type() == TQEvent::FocusOut && o->inherits( "TQLineEdit" ) && 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 && ( i->inherits("PropertyColorItem") || i->inherits("PropertyPixmapItem") ) ) {
pressItem = i;
@@ -2959,20 +2959,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 ( i->inherits("PropertyColorItem") ) {
- 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 );
@@ -2980,10 +2980,10 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
drg->dragCopy();
}
else if ( i->inherits("PropertyPixmapItem") ) {
- 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();
@@ -2997,9 +2997,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;
@@ -3009,7 +3009,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 ) {
@@ -3022,7 +3022,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.
@@ -3030,7 +3030,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() )
@@ -3044,7 +3044,7 @@ void PropertyList::refetchData()
updateEditorSize();
}
-static void clearAlignList( QStrList &l )
+static void clearAlignList( TQStrList &l )
{
if ( l.count() == 1 )
return;
@@ -3060,7 +3060,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 ) {
@@ -3069,7 +3069,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" ) {
@@ -3081,13 +3081,13 @@ 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" ) {
- ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
} else if ( i->name() == "layoutMargin" ) {
- ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( 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" ) ) {
@@ -3106,14 +3106,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() );
@@ -3134,7 +3134,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(),
@@ -3147,7 +3147,7 @@ void PropertyList::resetProperty()
i->initChildren();
}
-void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e )
+void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e )
{
PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
if( !i ) {
@@ -3155,15 +3155,15 @@ void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e )
return;
}
- if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) )
+ if ( i->inherits("PropertyColorItem") && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) )
+ else if ( i->inherits("PropertyPixmapItem") && 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 ) {
@@ -3171,15 +3171,15 @@ void PropertyList::viewportDragMoveEvent ( QDragMoveEvent *e )
return;
}
- if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) )
+ if ( i->inherits("PropertyColorItem") && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) )
+ else if ( i->inherits("PropertyPixmapItem") && 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 ) {
@@ -3187,19 +3187,19 @@ void PropertyList::viewportDropEvent ( QDropEvent *e )
return;
}
- if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) ) {
- QColor color;
- QColorDrag::decode( e, color );
- i->setValue( QVariant( color ) );
+ if ( i->inherits("PropertyColorItem") && TQColorDrag::canDecode( e ) ) {
+ TQColor color;
+ TQColorDrag::decode( e, color );
+ i->setValue( TQVariant( color ) );
valueChanged( i );
e->accept();
}
- else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) ) {
- QImage img;
- QImageDrag::decode( e, img );
- QPixmap pm;
+ else if ( i->inherits("PropertyPixmapItem") && 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();
}
@@ -3207,7 +3207,7 @@ void PropertyList::viewportDropEvent ( QDropEvent *e )
e->ignore();
}
-QString PropertyList::whatsThisAt( const QPoint &p )
+TQString PropertyList::whatsThisAt( const TQPoint &p )
{
return whatsThisText( itemAt( p ) );
}
@@ -3216,32 +3216,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()
@@ -3249,21 +3249,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();
@@ -3278,14 +3278,14 @@ void PropertyList::readPropertyDocs()
// ------------------------------------------------------------
#ifndef KOMMANDER
-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 * ) ) );
}
void EventList::setup()
@@ -3297,7 +3297,7 @@ void EventList::setup()
#else
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- QValueList<MetaDataBase::EventDescription> events =
+ TQValueList<MetaDataBase::EventDescription> events =
#ifndef KOMMANDER
MetaDataBase::events( editor->widget(), formWindow->project()->language() );
#else
@@ -3305,20 +3305,20 @@ void EventList::setup()
#endif
if ( events.isEmpty() )
return;
- for ( QValueList<MetaDataBase::EventDescription>::Iterator it = events.begin(); it != events.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::EventDescription>::Iterator it = events.begin(); it != events.end(); ++it ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (*it).name,
- QString::null, QString::null );
+ TQString::null, TQString::null );
eventItem->setOpen( true );
- QStringList funcs = MetaDataBase::eventFunctions( editor->widget(),
+ TQStringList funcs = MetaDataBase::eventFunctions( editor->widget(),
(*it).name,
#ifndef KOMMANDER
formWindow->project()->language() );
#else
"C++" );
#endif
- for ( QStringList::Iterator fit = funcs.begin(); fit != funcs.end(); ++fit ) {
+ for ( TQStringList::Iterator fit = funcs.begin(); fit != funcs.end(); ++fit ) {
HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem,
- *fit, QString::null, QString::null );
+ *fit, TQString::null, TQString::null );
item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) );
}
#if 0 // ### for conversation from old to new
@@ -3327,21 +3327,21 @@ void EventList::setup()
#endif
}
} else {
- QStrList sigs = editor->widget()->metaObject()->signalNames( true );
+ TQStrList sigs = editor->widget()->metaObject()->signalNames( true );
sigs.remove( "destroyed()" );
- QStrListIterator it( sigs );
+ TQStrListIterator it( sigs );
while ( it.current() ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this,
- 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() );
- for ( QValueList<MetaDataBase::Connection>::Iterator cit = conns.begin(); cit != conns.end(); ++cit ) {
- if ( MetaDataBase::normalizeSlot( QString( (*cit).signal ) ) !=
- MetaDataBase::normalizeSlot( QString( it.current() ) ) )
+ for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin(); cit != conns.end(); ++cit ) {
+ if ( MetaDataBase::normalizeSlot( TQString( (*cit).signal ) ) !=
+ MetaDataBase::normalizeSlot( TQString( it.current() ) ) )
continue;
HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem,
- (*cit).slot, QString::null, QString::null );
+ (*cit).slot, TQString::null, TQString::null );
item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) );
}
++it;
@@ -3349,66 +3349,66 @@ void EventList::setup()
}
}
-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;
#ifndef KOMMANDER
if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
#else
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- 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 );
}
insertEntry( i, PixmapChooser::loadPixmap( "editslots.xpm" ), s );
}
-void EventList::setCurrent( QWidget * )
+void EventList::setCurrent( TQWidget * )
{
}
-void EventList::objectClicked( QListViewItem *i )
+void EventList::objectClicked( TQListViewItem *i )
{
if ( !i || !i->parent() )
return;
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( PixmapChooser::loadPixmap( "filenew" ), i18n("New Signal Handler" ), NEW_ITEM );
menu.insertItem( PixmapChooser::loadPixmap( "editcut" ), i18n("Delete Signal Handler" ), DEL_ITEM );
int res = menu.exec( pos );
if ( res == NEW_ITEM ) {
- QString s;
+ TQString s;
#ifndef KOMMANDER
if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
#else
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- 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, PixmapChooser::loadPixmap( "editslots.xpm" ), s );
} else if ( res == DEL_ITEM && i->parent() ) {
@@ -3417,7 +3417,7 @@ void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos )
#else
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- QListViewItem *p = i->parent();
+ TQListViewItem *p = i->parent();
delete i;
save( p );
} else {
@@ -3439,13 +3439,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 ) ) {
@@ -3506,10 +3506,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();
@@ -3535,8 +3535,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" ) );
@@ -3551,20 +3551,20 @@ PropertyEditor::PropertyEditor( QWidget *parent )
#endif
}
-QObject *PropertyEditor::widget() const
+TQObject *PropertyEditor::widget() const
{
return wid;
}
-void PropertyEditor::setWidget( QObject *w, FormWindow *fw )
+void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
{
#ifndef KOMMANDER
eList->setFormWindow( fw );
#endif
if ( w && w == wid ) {
bool ret = true;
- 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" ) {
@@ -3643,7 +3643,7 @@ void PropertyEditor::closed( FormWindow *w )
}
}
-void PropertyEditor::closeEvent( QCloseEvent *e )
+void PropertyEditor::closeEvent( TQCloseEvent *e )
{
emit hidden();
e->accept();
@@ -3659,32 +3659,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;
diff --git a/kommander/editor/propertyeditor.h b/kommander/editor/propertyeditor.h
index 57911b7b..f34b7337 100644
--- a/kommander/editor/propertyeditor.h
+++ b/kommander/editor/propertyeditor.h
@@ -21,13 +21,13 @@
#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 <tqfeatures.h>
+#include <tqvariant.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqguardedptr.h>
+#include <tqtabwidget.h>
+#include <tqmodules.h>
#include "hierarchyview.h"
class PropertyList;
@@ -51,13 +51,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();
@@ -69,15 +69,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 );
@@ -87,51 +87,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();
@@ -140,7 +140,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 );
@@ -151,129 +151,129 @@ 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 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();
@@ -282,7 +282,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 );
@@ -290,13 +290,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
@@ -305,7 +305,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();
@@ -314,25 +314,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();
@@ -341,62 +341,62 @@ 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
public:
PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool isIconSet = FALSE );
+ const TQString &propName, bool isIconSet = FALSE );
~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;
bool iconSet;
};
-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();
@@ -405,76 +405,76 @@ 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 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();
@@ -483,14 +483,14 @@ 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;
};
@@ -504,14 +504,14 @@ 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 );
PropertyEditor *propertyEditor() const;
- QString whatsThisAt( const QPoint &p );
+ TQString whatsThisAt( const TQPoint &p );
void showCurrentWhatsThis();
public slots:
@@ -520,32 +520,32 @@ 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;
private:
void readPropertyDocs();
- 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;
};
@@ -555,9 +555,9 @@ class PropertyEditor : public QTabWidget
Q_OBJECT
public:
- PropertyEditor( QWidget *parent );
+ PropertyEditor( TQWidget *parent );
- QObject *widget() const;
+ TQObject *widget() const;
void clear();
void setup();
@@ -573,9 +573,9 @@ public:
// EventList *eventList() const;
#endif
- QString currentProperty() const;
- QString classOfCurrentProperty() const;
- QMetaObject* metaObjectOfCurrentProperty() const;
+ TQString currentProperty() const;
+ TQString classOfCurrentProperty() const;
+ TQMetaObject* metaObjectOfCurrentProperty() const;
void resetFocus();
@@ -583,13 +583,13 @@ 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:
- QObject *wid;
+ TQObject *wid;
PropertyList *listview;
#ifndef KOMMANDER
EventList *eList;
@@ -598,72 +598,72 @@ private:
};
-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/kommander/editor/qcompletionedit.cpp b/kommander/editor/qcompletionedit.cpp
index bd4b876a..4ba5e366 100644
--- a/kommander/editor/qcompletionedit.cpp
+++ b/kommander/editor/qcompletionedit.cpp
@@ -1,26 +1,26 @@
#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 );
}
@@ -30,12 +30,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;
}
@@ -45,7 +45,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();
@@ -65,8 +65,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() );
@@ -81,18 +81,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 ) {
@@ -121,10 +121,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 );
@@ -134,8 +134,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 ||
@@ -144,15 +144,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;
@@ -160,9 +160,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 );
}
@@ -179,7 +179,7 @@ bool QCompletionEdit::isCaseSensitive() const
void QCompletionEdit::clear()
{
- QLineEdit::clear();
+ TQLineEdit::clear();
compList.clear();
}
#include "qcompletionedit.moc"
diff --git a/kommander/editor/qcompletionedit.h b/kommander/editor/qcompletionedit.h
index fa7e8b23..39518c58 100644
--- a/kommander/editor/qcompletionedit.h
+++ b/kommander/editor/qcompletionedit.h
@@ -1,8 +1,8 @@
#ifndef QCOMPLETIONEDIT_H
#define QCOMPLETIONEDIT_H
-#include <qlineedit.h>
-#include <qstringlist.h>
+#include <tqlineedit.h>
+#include <tqstringlist.h>
class QListBox;
class QVBox;
@@ -14,26 +14,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();
@@ -41,9 +41,9 @@ private:
private:
bool aAdd;
- QStringList compList;
- QListBox *listbox;
- QVBox *popup;
+ TQStringList compList;
+ TQListBox *listbox;
+ TQVBox *popup;
bool caseSensitive;
};
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp
index 99fab90a..b725b7bc 100644
--- a/kommander/editor/resource.cpp
+++ b/kommander/editor/resource.cpp
@@ -18,13 +18,13 @@
**
**********************************************************************/
-#include <qmenudata.h>
+#include <tqmenudata.h>
#include "resource.h"
#include "defs.h"
#include "metadatabase.h"
#include "formwindow.h"
#include "mainwindow.h"
-#include "qdom.h"
+#include "tqdom.h"
#include "widgetdatabase.h"
#include "widgetfactory.h"
#include "layout.h"
@@ -41,60 +41,60 @@
#endif
#include "formfile.h"
-#include <qfeatures.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qobject.h>
-#include <qwidget.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qworkspace.h>
-#include <qtabwidget.h>
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
-#include <qtabbar.h>
-#include <qheader.h>
-#include <qlistview.h>
-#include <qiconview.h>
-#include <qlabel.h>
-#include <qwizard.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqfeatures.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqworkspace.h>
+#include <tqtabwidget.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
+#include <tqtabbar.h>
+#include <tqheader.h>
+#include <tqlistview.h>
+#include <tqiconview.h>
+#include <tqlabel.h>
+#include <tqwizard.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <zlib.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
#include <klocale.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;
- s2 = s2.replace( QRegExp( "&" ), "&amp;" );
- s2 = s2.replace( QRegExp( ">" ), "&gt;" );
- s2 = s2.replace( QRegExp( "<" ), "&lt;" );
+ TQString s2 = s;
+ s2 = s2.replace( TQRegExp( "&" ), "&amp;" );
+ s2 = s2.replace( TQRegExp( ">" ), "&gt;" );
+ s2 = s2.replace( TQRegExp( "<" ), "&lt;" );
if ( attribute ) {
- s2 = s2.replace( QRegExp( "\"" ), "&quot;" );
- s2 = s2.replace( QRegExp( "'" ), "&apos;" );
+ s2 = s2.replace( TQRegExp( "\"" ), "&quot;" );
+ s2 = s2.replace( TQRegExp( "'" ), "&apos;" );
}
return s2;
}
-static QString mkBool( bool b )
+static TQString mkBool( bool b )
{
return b? "true" : "false";
}
@@ -151,7 +151,7 @@ void Resource::setWidget( FormWindow *w )
toplevel = w;
}
-QWidget *Resource::widget() const
+TQWidget *Resource::widget() const
{
return toplevel;
}
@@ -163,7 +163,7 @@ bool Resource::load( FormFile *ff )
currFileName = ff->absFileName();
mainContainerSet = false;
- QFile f( ff->absFileName() );
+ TQFile f( ff->absFileName() );
f.open( IO_ReadOnly );
bool b = load( ff, &f );
@@ -172,19 +172,19 @@ bool Resource::load( FormFile *ff )
return b;
}
-bool Resource::load( FormFile *ff, QIODevice* dev )
+bool Resource::load( FormFile *ff, TQIODevice* dev )
{
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
- QTextStream stream(dev);
- QString content = stream.read();
+ TQTextStream stream(dev);
+ TQString content = stream.read();
if (content.startsWith("#!"))
{
content = content.mid(content.find('\n'));
}
if ( !doc.setContent( content) ) {
- // qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
return false;
}
@@ -205,63 +205,63 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
}
#endif
- 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 eltSignals = e;
+ TQDomElement eltSignals = e;
while ( eltSignals.tagName() != "signals" && !eltSignals.isNull() )
eltSignals = eltSignals.nextSibling().toElement();
- QDomElement eltSlots = e;
+ TQDomElement eltSlots = e;
while ( eltSlots.tagName() != "slots" && !eltSlots.isNull() )
eltSlots = eltSlots.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 functions = e;
+ TQDomElement functions = e;
while ( functions.tagName() != "functions" && !functions.isNull() )
functions = functions.nextSibling().toElement();
- QDomElement widget;
+ TQDomElement widget;
while ( !e.isNull() ) {
if ( e.tagName() == "widget" ) {
widget = e;
@@ -291,8 +291,8 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
} 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() );
}
e = e.nextSibling().toElement();
@@ -305,7 +305,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
#if defined (QT_NON_COMMERCIAL)
bool previewMode = MainWindow::self->isPreviewing();
- 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 )
@@ -316,13 +316,13 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
#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;
@@ -340,17 +340,17 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
}
if ( !variables.isNull() ) {
- for ( QDomElement n = variables.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = variables.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "variable" )
metaVariables << n.firstChild().toText().data();
}
if ( !eltSignals.isNull() ) {
- for ( QDomElement n = eltSignals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = eltSignals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "signal" )
metaSignals << n.firstChild().toText().data();
}
if ( !eltSlots.isNull() ) {
- for ( QDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
+ for ( TQDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "slot" ) {
MetaDataBase::Slot slot;
slot.specifier = n.attribute( "specifier", "virtual" );
@@ -413,13 +413,13 @@ bool Resource::load( FormFile *ff, QIODevice* dev )
return true;
}
-bool Resource::save( const QString& filename, bool formCodeOnly )
+bool Resource::save( const TQString& filename, bool formCodeOnly )
{
if ( !formwindow || filename.isEmpty() )
return false;
currFileName = filename;
- QFile f( filename );
+ TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
return false;
bool b = save( &f );
@@ -427,26 +427,26 @@ bool Resource::save( const QString& filename, bool formCodeOnly )
return b;
}
-bool Resource::save( QIODevice* dev )
+bool Resource::save( TQIODevice* dev )
{
if ( !formwindow )
return false;
- QTextStream ts( dev );
- ts.setCodec( QTextCodec::codecForName( "UTF-8" ) );
+ TQTextStream ts( dev );
+ ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) );
if ( formwindow->mainContainer()->property("useShebang").toBool() )
ts << formwindow->mainContainer()->property("shebang").toString() << endl;
ts << "<!DOCTYPE UI><UI version=\"3.0\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
saveObject( formwindow->mainContainer(), 0, ts, 0 );
- if ( formwindow->mainContainer()->inherits( "QMainWindow" ) ) {
- saveMenuBar( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
- saveToolBars( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
+ if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) ) {
+ saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
+ saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
- if ( formwindow->mainContainer()->inherits( "QMainWindow" ) )
+ if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) )
saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() )
saveImageCollection( ts, 0 );
@@ -460,20 +460,20 @@ bool Resource::save( QIODevice* dev )
return true;
}
-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 ) {
@@ -495,30 +495,30 @@ 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;
- QBuffer buf( QCString( cb.utf8() ) );
+ TQBuffer buf( TQCString( cb.utf8() ) );
buf.open( IO_ReadOnly );
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &buf, &errMsg, &errLine ) ) {
- // qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), 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();
@@ -527,13 +527,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 );
@@ -547,7 +547,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 );
@@ -571,26 +571,26 @@ 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() && !(obj->isA("ScriptObject")) )
+ if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) )
return;
- QString closeTag;
+ TQString closeTag;
if ( obj->isWidgetType() ) {
const char* className = WidgetFactory::classNameOf( obj );
if ( obj->isA( "CustomWidget" ) )
- usedCustomWidgets << QString( className );
- if ( obj != formwindow && !formwindow->widgets()->find( (QWidget*)obj ) )
+ usedCustomWidgets << TQString( className );
+ 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) + "\"";
}
}
@@ -615,16 +615,16 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
return;
}
- if ( obj->inherits( "QTabWidget" ) ) {
- QTabWidget* tw = (QTabWidget*) obj;
- QObjectList* tmpl = tw->queryList( "QWidgetStack" );
- QWidgetStack *ws = (QWidgetStack*)tmpl->first();
- QTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
+ if ( obj->inherits( "TQTabWidget" ) ) {
+ 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 )
@@ -648,10 +648,10 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
}
delete tmpl;
} else
- if ( ::qt_cast<QToolBox*>(obj) ) {
- QToolBox* tb = (QToolBox*)obj;
+ 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 )
@@ -665,7 +665,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;
@@ -678,9 +678,9 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << makeIndent( indent ) << "</widget>" << endl;
}
}
- else if ( obj->inherits( "QWizard" ) ) {
- QWizard* wiz = (QWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) {
- QWidget *w = wiz->page( i );
+ else if ( obj->inherits( "TQWizard" ) ) {
+ TQWizard* wiz = (TQWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) {
+ TQWidget *w = wiz->page( i );
if ( !w )
continue;
if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
@@ -702,8 +702,8 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( obj->inherits( "QMainWindow" ) ) {
- saveChildrenOf( ( (QMainWindow*)obj )->centralWidget(), ts, indent );
+ } else if ( obj->inherits( "TQMainWindow" ) ) {
+ saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else {
saveChildrenOf( obj, ts, indent );
}
@@ -712,56 +712,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 ( obj->inherits( "QListBox" ) || obj->inherits( "QComboBox" ) ) {
- QListBox *lb = 0;
- if ( obj->inherits( "QListBox" ) )
- lb = (QListBox*)obj;
+ if ( obj->inherits( "TQListBox" ) || obj->inherits( "TQComboBox" ) ) {
+ TQListBox *lb = 0;
+ if ( obj->inherits( "TQListBox" ) )
+ 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 ( obj->inherits( "QIconView" ) ) {
- QIconView *iv = (QIconView*)obj;
+ } else if ( obj->inherits( "TQIconView" ) ) {
+ 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 ( obj->inherits( "QListView" ) ) {
- QListView *lv = (QListView*)obj;
+ } else if ( obj->inherits( "TQListView" ) ) {
+ 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++;
@@ -779,11 +779,11 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
saveItem( lv->firstChild(), ts, indent - 1 );
}
#ifndef QT_NO_TABLE
- else if ( obj->inherits( "QTable" ) ) {
- QTable *table = (QTable*)obj;
+ else if ( obj->inherits( "TQTable" ) ) {
+ TQTable *table = (TQTable*)obj;
int i;
- QMap<QString, QString> columnFields = MetaDataBase::columnFields( table );
- bool isDataTable = table->inherits( "QDataTable" );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
+ bool isDataTable = table->inherits( "TQDataTable" );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
if ( !table->horizontalHeader()->label( i ).isNull() &&
table->horizontalHeader()->label( i ).toInt() != i + 1 ||
@@ -791,14 +791,14 @@ 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 ( table->inherits( "QDataTable" ) && !columnFields.isEmpty() ) {
+ if ( table->inherits( "TQDataTable" ) && !columnFields.isEmpty() ) {
ts << makeIndent( indent ) << "<property name=\"field\">" << endl;
indent++;
ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl;
@@ -815,12 +815,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;
@@ -830,15 +830,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 );
@@ -854,7 +854,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;
@@ -873,39 +873,39 @@ 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;
}
#ifndef KOMMANDER
else if ( formwindow && formwindow->savePixmapInProject() ) {
- QPixmap pix;
+ TQPixmap pix;
if ( mainwindow && mainwindow->currProject() )
pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg );
}
#endif
else
{
- QPixmap pix;
+ TQPixmap pix;
pix = PixmapChooser::loadPixmap( "image.xpm" );
MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
return pix;
}
- QPixmap pix = PixmapChooser::loadPixmap( "image.xpm" );
+ TQPixmap pix = PixmapChooser::loadPixmap( "image.xpm" );
MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix;
}
-void Resource::saveItem( const QStringList &text, const QPtrList<QPixmap> &pixmaps, QTextStream &ts, int indent )
+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++;
@@ -915,33 +915,33 @@ void Resource::saveItem( const QStringList &text, const QPtrList<QPixmap> &pixma
}
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 ( !obj->inherits( "QSplitter" ) &&
+ if ( !obj->inherits( "TQSplitter" ) &&
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>";
@@ -969,7 +969,7 @@ void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
}
- for ( QPtrListIterator<QObject> it ( *l ); it.current(); ++it )
+ for ( TQPtrListIterator<TQObject> it ( *l ); it.current(); ++it )
saveObject( it.current(), grid, ts, indent );
if ( !closeTag.isEmpty() ) {
indent--;
@@ -977,10 +977,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 ( w->inherits( "Spacer" ) ) {
@@ -989,7 +989,7 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
if ( !changed.contains( "geometry" ) )
changed << "geometry";
}
- } else if ( w->inherits( "QLayout" ) ) { // #### should be cleaner (RS)
+ } else if ( w->inherits( "TQLayout" ) ) { // #### should be cleaner (RS)
changed << "margin" << "spacing";
}
@@ -1003,22 +1003,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( !w->inherits( "Spacer" ) );
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
- if ( changed.find( QString::fromLatin1( it.current() ) ) == changed.end() )
+ TQStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
+ 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 ( w->inherits( "QLabel" ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
- ( !( (QLabel*)w )->pixmap() || ( (QLabel*)w )->pixmap()->isNull() ) )
+ if ( w->inherits( "TQLabel" ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
+ ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue;
if ( w->inherits( "QDesignerMenuBar" ) &&
( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
@@ -1033,19 +1033,19 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
ts << ">" << endl;
indent++;
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" ) ) {
@@ -1064,11 +1064,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 )
@@ -1077,123 +1077,123 @@ 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" )
return;
int num, unum;
double dob;
- QString comment;
- if ( w && formwindow->widgets()->find( (QWidget*)w ) )
+ TQString comment;
+ if ( w && formwindow->widgets()->find( (TQWidget*)w ) )
comment = MetaDataBase::propertyComment( w, name );
switch ( t ) {
- case QVariant::String:
+ case TQVariant::String:
ts << makeIndent( indent ) << "<string>" << entitize( value.toString() ) << "</string>" << endl;
if ( !comment.isEmpty() )
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:
+ case TQVariant::Int:
num = value.toInt();
- if ( w && w->inherits( "QLayout" ) ) {
+ if ( w && w->inherits( "TQLayout" ) ) {
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 ) ) );
}
- 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:
num = value.toInt();
- ts << makeIndent( indent ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
break;
- case QVariant::UInt:
+ case TQVariant::UInt:
unum = value.toUInt();
- if ( w && w->inherits( "QLayout" ) ) {
+ if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::layoutParent( (QLayout*)w ) );
+ num = MetaDataBase::spacing( WidgetFactory::layoutParent( (TQLayout*)w ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::layoutParent( (QLayout*)w ) );
+ num = MetaDataBase::margin( WidgetFactory::layoutParent( (TQLayout*)w ) );
}
- 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;
@@ -1204,17 +1204,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++;
@@ -1239,11 +1239,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++;
@@ -1254,8 +1254,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;
@@ -1265,8 +1265,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;
@@ -1276,8 +1276,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;
@@ -1295,33 +1295,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();
@@ -1332,7 +1332,7 @@ 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" );
if ( !className.isNull() ) {
obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
@@ -1340,19 +1340,19 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
return 0;
if ( !mainContainerSet ) {
if ( formwindow )
- formwindow->setMainContainer( (QWidget*)obj );
+ formwindow->setMainContainer( (TQWidget*)obj );
mainContainerSet = true;
}
- w = (QWidget*)obj;
- if ( w->inherits( "QMainWindow" ) )
- w = ( (QMainWindow*)w )->centralWidget();
+ w = (TQWidget*)obj;
+ if ( w->inherits( "TQMainWindow" ) )
+ 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,
@@ -1368,9 +1368,9 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
layout = 0;
if ( w && formwindow ) {
- if ( !parent || ( !parent->inherits( "QToolBox" ) && !parent->inherits( "QTabWidget" ) && !parent->inherits( "QWizard" ) ) )
+ if ( !parent || ( !parent->inherits( "TQToolBox" ) && !parent->inherits( "TQTabWidget" ) && !parent->inherits( "TQWizard" ) ) )
formwindow->insertWidget( w, pasting );
- else if ( parent && ( parent->inherits( "QToolBox" ) || parent->inherits( "QTabWidget" ) || parent->inherits( "QWizard" ) ) )
+ else if ( parent && ( parent->inherits( "TQToolBox" ) || parent->inherits( "TQTabWidget" ) || parent->inherits( "TQWizard" ) ) )
MetaDataBase::addEntry( w );
if (w->inherits("Dialog"))
dynamic_cast<Dialog*>(w)->setUseInternalParser(false);
@@ -1400,18 +1400,18 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
} else if ( n.tagName() == "property" && obj ) {
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 ( parent->inherits( "QTabWidget" ) ) {
+ TQString attrib = n.attribute( "name" );
+ TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
+ if ( parent->inherits( "TQTabWidget" ) ) {
if ( attrib == "title" )
- ( (QTabWidget*)parent )->insertTab( w, v.toString() );
+ ( (TQTabWidget*)parent )->insertTab( w, v.toString() );
} else
- if ( parent->inherits( "QToolBox" ) ) {
+ if ( parent->inherits( "TQToolBox" ) ) {
if ( attrib == "label" )
- ( (QToolBox*)parent )->addItem( w, v.toString() );
- } else if ( parent->inherits( "QWizard" ) ) {
+ ( (TQToolBox*)parent )->addItem( w, v.toString() );
+ } else if ( parent->inherits( "TQWizard" ) ) {
if ( attrib == "title" )
- ( (QWizard*)parent )->addPage( w, v.toString() );
+ ( (TQWizard*)parent )->addPage( w, v.toString() );
}
} else if ( n.tagName() == "item" ) {
createItem( n, w );
@@ -1421,7 +1421,7 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout*
// qDebug("Resource : Tag == event");
#ifndef KOMMANDER
MetaDataBase::setEventFunctions( obj, formwindow, MainWindow::self->currProject()->language(),
- n.attribute( "name" ), QStringList::split( ',', n.attribute( "functions" ) ), false );
+ n.attribute( "name" ), TQStringList::split( ',', n.attribute( "functions" ) ), false );
#endif
}
@@ -1431,22 +1431,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 ( widget->inherits( "QListView" ) && e.tagName() == "column" ) {
- QListView *lv = (QListView*)widget;
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ if ( widget->inherits( "TQListView" ) && e.tagName() == "column" ) {
+ TQListView *lv = (TQListView*)widget;
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = false;
- QString txt;
+ TQString txt;
bool clickable = true, resizeable = 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" ) {
@@ -1470,24 +1470,24 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget )
lv->header()->setResizeEnabled( resizeable, i );
}
#ifndef QT_NO_TABLE
- else if ( widget->inherits( "QTable" ) ) {
- QTable *table = (QTable*)widget;
+ else if ( widget->inherits( "TQTable" ) ) {
+ 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" ) {
@@ -1501,7 +1501,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
@@ -1513,14 +1513,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" ) {
@@ -1532,57 +1532,57 @@ 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 ) ) ) )
return;
- if ( widget->inherits( "QListBox" ) || widget->inherits( "QComboBox" ) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = false;
- QString txt;
+ TQString txt;
loadItem( n, pix, txt, hasPixmap );
- QListBox *lb = 0;
- if ( widget->inherits( "QListBox" ) )
- lb = (QListBox*)widget;
+ TQListBox *lb = 0;
+ if ( widget->inherits( "TQListBox" ) )
+ 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 ( widget->inherits( "QIconView" ) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
+ } else if ( widget->inherits( "TQIconView" ) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
bool hasPixmap = false;
- QString txt;
+ TQString txt;
loadItem( n, pix, txt, hasPixmap );
- QIconView *iv = (QIconView*)widget;
- new QIconViewItem( iv, txt, pix );
- } else if ( widget->inherits( "QListView" ) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
- QValueList<QPixmap> pixmaps;
- QStringList textes;
- QListViewItem *item = 0;
- QListView *lv = (QListView*)widget;
+ TQIconView *iv = (TQIconView*)widget;
+ new TQIconViewItem( iv, txt, pix );
+ } else if ( widget->inherits( "TQListView" ) ) {
+ 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;
@@ -1605,9 +1605,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();
@@ -1630,8 +1630,8 @@ QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
if ( layout ) {
- if ( layout->inherits( "QBoxLayout" ) )
- ( (QBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
+ if ( layout->inherits( "TQBoxLayout" ) )
+ ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
else
( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
spacer->alignment() );
@@ -1642,11 +1642,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 ( !obj->inherits( "QLayout" ) ) {// no layouts in metadatabase... (RS)
+ if ( !obj->inherits( "TQLayout" ) ) {// 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" )
@@ -1655,16 +1655,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 );
@@ -1672,24 +1672,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 )
@@ -1701,10 +1701,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 );
@@ -1717,22 +1717,22 @@ 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() ) {
- QString key( v.toString() );
- v = QVariant( p->keyToValue( key ) );
+ TQString key( v.toString() );
+ v = TQVariant( p->keyToValue( key ) );
} 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 ( !s1.isEmpty() )
formwindow->setCaption( s1 );
else if ( !s2.isEmpty() )
@@ -1754,21 +1754,21 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE
}
}
- if ( obj->inherits( "QLayout" ) ) {
+ if ( obj->inherits( "TQLayout" ) ) {
if ( prop == "spacing" ) {
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
return;
}
if ( prop == "margin" ) {
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
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() ) {
@@ -1777,18 +1777,18 @@ 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() );
}
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;
@@ -1798,7 +1798,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 );
@@ -1806,19 +1806,19 @@ 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 );
- QImageIO iio( &buf, "XPM" );
+ TQImageIO iio( &buf, "XPM" );
iio.setImage( img );
iio.write();
buf.close();
ulong len = ba.size() * 2;
- QByteArray bazip( len );
+ TQByteArray bazip( len );
::compress( (uchar*) bazip.data(), &len, (uchar*) ba.data(), ba.size() );
- QString res;
+ TQString res;
ts << makeIndent( indent ) << "<data format=\"XPM.GZ\" length=\"" << ba.size() << "\">";
static const char hexchars[] = "0123456789abcdef";
for ( int i = 0; i < (int)len; ++i ) {
@@ -1829,12 +1829,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++;
@@ -1847,10 +1847,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();
char *ba = new char[ data.length() / 2 ];
for ( int i = 0; i < (int)data.length() / 2; ++i ) {
char h = data[ 2 * i ].latin1();
@@ -1867,12 +1867,12 @@ 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" ) {
ulong len = n2.attribute( "length" ).toULong();
if ( len < data.length() * 5 )
len = data.length() * 5;
- QByteArray baunzip( len );
+ TQByteArray baunzip( len );
::uncompress( (uchar*) baunzip.data(), &len, (uchar*) ba, data.length()/2 );
img.loadFromData( (const uchar*)baunzip.data(), len, "XPM" );
} else {
@@ -1883,14 +1883,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 );
@@ -1902,30 +1902,30 @@ 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 )
{
ts << makeIndent( indent ) << "<connections>" << endl;
indent++;
- QValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
- QValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
+ TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
+ 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::normalizeSlot( (*it).slot ).latin1() ) )
continue;
@@ -1952,21 +1952,21 @@ void Resource::saveConnections( QTextStream &ts, int indent )
}
#ifndef KOMMANDER
- QString lang = formwindow->project()->language();
+ TQString lang = formwindow->project()->language();
LanguageInterface *iface = langIface;
if ( iface && MetaDataBase::hasEvents( lang ) ) {
- QObjectList *l = formwindow->queryList( "QWidget" );
+ TQObjectList *l = formwindow->queryList( "TQWidget" );
l->append( formwindow );
- QPtrList<QAction> lst = formwindow->actionList();
- for ( QAction *a = lst.first(); a; a = lst.next() )
+ TQPtrList<TQAction> lst = formwindow->actionList();
+ for ( TQAction *a = lst.first(); a; a = lst.next() )
l->append( a );
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( !MetaDataBase::hasObject( o ) )
continue;
- QMap<QString, QStringList> eventFunctions = MetaDataBase::eventFunctions( o );
- QMap<QString, QStringList>::ConstIterator it = eventFunctions.begin();
+ TQMap<TQString, TQStringList> eventFunctions = MetaDataBase::eventFunctions( o );
+ TQMap<TQString, TQStringList>::ConstIterator it = eventFunctions.begin();
for ( ; it != eventFunctions.end(); ++it ) {
- QString sls = (*it).join( "," );
+ TQString sls = (*it).join( "," );
MetaDataBase::Connection conn;
conn.sender = o;
conn.signal = it.key();
@@ -1982,24 +1982,24 @@ void Resource::saveConnections( QTextStream &ts, int 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();
@@ -2011,11 +2011,11 @@ void Resource::loadConnections( const QDomElement &e )
} else if ( n2.tagName() == "signal" ) {
conn.signal = n2.firstChild().toText().data();
} else if ( n2.tagName() == "receiver" ) {
- 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();
@@ -2041,7 +2041,7 @@ void Resource::loadConnections( const QDomElement &e )
}
else if ( MetaDataBase::hasEvents( lang ) ) {
MetaDataBase::setEventFunctions( conn.sender, formwindow, lang, conn.signal,
- QStringList::split( ',', conn.slot ), false );
+ TQStringList::split( ',', conn.slot ), false );
}
#else
MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
@@ -2073,12 +2073,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;
@@ -2105,16 +2105,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::Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ for ( TQValueList<MetaDataBase::Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
ts << makeIndent( indent ) << "<slot access=\"" << (*it).access << "\" specifier=\""
<< (*it).specifier << "\">" << entitize( (*it).slot ) << "</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--;
@@ -2126,25 +2126,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() );
@@ -2153,12 +2153,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" )
@@ -2166,12 +2166,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 );
@@ -2180,7 +2180,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" ) {
@@ -2204,16 +2204,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;
@@ -2223,20 +2223,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 );
@@ -2252,10 +2252,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 = formwindow->name();
+ TQString cn = formwindow->name();
ts << makeIndent(indent) << "<class>" << entitize(cn) << "</class>" << endl;
if (!info.comment.isEmpty())
ts << makeIndent(indent) << "<comment>" << entitize(info.comment) << "</comment>" << endl;
@@ -2267,17 +2267,17 @@ void Resource::saveMetaInfoBefore( QTextStream &ts, int indent )
ts << makeIndent(indent) << "<version>" << entitize(info.version) << "</version>" << endl;
}
-void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
+void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
- QValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
- QString extensionInclude;
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
+ TQString extensionInclude;
bool needExtensionInclude = false;
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 )
@@ -2291,32 +2291,32 @@ 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;
}
- 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::Slot> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl;
indent++;
#ifndef KOMMANDER
- QString lang = formwindow->project()->language();
+ TQString lang = formwindow->project()->language();
#endif
- QValueList<MetaDataBase::Slot>::Iterator it = slotList.begin();
+ TQValueList<MetaDataBase::Slot>::Iterator it = slotList.begin();
for ( ; it != slotList.end(); ++it ) {
MetaDataBase::Slot slot = *it;
ts << makeIndent( indent ) << "<slot";
@@ -2346,37 +2346,37 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
<< "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << 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 ( !o->inherits( "QAction" ) )
+ if ( !o->inherits( "TQAction" ) )
continue;
- QAction *ac = (QAction*)o;
- bool isGroup = ac->inherits( "QActionGroup" );
+ TQAction *ac = (TQAction*)o;
+ bool isGroup = ac->inherits( "TQActionGroup" );
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2396,16 +2396,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 = a->inherits( "QActionGroup" );
+ TQAction *a = it.current();
+ bool isGroup = a->inherits( "TQActionGroup" );
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2428,14 +2428,14 @@ 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();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
setObjectProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
@@ -2444,17 +2444,17 @@ void Resource::loadChildAction( QObject *parent, const QDomElement &e )
#ifndef KOMMANDER
MetaDataBase::setEventFunctions( a, formwindow, MainWindow::self->currProject()->language(),
n2.attribute( "name" ),
- QStringList::split( ',', n2.attribute( "functions" ) ), false );
+ TQStringList::split( ',', n2.attribute( "functions" ) ), false );
#endif
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( "QAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
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();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
setObjectProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
@@ -2466,19 +2466,19 @@ void Resource::loadChildAction( QObject *parent, const QDomElement &e )
#ifndef KOMMANDER
MetaDataBase::setEventFunctions( a, formwindow, MainWindow::self->currProject()->language(),
n2.attribute( "name" ),
- QStringList::split( ',', n2.attribute( "functions" ) ), false );
+ TQStringList::split( ',', n2.attribute( "functions" ) ), false );
#endif
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( "QAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
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 );
@@ -2489,36 +2489,36 @@ 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 ( a->inherits( "QSeparatorAction" ) ) {
ts << makeIndent( indent ) << "<separator/>" << endl;
} else {
if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) {
- QWidget *w = ( (QDesignerAction*)a )->widget();
+ TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( w ) << "\">" << endl;
indent++;
saveObjectProperties( w, ts, 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 ) ) ) )
saveItems( w, ts, indent );
indent--;
@@ -2536,9 +2536,9 @@ 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 )
{
- if ( !mw->child( 0, "QMenuBar" ) )
+ if ( !mw->child( 0, "TQMenuBar" ) )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
@@ -2548,11 +2548,11 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "<item text=\"" << entitize( mw->menuBar()->text( mw->menuBar()->idAt( i ) ) )
<< "\" name=\"" << entitize( mw->menuBar()->findItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl;
indent++;
- QMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) );
+ TQMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) );
if ( !m )
continue;
- QPtrList<QAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions();
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ TQPtrList<TQAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions();
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( a->inherits( "QSeparatorAction" ) )
ts << makeIndent( indent ) << "<separator/>" << endl;
else
@@ -2565,29 +2565,29 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</menubar>" << endl;
}
-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 );
@@ -2602,25 +2602,25 @@ 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() );
QDesignerMenuBar *mb = new QDesignerMenuBar( mw );
while ( !n.isNull() ) {
if ( n.tagName() == "item" ) {
QDesignerPopupMenu *popup = new QDesignerPopupMenu( mw );
popup->setName( n.attribute( "name" ) );
- 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( popup );
popup->addAction( a );
}
} else if ( n2.tagName() == "separator" ) {
- QAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new QSeparatorAction( 0 );
a->addTo( popup );
popup->addAction( a );
}
@@ -2638,35 +2638,35 @@ void Resource::loadMenuBar( const QDomElement &e )
void Resource::saveFormCode()
{
#ifndef KOMMANDER
- QString lang = formwindow->project()->language();
+ TQString lang = formwindow->project()->language();
#else
- QString lang = "C++";
+ TQString lang = "C++";
#endif
LanguageInterface *iface = langIface;
if ( !iface )
return;
- QMap<QString, QString> functionBodies = MetaDataBase::functionBodies( formwindow );
+ TQMap<TQString, TQString> functionBodies = MetaDataBase::functionBodies( formwindow );
if ( langIface->supports( LanguageInterface::StoreFormCodeSeperate ) ) {
if ( formwindow->formFile()->hasTempFileName() ||
formwindow->formFile()->code().isEmpty() ||
!formwindow->formFile()->hasFormCode() )
return;
#ifndef KOMMANDER
- QFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
+ TQFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
#else
- QFile f( formwindow->formFile()->codeFile() );
+ TQFile f( formwindow->formFile()->codeFile() );
#endif
if ( f.open( IO_WriteOnly | IO_Translate ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
ts << formwindow->formFile()->code();
}
} else {
- QValueList<LanguageInterface::Function> funcs;
- QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
- QValueList<MetaDataBase::Slot>::Iterator sit = slotList.begin();
+ TQValueList<LanguageInterface::Function> funcs;
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Slot>::Iterator sit = slotList.begin();
for ( ; sit != slotList.end(); ++sit ) {
MetaDataBase::Slot slot = *sit;
- QMap<QString, QString>::Iterator it =
+ TQMap<TQString, TQString>::Iterator it =
functionBodies.find( MetaDataBase::normalizeSlot( (*sit).slot ) );
LanguageInterface::Function func;
func.name = slot.slot;
@@ -2676,9 +2676,9 @@ void Resource::saveFormCode()
funcs.append( func );
}
- QValueList<LanguageInterface::Connection> conns;
- QValueList<MetaDataBase::Connection> mconns = langConnections[ lang ];
- for ( QValueList<MetaDataBase::Connection>::Iterator it = mconns.begin();
+ TQValueList<LanguageInterface::Connection> conns;
+ TQValueList<MetaDataBase::Connection> mconns = langConnections[ lang ];
+ for ( TQValueList<MetaDataBase::Connection>::Iterator it = mconns.begin();
it != mconns.end(); ++it ) {
LanguageInterface::Connection conn;
conn.sender = (*it).sender->name();
@@ -2688,7 +2688,7 @@ void Resource::saveFormCode()
}
iface->saveFormCode( formwindow->name(), currFileName + iface->formCodeExtension(),
- funcs, QStringList(), QStringList(), QStringList(),
+ funcs, TQStringList(), TQStringList(), TQStringList(),
MetaDataBase::variables( formwindow ), conns );
}
}
@@ -2696,57 +2696,57 @@ void Resource::saveFormCode()
// compatibility with early 3.0 betas
-static QString make_function_pretty( const QString &s )
+static TQString make_function_pretty( const TQString &s )
{
- QString res = s;
+ TQString res = s;
if ( res.find( ")" ) - res.find( "(" ) == 1 )
return res;
- res.replace( QRegExp( "[(]" ), "( " );
- res.replace( QRegExp( "[)]" ), " )" );
- res.replace( QRegExp( "&" ), " &" );
- res.replace( QRegExp( "[*]" ), " *" );
- res.replace( QRegExp( "," ), ", " );
- res.replace( QRegExp( ":" ), " : " );
+ res.replace( TQRegExp( "[(]" ), "( " );
+ res.replace( TQRegExp( "[)]" ), " )" );
+ res.replace( TQRegExp( "&" ), " &" );
+ res.replace( TQRegExp( "[*]" ), " *" );
+ res.replace( TQRegExp( "," ), ", " );
+ res.replace( TQRegExp( ":" ), " : " );
res = res.simplifyWhiteSpace();
return res;
}
#ifndef KOMMANDER
-void Resource::loadFunctions( const QDomElement &e )
+void Resource::loadFunctions( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMap<QString, QString> bodies;
+ TQDomElement n = e.firstChild().toElement();
+ TQMap<TQString, TQString> bodies;
while ( !n.isNull() ) {
if ( n.tagName() == "function" ) {
- QString name = n.attribute( "name" );
- QString body = n.firstChild().toText().data();
+ TQString name = n.attribute( "name" );
+ TQString body = n.firstChild().toText().data();
bodies.insert( name, body );
}
n = n.nextSibling().toElement();
}
- MetaDataBase::setFunctionBodies( formwindow, bodies, QString::null, QString::null );
+ MetaDataBase::setFunctionBodies( formwindow, bodies, TQString::null, TQString::null );
if ( !bodies.isEmpty() ) {
LanguageInterface *iface = langIface;
if ( !iface )
return;
- QString code;
- QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
- for ( QValueList<MetaDataBase::Slot>::Iterator it = slotList.begin(); it != slotList.end(); ++it ) {
+ TQString code;
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ for ( TQValueList<MetaDataBase::Slot>::Iterator it = slotList.begin(); it != slotList.end(); ++it ) {
#ifndef KOMMANDER
if ( (*it).language != formwindow->project()->language() )
#else
if ( (*it).language != "C++" )
#endif
continue;
- QString sl( (*it).slot );
- QString comments = MetaDataBase::functionComments( formwindow, sl );
+ TQString sl( (*it).slot );
+ TQString comments = MetaDataBase::functionComments( formwindow, sl );
if ( !comments.isEmpty() )
code += comments + "\n";
code += iface->createFunctionStart( formwindow->name(), make_function_pretty( sl ),
( (*it).returnType.isEmpty() ?
- QString( "void" ) :
+ TQString( "void" ) :
(*it).returnType ) );
- QMap<QString, QString>::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) );
+ TQMap<TQString, TQString>::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) );
if ( bit != bodies.end() )
code += "\n" + *bit + "\n\n";
else
@@ -2763,47 +2763,47 @@ void Resource::loadFunctions( const QDomElement &e )
void Resource::loadExtraSource()
{
#ifndef KOMMANDER
- QString lang = MainWindow::self->currProject()->language();
+ TQString lang = MainWindow::self->currProject()->language();
#else
- QString lang = "C++";
+ TQString lang = "C++";
#endif
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( formwindow->name(), currFileName + iface->formCodeExtension(),
functions, forwards, includesImpl, includesDecl, vars, connections );
if ( iface->supports( LanguageInterface::StoreFormCodeSeperate ) ) {
#ifndef KOMMANDER
- QFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
+ TQFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
#else
- QFile f( formwindow->formFile()->codeFile() );
+ TQFile f( formwindow->formFile()->codeFile() );
#endif
- QString code;
+ TQString code;
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
+ TQTextStream ts( &f );
code = ts.read();
}
formwindow->formFile()->setCode( code );
}
- for ( QValueList<LanguageInterface::Connection>::Iterator cit = connections.begin();
+ for ( TQValueList<LanguageInterface::Connection>::Iterator cit = connections.begin();
cit != connections.end(); ++cit ) {
- QObject *sender = 0;
- QString name = (*cit).sender;
+ TQObject *sender = 0;
+ TQString name = (*cit).sender;
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
sender = ( (FormWindow*)toplevel )->mainContainer();
} 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() )
sender = l->first();
@@ -2813,12 +2813,12 @@ void Resource::loadExtraSource()
sender = formwindow->findAction( name );
}
MetaDataBase::setEventFunctions( sender, formwindow, lang, (*cit).signal,
- QStringList::split( ',', (*cit).slot ), false );
+ TQStringList::split( ',', (*cit).slot ), false );
}
- QMap<QString, QString> bodies = MetaDataBase::functionBodies( formwindow );
+ TQMap<TQString, TQString> bodies = MetaDataBase::functionBodies( formwindow );
- for ( QValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
+ for ( TQValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
fit != functions.end(); ++fit ) {
if ( MetaDataBase::hasSlot( formwindow, (*fit).name.latin1() ) )
MetaDataBase::changeSlot( formwindow, (*fit).name.latin1(), (*fit).name.latin1() );
@@ -2827,20 +2827,20 @@ void Resource::loadExtraSource()
MetaDataBase::setFunctionComments( formwindow, (*fit).name, (*fit).comments );
bodies.insert( MetaDataBase::normalizeSlot( (*fit).name ), (*fit).body );
}
- MetaDataBase::setFunctionBodies( formwindow, bodies, QString::null, QString::null );
+ MetaDataBase::setFunctionBodies( formwindow, bodies, TQString::null, TQString::null );
- QStringList v = MetaDataBase::variables( formwindow );
- QStringList::Iterator vit;
+ TQStringList v = MetaDataBase::variables( formwindow );
+ TQStringList::Iterator vit;
for ( vit = vars.begin(); vit != vars.end(); ++vit )
v << *vit;
MetaDataBase::setVariables( formwindow, v );
- QStringList f = MetaDataBase::forwards( formwindow );
+ TQStringList f = MetaDataBase::forwards( formwindow );
for ( vit = forwards.begin(); vit != forwards.end(); ++vit )
f << *vit;
MetaDataBase::setForwards( formwindow, f );
- QValueList<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow );
+ TQValueList<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow );
for ( vit = includesImpl.begin(); vit != includesImpl.end(); ++vit ) {
MetaDataBase::Include inc;
inc.header = *vit;
diff --git a/kommander/editor/resource.h b/kommander/editor/resource.h
index 710bd34b..e41a9fd7 100644
--- a/kommander/editor/resource.h
+++ b/kommander/editor/resource.h
@@ -21,11 +21,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"
@@ -50,8 +50,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 );
@@ -63,92 +63,92 @@ public:
~Resource();
void setWidget( FormWindow *w );
- QWidget *widget() const;
+ TQWidget *widget() const;
bool load( FormFile *ff );
- bool load( FormFile *ff, QIODevice* );
- QString copy();
+ bool load( FormFile *ff, TQIODevice* );
+ 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 saveImageData( const TQImage &img, TQTextStream &ts, int indent );
+ static void loadCustomWidgets( const TQDomElement &e, Resource *r );
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 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 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 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 );
#ifndef KOMMANDER
// void saveFormCode();
#endif
- 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 );
- QColorGroup loadColorGroup( const QDomElement &e );
- QPixmap loadPixmap( const QDomElement &e, const QString &tagname = "pixmap" );
+ 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 );
+ TQColorGroup loadColorGroup( const TQDomElement &e );
+ TQPixmap loadPixmap( const TQDomElement &e, const TQString &tagname = "pixmap" );
#ifndef KOMMANDER
-// void loadFunctions( const QDomElement &e ); // compatibility with early 3.0 betas
+// void loadFunctions( const TQDomElement &e ); // compatibility with early 3.0 betas
// void loadExtraSource();
#endif
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;
- QStringList metaForwards;
- QStringList metaVariables;
- QStringList metaSignals;
+ TQStringList knownNames;
+ TQStringList usedCustomWidgets;
+ TQListViewItem *lastItem;
+
+ TQValueList<MetaDataBase::Include> metaIncludes;
+ TQStringList metaForwards;
+ TQStringList metaVariables;
+ TQStringList metaSignals;
MetaDataBase::MetaInfo metaInfo;
- QMap<QString, QString> dbControls;
- QMap<QString, QStringList> dbTables;
- QString exportMacro;
+ TQMap<TQString, TQString> dbControls;
+ TQMap<TQString, TQStringList> dbTables;
+ TQString exportMacro;
bool hadGeometry;
- QMap<QString, QValueList<MetaDataBase::Connection> > langConnections;
- QString currFileName;
+ TQMap<TQString, TQValueList<MetaDataBase::Connection> > langConnections;
+ TQString currFileName;
#ifndef KOMMANDER
LanguageInterface *langIface;
#endif
diff --git a/kommander/editor/sizehandle.cpp b/kommander/editor/sizehandle.cpp
index 937d33bc..a5ebe0ec 100644
--- a/kommander/editor/sizehandle.cpp
+++ b/kommander/editor/sizehandle.cpp
@@ -18,20 +18,20 @@
**
**********************************************************************/
-#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 );
@@ -86,37 +86,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 ) {
@@ -204,13 +204,13 @@ void SizeHandle::mouseMoveEvent( QMouseEvent *e )
} break;
}
- QPoint p = pos();
+ TQPoint p = pos();
sel->updateGeometry();
oldPressPos += ( p - pos() );
- formWindow->sizePreview()->setText( QString( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) );
+ formWindow->sizePreview()->setText( TQString( "%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 );
@@ -220,7 +220,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;
@@ -234,7 +234,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() );
@@ -250,7 +250,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 );
@@ -261,7 +261,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;
@@ -271,7 +271,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();
@@ -306,9 +306,9 @@ void WidgetSelection::updateGeometry()
if ( !wid )
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;
@@ -377,7 +377,7 @@ void WidgetSelection::update()
}
}
-QWidget *WidgetSelection::widget() const
+TQWidget *WidgetSelection::widget() const
{
return wid;
}
diff --git a/kommander/editor/sizehandle.h b/kommander/editor/sizehandle.h
index ccd6a6ef..24413602 100644
--- a/kommander/editor/sizehandle.h
+++ b/kommander/editor/sizehandle.h
@@ -21,9 +21,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;
@@ -38,29 +38,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;
};
@@ -68,9 +68,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();
@@ -78,13 +78,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/kommander/editor/styledbutton.cpp b/kommander/editor/styledbutton.cpp
index 9b77b941..4502b2a3 100644
--- a/kommander/editor/styledbutton.cpp
+++ b/kommander/editor/styledbutton.cpp
@@ -18,33 +18,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 <kcolordialog.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 <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();
@@ -69,17 +69,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;
@@ -87,12 +87,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;
}
@@ -111,14 +111,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()
@@ -126,8 +126,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 {
@@ -137,39 +137,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 );
}
@@ -178,18 +178,18 @@ void StyledButton::onEditor()
{
switch (edit) {
case ColorEditor: {
- QColor c = palette().active().background();
- if ( KColorDialog::getColor( c, this ) == QDialog::Accepted ) {
+ TQColor c = palette().active().background();
+ if ( KColorDialog::getColor( c, this ) == TQDialog::Accepted ) {
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();
@@ -200,25 +200,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 );
@@ -226,8 +226,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;
@@ -238,46 +238,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/kommander/editor/styledbutton.h b/kommander/editor/styledbutton.h
index a2927084..ec60c22b 100644
--- a/kommander/editor/styledbutton.h
+++ b/kommander/editor/styledbutton.h
@@ -21,8 +21,8 @@
#ifndef STYLEDBUTTON_H
#define STYLEDBUTTON_H
-#include <qbutton.h>
-#include <qpixmap.h>
+#include <tqbutton.h>
+#include <tqpixmap.h>
class QColor;
class QBrush;
@@ -32,8 +32,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 )
@@ -42,24 +42,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; }
@@ -70,27 +70,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/kommander/editor/tableeditorimpl.cpp b/kommander/editor/tableeditorimpl.cpp
index d8cfc70d..6b5ce13e 100644
--- a/kommander/editor/tableeditorimpl.cpp
+++ b/kommander/editor/tableeditorimpl.cpp
@@ -1,18 +1,18 @@
#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 <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include "pixmapchooser.h"
#include "command.h"
-#include <qvaluelist.h>
-#include <qtabwidget.h>
+#include <tqvaluelist.h>
+#include <tqtabwidget.h>
#ifndef KOMMANDER
#include "project.h"
#endif
@@ -21,26 +21,26 @@
#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( "" );
- if ( !editTable->inherits( "QDataTable" ) ) {
+ if ( !editTable->inherits( "TQDataTable" ) ) {
labelFields->hide();
comboFields->hide();
labelTable->hide();
labelTableValue->hide();
}
#ifndef QT_NO_SQL
- if ( editTable->inherits( "QDataTable" ) ) {
+ if ( editTable->inherits( "TQDataTable" ) ) {
// ## why does this behave weird?
// TabWidget->removePage( rows_tab );
// rows_tab->hide();
@@ -48,10 +48,10 @@ TableEditor::TableEditor( QWidget* parent, QWidget *editWidget, FormWindow *fw,
TabWidget->setTabEnabled( rows_tab, false );
}
- if ( formWindow->project() && editTable->inherits( "QDataTable" ) ) {
- QStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
+ if ( formWindow->project() && editTable->inherits( "TQDataTable" ) ) {
+ TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) {
- QStringList fields;
+ TQStringList fields;
fields << i18n( "<no field>" );
fields += formWindow->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] );
comboFields->insertStringList( fields );
@@ -77,7 +77,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 );
@@ -86,7 +86,7 @@ void TableEditor::columnDownClicked()
currentColumnChanged( i );
}
-void TableEditor::columnTextChanged( const QString &s )
+void TableEditor::columnTextChanged( const TQString &s )
{
if ( listColumns->currentItem() == -1 )
return;
@@ -109,7 +109,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 );
@@ -118,7 +118,7 @@ void TableEditor::columnUpClicked()
currentColumnChanged( i );
}
-void TableEditor::currentColumnChanged( QListBoxItem *i )
+void TableEditor::currentColumnChanged( TQListBoxItem *i )
{
if ( !i )
return;
@@ -131,8 +131,8 @@ void TableEditor::currentColumnChanged( QListBoxItem *i )
editColumnText->blockSignals( false );
#ifndef QT_NO_TABLE
- if ( editTable->inherits( "QDataTable" ) ) {
- QString s = *fieldMap.find( listColumns->index( i ) );
+ if ( editTable->inherits( "TQDataTable" ) ) {
+ TQString s = *fieldMap.find( listColumns->index( i ) );
if ( s.isEmpty() )
comboFields->setCurrentItem( 0 );
else if ( comboFields->listBox()->findItem( s ) )
@@ -143,20 +143,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;
@@ -203,19 +203,19 @@ 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 );
- if ( editTable->inherits( "QDataTable" ) ) {
+ if ( editTable->inherits( "TQDataTable" ) ) {
comboFields->setFocus();
} else {
editColumnText->setFocus();
@@ -228,16 +228,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
@@ -256,14 +256,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;
@@ -283,7 +283,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 );
@@ -292,8 +292,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
@@ -323,11 +323,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;
@@ -343,7 +343,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
}
@@ -352,11 +352,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;
@@ -371,7 +371,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
}
@@ -379,9 +379,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 ),
@@ -392,7 +392,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 );
}
@@ -401,7 +401,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 ) ) {
@@ -426,7 +426,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
@@ -439,7 +439,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
@@ -451,14 +451,14 @@ 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 );
}
#include "tableeditorimpl.moc"
diff --git a/kommander/editor/tableeditorimpl.h b/kommander/editor/tableeditorimpl.h
index 8018bf92..9d2909c9 100644
--- a/kommander/editor/tableeditorimpl.h
+++ b/kommander/editor/tableeditorimpl.h
@@ -2,7 +2,7 @@
#define TABLEEDITOR_H
#include "tableeditor.h"
-#include <qmap.h>
+#include <tqmap.h>
class QListBoxItem;
class QTable;
@@ -13,24 +13,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();
@@ -46,10 +46,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/kommander/editor/timestamp.cpp b/kommander/editor/timestamp.cpp
index b0d42e03..659cfcec 100644
--- a/kommander/editor/timestamp.cpp
+++ b/kommander/editor/timestamp.cpp
@@ -19,26 +19,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;
}
@@ -54,18 +54,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/kommander/editor/timestamp.h b/kommander/editor/timestamp.h
index 06d50507..d3e061f9 100644
--- a/kommander/editor/timestamp.h
+++ b/kommander/editor/timestamp.h
@@ -21,19 +21,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();
@@ -47,10 +47,10 @@ private slots:
void autoCheckTimeStamp();
private:
- QDateTime lastTimeStamp;
- QString filename;
+ TQDateTime lastTimeStamp;
+ TQString filename;
bool autoCheck;
- QTimer *timer;
+ TQTimer *timer;
};
diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp
index 4de615d0..940176c1 100644
--- a/kommander/editor/widgetdatabase.cpp
+++ b/kommander/editor/widgetdatabase.cpp
@@ -26,16 +26,16 @@
#endif
#include "widgetdatabase.h"
-#include <qapplication.h>
+#include <tqapplication.h>
//#define NO_STATIC_COLORS
#include "globaldefs.h"
-#include <qstrlist.h>
-#include <qdict.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcleanuphandler.h>
+#include <tqstrlist.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqcleanuphandler.h>
-#include <qfeatures.h>
+#include <tqfeatures.h>
#include <stdlib.h>
@@ -46,11 +46,11 @@ const int dbsize = 300;
const int dbcustom = 200;
const int dbdictsize = 211;
static WidgetDatabaseRecord* widget_db[ dbsize ];
-static QDict<int> *className2Id = 0;
+static TQDict<int> *className2Id = 0;
static int dbcount = 0;
static int dbcustomcount = 200;
-static QStrList *wGroups;
-static QStrList *invisibleGroups;
+static TQStrList *wGroups;
+static TQStrList *invisibleGroups;
static bool whatsThisLoaded = false;
#ifndef KOMMANDER
static QPluginManager<WidgetInterface> *widgetPluginManager = 0;
@@ -59,7 +59,7 @@ static bool plugins_set_up = false;
static bool was_in_setup = false;
#ifndef KOMMANDER
-QCleanupHandler<QPluginManager<WidgetInterface> > cleanup_manager;
+TQCleanupHandler<QPluginManager<WidgetInterface> > cleanup_manager;
#endif
WidgetDatabaseRecord::WidgetDatabaseRecord()
@@ -126,7 +126,7 @@ void WidgetDatabase::setupDataBase( int id )
invisibleGroups = new QStrList;
invisibleGroups->append("Forms");
invisibleGroups->append("Temp");
- className2Id = new QDict < int >(dbdictsize);
+ className2Id = new TQDict < int >(dbdictsize);
className2Id->setAutoDelete(true);
WidgetDatabaseRecord *r = 0;
@@ -134,35 +134,35 @@ void WidgetDatabase::setupDataBase( int id )
/* Designer widgets */
r = new WidgetDatabaseRecord;
r->iconName = "pushbutton.xpm";
- r->name = "QPushButton";
+ r->name = "TQPushButton";
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Push Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "toolbutton.xpm";
- r->name = "QToolButton";
+ r->name = "TQToolButton";
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Tool Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "radiobutton.xpm";
- r->name = "QRadioButton";
+ r->name = "TQRadioButton";
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Radio Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "checkbox.xpm";
- r->name = "QCheckBox";
+ r->name = "TQCheckBox";
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Check Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "groupbox.xpm";
- r->name = "QGroupBox";
+ r->name = "TQGroupBox";
r->group = widgetGroup("Containers");
r->toolTip = i18n("Group Box");
r->isContainer = true;
@@ -170,7 +170,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "buttongroup.xpm";
- r->name = "QButtonGroup";
+ r->name = "TQButtonGroup";
r->group = widgetGroup("Containers");
r->toolTip = i18n("Button Group");
r->isContainer = true;
@@ -178,7 +178,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "frame.xpm";
- r->name = "QFrame";
+ r->name = "TQFrame";
r->group = widgetGroup("Containers");
r->toolTip = i18n("Frame");
r->isContainer = true;
@@ -186,7 +186,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QTabWidget";
+ r->name = "TQTabWidget";
r->group = widgetGroup("Containers");
r->toolTip = i18n("Tabwidget");
r->isContainer = true;
@@ -194,14 +194,14 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "listbox.xpm";
- r->name = "QListBox";
+ r->name = "TQListBox";
r->group = widgetGroup("Views");
r->toolTip = i18n("List Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "listview.xpm";
- r->name = "QListView";
+ r->name = "TQListView";
r->group = widgetGroup("Views");
r->toolTip = i18n("List View");
append(r);
@@ -209,7 +209,7 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(QT_NO_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconName = "iconview.xpm";
- r->name = "QIconView";
+ r->name = "TQIconView";
r->group = widgetGroup("Views");
r->toolTip = i18n("Icon View");
append(r);
@@ -218,7 +218,7 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(QT_NO_TABLE)
r = new WidgetDatabaseRecord;
r->iconName = "table.xpm";
- r->name = "QTable";
+ r->name = "TQTable";
r->group = widgetGroup("Views");
r->toolTip = i18n("Table");
append(r);
@@ -227,8 +227,8 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(QT_NO_SQL)
r = new WidgetDatabaseRecord;
r->iconName = "datatable.xpm";
- r->includeFile = "qdatatable.h";
- r->name = "QDataTable";
+ r->includeFile = "tqdatatable.h";
+ r->name = "TQDataTable";
r->group = widgetGroup("Database");
r->toolTip = i18n("Data Table");
append(r);
@@ -236,14 +236,14 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "lineedit.xpm";
- r->name = "QLineEdit";
+ r->name = "TQLineEdit";
r->group = widgetGroup("Input");
r->toolTip = i18n("Line Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "spinbox.xpm";
- r->name = "QSpinBox";
+ r->name = "TQSpinBox";
r->group = widgetGroup("Input");
r->toolTip = i18n("Spin Box");
append(r);
@@ -253,7 +253,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "QDateEdit";
r->group = widgetGroup("Input");
r->toolTip = i18n("Date Edit");
- r->includeFile = "qdatetimeedit.h";
+ r->includeFile = "tqdatetimeedit.h";
append(r);
r = new WidgetDatabaseRecord;
@@ -261,7 +261,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "QTimeEdit";
r->group = widgetGroup("Input");
r->toolTip = i18n("Time Edit");
- r->includeFile = "qdatetimeedit.h";
+ r->includeFile = "tqdatetimeedit.h";
append(r);
r = new WidgetDatabaseRecord;
@@ -269,82 +269,82 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "QDateTimeEdit";
r->group = widgetGroup("Input");
r->toolTip = i18n("Date-Time Edit");
- r->includeFile = "qdatetimeedit.h";
+ r->includeFile = "tqdatetimeedit.h";
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "multilineedit.xpm";
- r->name = "QMultiLineEdit";
+ r->name = "TQMultiLineEdit";
r->group = widgetGroup("Temp");
r->toolTip = i18n("Multi Line Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "richtextedit.xpm";
- r->name = "QTextEdit";
+ r->name = "TQTextEdit";
r->group = widgetGroup("Input");
r->toolTip = i18n("Rich Text Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "combobox.xpm";
- r->name = "QComboBox";
+ r->name = "TQComboBox";
r->group = widgetGroup("Input");
r->toolTip = i18n("Combo Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "slider.xpm";
- r->name = "QSlider";
+ r->name = "TQSlider";
r->group = widgetGroup("Input");
r->toolTip = i18n("Slider");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "scrollbar.xpm";
- r->name = "QScrollBar";
+ r->name = "TQScrollBar";
r->group = widgetGroup("Input");
r->toolTip = i18n("Scrollbar");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "dial.xpm";
- r->name = "QDial";
+ r->name = "TQDial";
r->group = widgetGroup("Input");
r->toolTip = i18n("Dial");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "label.xpm";
- r->name = "QLabel";
+ r->name = "TQLabel";
r->group = widgetGroup("Temp");
r->toolTip = i18n("Label");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "lcdnumber.xpm";
- r->name = "QLCDNumber";
+ r->name = "TQLCDNumber";
r->group = widgetGroup("Display");
r->toolTip = i18n("LCD Number");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "progress.xpm";
- r->name = "QProgressBar";
+ r->name = "TQProgressBar";
r->group = widgetGroup("Display");
r->toolTip = i18n("Progress Bar");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "textview.xpm";
- r->name = "QTextView";
+ r->name = "TQTextView";
r->group = widgetGroup("Temp");
r->toolTip = i18n("Text View");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "textbrowser.xpm";
- r->name = "QTextBrowser";
+ r->name = "TQTextBrowser";
r->group = widgetGroup("Display");
r->toolTip = i18n("Text Browser");
append(r);
@@ -359,19 +359,19 @@ void WidgetDatabase::setupDataBase( int id )
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QWidget";
+ r->name = "TQWidget";
r->isForm = true;
r->group = widgetGroup("Forms");
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QDialog";
+ r->name = "TQDialog";
r->group = widgetGroup("Forms");
r->isForm = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QWizard";
+ r->name = "TQWizard";
r->group = widgetGroup("Forms");
r->isContainer = true;
append(r);
@@ -390,9 +390,9 @@ void WidgetDatabase::setupDataBase( int id )
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QSplitter";
+ r->name = "TQSplitter";
r->group = widgetGroup("Temp");
- r->includeFile = "qsplitter.h";
+ r->includeFile = "tqsplitter.h";
r->isContainer = true;
append(r);
@@ -419,16 +419,16 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "";
- r->name = "QMainWindow";
- r->includeFile = "qmainwindow.h";
+ r->name = "TQMainWindow";
+ r->includeFile = "tqmainwindow.h";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
#ifndef QT_NO_SQL
r = new WidgetDatabaseRecord;
- r->name = "QDataBrowser";
- r->includeFile = "qdatabrowser.h";
+ r->name = "TQDataBrowser";
+ r->includeFile = "tqdatabrowser.h";
r->group = widgetGroup("Database");
r->toolTip = "Data Browser";
r->iconName = "databrowser.xpm";
@@ -436,8 +436,8 @@ void WidgetDatabase::setupDataBase( int id )
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QDataView";
- r->includeFile = "qdataview.h";
+ r->name = "TQDataView";
+ r->includeFile = "tqdataview.h";
r->group = widgetGroup("Database");
r->toolTip = "Data View";
r->iconName = "dataview.xpm";
@@ -702,7 +702,7 @@ void WidgetDatabase::setupPlugins()
continue;
WidgetDatabaseRecord *r = new WidgetDatabaseRecord;
- QString grp = (*it).group;
+ TQString grp = (*it).group;
if (grp.isEmpty())
grp = "Kommander";
r->group = widgetGroup(grp);
@@ -739,19 +739,19 @@ int WidgetDatabase::startCustom()
Returns the iconset which represents the class registered as \a id.
*/
-QIconSet WidgetDatabase::iconSet( int id )
+TQIconSet WidgetDatabase::iconSet( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QIconSet();
+ return TQIconSet();
#if !defined(UIC) && !defined(RESOURCE)
if ( !r->iconSet )
- r->iconSet = new QIconSet( PixmapChooser::loadPixmap( r->iconName, PixmapChooser::Small ),
+ r->iconSet = new TQIconSet( PixmapChooser::loadPixmap( r->iconName, PixmapChooser::Small ),
PixmapChooser::loadPixmap( r->iconName, PixmapChooser::Large ) );
return *r->iconSet;
#else
- return QIconSet();
+ return TQIconSet();
#endif
}
@@ -759,12 +759,12 @@ QIconSet WidgetDatabase::iconSet( int id )
Returns the classname of the widget which is registered as \a id.
*/
-QString WidgetDatabase::className( int id )
+TQString WidgetDatabase::className( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->name;
}
@@ -772,12 +772,12 @@ QString WidgetDatabase::className( int id )
Returns the group the widget registered as \a id belongs to.
*/
-QString WidgetDatabase::group( int id )
+TQString WidgetDatabase::group( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->group;
}
@@ -785,12 +785,12 @@ QString WidgetDatabase::group( int id )
Returns the tooltip text of the widget which is registered as \a id.
*/
-QString WidgetDatabase::toolTip( int id )
+TQString WidgetDatabase::toolTip( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->toolTip;
}
@@ -798,12 +798,12 @@ QString WidgetDatabase::toolTip( int id )
Returns the what's this? text of the widget which is registered as \a id.
*/
-QString WidgetDatabase::whatsThis( int id )
+TQString WidgetDatabase::whatsThis( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->whatsThis;
}
@@ -811,12 +811,12 @@ QString WidgetDatabase::whatsThis( int id )
Returns the include file if the widget which is registered as \a id.
*/
-QString WidgetDatabase::includeFile( int id )
+TQString WidgetDatabase::includeFile( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
@@ -845,10 +845,10 @@ bool WidgetDatabase::isContainer( int id )
return r->isContainer || r->isForm;
}
-QString WidgetDatabase::createWidgetName( int id )
+TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase( id );
- QString n = className( id );
+ TQString n = className( id );
if ( n == "QLayoutWidget" )
n = "Layout";
if ( n[ 0 ] == 'Q' )
@@ -856,13 +856,13 @@ QString WidgetDatabase::createWidgetName( int id )
WidgetDatabaseRecord *r = at( id );
if ( !r )
return n;
- n += QString::number( ++r->nameCounter );
+ n += TQString::number( ++r->nameCounter );
return n;
}
/*! Returns the id for \a name or -1 if \a name is unknown.
*/
-int WidgetDatabase::idFromClassName( const QString &name )
+int WidgetDatabase::idFromClassName( const TQString &name )
{
setupDataBase( -1 );
if ( name.isEmpty() )
@@ -881,7 +881,7 @@ int WidgetDatabase::idFromClassName( const QString &name )
return -1;
}
-bool WidgetDatabase::hasWidget( const QString &name )
+bool WidgetDatabase::hasWidget( const TQString &name )
{
return className2Id->find( name ) != 0;
}
@@ -914,14 +914,14 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r )
insert( dbcount++, r );
}
-QString WidgetDatabase::widgetGroup( const QString &g )
+TQString WidgetDatabase::widgetGroup( const TQString &g )
{
if ( wGroups->find( g ) == -1 )
wGroups->append( g );
return g;
}
-bool WidgetDatabase::isGroupEmpty( const QString &grp )
+bool WidgetDatabase::isGroupEmpty( const TQString &grp )
{
WidgetDatabaseRecord *r = 0;
for ( int i = 0; i < dbcount; ++i ) {
@@ -940,12 +940,12 @@ bool WidgetDatabase::isGroupEmpty( const QString &grp )
return true;
}
-QString WidgetDatabase::widgetGroup( int i )
+TQString WidgetDatabase::widgetGroup( int i )
{
setupDataBase( -1 );
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
- return QString::null;
+ return TQString::null;
}
int WidgetDatabase::numWidgetGroups()
@@ -954,7 +954,7 @@ int WidgetDatabase::numWidgetGroups()
return wGroups->count();
}
-bool WidgetDatabase::isGroupVisible( const QString &g )
+bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase( -1 );
return invisibleGroups->find( g ) == -1;
@@ -978,16 +978,16 @@ bool WidgetDatabase::isWhatsThisLoaded()
return whatsThisLoaded;
}
-void WidgetDatabase::loadWhatsThis( const QString &docPath )
+void WidgetDatabase::loadWhatsThis( const TQString &docPath )
{
- QString whatsthisFile = docPath + "/whatsthis";
- QFile f( whatsthisFile );
+ TQString whatsthisFile = docPath + "/whatsthis";
+ TQFile f( whatsthisFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QTextStream ts( &f );
+ TQTextStream ts( &f );
while ( !ts.atEnd() ) {
- QString s = ts.readLine();
- QStringList l = QStringList::split( " | ", s );
+ TQString s = ts.readLine();
+ TQStringList l = TQStringList::split( " | ", s );
int id = idFromClassName( l[ 1 ] );
WidgetDatabaseRecord *r = at( id );
if ( r )
@@ -1001,16 +1001,16 @@ void WidgetDatabase::loadWhatsThis( const QString &docPath )
#ifndef KOMMANDER
#if defined(UIC)
bool dbnounload = false;
-QStringList *dbpaths = 0;
+TQStringList *dbpaths = 0;
#endif
QPluginManager<WidgetInterface> *widgetManager()
{
if ( !widgetPluginManager ) {
#ifndef KOMMANDER
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), "/designer" );
+ widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "/designer" );
#else
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), "" );
+ widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "" );
#endif
cleanup_manager.add( &widgetPluginManager );
@@ -1018,7 +1018,7 @@ QPluginManager<WidgetInterface> *widgetManager()
if ( dbnounload )
widgetPluginManager->setAutoUnload( false );
if ( dbpaths ) {
- QStringList::ConstIterator it = dbpaths->begin();
+ TQStringList::ConstIterator it = dbpaths->begin();
for ( ; it != dbpaths->end(); ++it )
widgetPluginManager->addLibraryPath( *it );
}
diff --git a/kommander/editor/widgetdatabase.h b/kommander/editor/widgetdatabase.h
index ad1f123c..3e4078c5 100644
--- a/kommander/editor/widgetdatabase.h
+++ b/kommander/editor/widgetdatabase.h
@@ -21,8 +21,8 @@
#ifndef WIDGETDATABASE_H
#define WIDGETDATABASE_H
-#include <qiconset.h>
-#include <qstring.h>
+#include <tqiconset.h>
+#include <tqstring.h>
#ifndef KOMMANDER
#include "widgetinterface.h" // up here for GCC 2.7.* compatibility
#include <private/qpluginmanager_p.h>
@@ -35,10 +35,10 @@ struct WidgetDatabaseRecord
{
WidgetDatabaseRecord();
~WidgetDatabaseRecord();
- QString iconName, name, group, toolTip, whatsThis, includeFile;
+ TQString iconName, name, group, toolTip, whatsThis, includeFile;
uint isContainer : 1;
uint isForm : 1;
- QIconSet *iconSet;
+ TQIconSet *iconSet;
int nameCounter;
};
@@ -52,35 +52,35 @@ public:
static int count();
static int startCustom();
- static QIconSet iconSet( int id );
- static QString className( int id );
- static QString group( int id );
- static QString toolTip( int id );
- static QString whatsThis( int id );
- static QString includeFile( int id );
+ static TQIconSet iconSet( int id );
+ static TQString className( int id );
+ static TQString group( int id );
+ static TQString toolTip( int id );
+ static TQString whatsThis( int id );
+ static TQString includeFile( int id );
static bool isForm( int id );
static bool isContainer( int id );
- static int idFromClassName( const QString &name );
- static QString createWidgetName( int id );
+ static int idFromClassName( const TQString &name );
+ static TQString createWidgetName( int id );
static WidgetDatabaseRecord *at( int index );
static void insert( int index, WidgetDatabaseRecord *r );
static void append( WidgetDatabaseRecord *r );
- static QString widgetGroup( const QString &g );
- static QString widgetGroup( int i );
+ static TQString widgetGroup( const TQString &g );
+ static TQString widgetGroup( int i );
static int numWidgetGroups();
- static bool isGroupVisible( const QString &g );
- static bool isGroupEmpty( const QString &grp );
+ static bool isGroupVisible( const TQString &g );
+ static bool isGroupEmpty( const TQString &grp );
static int addCustomWidget( WidgetDatabaseRecord *r );
static bool isCustomWidget( int id );
static bool isWhatsThisLoaded();
- static void loadWhatsThis( const QString &docPath );
+ static void loadWhatsThis( const TQString &docPath );
- static bool hasWidget( const QString &name );
+ static bool hasWidget( const TQString &name );
};
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
index 0dbab517..34cd0514 100644
--- a/kommander/editor/widgetfactory.cpp
+++ b/kommander/editor/widgetfactory.cpp
@@ -22,7 +22,7 @@
#include <kommanderfactory.h>
#include "kmdrmainwindow.h"
-#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"
@@ -41,46 +41,46 @@
#include "tableeditorimpl.h"
#endif
-#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 <qwizard.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qscrollbar.h>
-#include <qmainwindow.h>
-#include <qmenubar.h>
-#include <qapplication.h>
-#include <qsplitter.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 <tqwizard.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqscrollbar.h>
+#include <tqmainwindow.h>
+#include <tqmenubar.h>
+#include <tqapplication.h>
+#include <tqsplitter.h>
#ifndef QT_NO_SQL
#include "database.h"
#endif
@@ -116,7 +116,7 @@
#include "fontdialog.h"
#include "aboutdialog.h"
-FormWindow *find_formwindow( QWidget *w )
+FormWindow *find_formwindow( TQWidget *w )
{
if ( !w )
return 0;
@@ -129,16 +129,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 );
@@ -154,27 +154,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
@@ -182,24 +182,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 );
@@ -213,24 +213,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();
@@ -239,33 +239,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++ ) {
@@ -274,7 +274,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++;
@@ -330,30 +330,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 )
@@ -362,28 +362,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
@@ -396,28 +396,28 @@ QMap< int, QStringList > *changedProperties = 0;
*/
-void WidgetFactory::saveDefaultProperties( QWidget *w, int id )
+void WidgetFactory::saveDefaultProperties( TQWidget *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 );
}
-static void saveChangedProperties( QWidget *w, int id )
+static void saveChangedProperties( TQWidget *w, int id )
{
- QStringList l = MetaDataBase::changedProperties( w );
+ TQStringList l = MetaDataBase::changedProperties( w );
changedProperties->insert( id, l );
}
-EditorTabWidget::EditorTabWidget( QWidget *parent, const char *name )
+EditorTabWidget::EditorTabWidget( TQWidget *parent, const char *name )
: TabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( true );
@@ -434,27 +434,27 @@ void EditorTabWidget::setCurrentPage( int i )
tabBar()->setCurrentTab( i );
}
-QString EditorTabWidget::pageTitle() const
+TQString EditorTabWidget::pageTitle() const
{
- return ((QTabWidget*)this)->tabLabel( QTabWidget::currentPage() );
+ return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() );
}
-void EditorTabWidget::setPageTitle( const QString& title )
+void EditorTabWidget::setPageTitle( const TQString& title )
{
- changeTab( QTabWidget::currentPage(), title );
+ changeTab( TQTabWidget::currentPage(), title );
}
-void EditorTabWidget::setPageName( const QCString& name )
+void EditorTabWidget::setPageName( const TQCString& name )
{
- if ( QTabWidget::currentPage() )
- QTabWidget::currentPage()->setName( name );
+ if ( TQTabWidget::currentPage() )
+ TQTabWidget::currentPage()->setName( name );
}
-QCString EditorTabWidget::pageName() const
+TQCString EditorTabWidget::pageName() const
{
- if ( !QTabWidget::currentPage() )
+ if ( !TQTabWidget::currentPage() )
return 0;
- return QTabWidget::currentPage()->name();
+ return TQTabWidget::currentPage()->name();
}
int EditorTabWidget::count() const
@@ -462,24 +462,24 @@ int EditorTabWidget::count() const
return tabBar()->count();
}
-bool EditorTabWidget::eventFilter( QObject *o, QEvent *e )
+bool EditorTabWidget::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 );
@@ -493,24 +493,24 @@ bool EditorTabWidget::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();
@@ -519,33 +519,33 @@ bool EditorTabWidget::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++ ) {
@@ -554,7 +554,7 @@ bool EditorTabWidget::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++;
@@ -584,7 +584,7 @@ bool EditorTabWidget::eventFilter( QObject *o, QEvent *e )
}
-EditorToolBox::EditorToolBox( QWidget *parent, const char *name )
+EditorToolBox::EditorToolBox( TQWidget *parent, const char *name )
: ToolBox( parent, name )
{
setAcceptDrops( true );
@@ -600,23 +600,23 @@ void EditorToolBox::setCurrentPage( int i )
setCurrentItem( item( i ) );
}
-QString EditorToolBox::pageTitle() const
+TQString EditorToolBox::pageTitle() const
{
return itemLabel( currentIndex() );
}
-void EditorToolBox::setPageTitle( const QString& title )
+void EditorToolBox::setPageTitle( const TQString& title )
{
setItemLabel( currentIndex(), title );
}
-void EditorToolBox::setPageName( const QCString& name )
+void EditorToolBox::setPageName( const TQCString& name )
{
if ( currentItem() )
currentItem()->setName( name );
}
-QCString EditorToolBox::pageName() const
+TQCString EditorToolBox::pageName() const
{
if ( !currentItem() )
return 0;
@@ -625,7 +625,7 @@ QCString EditorToolBox::pageName() const
int EditorToolBox::count() const
{
- return QToolBox::count();
+ return TQToolBox::count();
}
@@ -636,21 +636,21 @@ int EditorToolBox::count() const
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);
//qDebug("Trying to create '%s'", n.latin1());
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);
//qDebug("Trying to create '%s', widget (id=%d) - %s", s, id, w ? "successful" : "failure");
@@ -672,7 +672,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;
@@ -682,39 +682,39 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
widget && widget->parentWidget() && widget->parentWidget()->inherits( "FormWindow" ) ) )
margin = MainWindow::self->currentLayoutDefaultMargin();
- if ( !layout && widget && widget->inherits( "QTabWidget" ) )
- widget = ((QTabWidget*)widget)->currentPage();
+ if ( !layout && widget && widget->inherits( "TQTabWidget" ) )
+ widget = ((TQTabWidget*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( "QToolBox" ) )
- widget = ((QToolBox*)widget)->currentItem();
+ if ( !layout && widget && widget->inherits( "TQToolBox" ) )
+ widget = ((TQToolBox*)widget)->currentItem();
- if ( !layout && widget && widget->inherits( "QWizard" ) )
- widget = ((QWizard*)widget)->currentPage();
+ if ( !layout && widget && widget->inherits( "TQWizard" ) )
+ widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( "QMainWindow" ) )
- widget = ((QMainWindow*)widget)->centralWidget();
+ if ( !layout && widget && widget->inherits( "TQMainWindow" ) )
+ widget = ((TQMainWindow*)widget)->centralWidget();
- if ( !layout && widget && widget->inherits( "QWidgetStack" ) )
- widget = ((QWidgetStack*)widget)->visibleWidget();
+ if ( !layout && widget && widget->inherits( "TQWidgetStack" ) )
+ widget = ((TQWidgetStack*)widget)->visibleWidget();
MetaDataBase::addEntry( widget );
- if ( !layout && widget && widget->inherits( "QGroupBox" ) ) {
- QGroupBox *gb = (QGroupBox*)widget;
+ if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
+ TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
gb->layout()->setMargin( 0 );
gb->layout()->setSpacing( 0 );
- QLayout *l;
+ TQLayout *l;
switch ( type ) {
case HBox:
- l = new QHBoxLayout( gb->layout() );
+ l = new TQHBoxLayout( gb->layout() );
MetaDataBase::setMargin( gb, margin );
MetaDataBase::setSpacing( gb, spacing );
l->setAlignment( AlignTop );
MetaDataBase::addEntry( l );
return l;
case VBox:
- l = new QVBoxLayout( gb->layout(), spacing );
+ l = new TQVBoxLayout( gb->layout(), spacing );
MetaDataBase::setMargin( gb, margin );
MetaDataBase::setSpacing( gb, spacing );
l->setAlignment( AlignTop );
@@ -732,17 +732,17 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
}
} else {
if ( layout ) {
- QLayout *l;
+ TQLayout *l;
switch ( type ) {
case HBox:
- l = new QHBoxLayout( layout );
+ l = new TQHBoxLayout( layout );
MetaDataBase::addEntry( l );
l->setSpacing( spacing );
l->setMargin( margin );
MetaDataBase::addEntry( l );
return l;
case VBox:
- l = new QVBoxLayout( layout );
+ l = new TQVBoxLayout( layout );
MetaDataBase::addEntry( l );
l->setSpacing( spacing );
l->setMargin( margin );
@@ -760,10 +760,10 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
return 0;
}
} else {
- QLayout *l;
+ TQLayout *l;
switch ( type ) {
case HBox:
- l = new QHBoxLayout( widget );
+ l = new TQHBoxLayout( widget );
MetaDataBase::addEntry( l );
if ( widget ) {
MetaDataBase::setMargin( widget, margin );
@@ -775,7 +775,7 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
MetaDataBase::addEntry( l );
return l;
case VBox:
- l = new QVBoxLayout( widget );
+ l = new TQVBoxLayout( widget );
MetaDataBase::addEntry( l );
if ( widget ) {
MetaDataBase::setMargin( widget, margin );
@@ -806,19 +806,19 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy
}
}
-void WidgetFactory::deleteLayout( QWidget *widget )
+void WidgetFactory::deleteLayout( TQWidget *widget )
{
if ( !widget )
return;
- if ( widget->inherits( "QTabWidget" ) )
- widget = ((QTabWidget*)widget)->currentPage();
- if ( widget->inherits( "QWizard" ) )
- widget = ((QWizard*)widget)->currentPage();
- if ( widget->inherits( "QMainWindow" ) )
- widget = ((QMainWindow*)widget)->centralWidget();
- if ( widget->inherits( "QWidgetStack" ) )
- widget = ((QWidgetStack*)widget)->visibleWidget();
+ if ( widget->inherits( "TQTabWidget" ) )
+ widget = ((TQTabWidget*)widget)->currentPage();
+ if ( widget->inherits( "TQWizard" ) )
+ widget = ((TQWizard*)widget)->currentPage();
+ if ( widget->inherits( "TQMainWindow" ) )
+ widget = ((TQMainWindow*)widget)->centralWidget();
+ if ( widget->inherits( "TQWidgetStack" ) )
+ widget = ((TQWidgetStack*)widget)->visibleWidget();
delete widget->layout();
}
@@ -829,24 +829,24 @@ 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")
+ if (className == "TQPushButton")
{
- QPushButton *b = 0;
+ 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 && ((FormWindow *) w)->mainContainer()->inherits("QDialog"));
+ TQWidget *w = find_formwindow(b);
+ b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits("TQDialog"));
return b;
- } else if (className == "QToolButton")
+ } else if (className == "TQToolButton")
{
if (init)
{
@@ -855,57 +855,57 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
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")
+ } else if (className == "TQDataTable")
{
- return new QDataTable(parent, name);
+ return new TQDataTable(parent, name);
#endif //QT_NO_SQL
} else if (className == "QDateEdit")
{
@@ -916,70 +916,70 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
} else if (className == "QDateTimeEdit")
{
return new QDateTimeEdit(parent, name);
- } else if (className == "QListBox")
+ } else if (className == "TQListBox")
{
- QListBox *lb = new QListBox(parent, name);
+ TQListBox *lb = new TQListBox(parent, name);
if (init)
{
lb->insertItem(i18n("New Item"));
lb->setCurrentItem(0);
}
return lb;
- } else if (className == "QListView")
+ } else if (className == "TQListView")
{
- QListView *lv = new QListView(parent, name);
+ 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")
+ } 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")
{
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);
}
return l;
} else if (className == "QLayoutWidget")
return new QLayoutWidget(parent, name);
- else if (className == "QTabWidget")
+ else if (className == "TQTabWidget")
{
- QTabWidget *tw = new QDesignerTabWidget(parent, name);
+ 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 == "QComboBox")
+ } else if (className == "TQComboBox")
{
- return new QComboBox(false, parent, name);
- } else if (className == "QWidget")
+ return new TQComboBox(false, parent, name);
+ } else if (className == "TQWidget")
{
if (parent &&
- (parent->inherits("FormWindow") || parent->inherits("QWizard")
- || parent->inherits("QTabWidget") || parent->inherits("QToolBox") || parent->inherits("QMainWindow")))
+ (parent->inherits("FormWindow") || parent->inherits("TQWizard")
+ || parent->inherits("TQTabWidget") || parent->inherits("TQToolBox") || parent->inherits("TQMainWindow")))
{
FormWindow *fw = find_formwindow(parent);
if (fw)
@@ -989,30 +989,30 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
return dw;
}
}
- return new QWidget(parent, name);
- } else if (className == "QDialog")
+ return new TQWidget(parent, name);
+ } else if (className == "TQDialog")
{
- QDialog *dia = 0;
+ TQDialog *dia = 0;
if (parent && parent->inherits("FormWindow"))
dia = new QDesignerDialog((FormWindow *) parent, parent, name);
else
- dia = new QDialog(parent, name);
+ dia = new TQDialog(parent, name);
if (parent && !parent->inherits("MainWindow"))
- dia->reparent(parent, QPoint(0, 0), true);
+ dia->reparent(parent, TQPoint(0, 0), true);
return dia;
- } else if (className == "QWizard")
+ } else if (className == "TQWizard")
{
- QWizard *wiz = new QDesignerWizard(parent, name);
+ TQWizard *wiz = new QDesignerWizard(parent, name);
if (parent && !parent->inherits("MainWindow"))
{
- wiz->reparent(parent, QPoint(0, 0), true);
+ wiz->reparent(parent, TQPoint(0, 0), true);
}
if (init && parent && parent->inherits("FormWindow"))
{
QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
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")
@@ -1030,19 +1030,19 @@ 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")
+ } 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")
{
- QSlider *s = new QSlider(parent, name);
+ TQSlider *s = new TQSlider(parent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1052,9 +1052,9 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
MetaDataBase::addEntry(s);
MetaDataBase::setPropertyChanged(s, "orientation", true);
return s;
- } else if (className == "QScrollBar")
+ } else if (className == "TQScrollBar")
{
- QScrollBar *s = new QScrollBar(parent, name);
+ TQScrollBar *s = new TQScrollBar(parent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1064,12 +1064,12 @@ 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")
{
@@ -1085,9 +1085,9 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
else if (r->width() < r->height())
l->setOrientation(Qt::Vertical);
return l;
- } else if (className == "QMainWindow")
+ } else if (className == "TQMainWindow")
{
- QMainWindow *mw = new KmdrMainWindow(parent, name, 0);
+ TQMainWindow *mw = new KmdrMainWindow(parent, name, 0);
mw->setDockEnabled(Qt::DockMinimized, false);
QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, mw, "central widget");
mw->setDockMenuEnabled(false);
@@ -1098,17 +1098,17 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
return mw;
}
#ifndef QT_NO_SQL
- else if (className == "QDataBrowser")
+ else if (className == "TQDataBrowser")
{
- QWidget *w = new QDesignerDataBrowser(parent, name);
+ 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")
+ } else if (className == "TQDataView")
{
- QWidget *w = new QDesignerDataView(parent, name);
+ 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
@@ -1118,57 +1118,57 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
return new LineEdit(parent, name);
else if (className == "ListView")
{
- QListView *lv = new QListView(parent, name);
+ 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 == "Dialog")
{
- QDialog *dia = 0;
+ TQDialog *dia = 0;
if (parent && parent->inherits("FormWindow"))
dia = new EditorDialog((FormWindow *) parent, parent, name);
else
dia = new Dialog(parent, name, false);
if (parent)
- dia->reparent(parent, QPoint(0, 0), true);
+ dia->reparent(parent, TQPoint(0, 0), true);
return dia;
}
else if (className == "Wizard")
{
//qDebug("Creating Wizard...");
- QWizard *wiz;
+ TQWizard *wiz;
if (parent && parent->inherits("FormWindow"))
wiz = new QDesignerWizard(parent, name);
else
wiz = new Wizard(parent, name);
if (parent)
- wiz->reparent(parent, QPoint(0, 0), true);
+ wiz->reparent(parent, TQPoint(0, 0), true);
if (init && parent && parent->inherits("FormWindow"))
{
QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
MetaDataBase::addEntry(dw);
wiz->addPage(dw, i18n("Page 1"));
wiz->addPage(dw, i18n("Page 2"));
- QTimer::singleShot(0, wiz, SLOT(next()));
+ TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
}
return wiz;
}
else if (className == "TabWidget")
{
- QTabWidget *tw = new EditorTabWidget(parent, name);
+ TQTabWidget *tw = new EditorTabWidget(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);
@@ -1176,14 +1176,14 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
return tw;
} else if (className == "ToolBox")
{
- QToolBox *tw = new EditorToolBox(parent, name);
+ TQToolBox *tw = new EditorToolBox(parent, name);
if (init)
{
FormWindow *fw = find_formwindow(parent);
- QWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new QWidget(tw, "toolbox");
+ TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 1"));
MetaDataBase::addEntry(w);
- w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new QWidget(tw, "toolbox");
+ w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 2"));
MetaDataBase::addEntry(tw);
MetaDataBase::addEntry(w);
@@ -1228,12 +1228,12 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
return new AboutDialog(parent, name);
else if (className == "TreeWidget")
{
- QListView *lv = new TreeWidget(parent, name);
+ TQListView *lv = new TreeWidget(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 == "Slider")
@@ -1251,7 +1251,7 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,
}
#endif
- QWidget *w = KommanderFactory::createWidget(className, parent, name);
+ TQWidget *w = KommanderFactory::createWidget(className, parent, name);
return w;
}
@@ -1259,44 +1259,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 ( w && w->inherits( "QTabWidget" ) )
- w = ((QTabWidget*)w)->currentPage();
- if ( w->inherits( "QToolBox" ) )
- w = ((QToolBox*)w)->currentItem();
- if ( w && w->inherits( "QWizard" ) )
- w = ((QWizard*)w)->currentPage();
- if ( w && w->inherits( "QMainWindow" ) )
- w = ((QMainWindow*)w)->centralWidget();
- if ( w && w->inherits( "QWidgetStack" ) )
- w = ((QWidgetStack*)w)->visibleWidget();
+ if ( w && w->inherits( "TQTabWidget" ) )
+ w = ((TQTabWidget*)w)->currentPage();
+ if ( w->inherits( "TQToolBox" ) )
+ w = ((TQToolBox*)w)->currentItem();
+ if ( w && w->inherits( "TQWizard" ) )
+ w = ((TQWizard*)w)->currentPage();
+ if ( w && w->inherits( "TQMainWindow" ) )
+ w = ((TQMainWindow*)w)->centralWidget();
+ if ( w && w->inherits( "TQWidgetStack" ) )
+ w = ((TQWidgetStack*)w)->visibleWidget();
- if ( w && w->inherits( "QSplitter" ) )
- return ( (QSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
+ if ( w && w->inherits( "TQSplitter" ) )
+ return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
if ( !w || !w->layout() )
return NoLayout;
- QLayout *lay = w->layout();
+ TQLayout *lay = w->layout();
- if ( w->inherits( "QGroupBox" ) ) {
- QObjectList *l = lay->queryList( "QLayout" );
+ if ( w->inherits( "TQGroupBox" ) ) {
+ TQObjectList *l = lay->queryList( "TQLayout" );
if ( l && l->first() )
- lay = (QLayout*)l->first();
+ lay = (TQLayout*)l->first();
delete l;
}
layout = lay;
- if ( lay->inherits( "QHBoxLayout" ) )
+ if ( lay->inherits( "TQHBoxLayout" ) )
return HBox;
- else if ( lay->inherits( "QVBoxLayout" ) )
+ else if ( lay->inherits( "TQVBoxLayout" ) )
return VBox;
- else if ( lay->inherits( "QGridLayout" ) )
+ else if ( lay->inherits( "TQGridLayout" ) )
return Grid;
return NoLayout;
}
@@ -1304,13 +1304,13 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w, QLayout *&layou
/*!
\overload
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( QLayout *layout )
+WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
{
- if ( layout->inherits( "QHBoxLayout" ) )
+ if ( layout->inherits( "TQHBoxLayout" ) )
return HBox;
- else if ( layout->inherits( "QVBoxLayout" ) )
+ else if ( layout->inherits( "TQVBoxLayout" ) )
return VBox;
- else if ( layout->inherits( "QGridLayout" ) )
+ else if ( layout->inherits( "TQGridLayout" ) )
return Grid;
return NoLayout;
}
@@ -1318,19 +1318,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;
@@ -1345,20 +1345,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 ( w->inherits( "QTabWidget" ) )
- return ((QTabWidget*)w)->currentPage();
- if ( w->inherits( "QToolBox" ) )
- return ((QToolBox*)w)->currentItem();
- if ( w->inherits( "QWizard" ) )
- return ((QWizard*)w)->currentPage();
- if ( w->inherits( "QWidgetStack" ) )
- return ((QWidgetStack*)w)->visibleWidget();
- if ( w->inherits( "QMainWindow" ) )
- return ((QMainWindow*)w)->centralWidget();
+ if ( w->inherits( "TQTabWidget" ) )
+ return ((TQTabWidget*)w)->currentPage();
+ if ( w->inherits( "TQToolBox" ) )
+ return ((TQToolBox*)w)->currentItem();
+ if ( w->inherits( "TQWizard" ) )
+ return ((TQWizard*)w)->currentPage();
+ if ( w->inherits( "TQWidgetStack" ) )
+ return ((TQWidgetStack*)w)->visibleWidget();
+ if ( w->inherits( "TQMainWindow" ) )
+ return ((TQMainWindow*)w)->centralWidget();
return w;
}
@@ -1370,9 +1370,9 @@ QWidget* WidgetFactory::containerOfWidget( QWidget *w )
function returns the tabwidget then.)
*/
-QWidget* WidgetFactory::widgetOfContainer( QWidget *w )
+TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
{
- if ( w->parentWidget() && w->parentWidget()->inherits( "QWidgetStack" ) )
+ if ( w->parentWidget() && w->parentWidget()->inherits( "TQWidgetStack" ) )
w = w->parentWidget();
while ( w ) {
if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
@@ -1386,20 +1386,20 @@ QWidget* WidgetFactory::widgetOfContainer( QWidget *w )
/*!
Returns whether \a o is a passive interactor or not.
*/
-bool WidgetFactory::isPassiveInteractor( QObject* o )
+bool WidgetFactory::isPassiveInteractor( TQObject* 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 true;
- if ( o->inherits( "QTabBar" ) || ::qt_cast<QToolBox*>(o->parent()) )
+ if ( o->inherits( "TQTabBar" ) || ::qt_cast<TQToolBox*>(o->parent()) )
return true;
- else if ( o->inherits( "QSizeGrip" ) )
+ else if ( o->inherits( "TQSizeGrip" ) )
return true;
- else if ( o->inherits( "QToolButton" ) && o->parent() && o->parent()->inherits( "QTabBar" ) )
+ else if ( o->inherits( "TQToolButton" ) && o->parent() && o->parent()->inherits( "TQTabBar" ) )
return true;
- else if ( o->parent() && o->parent()->inherits( "QWizard" ) && o->inherits( "QPushButton" ) )
+ else if ( o->parent() && o->parent()->inherits( "TQWizard" ) && o->inherits( "TQPushButton" ) )
return true;
- else if ( o->parent() && o->parent()->inherits( "QMainWindow" ) && o->inherits( "QMenuBar" ) )
+ else if ( o->parent() && o->parent()->inherits( "TQMainWindow" ) && o->inherits( "TQMenuBar" ) )
return true;
else if ( o->inherits( "QDockWindowHandle" ) )
return true;
@@ -1413,10 +1413,10 @@ 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->inherits("QDesignerTabWidget"))
- return "QTabWidget";
+ return "TQTabWidget";
#ifdef KOMMANDER
else if (o->inherits("EditorTabWidget"))
return "TabWidget";
@@ -1424,34 +1424,34 @@ const char* WidgetFactory::classNameOf( QObject* o )
return "ToolBox";
#endif
else if (o->inherits("QDesignerDialog"))
- return "QDialog";
+ return "TQDialog";
else if (o->inherits("QDesignerWidget"))
- return "QWidget";
+ return "TQWidget";
else if (o->inherits("CustomWidget"))
return ((CustomWidget *) o)->realClassName().latin1();
else if (o->inherits("QDesignerLabel"))
- return "QLabel";
+ return "TQLabel";
else if (o->inherits("QDesignerWizard"))
- return "QWizard";
+ return "TQWizard";
else if (o->inherits("EditorWizard"))
return "Wizard";
else if (o->inherits("QDesignerPushButton"))
- return "QPushButton";
+ return "TQPushButton";
else if (o->inherits("QDesignerToolButton"))
- return "QToolButton";
+ return "TQToolButton";
else if (o->inherits("QDesignerRadioButton"))
- return "QRadioButton";
+ return "TQRadioButton";
else if (o->inherits("QDesignerCheckBox"))
- return "QCheckBox";
+ return "TQCheckBox";
else if (o->inherits("QDesignerMenuBar"))
- return "QMenuBar";
+ return "TQMenuBar";
else if (o->inherits("QDesignerToolBar"))
- return "QToolBar";
+ return "TQToolBar";
#ifndef QT_NO_SQL
else if (o->inherits("QDesignerDataBrowser"))
- return "QDataBrowser";
+ return "TQDataBrowser";
else if (o->inherits("QDesignerDataView"))
- return "QDataView";
+ return "TQDataView";
#endif
else if (o->inherits("EditorDialog"))
return "Dialog";
@@ -1463,45 +1463,45 @@ const char* WidgetFactory::classNameOf( QObject* o )
createWidget()!
*/
-void WidgetFactory::initChangedProperties( QObject *o )
+void WidgetFactory::initChangedProperties( TQObject *o )
{
MetaDataBase::setPropertyChanged( o, "name", true );
if ( !o->inherits( "QDesignerToolBar" ) && !o->inherits( "QDesignerMenuBar" ) )
MetaDataBase::setPropertyChanged( o, "geometry", true );
- if ( o->inherits( "QPushButton" ) || o->inherits("QRadioButton") || o->inherits( "QCheckBox" ) || o->inherits( "QToolButton" ) )
+ if ( o->inherits( "TQPushButton" ) || o->inherits("TQRadioButton") || o->inherits( "TQCheckBox" ) || o->inherits( "TQToolButton" ) )
MetaDataBase::setPropertyChanged( o, "text", true );
- else if (::qt_cast<QToolButton*>(o) && ::qt_cast<QToolBox*>(widgetOfContainer((QWidget*)o->parent()))) {
+ else 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 );
MetaDataBase::setPropertyChanged( o, "textPosition", TRUE );
- } else if ( o->inherits( "QGroupBox" ) )
+ } else if ( o->inherits( "TQGroupBox" ) )
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 ( o->inherits( "QTabWidget" ) || o->inherits( "QWizard" ) ) {
+ } else if ( o->inherits( "TQTabWidget" ) || o->inherits( "TQWizard" ) ) {
MetaDataBase::setPropertyChanged( o, "pageTitle", true );
MetaDataBase::setPropertyChanged( o, "pageName", true );
#ifndef QT_NO_TABLE
- } else if ( o->inherits( "QTable" ) && !o->inherits( "QDataTable" ) ) {
+ } else if ( o->inherits( "TQTable" ) && !o->inherits( "TQDataTable" ) ) {
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<QToolBox*>(o) ) {
+ } else if ( ::qt_cast<TQToolBox*>(o) ) {
MetaDataBase::setPropertyChanged( o, "currentIndex", true );
MetaDataBase::setPropertyChanged( o, "itemName", true );
MetaDataBase::setPropertyChanged( o, "itemLabel", true );
MetaDataBase::setPropertyChanged( o, "itemIconSet", true );
MetaDataBase::setPropertyChanged( o, "itemToolTip", true );
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true );
- } else if ( o->inherits( "QSplitter" ) ) {
+ } else if ( o->inherits( "TQSplitter" ) ) {
MetaDataBase::setPropertyChanged( o, "orientation", true );
} else if ( o->inherits( "QDesignerToolBar" ) ) {
MetaDataBase::setPropertyChanged( o, "label", true );
@@ -1514,7 +1514,7 @@ void WidgetFactory::initChangedProperties( QObject *o )
bool WidgetFactory::hasSpecialEditor( int id )
{
- QString className = WidgetDatabase::className(id);
+ TQString className = WidgetDatabase::className(id);
if (className == "TextEdit" || className == "ComboBox" || className == "ListBox" || className ==
"TreeWidget" || className == "TextBrowser")
@@ -1528,7 +1528,7 @@ bool WidgetFactory::hasSpecialEditor( int id )
return true;
if (className.mid(1) == "IconView")
return true;
- if (className == "QTextEdit" || className == "QMultiLineEdit")
+ if (className == "TQTextEdit" || className == "TQMultiLineEdit")
return true;
if (className.contains("Table"))
return true;
@@ -1538,7 +1538,7 @@ bool WidgetFactory::hasSpecialEditor( int id )
bool WidgetFactory::hasItems( int id )
{
- QString className = WidgetDatabase::className(id);
+ TQString className = WidgetDatabase::className(id);
if (className == "ComboBox" || className == "ListBox" || className == "TreeWidget")
return true;
@@ -1550,17 +1550,17 @@ bool WidgetFactory::hasItems( int id )
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);
#ifdef KOMMANDER
if (className == "ComboBox")
{
- if (!editWidget->inherits("QComboBox"))
+ if (!editWidget->inherits("TQComboBox"))
return;
- QComboBox *cb = (QComboBox *) editWidget;
+ TQComboBox *cb = (TQComboBox *) editWidget;
ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
e->exec();
@@ -1579,9 +1579,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
}
if (className == "TreeWidget")
{
- if (!editWidget->inherits("QListView"))
+ if (!editWidget->inherits("TQListView"))
return;
- QListView *lv = (QListView *) editWidget;
+ TQListView *lv = (TQListView *) editWidget;
ListViewEditor *e = new ListViewEditor(parent, lv, fw);
e->exec();
delete e;
@@ -1589,7 +1589,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
}
if (className == "ListBox")
{
- if (!editWidget->inherits("QListBox"))
+ if (!editWidget->inherits("TQListBox"))
return;
ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
e->exec();
@@ -1599,7 +1599,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
#endif
if (className.mid(1) == "ListBox")
{
- if (!editWidget->inherits("QListBox"))
+ if (!editWidget->inherits("TQListBox"))
return;
ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
e->exec();
@@ -1609,9 +1609,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
if (className.mid(1) == "ComboBox")
{
- if (!editWidget->inherits("QComboBox"))
+ if (!editWidget->inherits("TQComboBox"))
return;
- QComboBox *cb = (QComboBox *) editWidget;
+ TQComboBox *cb = (TQComboBox *) editWidget;
ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
e->exec();
delete e;
@@ -1621,9 +1621,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
if (className.mid(1) == "ListView")
{
- if (!editWidget->inherits("QListView"))
+ if (!editWidget->inherits("TQListView"))
return;
- QListView *lv = (QListView *) editWidget;
+ TQListView *lv = (TQListView *) editWidget;
ListViewEditor *e = new ListViewEditor(parent, lv, fw);
e->exec();
delete e;
@@ -1632,7 +1632,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo
if (className.mid(1) == "IconView")
{
- if (!editWidget->inherits("QIconView"))
+ if (!editWidget->inherits("TQIconView"))
return;
IconViewEditor *e = new IconViewEditor(parent, editWidget, fw);
e->exec();
@@ -1640,7 +1640,7 @@ 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(parent, editWidget, fw);
e->exec();
@@ -1658,50 +1658,50 @@ 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" ) {
if ( w->inherits( "QLayoutWidget" ) )
- return QVariant( 0 );
+ return TQVariant( 0 );
else if ( MainWindow::self->formWindow() )
- return QVariant( MainWindow::self->formWindow()->layoutDefaultMargin() );
+ return TQVariant( MainWindow::self->formWindow()->layoutDefaultMargin() );
} else if ( propName == "layoutSpacing" ) {
if ( MainWindow::self->formWindow() )
- return QVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() );
+ return TQVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() );
}
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();
@@ -1724,22 +1724,22 @@ QString WidgetFactory::defaultCurrentItem( QObject *w, const QString &propName )
if ( ( v & AlignBottom ) == AlignBottom )
return "AlignBottom";
}
- 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 )
{
- QVariant v = w->property( name );
+ TQVariant v = w->property( name );
if ( v.isValid() )
return v;
return MetaDataBase::fakeProperty( w, name );
@@ -1751,60 +1751,60 @@ 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::paintEvent( QPaintEvent *e )
+void QDesignerWidget::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}
-void QDesignerDialog::paintEvent( QPaintEvent *e )
+void QDesignerDialog::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}
-void EditorDialog::paintEvent( QPaintEvent *e )
+void EditorDialog::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
@@ -1813,110 +1813,110 @@ 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 && parentLayout->mainWidget()->inherits("QLayoutWidget") )
parentLayout = 0;
}
- QObjectListIt it( *children() );
- QObject *o;
+ TQObjectListIt it( *children() );
+ TQObject *o;
- if ( layout()->inherits("QVBoxLayout") ) {
- if ( parentLayout && parentLayout->inherits("QHBoxLayout") )
- vt = QSizePolicy::Minimum;
+ if ( layout()->inherits("TQVBoxLayout") ) {
+ if ( parentLayout && parentLayout->inherits("TQHBoxLayout") )
+ 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 ( layout()->inherits("QHBoxLayout") ) {
- if ( parentLayout && parentLayout->inherits("QVBoxLayout") )
- ht = QSizePolicy::Minimum;
+ } else if ( layout()->inherits("TQHBoxLayout") ) {
+ if ( parentLayout && parentLayout->inherits("TQVBoxLayout") )
+ 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 ( layout()->inherits("QGridLayout") ) {
- ht = QSizePolicy::Fixed;
- vt = QSizePolicy::Fixed;
+ } else if ( layout()->inherits("TQGridLayout") ) {
+ ht = TQSizePolicy::Fixed;
+ vt = TQSizePolicy::Fixed;
if ( parentLayout ) {
- if ( parentLayout->inherits("QVBoxLayout") )
- ht = QSizePolicy::Minimum;
- else if ( parentLayout->inherits("QHBoxLayout") )
- vt = QSizePolicy::Minimum;
+ if ( parentLayout->inherits("TQVBoxLayout") )
+ ht = TQSizePolicy::Minimum;
+ else if ( parentLayout->inherits("TQHBoxLayout") )
+ 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 ( parentWidget() && parentWidget()->inherits( "FormWindow" ) ) {
( (FormWindow*)parentWidget() )->paintGrid( this, e );
} else {
- QPainter p( this );
+ TQPainter p( this );
p.fillRect( rect(), colorGroup().dark() );
p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2,
( height() - cusw->pixmap->height() ) / 2,
diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h
index 03d2b2f1..68fcc9ea 100644
--- a/kommander/editor/widgetfactory.h
+++ b/kommander/editor/widgetfactory.h
@@ -21,28 +21,28 @@
#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 <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 "metadatabase.h"
#ifndef KOMMANDER
-#include "qwidgetfactory.h"
+#include "tqwidgetfactory.h"
#include "ewidgetfactory.h"
#else
#include "kommanderfactory.h"
@@ -70,40 +70,40 @@ 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 );
static bool hasItems( int id );
- static void editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw );
+ 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( QWidget *w, int id );
+ static TQVariant property( TQObject *w, const char *name );
+ static void saveDefaultProperties( TQWidget *w, int id );
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 );
};
@@ -112,28 +112,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;
};
@@ -141,28 +141,28 @@ class EditorTabWidget : public TabWidget
{
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:
- EditorTabWidget( QWidget *parent, const char *name );
+ EditorTabWidget( 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;
};
@@ -170,17 +170,17 @@ class EditorToolBox : public ToolBox
{
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:
- EditorToolBox( QWidget *parent, const char *name );
+ EditorToolBox( 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;
};
@@ -189,34 +189,34 @@ 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 )
public:
- QDesignerWizard( QWidget *parent, const char *name ) : QWizard( parent, name ) {}
+ QDesignerWizard( TQWidget *parent, const char *name ) : TQWizard( parent, name ) {}
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); }
void reject() {}
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;
};
@@ -225,15 +225,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;
};
@@ -243,26 +243,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;
@@ -277,11 +277,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 );
}
@@ -300,23 +300,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();
}
@@ -324,7 +324,7 @@ protected:
private:
void updateBuddy();
- QCString myBuddy;
+ TQCString myBuddy;
};
@@ -333,11 +333,11 @@ 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 ) {}
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
private:
FormWindow *formwindow;
@@ -349,11 +349,11 @@ class QDesignerDialog : public QDialog
Q_OBJECT
public:
- QDesignerDialog( FormWindow *fw, QWidget *parent, const char *name )
- : QDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
+ QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name )
+ : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
private:
FormWindow *formwindow;
@@ -366,19 +366,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 );
}
}
};
@@ -389,19 +389,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 );
}
}
@@ -413,19 +413,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 );
}
}
@@ -437,19 +437,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 );
}
}
@@ -460,11 +460,11 @@ class EditorDialog : public Dialog
Q_OBJECT
public:
- EditorDialog( FormWindow *fw, QWidget *parent, const char *name )
+ EditorDialog( FormWindow *fw, TQWidget *parent, const char *name )
: Dialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) { }
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent( TQPaintEvent *e );
private:
FormWindow *formwindow;
diff --git a/kommander/editor/wizardeditorimpl.cpp b/kommander/editor/wizardeditorimpl.cpp
index 12f8d33f..dfed9a2f 100644
--- a/kommander/editor/wizardeditorimpl.cpp
+++ b/kommander/editor/wizardeditorimpl.cpp
@@ -24,17 +24,17 @@
#include "pixmapchooser.h"
#include "command.h"
-#include <qwizard.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
+#include <tqwizard.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
#include <kinputdialog.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 )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
fillListBox();
}
@@ -69,7 +69,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 );
@@ -142,7 +142,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 );
@@ -162,7 +162,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 );
@@ -197,9 +197,9 @@ void WizardEditor::itemSelected( int index )
if ( index < 0 ) return;
bool ok = false;
- QString text = KInputDialog::getText( i18n("Page Title"), i18n("New page title:" ), listBox->text( index ), &ok, this );
+ TQString text = KInputDialog::getText( i18n("Page Title"), i18n("New page title:" ), listBox->text( index ), &ok, this );
if ( ok ) {
- QString pn( i18n("Rename page %1 of %2" ).arg( listBox->text( index ) ).arg( wizard->name() ) );
+ TQString pn( i18n("Rename page %1 of %2" ).arg( listBox->text( index ) ).arg( wizard->name() ) );
RenameWizardPageCommand *cmd = new RenameWizardPageCommand( pn, formwindow, wizard, index, text );
commands.append( cmd );
listBox->changeItem( text, index );
diff --git a/kommander/editor/wizardeditorimpl.h b/kommander/editor/wizardeditorimpl.h
index 3a9f909e..8fdf4cce 100644
--- a/kommander/editor/wizardeditorimpl.h
+++ b/kommander/editor/wizardeditorimpl.h
@@ -24,7 +24,7 @@
class QWizard;
class FormWindow;
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "wizardeditor.h"
#include "command.h"
@@ -34,7 +34,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 @@ private:
private:
FormWindow *formwindow;
- QWizard *wizard;
- QPtrList<Command> commands;
+ TQWizard *wizard;
+ TQPtrList<Command> commands;
};
#endif
diff --git a/kommander/editor/workspace.cpp b/kommander/editor/workspace.cpp
index c5c6420e..90f0891d 100644
--- a/kommander/editor/workspace.cpp
+++ b/kommander/editor/workspace.cpp
@@ -18,8 +18,8 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
-#include <qlistview.h>
+#include <tqvariant.h> // HP-UX compiler needs this here
+#include <tqlistview.h>
#include "workspace.h"
#include "formwindow.h"
#include "mainwindow.h"
@@ -34,15 +34,15 @@
#endif
#include "formfile.h"
-#include <qheader.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 <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 <kurldrag.h>
@@ -97,16 +97,16 @@ static const char * const file_xpm[]={
".bbbbbbbbbbbc###",
"ccccccccccccc###"};
-static QPixmap *folderPixmap = 0;
-static QPixmap *filePixmap = 0;
-static QPixmap* formPixmap = 0;
+static TQPixmap *folderPixmap = 0;
+static TQPixmap *filePixmap = 0;
+static TQPixmap* formPixmap = 0;
#ifndef KOMMANDER
-WorkspaceItem::WorkspaceItem( QListView *parent, Project* p )
+WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p )
#else
-WorkspaceItem::WorkspaceItem( QListView *parent )
+WorkspaceItem::WorkspaceItem( TQListView *parent )
#endif
- : QListViewItem( parent )
+ : TQListViewItem( parent )
{
init();
#ifndef KOMMANDER
@@ -118,8 +118,8 @@ WorkspaceItem::WorkspaceItem( QListView *parent )
}
#ifndef KOMMANDER
-WorkspaceItem::WorkspaceItem( QListViewItem *parent, SourceFile* sf )
- : QListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf )
+ : TQListViewItem( parent )
{
init();
sourceFile = sf;
@@ -128,15 +128,15 @@ WorkspaceItem::WorkspaceItem( QListViewItem *parent, SourceFile* sf )
}
#endif
-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, *formPixmap );
- QObject::connect( ff, SIGNAL( somethingChanged(FormFile*) ), listView(), SLOT( update(FormFile*) ) );
+ TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) );
#ifndef KOMMANDER
if ( formFile->supportsCodeFile() )
(void) new WorkspaceItem( this, formFile, FormSourceType );
@@ -146,15 +146,15 @@ WorkspaceItem::WorkspaceItem( QListViewItem *parent, FormFile* ff, Type type )
}
}
-WorkspaceItem::WorkspaceItem( QListView *parent, FormFile* ff, Type type )
- : QListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListView *parent, FormFile* ff, Type type )
+ : TQListViewItem( parent )
{
init();
formFile = ff;
t = type;
if ( type == FormFileType ) {
setPixmap( 0, *formPixmap );
- QObject::connect( ff, SIGNAL( somethingChanged(FormFile*) ), listView(), SLOT( update(FormFile*) ) );
+ TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) );
#ifndef KOMMANDER
if ( formFile->supportsCodeFile() )
(void) new WorkspaceItem( this, formFile, FormSourceType );
@@ -176,32 +176,32 @@ 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 );
#ifndef KOMMANDER
if ( type() == FormSourceType && !formFile->hasFormCode() ) {
- 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 {
#endif
- g.setColor( QColorGroup::Text, Qt::black );
+ g.setColor( TQColorGroup::Text, Qt::black );
#ifndef KOMMANDER
}
#endif
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 ) {
@@ -215,10 +215,10 @@ 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 ) {
#ifndef KOMMANDER
case ProjectType:
@@ -236,10 +236,10 @@ QString WorkspaceItem::text( int column ) const
#endif
}
- 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:
@@ -259,7 +259,7 @@ void WorkspaceItem::fillCompletionList( QStringList& completion )
}
}
-bool WorkspaceItem::checkCompletion( const QString& completion )
+bool WorkspaceItem::checkCompletion( const TQString& completion )
{
switch( t ) {
case ProjectType:
@@ -297,9 +297,9 @@ bool WorkspaceItem::isModified() const
#endif
}
-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
@@ -307,7 +307,7 @@ QString WorkspaceItem::key( int column, bool ) const
return key;
}
-QColor WorkspaceItem::backgroundColor()
+TQColor WorkspaceItem::backgroundColor()
{
bool b = useOddColor;
if ( t == FormSourceType && parent() )
@@ -318,18 +318,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 ),
#ifndef KOMMANDER
project( 0 ), completionDirty( false )
@@ -345,22 +345,22 @@ Workspace::Workspace( QWidget *parent, MainWindow *mw )
header()->setStretchEnabled( true );
header()->hide();
setSorting( 0 );
- setResizePolicy( QScrollView::Manual );
+ setResizePolicy( TQScrollView::Manual );
#ifndef KOMMANDER
setIcon( PixmapChooser::loadPixmap( "logo" ) );
#endif
- QPalette p( palette() );
- p.setColor( QColorGroup::Base, QColor( *backColor2 ) );
+ TQPalette p( palette() );
+ p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) );
(void)*selectedBack; // hack
setPalette( p );
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 );
@@ -368,9 +368,9 @@ Workspace::Workspace( QWidget *parent, MainWindow *mw )
setColumnWidthMode( 1, Manual );
if ( !folderPixmap ) {
- folderPixmap = new QPixmap( folderxpm );
- filePixmap = new QPixmap( file_xpm );
- formPixmap = new QPixmap( PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) );
+ folderPixmap = new TQPixmap( folderxpm );
+ filePixmap = new TQPixmap( file_xpm );
+ formPixmap = new TQPixmap( PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) );
}
#ifdef KOMMANDER
@@ -380,7 +380,7 @@ Workspace::Workspace( QWidget *parent, MainWindow *mw )
#ifndef KOMMANDER
-void Workspace::projectDestroyed( QObject* o )
+void Workspace::projectDestroyed( TQObject* o )
{
if ( o == project ) {
project = 0;
@@ -395,19 +395,19 @@ 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( 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( 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( 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( projectModified() ), this, TQT_SLOT( update() ) );
clear();
if ( bufferEdit )
@@ -417,13 +417,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();
(void) new WorkspaceItem( projectItem, f );
@@ -483,7 +483,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()) )
@@ -534,7 +534,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();
@@ -545,7 +545,7 @@ WorkspaceItem *Workspace::findItem( FormFile* ff)
#ifndef KOMMANDER
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();
@@ -556,7 +556,7 @@ WorkspaceItem *Workspace::findItem( SourceFile *sf )
void Workspace::closeAutoOpenItems()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
WorkspaceItem* i = (WorkspaceItem*) it.current();
WorkspaceItem* ip = (WorkspaceItem*) i->parent();
@@ -570,18 +570,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;
@@ -610,7 +610,7 @@ void Workspace::itemClicked( int button, QListViewItem *i, const QPoint& )
#endif
}
-void Workspace::contentsDropEvent( QDropEvent *e )
+void Workspace::contentsDropEvent( TQDropEvent *e )
{
if (!KURLDrag::canDecode(e))
{
@@ -627,12 +627,12 @@ void Workspace::contentsDropEvent( QDropEvent *e )
{
if (!(*it).isLocalFile())
continue;
- QString fn = (*it).path();
+ TQString fn = (*it).path();
mainWindow->fileOpen(fn);
}
}
-void Workspace::contentsDragEnterEvent( QDragEnterEvent *e )
+void Workspace::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( !KURLDrag::canDecode( e ) )
e->ignore();
@@ -640,7 +640,7 @@ void Workspace::contentsDragEnterEvent( QDragEnterEvent *e )
e->accept();
}
-void Workspace::contentsDragMoveEvent( QDragMoveEvent *e )
+void Workspace::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( !KURLDrag::canDecode( e ) )
e->ignore();
@@ -648,13 +648,13 @@ void Workspace::contentsDragMoveEvent( QDragMoveEvent *e )
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 };
- QPopupMenu menu( this );
+ TQPopupMenu menu( this );
switch ( wi->type() ) {
#ifndef KOMMANDER
case WorkspaceItem::SourceFileType:
@@ -717,19 +717,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 );
}
@@ -739,7 +739,7 @@ void Workspace::updateBufferEdit()
return;
completionDirty = false;
#ifndef KOMMANDER
- QStringList completion = MainWindow::self->projectFileNames();
+ TQStringList completion = MainWindow::self->projectFileNames();
while ( it.current() ) {
( (WorkspaceItem*)it.current())->fillCompletionList( completion );
++it;
@@ -749,7 +749,7 @@ void Workspace::updateBufferEdit()
#endif
}
-void Workspace::bufferChosen( const QString &buffer )
+void Workspace::bufferChosen( const TQString &buffer )
{
if ( bufferEdit )
bufferEdit->setText( "" );
@@ -761,10 +761,10 @@ void Workspace::bufferChosen( const QString &buffer )
}
#endif
- 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;
@@ -773,7 +773,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/kommander/editor/workspace.h b/kommander/editor/workspace.h
index e1c0ae8e..4058fc93 100644
--- a/kommander/editor/workspace.h
+++ b/kommander/editor/workspace.h
@@ -21,7 +21,7 @@
#ifndef WORKSPACE_H
#define WORKSPACE_H
-#include <qlistview.h>
+#include <tqlistview.h>
class FormWindow;
class QResizeEvent;
@@ -46,28 +46,28 @@ public:
enum Type { ProjectType, FormFileType, FormSourceType, SourceFileType };
#ifndef KOMMANDER
- //WorkspaceItem( QListView *parent, Project* p );
+ //WorkspaceItem( TQListView *parent, Project* p );
#else
- WorkspaceItem(QListView *parent);
+ WorkspaceItem(TQListView *parent);
#endif
#ifndef KOMMANDER
-// WorkspaceItem( QListViewItem *parent, SourceFile* sf );
+// WorkspaceItem( TQListViewItem *parent, SourceFile* sf );
#endif
- WorkspaceItem( QListViewItem *parent, FormFile* ff, Type t = FormFileType );
- WorkspaceItem( QListView *parent, FormFile* ff, Type t = FormFileType );
+ WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type t = FormFileType );
+ WorkspaceItem( TQListView *parent, FormFile* ff, Type t = FormFileType );
- 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
#ifndef KOMMANDER
Project* project;
@@ -87,7 +87,7 @@ public:
private:
void init();
bool autoOpen;
- QColor backgroundColor();
+ TQColor backgroundColor();
Type t;
};
@@ -96,7 +96,7 @@ class Workspace : public QListView
Q_OBJECT
public:
- Workspace( QWidget *parent , MainWindow *mw );
+ Workspace( TQWidget *parent , MainWindow *mw );
#ifndef KOMMANDER
void setCurrentProject( Project *pro );
@@ -104,9 +104,9 @@ public:
#ifdef KOMMANDER
void makeConnections(MainWindow *);
#endif
- 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 );
@@ -121,18 +121,18 @@ public slots:
#endif
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 );
#ifndef KOMMANDER
-// void projectDestroyed( QObject* );
+// void projectDestroyed( TQObject* );
#endif
#ifndef KOMMANDER