summaryrefslogtreecommitdiffstats
path: root/kommander
diff options
context:
space:
mode:
Diffstat (limited to 'kommander')
-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
-rw-r--r--kommander/executor/dcopkommanderif.h100
-rw-r--r--kommander/executor/instance.cpp362
-rw-r--r--kommander/executor/instance.h126
-rw-r--r--kommander/executor/main.cpp14
-rw-r--r--kommander/executor/register.cpp36
-rw-r--r--kommander/factory/domtool.cpp154
-rw-r--r--kommander/factory/domtool.h22
-rw-r--r--kommander/factory/kommanderfactory.cpp888
-rw-r--r--kommander/factory/kommanderfactory.h132
-rw-r--r--kommander/part/kommander_part.cpp20
-rw-r--r--kommander/part/kommander_part.h8
-rw-r--r--kommander/plugin/kommanderplugin.cpp20
-rw-r--r--kommander/plugin/kommanderplugin.h40
-rw-r--r--kommander/plugin/specialinformation.cpp366
-rw-r--r--kommander/plugin/specialinformation.h74
-rw-r--r--kommander/pluginmanager/main.cpp10
-rw-r--r--kommander/pluginmanager/mainwindow.cpp14
-rw-r--r--kommander/pluginmanager/mainwindow.h4
-rw-r--r--kommander/pluginmanager/pluginmanager.cpp20
-rw-r--r--kommander/pluginmanager/pluginmanager.h14
-rw-r--r--kommander/widget/expression.cpp100
-rw-r--r--kommander/widget/expression.h46
-rw-r--r--kommander/widget/function.h6
-rw-r--r--kommander/widget/functionlib.cpp248
-rw-r--r--kommander/widget/invokeclass.cpp18
-rw-r--r--kommander/widget/invokeclass.h28
-rw-r--r--kommander/widget/kmdrmainwindow.cpp6
-rw-r--r--kommander/widget/kmdrmainwindow.h2
-rw-r--r--kommander/widget/kommanderfunctions.cpp160
-rw-r--r--kommander/widget/kommanderwidget.cpp244
-rw-r--r--kommander/widget/kommanderwidget.h114
-rw-r--r--kommander/widget/kommanderwindow.cpp6
-rw-r--r--kommander/widget/kommanderwindow.h8
-rw-r--r--kommander/widget/myprocess.cpp36
-rw-r--r--kommander/widget/myprocess.h12
-rw-r--r--kommander/widget/parsenode.cpp32
-rw-r--r--kommander/widget/parsenode.h22
-rw-r--r--kommander/widget/parser.cpp98
-rw-r--r--kommander/widget/parser.h56
-rw-r--r--kommander/widget/parserdata.cpp16
-rw-r--r--kommander/widget/parserdata.h18
-rw-r--r--kommander/widgets/aboutdialog.cpp64
-rw-r--r--kommander/widgets/aboutdialog.h60
-rw-r--r--kommander/widgets/buttongroup.cpp52
-rw-r--r--kommander/widgets/buttongroup.h34
-rw-r--r--kommander/widgets/checkbox.cpp60
-rw-r--r--kommander/widgets/checkbox.h36
-rw-r--r--kommander/widgets/closebutton.cpp56
-rw-r--r--kommander/widgets/closebutton.h28
-rw-r--r--kommander/widgets/combobox.cpp60
-rw-r--r--kommander/widgets/combobox.h32
-rw-r--r--kommander/widgets/datepicker.cpp46
-rw-r--r--kommander/widgets/datepicker.h34
-rw-r--r--kommander/widgets/dialog.cpp80
-rw-r--r--kommander/widgets/dialog.h42
-rw-r--r--kommander/widgets/execbutton.cpp74
-rw-r--r--kommander/widgets/execbutton.h30
-rw-r--r--kommander/widgets/fileselector.cpp70
-rw-r--r--kommander/widgets/fileselector.h60
-rw-r--r--kommander/widgets/fontdialog.cpp38
-rw-r--r--kommander/widgets/fontdialog.h28
-rw-r--r--kommander/widgets/groupbox.cpp62
-rw-r--r--kommander/widgets/groupbox.h42
-rw-r--r--kommander/widgets/konsole.cpp42
-rw-r--r--kommander/widgets/konsole.h22
-rw-r--r--kommander/widgets/label.cpp42
-rw-r--r--kommander/widgets/label.h34
-rw-r--r--kommander/widgets/lineedit.cpp60
-rw-r--r--kommander/widgets/lineedit.h38
-rw-r--r--kommander/widgets/listbox.cpp72
-rw-r--r--kommander/widgets/listbox.h32
-rw-r--r--kommander/widgets/pixmaplabel.cpp50
-rw-r--r--kommander/widgets/pixmaplabel.h36
-rw-r--r--kommander/widgets/plugin.cpp12
-rw-r--r--kommander/widgets/popupmenu.cpp72
-rw-r--r--kommander/widgets/popupmenu.h32
-rw-r--r--kommander/widgets/progressbar.cpp54
-rw-r--r--kommander/widgets/progressbar.h26
-rw-r--r--kommander/widgets/radiobutton.cpp52
-rw-r--r--kommander/widgets/radiobutton.h36
-rw-r--r--kommander/widgets/richtexteditor.cpp116
-rw-r--r--kommander/widgets/richtexteditor.h44
-rw-r--r--kommander/widgets/scriptobject.cpp54
-rw-r--r--kommander/widgets/scriptobject.h32
-rw-r--r--kommander/widgets/slider.cpp38
-rw-r--r--kommander/widgets/slider.h30
-rw-r--r--kommander/widgets/spinboxint.cpp50
-rw-r--r--kommander/widgets/spinboxint.h38
-rw-r--r--kommander/widgets/statusbar.cpp42
-rw-r--r--kommander/widgets/statusbar.h28
-rw-r--r--kommander/widgets/subdialog.cpp54
-rw-r--r--kommander/widgets/subdialog.h42
-rw-r--r--kommander/widgets/table.cpp136
-rw-r--r--kommander/widgets/table.h36
-rw-r--r--kommander/widgets/tabwidget.cpp76
-rw-r--r--kommander/widgets/tabwidget.h26
-rw-r--r--kommander/widgets/textbrowser.cpp46
-rw-r--r--kommander/widgets/textbrowser.h28
-rw-r--r--kommander/widgets/textedit.cpp98
-rw-r--r--kommander/widgets/textedit.h34
-rw-r--r--kommander/widgets/timer.cpp40
-rw-r--r--kommander/widgets/timer.h26
-rw-r--r--kommander/widgets/toolbox.cpp80
-rw-r--r--kommander/widgets/toolbox.h28
-rw-r--r--kommander/widgets/treewidget.cpp194
-rw-r--r--kommander/widgets/treewidget.h66
-rw-r--r--kommander/widgets/wizard.cpp62
-rw-r--r--kommander/widgets/wizard.h38
-rw-r--r--kommander/working/plugintemplate/plugin.cpp6
-rw-r--r--kommander/working/plugintemplate/widget.cpp32
-rw-r--r--kommander/working/plugintemplate/widget.h28
200 files changed, 9622 insertions, 9622 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
diff --git a/kommander/executor/dcopkommanderif.h b/kommander/executor/dcopkommanderif.h
index 3ee8a552..1ba67cbb 100644
--- a/kommander/executor/dcopkommanderif.h
+++ b/kommander/executor/dcopkommanderif.h
@@ -17,7 +17,7 @@
#define DCOPKOMMANDERIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/* See widgets/specials.cpp for description. Deprecated methods are replaced by methods above. */
@@ -26,55 +26,55 @@ class DCOPKommanderIf : virtual public DCOPObject
K_DCOP
k_dcop:
-virtual void setEnabled(const QString& widgetName, bool enable) = 0;
-virtual void enableWidget(const QString& widgetName, bool enable) = 0; /* DEPRECATED */
-virtual void setVisible(const QString& widgetName, bool enable) = 0;
-virtual void setText(const QString& widgetName, const QString& text) = 0;
-virtual void changeWidgetText(const QString& widgetName, const QString& text) = 0; /* DEPRECATED */
-virtual QString text(const QString& widgetName) = 0;
-virtual void setSelection(const QString& widgetName, const QString& text) = 0;
-virtual void setCurrentListItem(const QString& widgetName, const QString& text) = 0; /* DEPRECATED */
-virtual QString selection(const QString& widgetName) = 0;
-virtual int currentItem(const QString &widgetName) = 0;
-virtual QString item(const QString &widgetName, int index) = 0;
-virtual int itemDepth(const QString &widgetName, int index) = 0;
-virtual QString itemPath(const QString &widgetName, int index) = 0;
-virtual void removeItem(const QString &widgetName, int index) = 0;
-virtual void removeListItem(const QString &widgetName, int index) = 0; /* DEPRECATED */
-virtual void insertItem(const QString &widgetName, const QString &item, int index) = 0;
-virtual void addListItem(const QString &widgetName, const QString &item, int index) = 0; /* DEPRECATED */
-virtual void setPixmap(const QString &widgetName, const QString &iconName, int index) = 0;
-virtual void insertItems(const QString &widgetName, const QStringList &items, int index) = 0;
-virtual void addListItems(const QString &widgetName, const QStringList &items, int index) = 0;/*DEPRECATED*/
-virtual void addUniqueItem(const QString &widgetName, const QString &item) = 0;
-virtual int findItem(const QString &widgetName, const QString &item) = 0;
-virtual void clear(const QString &widgetName) = 0;
-virtual void clearList(const QString &widgetName) = 0; /* DEPRECATED */
-virtual void setCurrentItem(const QString &widgetName, int index) = 0;
-virtual void setCurrentTab(const QString &widgetName, int index) = 0; /* DEPRECATED */
-virtual void insertTab(const QString &widgetName, const QString &label, int index) = 0;
-virtual bool checked(const QString &widgetName) = 0;
-virtual void setChecked(const QString &widgetName, bool checked) = 0;
-virtual void setAssociatedText(const QString &widgetName, const QString &text) = 0;
-virtual QStringList associatedText(const QString &widgetName) = 0;
-virtual QString type(const QString& widget) = 0;
-virtual QStringList children(const QString& parent, bool recursive) = 0;
-virtual QString global(const QString& variableName) = 0;
-virtual void setGlobal(const QString& variableName, const QString& value) = 0;
-virtual void setMaximum(const QString &widgetName, int value) = 0;
-virtual QString execute(const QString &widgetName) = 0;
-virtual void cancel(const QString &widgetName) = 0;
-virtual int count(const QString &widgetName) = 0;
-virtual int currentColumn(const QString &widgetName) = 0;
-virtual int currentRow(const QString &widgetName) = 0;
-virtual void insertRow(const QString &widgetName, int row, int count) = 0;
-virtual void insertColumn(const QString &widgetName, int column, int count) = 0;
-virtual void setCellText(const QString &widgetName, int row, int column, const QString& text) = 0;
-virtual QString cellText(const QString &widgetName, int row, int column) = 0;
-virtual void removeRow(const QString &widgetName, int row, int count) = 0;
-virtual void removeColumn(const QString &widgetName, int column, int count) = 0;
-virtual void setRowCaption(const QString &widgetName, int row, const QString& text) = 0;
-virtual void setColumnCaption(const QString &widgetName, int column, const QString& text) = 0;
+virtual void setEnabled(const TQString& widgetName, bool enable) = 0;
+virtual void enableWidget(const TQString& widgetName, bool enable) = 0; /* DEPRECATED */
+virtual void setVisible(const TQString& widgetName, bool enable) = 0;
+virtual void setText(const TQString& widgetName, const TQString& text) = 0;
+virtual void changeWidgetText(const TQString& widgetName, const TQString& text) = 0; /* DEPRECATED */
+virtual TQString text(const TQString& widgetName) = 0;
+virtual void setSelection(const TQString& widgetName, const TQString& text) = 0;
+virtual void setCurrentListItem(const TQString& widgetName, const TQString& text) = 0; /* DEPRECATED */
+virtual TQString selection(const TQString& widgetName) = 0;
+virtual int currentItem(const TQString &widgetName) = 0;
+virtual TQString item(const TQString &widgetName, int index) = 0;
+virtual int itemDepth(const TQString &widgetName, int index) = 0;
+virtual TQString itemPath(const TQString &widgetName, int index) = 0;
+virtual void removeItem(const TQString &widgetName, int index) = 0;
+virtual void removeListItem(const TQString &widgetName, int index) = 0; /* DEPRECATED */
+virtual void insertItem(const TQString &widgetName, const TQString &item, int index) = 0;
+virtual void addListItem(const TQString &widgetName, const TQString &item, int index) = 0; /* DEPRECATED */
+virtual void setPixmap(const TQString &widgetName, const TQString &iconName, int index) = 0;
+virtual void insertItems(const TQString &widgetName, const TQStringList &items, int index) = 0;
+virtual void addListItems(const TQString &widgetName, const TQStringList &items, int index) = 0;/*DEPRECATED*/
+virtual void addUniqueItem(const TQString &widgetName, const TQString &item) = 0;
+virtual int findItem(const TQString &widgetName, const TQString &item) = 0;
+virtual void clear(const TQString &widgetName) = 0;
+virtual void clearList(const TQString &widgetName) = 0; /* DEPRECATED */
+virtual void setCurrentItem(const TQString &widgetName, int index) = 0;
+virtual void setCurrentTab(const TQString &widgetName, int index) = 0; /* DEPRECATED */
+virtual void insertTab(const TQString &widgetName, const TQString &label, int index) = 0;
+virtual bool checked(const TQString &widgetName) = 0;
+virtual void setChecked(const TQString &widgetName, bool checked) = 0;
+virtual void setAssociatedText(const TQString &widgetName, const TQString &text) = 0;
+virtual TQStringList associatedText(const TQString &widgetName) = 0;
+virtual TQString type(const TQString& widget) = 0;
+virtual TQStringList children(const TQString& parent, bool recursive) = 0;
+virtual TQString global(const TQString& variableName) = 0;
+virtual void setGlobal(const TQString& variableName, const TQString& value) = 0;
+virtual void setMaximum(const TQString &widgetName, int value) = 0;
+virtual TQString execute(const TQString &widgetName) = 0;
+virtual void cancel(const TQString &widgetName) = 0;
+virtual int count(const TQString &widgetName) = 0;
+virtual int currentColumn(const TQString &widgetName) = 0;
+virtual int currentRow(const TQString &widgetName) = 0;
+virtual void insertRow(const TQString &widgetName, int row, int count) = 0;
+virtual void insertColumn(const TQString &widgetName, int column, int count) = 0;
+virtual void setCellText(const TQString &widgetName, int row, int column, const TQString& text) = 0;
+virtual TQString cellText(const TQString &widgetName, int row, int column) = 0;
+virtual void removeRow(const TQString &widgetName, int row, int count) = 0;
+virtual void removeColumn(const TQString &widgetName, int column, int count) = 0;
+virtual void setRowCaption(const TQString &widgetName, int row, const TQString& text) = 0;
+virtual void setColumnCaption(const TQString &widgetName, int column, const TQString& text) = 0;
virtual int getWinID() = 0;
virtual void setBusyCursor(bool busy) = 0;
};
diff --git a/kommander/executor/instance.cpp b/kommander/executor/instance.cpp
index 2ff4edfd..7676f12d 100644
--- a/kommander/executor/instance.cpp
+++ b/kommander/executor/instance.cpp
@@ -24,17 +24,17 @@
#include <kstandarddirs.h>
/* QT INCLUDES */
-#include <qdialog.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qiodevice.h>
-#include <qlabel.h>
-#include <qmainwindow.h>
-#include <qobjectlist.h>
-#include <qstring.h>
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qcursor.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqiodevice.h>
+#include <tqlabel.h>
+#include <tqmainwindow.h>
+#include <tqobjectlist.h>
+#include <tqstring.h>
+#include <tqtabwidget.h>
+#include <tqwidget.h>
+#include <tqcursor.h>
/* OTHER INCLUDES */
#include "instance.h"
@@ -52,20 +52,20 @@ Instance::Instance()
SpecialInformation::registerSpecials();
}
-Instance::Instance(QWidget *a_parent)
+Instance::Instance(TQWidget *a_parent)
: DCOPObject("KommanderIf"), m_instance(0), m_textInstance(0),
m_parent(a_parent)
{
SpecialInformation::registerSpecials();
}
-void Instance::addCmdlineArguments(const QStringList& args)
+void Instance::addCmdlineArguments(const TQStringList& args)
{
if (!m_textInstance)
return;
// Filter out variable arguments ('var=value')
- QStringList stdArgs;
- for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
+ TQStringList stdArgs;
+ for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
{
int pos = (*it).find('=');
if (pos != -1)
@@ -74,10 +74,10 @@ void Instance::addCmdlineArguments(const QStringList& args)
stdArgs.append(*it);
}
int i = 0;
- for (QStringList::ConstIterator it = stdArgs.begin(); it != stdArgs.end(); ++it)
- m_textInstance->setGlobal(QString("_ARG%1").arg(++i), *it);
+ for (TQStringList::ConstIterator it = stdArgs.begin(); it != stdArgs.end(); ++it)
+ m_textInstance->setGlobal(TQString("_ARG%1").arg(++i), *it);
m_textInstance->setGlobal("_ARGS", stdArgs.join(" "));
- m_textInstance->setGlobal("_ARGCOUNT", QString::number(stdArgs.count()));
+ m_textInstance->setGlobal("_ARGCOUNT", TQString::number(stdArgs.count()));
}
@@ -101,10 +101,10 @@ bool Instance::build(const KURL& fname)
KommanderFactory::loadPlugins();
if (fname.isValid())
- m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast<QWidget*>(parent()));
+ m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast<TQWidget*>(parent()));
else
{
- QFile inputFile;
+ TQFile inputFile;
inputFile.open(IO_ReadOnly, stdin);
m_instance = KommanderFactory::create(&inputFile);
}
@@ -116,7 +116,7 @@ bool Instance::build(const KURL& fname)
return false;
}
- KommanderWindow* window = dynamic_cast<KommanderWindow*>((QWidget*)m_instance);
+ KommanderWindow* window = dynamic_cast<KommanderWindow*>((TQWidget*)m_instance);
if (window)
window->setFileName(fname.path().local8Bit());
@@ -127,8 +127,8 @@ bool Instance::build(const KURL& fname)
{
if (m_instance)
{
- QObjectList* widgets = m_instance->queryList();
- for (QObject* w = widgets->first(); w; w = widgets->next())
+ TQObjectList* widgets = m_instance->queryList();
+ for (TQObject* w = widgets->first(); w; w = widgets->next())
if (kommanderWidget(w))
{
m_textInstance = kommanderWidget(w);
@@ -146,7 +146,7 @@ bool Instance::build(const KURL& fname)
{
m_textInstance->setGlobal("KDDIR", fname.directory());
m_textInstance->setGlobal("NAME", fname.fileName());
- m_textInstance->setGlobal("_PID", QString().setNum(getpid()));
+ m_textInstance->setGlobal("_PID", TQString().setNum(getpid()));
m_textInstance->setGlobal("VERSION", KOMMANDER_VERSION);
}
return true;
@@ -158,12 +158,12 @@ bool Instance::run()
return false;
// Handle both dialogs and main windows
- if (m_instance->inherits("QDialog"))
- dynamic_cast<QDialog*>((QWidget*)m_instance)->exec();
- else if (m_instance->inherits("QMainWindow"))
+ if (m_instance->inherits("TQDialog"))
+ dynamic_cast<TQDialog*>((TQWidget*)m_instance)->exec();
+ else if (m_instance->inherits("TQMainWindow"))
{
kapp->setMainWidget(m_instance);
- dynamic_cast<QMainWindow*>((QWidget*)m_instance)->show();
+ dynamic_cast<TQMainWindow*>((TQWidget*)m_instance)->show();
kapp->exec();
}
else return false;
@@ -175,14 +175,14 @@ bool Instance::isBuilt() const
return m_instance;
}
-void Instance::setParent(QWidget *a_parent)
+void Instance::setParent(TQWidget *a_parent)
{
m_parent = a_parent;
}
bool Instance::isFileValid(const KURL& fname) const
{
- if (!QFileInfo(fname.path()).exists())
+ if (!TQFileInfo(fname.path()).exists())
{
KMessageBox::sorry(0, i18n("<qt>Kommander file<br><b>%1</b><br>does not "
"exist.</qt>").arg(fname.path()));
@@ -199,13 +199,13 @@ bool Instance::isFileValid(const KURL& fname) const
}
// Check whether file is not in some temporary directory.
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
tmpDirs += KGlobal::dirs()->resourceDirs("cache");
tmpDirs.append("/tmp/");
tmpDirs.append("/var/tmp/");
bool inTemp = false;
- for (QStringList::ConstIterator I = tmpDirs.begin(); I != tmpDirs.end(); ++I)
+ for (TQStringList::ConstIterator I = tmpDirs.begin(); I != tmpDirs.end(); ++I)
if (fname.directory(false).startsWith(*I))
inTemp = true;
@@ -215,12 +215,12 @@ bool Instance::isFileValid(const KURL& fname) const
" This may mean that it was run from a KMail attachment or from a webpage. "
"<p>Any script contained in this dialog will have write access to all of your home directory; "
"<b>running such dialogs may be dangerous: </b>"
- "<p>are you sure you want to continue?</qt>"), QString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
+ "<p>are you sure you want to continue?</qt>"), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
return false;
}
- if (!QFileInfo(fname.path()).isExecutable())
+ if (!TQFileInfo(fname.path()).isExecutable())
{
- if (KMessageBox::warningContinueCancel(0, i18n("<qt>The Kommander file <i>%1</i> does not have the <b>executable attribute</b> set and could possibly contain dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.<p>Are you sure you want to continue?</qt>").arg(fname.pathOrURL()), QString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
+ if (KMessageBox::warningContinueCancel(0, i18n("<qt>The Kommander file <i>%1</i> does not have the <b>executable attribute</b> set and could possibly contain dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.<p>Are you sure you want to continue?</qt>").arg(fname.pathOrURL()), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
return false;
}
return true;
@@ -231,31 +231,31 @@ bool Instance::isFileValid(const KURL& fname) const
// Widget functions
-void Instance::setEnabled(const QString& widgetName, bool enable)
+void Instance::setEnabled(const TQString& widgetName, bool enable)
{
- QObject* child = stringToWidget(widgetName);
- if (child && child->inherits("QWidget"))
- ((QWidget*)child)->setEnabled(enable);
+ TQObject* child = stringToWidget(widgetName);
+ if (child && child->inherits("TQWidget"))
+ ((TQWidget*)child)->setEnabled(enable);
}
-void Instance::setVisible(const QString& widgetName, bool visible)
+void Instance::setVisible(const TQString& widgetName, bool visible)
{
- QObject* child = stringToWidget(widgetName);
- if (child && child->inherits("QWidget"))
- ((QWidget*)child)->setShown(visible);
+ TQObject* child = stringToWidget(widgetName);
+ if (child && child->inherits("TQWidget"))
+ ((TQWidget*)child)->setShown(visible);
}
-void Instance::setText(const QString& widgetName, const QString& text)
+void Instance::setText(const TQString& widgetName, const TQString& text)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::setText, text);
- else if (child && child->inherits("QLabel"))
+ else if (child && child->inherits("TQLabel"))
{
- QLabel* label = (QLabel*)child;
+ TQLabel* label = (TQLabel*)child;
if (label->pixmap())
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (pixmap.load(text))
label->setPixmap(pixmap);
}
@@ -264,321 +264,321 @@ void Instance::setText(const QString& widgetName, const QString& text)
}
}
-QString Instance::text(const QString& widgetName)
+TQString Instance::text(const TQString& widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::text);
- else if (child && child->inherits("QLabel"))
- return ((QLabel*)child)->text();
- return QString();
+ else if (child && child->inherits("TQLabel"))
+ return ((TQLabel*)child)->text();
+ return TQString();
}
-void Instance::setSelection(const QString& widgetName, const QString& text)
+void Instance::setSelection(const TQString& widgetName, const TQString& text)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::setSelection, text);
- else if (child && child->inherits("QLabel"))
- ((QLabel*)child)->setText(text);
+ else if (child && child->inherits("TQLabel"))
+ ((TQLabel*)child)->setText(text);
}
-QString Instance::selection(const QString& widgetName)
+TQString Instance::selection(const TQString& widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::selection);
- return QString();
+ return TQString();
}
-int Instance::currentItem(const QString &widgetName)
+int Instance::currentItem(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::currentItem).toInt();
return -1;
}
-QString Instance::item(const QString &widgetName, int i)
+TQString Instance::item(const TQString &widgetName, int i)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
- return kommanderWidget(child)->handleDCOP(DCOP::item, QString::number(i));
- return QString();
+ return kommanderWidget(child)->handleDCOP(DCOP::item, TQString::number(i));
+ return TQString();
}
-void Instance::removeItem(const QString &widgetName, int index)
+void Instance::removeItem(const TQString &widgetName, int index)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
- kommanderWidget(child)->handleDCOP(DCOP::removeItem, QString::number(index));
+ kommanderWidget(child)->handleDCOP(DCOP::removeItem, TQString::number(index));
}
-void Instance::insertItem(const QString &widgetName, const QString &item, int index)
+void Instance::insertItem(const TQString &widgetName, const TQString &item, int index)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(item);
- args += QString::number(index);
+ TQStringList args(item);
+ args += TQString::number(index);
kommanderWidget(child)->handleDCOP(DCOP::insertItem, args);
}
}
-void Instance::insertItems(const QString &widgetName, const QStringList &items, int index)
+void Instance::insertItems(const TQString &widgetName, const TQStringList &items, int index)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(items.join("\n"));
- args += QString::number(index);
+ TQStringList args(items.join("\n"));
+ args += TQString::number(index);
kommanderWidget(child)->handleDCOP(DCOP::insertItems, args);
}
}
-int Instance::findItem(const QString &widgetName, const QString& item)
+int Instance::findItem(const TQString &widgetName, const TQString& item)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::findItem, item).toInt();
return -1;
}
-void Instance::addUniqueItem(const QString &widgetName, const QString &item)
+void Instance::addUniqueItem(const TQString &widgetName, const TQString &item)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::addUniqueItem, item);
}
-int Instance::itemDepth(const QString &widgetName, int index)
+int Instance::itemDepth(const TQString &widgetName, int index)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
- return kommanderWidget(child)->handleDCOP(DCOP::itemDepth, QString::number(index)).toInt();
+ return kommanderWidget(child)->handleDCOP(DCOP::itemDepth, TQString::number(index)).toInt();
return -1;
}
-QString Instance::itemPath(const QString &widgetName, int index)
+TQString Instance::itemPath(const TQString &widgetName, int index)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
- return kommanderWidget(child)->handleDCOP(DCOP::itemPath, QString::number(index));
- return QString();
+ return kommanderWidget(child)->handleDCOP(DCOP::itemPath, TQString::number(index));
+ return TQString();
}
-void Instance::setPixmap(const QString &widgetName, const QString& iconName, int index)
+void Instance::setPixmap(const TQString &widgetName, const TQString& iconName, int index)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(iconName);
- args += QString::number(index);
+ TQStringList args(iconName);
+ args += TQString::number(index);
kommanderWidget(child)->handleDCOP(DCOP::setPixmap, args);
}
}
-void Instance::clear(const QString &widgetName)
+void Instance::clear(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::clear);
}
-void Instance::setCurrentItem(const QString &widgetName, int index)
+void Instance::setCurrentItem(const TQString &widgetName, int index)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
- kommanderWidget(child)->handleDCOP(DCOP::setCurrentItem, QString::number(index));
+ kommanderWidget(child)->handleDCOP(DCOP::setCurrentItem, TQString::number(index));
}
-void Instance::setChecked(const QString &widgetName, bool checked)
+void Instance::setChecked(const TQString &widgetName, bool checked)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::setChecked, checked ? "true" : "false");
}
-bool Instance::checked(const QString &widgetName)
+bool Instance::checked(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::checked, widgetName) == "1";
return false;
}
-void Instance::setAssociatedText(const QString &widgetName, const QString& text)
+void Instance::setAssociatedText(const TQString &widgetName, const TQString& text)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
- kommanderWidget(child)->setAssociatedText(QStringList::split('\n', text, true));
+ kommanderWidget(child)->setAssociatedText(TQStringList::split('\n', text, true));
}
-QStringList Instance::associatedText(const QString &widgetName)
+TQStringList Instance::associatedText(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->associatedText();
- return QString();
+ return TQString();
}
-QString Instance::type(const QString& widget)
+TQString Instance::type(const TQString& widget)
{
- QObject* child = stringToWidget(widget);
- if (child && child->inherits("QWidget"))
+ TQObject* child = stringToWidget(widget);
+ if (child && child->inherits("TQWidget"))
return child->className();
- return QString();
+ return TQString();
}
-QStringList Instance::children(const QString& parent, bool recursive)
+TQStringList Instance::children(const TQString& parent, bool recursive)
{
- QStringList matching;
- QObject* child = stringToWidget(parent);
- QObjectList* widgets;
+ TQStringList matching;
+ TQObject* child = stringToWidget(parent);
+ TQObjectList* widgets;
if (!child)
child = m_instance;
- if (child->inherits("QWidget"))
+ if (child->inherits("TQWidget"))
{
- widgets = child->queryList("QWidget", 0, false, recursive);
- for (QObject* w = widgets->first(); w; w = widgets->next())
+ widgets = child->queryList("TQWidget", 0, false, recursive);
+ for (TQObject* w = widgets->first(); w; w = widgets->next())
if (w->name() && kommanderWidget(w))
matching.append(w->name());
}
return matching;
}
-void Instance::setMaximum(const QString &widgetName, int value)
+void Instance::setMaximum(const TQString &widgetName, int value)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
- kommanderWidget(child)->handleDCOP(DCOP::setMaximum, QString::number(value));
+ kommanderWidget(child)->handleDCOP(DCOP::setMaximum, TQString::number(value));
}
-QString Instance::execute(const QString &widgetName)
+TQString Instance::execute(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::execute);
return "";
}
-void Instance::cancel(const QString &widgetName)
+void Instance::cancel(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::cancel);
}
-int Instance::count(const QString &widgetName)
+int Instance::count(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::count).toInt();
return -1;
}
-int Instance::currentColumn(const QString &widgetName)
+int Instance::currentColumn(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::currentColumn).toInt();
return -1;
}
-int Instance::currentRow(const QString &widgetName)
+int Instance::currentRow(const TQString &widgetName)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
return kommanderWidget(child)->handleDCOP(DCOP::currentRow).toInt();
return -1;
}
-void Instance::insertRow(const QString &widgetName, int row, int count)
+void Instance::insertRow(const TQString &widgetName, int row, int count)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(QString::number(row));
- args += QString::number(count);
+ TQStringList args(TQString::number(row));
+ args += TQString::number(count);
kommanderWidget(child)->handleDCOP(DCOP::insertRow, args);
}
}
-void Instance::insertColumn(const QString &widgetName, int column, int count)
+void Instance::insertColumn(const TQString &widgetName, int column, int count)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(QString::number(column));
- args += QString::number(count);
+ TQStringList args(TQString::number(column));
+ args += TQString::number(count);
kommanderWidget(child)->handleDCOP(DCOP::insertColumn, args);
}
}
-void Instance::setCellText(const QString &widgetName, int row, int column, const QString& text)
+void Instance::setCellText(const TQString &widgetName, int row, int column, const TQString& text)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(QString::number(row));
- args += QString::number(column);
+ TQStringList args(TQString::number(row));
+ args += TQString::number(column);
args += text;
kommanderWidget(child)->handleDCOP(DCOP::setCellText, args);
}
}
-QString Instance::cellText(const QString &widgetName, int row, int column)
+TQString Instance::cellText(const TQString &widgetName, int row, int column)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(QString::number(row));
- args += QString::number(column);
+ TQStringList args(TQString::number(row));
+ args += TQString::number(column);
return kommanderWidget(child)->handleDCOP(DCOP::cellText, args);
}
- else return QString();
+ else return TQString();
}
-void Instance::removeRow(const QString &widgetName, int row, int count)
+void Instance::removeRow(const TQString &widgetName, int row, int count)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(QString::number(row));
- args += QString::number(count);
+ TQStringList args(TQString::number(row));
+ args += TQString::number(count);
kommanderWidget(child)->handleDCOP(DCOP::removeRow, args);
}
}
-void Instance::removeColumn(const QString &widgetName, int column, int count)
+void Instance::removeColumn(const TQString &widgetName, int column, int count)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(QString::number(column));
- args += QString::number(count);
+ TQStringList args(TQString::number(column));
+ args += TQString::number(count);
kommanderWidget(child)->handleDCOP(DCOP::removeColumn, args);
}
}
-void Instance::setRowCaption(const QString &widgetName, int row, const QString& text)
+void Instance::setRowCaption(const TQString &widgetName, int row, const TQString& text)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(QString::number(row));
+ TQStringList args(TQString::number(row));
args += text;
kommanderWidget(child)->handleDCOP(DCOP::setRowCaption, args);
}
}
-void Instance::setColumnCaption(const QString &widgetName, int column, const QString& text)
+void Instance::setColumnCaption(const TQString &widgetName, int column, const TQString& text)
{
- QObject* child = stringToWidget(widgetName);
+ TQObject* child = stringToWidget(widgetName);
if (kommanderWidget(child))
{
- QStringList args(QString::number(column));
+ TQStringList args(TQString::number(column));
args += text;
kommanderWidget(child)->handleDCOP(DCOP::setColumnCaption, args);
}
@@ -593,75 +593,75 @@ void Instance::setColumnCaption(const QString &widgetName, int column, const QSt
-QString Instance::global(const QString& variableName)
+TQString Instance::global(const TQString& variableName)
{
- return m_textInstance ? m_textInstance->global(variableName) : QString();
+ return m_textInstance ? m_textInstance->global(variableName) : TQString();
}
-void Instance::setGlobal(const QString& variableName, const QString& value)
+void Instance::setGlobal(const TQString& variableName, const TQString& value)
{
if (m_textInstance)
m_textInstance->setGlobal(variableName, value);
}
-QObject* Instance::stringToWidget(const QString& name)
+TQObject* Instance::stringToWidget(const TQString& name)
{
return m_instance->child(name);
}
-KommanderWidget* Instance::kommanderWidget(QObject* object)
+KommanderWidget* Instance::kommanderWidget(TQObject* object)
{
return dynamic_cast<KommanderWidget*>(object);
}
/*** Deprecated methods: just call appropriate method ***/
-void Instance::changeWidgetText(const QString& widgetName, const QString& text)
+void Instance::changeWidgetText(const TQString& widgetName, const TQString& text)
{
setText(widgetName, text);
}
-void Instance::clearList(const QString &widgetName)
+void Instance::clearList(const TQString &widgetName)
{
clear(widgetName);
}
-void Instance::setCurrentListItem(const QString& widgetName, const QString& item)
+void Instance::setCurrentListItem(const TQString& widgetName, const TQString& item)
{
setSelection(widgetName, item);
}
-void Instance::setCurrentTab(const QString &widgetName, int index)
+void Instance::setCurrentTab(const TQString &widgetName, int index)
{
setCurrentItem(widgetName, index);
}
-void Instance::insertTab(const QString &widgetName, const QString &label, int index)
+void Instance::insertTab(const TQString &widgetName, const TQString &label, int index)
{
- QObject* child = stringToWidget(widgetName);
- QStringList l;
+ TQObject* child = stringToWidget(widgetName);
+ TQStringList l;
l << label;
- l << QString::number(index);
+ l << TQString::number(index);
if (kommanderWidget(child))
kommanderWidget(child)->handleDCOP(DCOP::insertTab, l);
}
-void Instance::addListItems(const QString &widgetName, const QStringList &items, int index)
+void Instance::addListItems(const TQString &widgetName, const TQStringList &items, int index)
{
insertItems(widgetName, items, index);
}
-void Instance::enableWidget(const QString& widgetName, bool enable)
+void Instance::enableWidget(const TQString& widgetName, bool enable)
{
setEnabled(widgetName, enable);
}
-void Instance::removeListItem(const QString &widgetName, int index)
+void Instance::removeListItem(const TQString &widgetName, int index)
{
removeItem(widgetName, index);
}
-void Instance::addListItem(const QString & widgetName, const QString & item, int index)
+void Instance::addListItem(const TQString & widgetName, const TQString & item, int index)
{
insertItem(widgetName, item, index);
}
@@ -674,9 +674,9 @@ int Instance::getWinID()
void Instance::setBusyCursor(bool busy)
{
if (busy)
- m_instance->setCursor(QCursor(Qt::WaitCursor));
+ m_instance->setCursor(TQCursor(Qt::WaitCursor));
else
- m_instance->setCursor(QCursor(Qt::ArrowCursor));
+ m_instance->setCursor(TQCursor(Qt::ArrowCursor));
}
diff --git a/kommander/executor/instance.h b/kommander/executor/instance.h
index 66b97455..443e8db5 100644
--- a/kommander/executor/instance.h
+++ b/kommander/executor/instance.h
@@ -20,11 +20,11 @@
#define INSTANCE_H
/* QT INCLUDES */
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qmap.h>
-#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
/* KDE INCLUDES */
#include <kurl.h>
@@ -40,13 +40,13 @@ class KommanderWidget;
-class Instance : public QObject, virtual public DCOPKommanderIf
+class Instance : public TQObject, virtual public DCOPKommanderIf
{
Q_OBJECT
public:
Instance();
- Instance(QWidget*);
+ Instance(TQWidget*);
~Instance();
/* passing global variables: two forms are accepted.
kdmr-executor file.kmdr COUNT=45 PATH=/tmp - this adds global variables 45 and PATH
@@ -54,65 +54,65 @@ public:
ARGS holds space-separated list of all second-type variables (like Bash $@)
ARGCOUNT holds number of second-type arguments
*/
- virtual void addCmdlineArguments(const QStringList& args);
+ virtual void addCmdlineArguments(const TQStringList& args);
//DCOP methods. The documentation is in the widgets/specials.cpp file.
- virtual void setEnabled(const QString& widgetName, bool enable);
- virtual void enableWidget(const QString& widgetName, bool enable); /* DEPRECATED */
- virtual void setVisible(const QString& widgetName, bool enable);
- virtual void setText(const QString& widgetName, const QString& text);
- virtual void changeWidgetText(const QString& widgetName, const QString& text); /* DEPRECATED */
- virtual QString text(const QString& widgetName);
- virtual void setSelection(const QString& widgetName, const QString& text);
- virtual void setCurrentListItem(const QString& widgetName, const QString& text); /* DEPRECATED */
- virtual QString selection(const QString& widgetName);
- virtual int currentItem(const QString &widgetName);
- virtual QString item(const QString &widgetName, int index);
- virtual int itemDepth(const QString &widgetName, int index);
- virtual QString itemPath(const QString &widgetName, int index);
- virtual void removeItem(const QString &widgetName, int index);
- virtual void removeListItem(const QString &widgetName, int index); /* DEPRECATED */
- virtual void insertItem(const QString &widgetName, const QString &item, int index);
- virtual void addListItem(const QString &widgetName, const QString &item, int index); /* DEPRECATED */
- virtual void setPixmap(const QString &widgetName, const QString &iconName, int index);
- virtual void insertItems(const QString &widgetName, const QStringList &items, int index);
- virtual void addListItems(const QString &widgetName, const QStringList &items, int index);/*DEPRECATED*/
- virtual void addUniqueItem(const QString &widgetName, const QString &item);
- virtual int findItem(const QString &widgetName, const QString &item);
- virtual void clear(const QString &widgetName);
- virtual void clearList(const QString &widgetName); /* DEPRECATED */
- virtual void setCurrentItem(const QString &widgetName, int index);
- virtual void setCurrentTab(const QString &widgetName, int index); /* DEPRECATED */
- virtual void insertTab(const QString &widgetName, const QString &label, int index);
- virtual void setChecked(const QString &widgetName, bool checked);
- virtual bool checked(const QString &widgetName);
- virtual void setAssociatedText(const QString &widgetName, const QString &text);
- virtual QStringList associatedText(const QString &widgetName);
- virtual QString type(const QString& widget);
- virtual QStringList children(const QString& parent, bool recursive);
- virtual QString global(const QString& variableName);
- virtual void setGlobal(const QString& variableName, const QString& value);
- virtual void setMaximum(const QString &widgetName, int value);
- virtual QString execute(const QString &widgetName);
- virtual void cancel(const QString &widgetName);
- virtual int count(const QString &widgetName);
- virtual int currentColumn(const QString &widgetName);
- virtual int currentRow(const QString &widgetName);
- virtual void insertRow(const QString &widgetName, int row, int count);
- virtual void insertColumn(const QString &widgetName, int column, int count);
- virtual void setCellText(const QString &widgetName, int row, int column, const QString& text);
- virtual QString cellText(const QString &widgetName, int row, int column);
- virtual void removeRow(const QString &widgetName, int row, int count);
- virtual void removeColumn(const QString &widgetName, int column, int count);
- virtual void setRowCaption(const QString &widgetName, int row, const QString& text);
- virtual void setColumnCaption(const QString &widgetName, int column, const QString& text);
+ virtual void setEnabled(const TQString& widgetName, bool enable);
+ virtual void enableWidget(const TQString& widgetName, bool enable); /* DEPRECATED */
+ virtual void setVisible(const TQString& widgetName, bool enable);
+ virtual void setText(const TQString& widgetName, const TQString& text);
+ virtual void changeWidgetText(const TQString& widgetName, const TQString& text); /* DEPRECATED */
+ virtual TQString text(const TQString& widgetName);
+ virtual void setSelection(const TQString& widgetName, const TQString& text);
+ virtual void setCurrentListItem(const TQString& widgetName, const TQString& text); /* DEPRECATED */
+ virtual TQString selection(const TQString& widgetName);
+ virtual int currentItem(const TQString &widgetName);
+ virtual TQString item(const TQString &widgetName, int index);
+ virtual int itemDepth(const TQString &widgetName, int index);
+ virtual TQString itemPath(const TQString &widgetName, int index);
+ virtual void removeItem(const TQString &widgetName, int index);
+ virtual void removeListItem(const TQString &widgetName, int index); /* DEPRECATED */
+ virtual void insertItem(const TQString &widgetName, const TQString &item, int index);
+ virtual void addListItem(const TQString &widgetName, const TQString &item, int index); /* DEPRECATED */
+ virtual void setPixmap(const TQString &widgetName, const TQString &iconName, int index);
+ virtual void insertItems(const TQString &widgetName, const TQStringList &items, int index);
+ virtual void addListItems(const TQString &widgetName, const TQStringList &items, int index);/*DEPRECATED*/
+ virtual void addUniqueItem(const TQString &widgetName, const TQString &item);
+ virtual int findItem(const TQString &widgetName, const TQString &item);
+ virtual void clear(const TQString &widgetName);
+ virtual void clearList(const TQString &widgetName); /* DEPRECATED */
+ virtual void setCurrentItem(const TQString &widgetName, int index);
+ virtual void setCurrentTab(const TQString &widgetName, int index); /* DEPRECATED */
+ virtual void insertTab(const TQString &widgetName, const TQString &label, int index);
+ virtual void setChecked(const TQString &widgetName, bool checked);
+ virtual bool checked(const TQString &widgetName);
+ virtual void setAssociatedText(const TQString &widgetName, const TQString &text);
+ virtual TQStringList associatedText(const TQString &widgetName);
+ virtual TQString type(const TQString& widget);
+ virtual TQStringList children(const TQString& parent, bool recursive);
+ virtual TQString global(const TQString& variableName);
+ virtual void setGlobal(const TQString& variableName, const TQString& value);
+ virtual void setMaximum(const TQString &widgetName, int value);
+ virtual TQString execute(const TQString &widgetName);
+ virtual void cancel(const TQString &widgetName);
+ virtual int count(const TQString &widgetName);
+ virtual int currentColumn(const TQString &widgetName);
+ virtual int currentRow(const TQString &widgetName);
+ virtual void insertRow(const TQString &widgetName, int row, int count);
+ virtual void insertColumn(const TQString &widgetName, int column, int count);
+ virtual void setCellText(const TQString &widgetName, int row, int column, const TQString& text);
+ virtual TQString cellText(const TQString &widgetName, int row, int column);
+ virtual void removeRow(const TQString &widgetName, int row, int count);
+ virtual void removeColumn(const TQString &widgetName, int column, int count);
+ virtual void setRowCaption(const TQString &widgetName, int row, const TQString& text);
+ virtual void setColumnCaption(const TQString &widgetName, int column, const TQString& text);
virtual int getWinID();
virtual void setBusyCursor(bool busy);
- QWidget *widget() { return m_instance;}
+ TQWidget *widget() { return m_instance;}
public slots:
/** Sets the instance's parent */
- void setParent(QWidget*);
+ void setParent(TQWidget*);
/** Returns whether the instance is built */
bool isBuilt() const;
/** Builds the instance. Uses stdin if no filename is given */
@@ -123,15 +123,15 @@ private:
/** Check if the file exists, has correct extension and is not in a temporary (insecure) directory */
bool isFileValid(const KURL& fname) const;
/* Dialog Instance */
- QGuardedPtr<QWidget> m_instance;
+ TQGuardedPtr<TQWidget> m_instance;
/* Associated Text Instance */
KommanderWidget *m_textInstance;
/** The parent widget */
- QWidget *m_parent;
+ TQWidget *m_parent;
/* Get object by name */
- QObject* stringToWidget(const QString& name);
+ TQObject* stringToWidget(const TQString& name);
/* Cast to Kommander widget if possible */
- KommanderWidget* kommanderWidget(QObject* object);
+ KommanderWidget* kommanderWidget(TQObject* object);
};
#endif
diff --git a/kommander/executor/main.cpp b/kommander/executor/main.cpp
index 589ec1cd..00d7e509 100644
--- a/kommander/executor/main.cpp
+++ b/kommander/executor/main.cpp
@@ -25,9 +25,9 @@
#include <kmessagebox.h>
/* QT INCLUDES */
-#include <qapplication.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <cstdio>
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
else if (args->count())
{
char buf[200];
- QString baseFile = args->url(0).fileName();
+ TQString baseFile = args->url(0).fileName();
int ext = baseFile.findRev('.');
if (ext != -1)
baseFile = baseFile.left(ext);
@@ -81,18 +81,18 @@ int main(int argc, char *argv[])
KLocale::setMainCatalogue("kommander");
KApplication app;
- QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
+ TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()), &app, TQT_SLOT(quit()));
if (!args->count())
{
KMessageBox::sorry(0, i18n("Error: no dialog given. Use --stdin option to read dialog from standard input.\n"));
return -1;
}
Instance instance;
- if (!instance.build(args->isSet("stdin") ? QString() : args->url(0)))
+ if (!instance.build(args->isSet("stdin") ? TQString() : args->url(0)))
return -1;
// Read command-line variables
- QStringList cmdargs;
+ TQStringList cmdargs;
for (int i = !args->isSet("stdin"); i<args->count(); i++)
cmdargs.append(args->arg(i));
instance.addCmdlineArguments(cmdargs);
diff --git a/kommander/executor/register.cpp b/kommander/executor/register.cpp
index e6c41b7f..db794e25 100644
--- a/kommander/executor/register.cpp
+++ b/kommander/executor/register.cpp
@@ -21,24 +21,24 @@
void Instance::registerDCOP()
{
- DCOPInformation::insert("enableWidget(QString,bool)");
- DCOPInformation::insert("changeWidgetText(QString,QString)");
- DCOPInformation::insert("currentItem(QString)");
- DCOPInformation::insert("item(QString,int)");
- DCOPInformation::insert("removeListItem(QString,int)");
- DCOPInformation::insert("addListItem(QString,QString,int)");
- DCOPInformation::insert("addListItems(QString,QStringList,int)");
- DCOPInformation::insert("addUniqueItem(QString,QString)");
- DCOPInformation::insert("findItem(QString,QString)");
- DCOPInformation::insert("clearList(QString)");
- DCOPInformation::insert("setCurrentListItem(QString,QString)");
- DCOPInformation::insert("setCurrentTab(QString,int)");
- DCOPInformation::insert("insertTab(QString,QString,int)");
- DCOPInformation::insert("setChecked(QString, bool)");
- DCOPInformation::insert("setAssociatedText(QString,QString)");
- DCOPInformation::insert("associatedText(QString)");
- DCOPInformation::insert("global(QString)");
- DCOPInformation::insert("setGlobal(QString,QString)");
+ DCOPInformation::insert("enableWidget(TQString,bool)");
+ DCOPInformation::insert("changeWidgetText(TQString,TQString)");
+ DCOPInformation::insert("currentItem(TQString)");
+ DCOPInformation::insert("item(TQString,int)");
+ DCOPInformation::insert("removeListItem(TQString,int)");
+ DCOPInformation::insert("addListItem(TQString,TQString,int)");
+ DCOPInformation::insert("addListItems(TQString,TQStringList,int)");
+ DCOPInformation::insert("addUniqueItem(TQString,TQString)");
+ DCOPInformation::insert("findItem(TQString,TQString)");
+ DCOPInformation::insert("clearList(TQString)");
+ DCOPInformation::insert("setCurrentListItem(TQString,TQString)");
+ DCOPInformation::insert("setCurrentTab(TQString,int)");
+ DCOPInformation::insert("insertTab(TQString,TQString,int)");
+ DCOPInformation::insert("setChecked(TQString, bool)");
+ DCOPInformation::insert("setAssociatedText(TQString,TQString)");
+ DCOPInformation::insert("associatedText(TQString)");
+ DCOPInformation::insert("global(TQString)");
+ DCOPInformation::insert("setGlobal(TQString,TQString)");
}
void Instance::registerSpecials()
diff --git a/kommander/factory/domtool.cpp b/kommander/factory/domtool.cpp
index d8c9fcd3..0bd7088c 100644
--- a/kommander/factory/domtool.cpp
+++ b/kommander/factory/domtool.cpp
@@ -20,14 +20,14 @@
#include "domtool.h"
-#include <qsizepolicy.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qfont.h>
-#include <qdom.h>
+#include <tqsizepolicy.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqfont.h>
+#include <tqdom.h>
/*!
\class DomTool domtool.h
@@ -46,9 +46,9 @@
\sa hasProperty()
*/
-QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
@@ -64,9 +64,9 @@ QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const
\sa readProperty()
*/
-bool DomTool::hasProperty( const QDomElement& e, const QString& name )
+bool DomTool::hasProperty( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
@@ -77,13 +77,13 @@ bool DomTool::hasProperty( const QDomElement& e, const QString& name )
return false;
}
-QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type )
+TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type )
{
- QStringList result;
- QDomElement n;
+ TQStringList result;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == type )
result += n.attribute( "name" );
}
@@ -92,20 +92,20 @@ QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type
}
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue )
{
- QString dummy;
+ TQString dummy;
return elementToVariant( e, defValue, dummy );
}
/*!
Interprets element \a e as variant and returns the result of the interpretation.
*/
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment )
{
- QVariant v;
+ TQVariant v;
if ( e.tagName() == "rect" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -118,9 +118,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QRect( x, y, w, h ) );
+ v = TQVariant( TQRect( x, y, w, h ) );
} else if ( e.tagName() == "point" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -129,9 +129,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QPoint( x, y ) );
+ v = TQVariant( TQPoint( x, y ) );
} else if ( e.tagName() == "size" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
@@ -140,12 +140,12 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QSize( w, h ) );
+ v = TQVariant( TQSize( w, h ) );
} else if ( e.tagName() == "color" ) {
- v = QVariant( readColor( e ) );
+ v = TQVariant( readColor( e ) );
} else if ( e.tagName() == "font" ) {
- QDomElement n3 = e.firstChild().toElement();
- QFont f( defValue.toFont() );
+ TQDomElement n3 = e.firstChild().toElement();
+ TQFont f( defValue.toFont() );
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
f.setFamily( n3.firstChild().toText().data() );
@@ -161,58 +161,58 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
f.setStrikeOut( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( f );
+ v = TQVariant( f );
} else if ( e.tagName() == "string" ) {
- v = QVariant( e.firstChild().toText().data() );
- QDomElement n = e;
+ v = TQVariant( e.firstChild().toText().data() );
+ TQDomElement n = e;
n = n.nextSibling().toElement();
if ( n.tagName() == "comment" )
comment = n.firstChild().toText().data();
} else if ( e.tagName() == "cstring" ) {
- v = QVariant( QCString( e.firstChild().toText().data() ) );
+ v = TQVariant( TQCString( e.firstChild().toText().data() ) );
} else if ( e.tagName() == "number" ) {
bool ok = true;
- v = QVariant( e.firstChild().toText().data().toInt( &ok ) );
+ v = TQVariant( e.firstChild().toText().data().toInt( &ok ) );
if ( !ok )
- v = QVariant( e.firstChild().toText().data().toDouble() );
+ v = TQVariant( e.firstChild().toText().data().toDouble() );
} else if ( e.tagName() == "bool" ) {
- QString t = e.firstChild().toText().data();
- v = QVariant( t == "true" || t == "1", 0 );
+ TQString t = e.firstChild().toText().data();
+ v = TQVariant( t == "true" || t == "1", 0 );
} else if ( e.tagName() == "pixmap" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "iconset" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "image" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "enum" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "set" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "sizepolicy" ) {
- QDomElement n3 = e.firstChild().toElement();
- QSizePolicy sp;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQSizePolicy sp;
while ( !n3.isNull() ) {
if ( n3.tagName() == "hsizetype" )
- sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "vsizetype" )
- sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "horstretch" )
sp.setHorStretch( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verstretch" )
sp.setVerStretch( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( sp );
+ v = TQVariant( sp );
} else if ( e.tagName() == "cursor" ) {
- v = QVariant( QCursor( e.firstChild().toText().data().toInt() ) );
+ v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) );
} else if ( e.tagName() == "stringlist" ) {
- QStringList lst;
- QDomElement n;
+ TQStringList lst;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
lst << n.firstChild().toText().data();
- v = QVariant( lst );
+ v = TQVariant( lst );
} else if ( e.tagName() == "date" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int y, m, d;
y = m = d = 0;
while ( !n3.isNull() ) {
@@ -224,9 +224,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QDate( y, m, d ) );
+ v = TQVariant( TQDate( y, m, d ) );
} else if ( e.tagName() == "time" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, m, s;
h = m = s = 0;
while ( !n3.isNull() ) {
@@ -238,9 +238,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
s = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QTime( h, m, s ) );
+ v = TQVariant( TQTime( h, m, s ) );
} else if ( e.tagName() == "datetime" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, mi, s, y, mo, d ;
h = mi = s = y = mo = d = 0;
while ( !n3.isNull() ) {
@@ -258,7 +258,7 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QDateTime( QDate( y, mo, d ), QTime( h, mi, s ) ) );
+ v = TQVariant( TQDateTime( TQDate( y, mo, d ), TQTime( h, mi, s ) ) );
}
return v;
}
@@ -267,9 +267,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
/*! Returns the color which is returned in the dom element \a e.
*/
-QColor DomTool::readColor( const QDomElement &e )
+TQColor DomTool::readColor( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
int r= 0, g = 0, b = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "red" )
@@ -281,7 +281,7 @@ QColor DomTool::readColor( const QDomElement &e )
n = n.nextSibling().toElement();
}
- return QColor( r, g, b );
+ return TQColor( r, g, b );
}
/*!
@@ -291,9 +291,9 @@ QColor DomTool::readColor( const QDomElement &e )
\sa hasAttribute()
*/
-QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
@@ -309,9 +309,9 @@ QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, cons
\sa readAttribute()
*/
-bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
+bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
@@ -322,7 +322,7 @@ bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
return false;
}
-static bool toBool( const QString& s )
+static bool toBool( const TQString& s )
{
return s == "true" || s.toInt() != 0;
}
@@ -330,11 +330,11 @@ static bool toBool( const QString& s )
/*!
Convert Qt 2.x format to Qt 3.0 format if necessary
*/
-void DomTool::fixDocument( QDomDocument& doc )
+void DomTool::fixDocument( TQDomDocument& doc )
{
- QDomElement e;
- QDomNode n;
- QDomNodeList nl;
+ TQDomElement e;
+ TQDomNode n;
+ TQDomNodeList nl;
uint i = 0;
e = doc.firstChild().toElement();
@@ -350,8 +350,8 @@ void DomTool::fixDocument( QDomDocument& doc )
uint nllen = nl.length();
for ( i = 0; i < nllen; i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -373,8 +373,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nllen = nl.length();
for ( i = 0; i < nllen; i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -386,8 +386,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nllen = nl.length();
for ( i = 0; i < nllen; i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -399,8 +399,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nllen = nl.length();
for ( i = 0; i < nllen; i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "class" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "class", name );
diff --git a/kommander/factory/domtool.h b/kommander/factory/domtool.h
index fac628a4..98e299a2 100644
--- a/kommander/factory/domtool.h
+++ b/kommander/factory/domtool.h
@@ -21,8 +21,8 @@
#ifndef DOMTOOL_H
#define DOMTOOL_H
-#include <qvariant.h>
-#include <qnamespace.h>
+#include <tqvariant.h>
+#include <tqnamespace.h>
class QDomElement;
class QDomDocument;
@@ -30,15 +30,15 @@ class QDomDocument;
class DomTool : public Qt
{
public:
- static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue );
- static bool hasProperty( const QDomElement& e, const QString& name );
- static QStringList propertiesOfType( const QDomElement& e, const QString& type );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment );
- static QVariant readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue );
- static bool hasAttribute( const QDomElement& e, const QString& name );
- static QColor readColor( const QDomElement &e );
- static void fixDocument( QDomDocument& );
+ static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static bool hasProperty( const TQDomElement& e, const TQString& name );
+ static TQStringList propertiesOfType( const TQDomElement& e, const TQString& type );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment );
+ static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static bool hasAttribute( const TQDomElement& e, const TQString& name );
+ static TQColor readColor( const TQDomElement &e );
+ static void fixDocument( TQDomDocument& );
};
diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp
index f3078830..3add83ae 100644
--- a/kommander/factory/kommanderfactory.cpp
+++ b/kommander/factory/kommanderfactory.cpp
@@ -26,71 +26,71 @@
#include <kommanderplugin.h>
-#include <qfeatures.h>
+#include <tqfeatures.h>
#include "config.h"
#ifndef QT_NO_SQL
#include "database2.h"
#endif
-#include <qdom.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qmetaobject.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqmetaobject.h>
#include "domtool.h"
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qobjectlist.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqobjectlist.h>
#include <private/qpluginmanager_p.h>
-#include <qmime.h>
-#include <qdragobject.h>
+#include <tqmime.h>
+#include <tqdragobject.h>
#include <zlib.h>
#ifndef QT_NO_SQL
-#include <qsqlrecord.h>
-#include <qsqldatabase.h>
-#include <qdatatable.h>
+#include <tqsqlrecord.h>
+#include <tqsqldatabase.h>
+#include <tqdatatable.h>
#endif
// include all Qt widgets we support
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qiconview.h>
-#include <qheader.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqiconview.h>
+#include <tqheader.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qmultilineedit.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qdialog.h>
-#include <qwizard.h>
-#include <qlcdnumber.h>
-#include <qprogressbar.h>
-#include <qtextview.h>
-#include <qtextbrowser.h>
-#include <qdial.h>
-#include <qslider.h>
-#include <qframe.h>
-#include <qwidgetstack.h>
-#include <qtextedit.h>
-#include <qscrollbar.h>
-#include <qmainwindow.h>
-#include <qsplitter.h>
-#include <qaction.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qdatetimeedit.h>
-#include <qtoolbox.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqmultilineedit.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqdialog.h>
+#include <tqwizard.h>
+#include <tqlcdnumber.h>
+#include <tqprogressbar.h>
+#include <tqtextview.h>
+#include <tqtextbrowser.h>
+#include <tqdial.h>
+#include <tqslider.h>
+#include <tqframe.h>
+#include <tqwidgetstack.h>
+#include <tqtextedit.h>
+#include <tqscrollbar.h>
+#include <tqmainwindow.h>
+#include <tqsplitter.h>
+#include <tqaction.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
+#include <tqdatetimeedit.h>
+#include <tqtoolbox.h>
#include <stdlib.h>
#include <kglobal.h>
@@ -98,14 +98,14 @@
#include "kmdrmainwindow.h"
-QPtrList<KommanderPlugin> widgetPlugins;
+TQPtrList<KommanderPlugin> widgetPlugins;
-QMap<QWidget*, QString> *qwf_functions = 0;
-QMap<QWidget*, QString> *qwf_forms = 0;
-QString *qwf_language = 0;
+TQMap<TQWidget*, TQString> *qwf_functions = 0;
+TQMap<TQWidget*, TQString> *qwf_forms = 0;
+TQString *qwf_language = 0;
bool qwf_execute_code = true;
bool qwf_stays_on_top = false;
-QString *qwf_currFileName = 0L; //is this really used?
+TQString *qwf_currFileName = 0L; //is this really used?
KommanderFactory::KommanderFactory()
: dbControls( 0 ), usePixmapCollection( false )
@@ -114,7 +114,7 @@ KommanderFactory::KommanderFactory()
defSpacing = 6;
defMargin = 11;
if (!qwf_currFileName)
- qwf_currFileName = new QString();
+ qwf_currFileName = new TQString();
}
KommanderFactory::~KommanderFactory()
@@ -123,33 +123,33 @@ KommanderFactory::~KommanderFactory()
qwf_currFileName = 0L;
}
-QWidget *KommanderFactory::create( const QString &uiFile, QObject *connector, QWidget *parent, const char *name )
+TQWidget *KommanderFactory::create( const TQString &uiFile, TQObject *connector, TQWidget *parent, const char *name )
{
- QFile f( uiFile );
+ TQFile f( uiFile );
if ( !f.open( IO_ReadOnly ) )
return 0;
if (!qwf_currFileName)
- qwf_currFileName = new QString();
+ qwf_currFileName = new TQString();
*qwf_currFileName = uiFile;
- QWidget *w = KommanderFactory::create( &f, connector, parent, name );
+ TQWidget *w = KommanderFactory::create( &f, connector, parent, name );
if ( !qwf_forms )
- qwf_forms = new QMap<QWidget*, QString>;
+ qwf_forms = new TQMap<TQWidget*, TQString>;
qwf_forms->insert( w, uiFile );
return w;
}
-QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *parent, const char *name )
+TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name )
{
- 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 0;
}
@@ -158,45 +158,45 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
KommanderFactory *widgetFactory = new KommanderFactory;
widgetFactory->toplevel = 0;
- QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement e = doc.firstChild().toElement().firstChild().toElement();
- QDomElement variables = e;
+ TQDomElement variables = e;
while ( variables.tagName() != "variables" && !variables.isNull() )
variables = variables.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;
while ( imageCollection.tagName() != "images" && !imageCollection.isNull() )
imageCollection = imageCollection.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;
@@ -205,8 +205,8 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
} else if ( e.tagName() == "pixmapinproject" ) {
widgetFactory->usePixmapCollection = true;
} else if ( e.tagName() == "layoutdefaults" ) {
- widgetFactory->defSpacing = e.attribute( "spacing", QString::number( widgetFactory->defSpacing ) ).toInt();
- widgetFactory->defMargin = e.attribute( "margin", QString::number( widgetFactory->defMargin ) ).toInt();
+ widgetFactory->defSpacing = e.attribute( "spacing", TQString::number( widgetFactory->defSpacing ) ).toInt();
+ widgetFactory->defMargin = e.attribute( "margin", TQString::number( widgetFactory->defMargin ) ).toInt();
}
e = e.nextSibling().toElement();
}
@@ -214,22 +214,22 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
if ( !imageCollection.isNull() )
widgetFactory->loadImageCollection( imageCollection );
- widgetFactory->createWidgetInternal( widget, parent, 0, widget.attribute("class", "QWidget") );
- QWidget *w = widgetFactory->toplevel;
+ widgetFactory->createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") );
+ TQWidget *w = widgetFactory->toplevel;
if ( !w ) {
delete widgetFactory;
return 0;
}
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" )
widgetFactory->variables << 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" ) {
- QString s = n.firstChild().toText().data();
+ TQString s = n.firstChild().toText().data();
widgetFactory->languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language", "C++" ) );
}
}
@@ -252,7 +252,7 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
if ( widgetFactory->toplevel ) {
#ifndef QT_NO_SQL
- QMap<QWidget*, SqlWidgetConnection>::Iterator cit = widgetFactory->sqlWidgetConnections.begin();
+ TQMap<TQWidget*, SqlWidgetConnection>::Iterator cit = widgetFactory->sqlWidgetConnections.begin();
for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) {
if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() )
continue;
@@ -262,42 +262,42 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *
( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls );
}
- for ( QMap<QString, QStringList>::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) {
- QDataTable *table = (QDataTable*)widgetFactory->toplevel->child( it.key(), "QDataTable" );
+ for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) {
+ TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key(), "TQDataTable" );
if ( !table )
continue;
if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != widgetFactory->noDatabaseWidgets.end() )
continue;
- QValueList<Field> fieldMap = *widgetFactory->fieldMaps.find( table );
- QString conn = (*it)[ 0 ];
- QSqlCursor* c = 0;
- QSqlDatabase *db = 0;
+ TQValueList<Field> fieldMap = *widgetFactory->fieldMaps.find( table );
+ TQString conn = (*it)[ 0 ];
+ TQSqlCursor* c = 0;
+ TQSqlDatabase *db = 0;
if ( conn.isEmpty() || conn == "(default)" ) {
- db = QSqlDatabase::database();
- c = new QSqlCursor( (*it)[ 1 ] );
+ db = TQSqlDatabase::database();
+ c = new TQSqlCursor( (*it)[ 1 ] );
} else {
- db = QSqlDatabase::database( conn );
- c = new QSqlCursor( (*it)[ 1 ], true, db );
+ db = TQSqlDatabase::database( conn );
+ c = new TQSqlCursor( (*it)[ 1 ], true, db );
}
if ( db ) {
table->setSqlCursor( c, fieldMap.isEmpty(), true );
- table->refresh( QDataTable::RefreshAll );
+ table->refresh( TQDataTable::RefreshAll );
}
}
#endif
}
- for ( QMap<QString, QString>::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) {
- QLabel *label = (QLabel*)widgetFactory->toplevel->child( it.key(), "QLabel" );
- QWidget *buddy = (QWidget*)widgetFactory->toplevel->child( *it, "QWidget" );
+ for ( TQMap<TQString, TQString>::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) {
+ TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key(), "TQLabel" );
+ TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( *it, "TQWidget" );
if ( label && buddy )
label->setBuddy( buddy );
}
delete widgetFactory;
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
return w;
}
@@ -307,121 +307,121 @@ void KommanderFactory::addPlugin( KommanderPlugin *plugin )
widgetPlugins.append( plugin );
}
-QWidget *KommanderFactory::createWidget( const QString &literalClassName, QWidget *parent, const char *name )
+TQWidget *KommanderFactory::createWidget( const TQString &literalClassName, TQWidget *parent, const char *name )
{
- QString className = literalClassName;
+ TQString className = literalClassName;
// create widgets we know
- if (className == "QPushButton")
- return new QPushButton(parent, name);
- else if (className == "QToolButton")
- return new QToolButton(parent, name);
- else if (className == "QCheckBox")
- return new QCheckBox(parent, name);
- else if (className == "QRadioButton")
- return new QRadioButton(parent, name);
- else if (className == "QGroupBox")
- return new QGroupBox(parent, name);
- else if (className == "QButtonGroup")
- return new QButtonGroup(parent, name);
- else if (className == "QIconView")
+ if (className == "TQPushButton")
+ return new TQPushButton(parent, name);
+ else if (className == "TQToolButton")
+ return new TQToolButton(parent, name);
+ else if (className == "TQCheckBox")
+ return new TQCheckBox(parent, name);
+ else if (className == "TQRadioButton")
+ return new TQRadioButton(parent, name);
+ else if (className == "TQGroupBox")
+ return new TQGroupBox(parent, name);
+ else if (className == "TQButtonGroup")
+ return new TQButtonGroup(parent, name);
+ else if (className == "TQIconView")
{
#if !defined(QT_NO_ICONVIEW)
- return new QIconView(parent, name);
+ return new TQIconView(parent, name);
#endif
}
- else if (className == "QTable")
+ else if (className == "TQTable")
{
#if !defined(QT_NO_TABLE)
- return new QTable(parent, name);
+ return new TQTable(parent, name);
#endif
}
- else if (className == "QListBox")
- return new QListBox(parent, name);
- else if (className == "QListView")
- return new QListView(parent, name);
- else if (className == "QLineEdit")
- return new QLineEdit(parent, name);
- else if (className == "QSpinBox")
- return new QSpinBox(parent, name);
- else if (className == "QMultiLineEdit")
- return new QMultiLineEdit(parent, name);
- else if (className == "QLabel")
- return new QLabel(parent, name);
+ else if (className == "TQListBox")
+ return new TQListBox(parent, name);
+ else if (className == "TQListView")
+ return new TQListView(parent, name);
+ else if (className == "TQLineEdit")
+ return new TQLineEdit(parent, name);
+ else if (className == "TQSpinBox")
+ return new TQSpinBox(parent, name);
+ else if (className == "TQMultiLineEdit")
+ return new TQMultiLineEdit(parent, name);
+ else if (className == "TQLabel")
+ return new TQLabel(parent, name);
else if (className == "QLayoutWidget")
- return new QWidget(parent, name);
- else if (className == "QTabWidget")
- return new QTabWidget(parent, name);
- else if (className == "QComboBox")
- return new QComboBox(false, parent, name);
- else if (className == "QWidget")
+ return new TQWidget(parent, name);
+ else if (className == "TQTabWidget")
+ return new TQTabWidget(parent, name);
+ else if (className == "TQComboBox")
+ return new TQComboBox(false, parent, name);
+ else if (className == "TQWidget")
{
if (!qwf_stays_on_top)
- return new QWidget(parent, name);
- return new QWidget(parent, name, Qt::WStyle_StaysOnTop);
+ return new TQWidget(parent, name);
+ return new TQWidget(parent, name, Qt::WStyle_StaysOnTop);
}
- else if (className == "QDialog")
+ else if (className == "TQDialog")
{
if (!qwf_stays_on_top)
- return new QDialog(parent, name);
- return new QDialog(parent, name, false, Qt::WStyle_StaysOnTop);
+ return new TQDialog(parent, name);
+ return new TQDialog(parent, name, false, Qt::WStyle_StaysOnTop);
}
- else if (className == "QWizard")
- return new QWizard(parent, name);
- 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")
- return new QSlider(parent, name);
- else if (className == "QFrame")
- return new QFrame(parent, name);
- else if (className == "QSplitter")
- return new QSplitter(parent, name);
+ else if (className == "TQWizard")
+ return new TQWizard(parent, name);
+ else if (className == "TQLCDNumber")
+ return new TQLCDNumber(parent, name);
+ else if (className == "TQProgressBar")
+ return new TQProgressBar(parent, name);
+ else if (className == "TQTextView")
+ return new TQTextView(parent, name);
+ else if (className == "TQTextBrowser")
+ return new TQTextBrowser(parent, name);
+ else if (className == "TQDial")
+ return new TQDial(parent, name);
+ else if (className == "TQSlider")
+ return new TQSlider(parent, name);
+ else if (className == "TQFrame")
+ return new TQFrame(parent, name);
+ else if (className == "TQSplitter")
+ return new TQSplitter(parent, name);
else if (className == "Line")
{
- QFrame *f = new QFrame(parent, name);
- f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ TQFrame *f = new TQFrame(parent, name);
+ f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken);
return f;
}
- else if (className == "QTextEdit")
- return new QTextEdit(parent, name);
+ else if (className == "TQTextEdit")
+ return new TQTextEdit(parent, name);
else if (className == "QDateEdit")
return new QDateEdit(parent, name);
else if (className == "QTimeEdit")
return new QTimeEdit(parent, name);
else if (className == "QDateTimeEdit")
return new QDateTimeEdit(parent, name);
- else if (className == "QScrollBar")
- return new QScrollBar(parent, name);
- else if (className == "QPopupMenu")
- return new QPopupMenu(parent, name);
- else if (className == "QWidgetStack")
- return new QWidgetStack(parent, name);
- else if (className == "QMainWindow")
+ else if (className == "TQScrollBar")
+ return new TQScrollBar(parent, name);
+ else if (className == "TQPopupMenu")
+ return new TQPopupMenu(parent, name);
+ else if (className == "TQWidgetStack")
+ return new TQWidgetStack(parent, name);
+ else if (className == "TQMainWindow")
{
- QMainWindow *mw = 0;
+ TQMainWindow *mw = 0;
if (!qwf_stays_on_top)
mw = new KmdrMainWindow(parent, name);
else
mw = new KmdrMainWindow(parent, name, Qt::WType_TopLevel | Qt::WStyle_StaysOnTop);
- mw->setCentralWidget(new QWidget(mw, "qt_central_widget"));
+ mw->setCentralWidget(new TQWidget(mw, "qt_central_widget"));
mw->centralWidget()->show();
(void) mw->statusBar();
return mw;
}
#if !defined(QT_NO_SQL)
- else if (className == "QDataTable")
- return new QDataTable(parent, name);
- else if (className == "QDataBrowser")
+ else if (className == "TQDataTable")
+ return new TQDataTable(parent, name);
+ else if (className == "TQDataBrowser")
return new QDesignerDataBrowser2(parent, name);
- else if (className == "QDataView")
+ else if (className == "TQDataView")
return new QDesignerDataView2(parent, name);
#endif
@@ -429,7 +429,7 @@ QWidget *KommanderFactory::createWidget( const QString &literalClassName, QWidge
//find the widget plugin which can create className
for (KommanderPlugin * p = widgetPlugins.first(); p; p = widgetPlugins.next())
{
- QWidget *w = p->create(className, parent, name);
+ TQWidget *w = p->create(className, parent, name);
if (w)
return w;
}
@@ -447,9 +447,9 @@ int KommanderFactory::loadPlugins(bool force)
num_plugins_loaded = 0;
KConfig cfg("kommanderrc", true);
- QStringList plugins = "libkommanderwidgets";
+ TQStringList plugins = "libkommanderwidgets";
plugins += cfg.readListEntry("plugins");
- QStringList::Iterator it;
+ TQStringList::Iterator it;
KLibLoader *f = KLibLoader::self();
for (it = plugins.begin(); it != plugins.end(); ++it)
{
@@ -482,11 +482,11 @@ FeatureList KommanderFactory::featureList()
FeatureList features;
for ( KommanderPlugin *p = widgetPlugins.first(); p ; p = widgetPlugins.next() )
{
- QStringList widgets = p->widgets();
- QStringList::Iterator it;
+ TQStringList widgets = p->widgets();
+ TQStringList::Iterator it;
for( it = widgets.begin() ; it != widgets.end() ; ++it )
{
- QString wn = *it;
+ TQString wn = *it;
features[wn] = KommanderWidgetInfo( p->group(wn), p->toolTip(wn),p->iconSet(wn), p->whatsThis(wn), p->isContainer(wn) );
}
}
@@ -494,14 +494,14 @@ FeatureList KommanderFactory::featureList()
//iterate through widgetPlugins, appending KommanderPlugin::widgets() to features
}
-QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *parent, QLayout* layout, const QString &classNameArg )
+TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg )
{
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
- QString className = classNameArg;
+ TQString className = classNameArg;
int row = e.attribute( "row" ).toInt();
int col = e.attribute( "column" ).toInt();
@@ -513,7 +513,7 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *
colspan = 1;
if ( !className.isEmpty() ) {
if ( !layout && className == "QLayoutWidget" )
- className = "QWidget";
+ className = "TQWidget";
if ( layout && className == "QLayoutWidget" ) {
// hide layout widgets
w = parent;
@@ -523,21 +523,21 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *
{
return 0;
}
- w = (QWidget*)obj;
+ w = (TQWidget*)obj;
if ( !toplevel )
toplevel = w;
- if ( w->inherits( "QMainWindow" ) )
- w = ( (QMainWindow*)w )->centralWidget();
+ if ( w->inherits( "TQMainWindow" ) )
+ w = ( (TQMainWindow*)w )->centralWidget();
if ( layout ) {
switch( layoutType( layout ) ) {
case HBox:
- ( (QHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)layout )->addWidget( w );
break;
case VBox:
- ( (QVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)layout )->addWidget( w );
break;
case Grid:
- ( (QGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ ( (TQGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 );
break;
default:
@@ -555,57 +555,57 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *
if ( n.tagName() == "spacer" ) {
createSpacer( n, layout );
} else if ( n.tagName() == "widget" ) {
- QMap< QString, QString> *oldDbControls = dbControls;
- createWidgetInternal( n, w, layout, n.attribute( "class", "QWidget" ) );
+ TQMap< TQString, TQString> *oldDbControls = dbControls;
+ createWidgetInternal( n, w, layout, n.attribute( "class", "TQWidget" ) );
dbControls = oldDbControls;
} else if ( n.tagName() == "hbox" ) {
- QLayout *parentLayout = layout;
- if ( layout && layout->inherits( "QGridLayout" ) )
+ TQLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "TQGridLayout" ) )
layout = createLayout( 0, 0, KommanderFactory::HBox );
else
layout = createLayout( w, layout, KommanderFactory::HBox );
obj = layout;
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
- ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
+ ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "grid" ) {
- QLayout *parentLayout = layout;
- if ( layout && layout->inherits( "QGridLayout" ) )
+ TQLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "TQGridLayout" ) )
layout = createLayout( 0, 0, KommanderFactory::Grid );
else
layout = createLayout( w, layout, KommanderFactory::Grid );
obj = layout;
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
- ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
+ ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "vbox" ) {
- QLayout *parentLayout = layout;
- if ( layout && layout->inherits( "QGridLayout" ) )
+ TQLayout *parentLayout = layout;
+ if ( layout && layout->inherits( "TQGridLayout" ) )
layout = createLayout( 0, 0, KommanderFactory::VBox );
else
layout = createLayout( w, layout, KommanderFactory::VBox );
obj = layout;
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( "QGridLayout" ) )
- ( (QGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
+ ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "property" && obj ) {
setProperty( 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, translate(v.toString()) );
+ ( (TQTabWidget*)parent )->insertTab( w, translate(v.toString()) );
} else
- if ( parent->inherits( "QToolBox" ) ) {
+ if ( parent->inherits( "TQToolBox" ) ) {
if ( attrib == "label" )
- ( (QToolBox*)parent )->addItem( w, translate(v.toString()) );
- }else if ( parent->inherits( "QWizard" ) ) {
+ ( (TQToolBox*)parent )->addItem( w, translate(v.toString()) );
+ }else if ( parent->inherits( "TQWizard" ) ) {
if ( attrib == "title" )
- ( (QWizard*)parent )->addPage( w, translate(v.toString()) );
+ ( (TQWizard*)parent )->addPage( w, translate(v.toString()) );
}
} else if ( n.tagName() == "item" ) {
createItem( n, w );
@@ -619,39 +619,39 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *
return w;
}
-QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, LayoutType type )
+TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* layout, LayoutType type )
{
int spacing = defSpacing;
int margin = defMargin;
- if ( !layout && widget && widget->inherits( "QTabWidget" ) )
- widget = ((QTabWidget*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( "QToolBox" ) )
- widget = ((QToolBox*)widget)->currentItem();
+ if ( !layout && widget && widget->inherits( "TQTabWidget" ) )
+ widget = ((TQTabWidget*)widget)->currentPage();
+ 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( "QWidgetStack" ) )
- widget = ((QWidgetStack*)widget)->visibleWidget();
+ if ( !layout && widget && widget->inherits( "TQWidgetStack" ) )
+ widget = ((TQWidgetStack*)widget)->visibleWidget();
- 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() );
l->setAlignment( Qt::AlignTop );
return l;
case VBox:
- l = new QVBoxLayout( gb->layout(), spacing );
+ l = new TQVBoxLayout( gb->layout(), spacing );
l->setAlignment( Qt::AlignTop );
return l;
case Grid:
- l = new QGridLayout( gb->layout() );
+ l = new TQGridLayout( gb->layout() );
l->setAlignment( Qt::AlignTop );
return l;
default:
@@ -659,20 +659,20 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo
}
} else {
if ( layout ) {
- QLayout *l;
+ TQLayout *l;
switch ( type ) {
case HBox:
- l = new QHBoxLayout( layout );
+ l = new TQHBoxLayout( layout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
case VBox:
- l = new QVBoxLayout( layout );
+ l = new TQVBoxLayout( layout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
case Grid: {
- l = new QGridLayout( layout );
+ l = new TQGridLayout( layout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
@@ -681,24 +681,24 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo
return 0;
}
} else {
- QLayout *l;
+ TQLayout *l;
switch ( type ) {
case HBox:
- l = new QHBoxLayout( widget );
+ l = new TQHBoxLayout( widget );
if ( !widget ) {
l->setMargin( margin );
l->setSpacing( spacing );
}
return l;
case VBox:
- l = new QVBoxLayout( widget );
+ l = new TQVBoxLayout( widget );
if ( !widget ) {
l->setMargin( margin );
l->setSpacing( spacing );
}
return l;
case Grid: {
- l = new QGridLayout( widget );
+ l = new TQGridLayout( widget );
if ( !widget ) {
l->setMargin( margin );
l->setSpacing( spacing );
@@ -712,61 +712,61 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo
}
}
-KommanderFactory::LayoutType KommanderFactory::layoutType( QLayout *layout ) const
+KommanderFactory::LayoutType KommanderFactory::layoutType( TQLayout *layout ) const
{
- 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;
}
-void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDomElement &e )
+void KommanderFactory::setProperty( 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 );
- QVariant defVariant;
+ TQVariant defVariant;
if ( e.tagName() == "font" ) {
- QFont f( qApp->font() );
- if ( obj->isWidgetType() && ( (QWidget*)obj )->parentWidget() )
- f = ( (QWidget*)obj )->parentWidget()->font();
- defVariant = QVariant( f );
+ TQFont f( qApp->font() );
+ if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
+ f = ( (TQWidget*)obj )->parentWidget()->font();
+ defVariant = TQVariant( f );
}
- QString comment;
- QVariant v( DomTool::elementToVariant( e, defVariant, comment ) );
+ TQString comment;
+ TQVariant v( DomTool::elementToVariant( e, defVariant, comment ) );
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 );
+ TQPixmap pix = loadPixmap( e );
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() ) );
} else if ( e.tagName() == "string" ) {
- v = QVariant( translate( v.asString(), comment ) );
+ v = TQVariant( translate( v.asString(), comment ) );
}
if ( !p ) {
if ( obj->isWidgetType() ) {
if ( prop == "toolTip" ) {
if ( !v.toString().isEmpty() )
- QToolTip::add( (QWidget*)obj, translate(v.toString()) );
+ TQToolTip::add( (TQWidget*)obj, translate(v.toString()) );
} else if ( prop == "whatsThis" ) {
if ( !v.toString().isEmpty() )
- QWhatsThis::add( (QWidget*)obj, translate(v.toString()) );
+ TQWhatsThis::add( (TQWidget*)obj, translate(v.toString()) );
}
#ifndef QT_NO_SQL
- if ( prop == "database" && !obj->inherits( "QDataView" )
- && !obj->inherits( "QDataBrowser" ) ) {
- QStringList lst = DomTool::elementToVariant( e, QVariant( QStringList() ) ).toStringList();
+ if ( prop == "database" && !obj->inherits( "TQDataView" )
+ && !obj->inherits( "TQDataBrowser" ) ) {
+ TQStringList lst = DomTool::elementToVariant( e, TQVariant( TQStringList() ) ).toStringList();
if ( lst.count() > 2 ) {
if ( dbControls )
dbControls->insert( obj->name(), lst[ 2 ] );
@@ -774,10 +774,10 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
dbTables.insert( obj->name(), lst );
}
} else if ( prop == "database" ) {
- QStringList lst = DomTool::elementToVariant( e, QVariant( QStringList() ) ).toStringList();
- if ( lst.count() == 2 && obj->inherits( "QWidget" ) ) {
+ TQStringList lst = DomTool::elementToVariant( e, TQVariant( TQStringList() ) ).toStringList();
+ if ( lst.count() == 2 && obj->inherits( "TQWidget" ) ) {
SqlWidgetConnection conn( lst[ 0 ], lst[ 1 ] );
- sqlWidgetConnections.insert( (QWidget*)obj, conn );
+ sqlWidgetConnections.insert( (TQWidget*)obj, conn );
dbControls = conn.dbControls;
}
} else
@@ -785,12 +785,12 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
if ( prop == "buddy" ) {
buddies.insert( obj->name(), v.toCString() );
} else if ( prop == "frameworkCode" ) {
- if ( !DomTool::elementToVariant( e, QVariant( true, 0 ) ).toBool() ) {
+ if ( !DomTool::elementToVariant( e, TQVariant( true, 0 ) ).toBool() ) {
noDatabaseWidgets << obj->name();
}
} else if ( prop == "buttonGroupId" ) {
- if ( obj->inherits( "QButton" ) && obj->parent()->inherits( "QButtonGroup" ) )
- ( (QButtonGroup*)obj->parent() )->insert( (QButton*)obj, v.toInt() );
+ if ( obj->inherits( "TQButton" ) && obj->parent()->inherits( "TQButtonGroup" ) )
+ ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, v.toInt() );
}
return;
@@ -798,10 +798,10 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
}
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 );
@@ -814,17 +814,17 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
}
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 == "geometry" ) {
@@ -837,9 +837,9 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo
obj->setProperty( prop, v );
}
-void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
+void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
{
- 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();
@@ -847,10 +847,10 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
Qt::Orientation orient = Qt::Horizontal;
int w = 0, h = 0;
- QSizePolicy::SizeType sizeType = QSizePolicy::Preferred;
+ TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString prop = n.attribute( "name" );
+ TQString prop = n.attribute( "name" );
if ( prop == "orientation" ) {
if ( n.firstChild().firstChild().toText().data() == "Horizontal" )
orient = Qt::Horizontal;
@@ -858,17 +858,17 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
orient = Qt::Vertical;
} else if ( prop == "sizeType" ) {
if ( n.firstChild().firstChild().toText().data() == "Fixed" )
- sizeType = QSizePolicy::Fixed;
+ sizeType = TQSizePolicy::Fixed;
else if ( n.firstChild().firstChild().toText().data() == "Minimum" )
- sizeType = QSizePolicy::Minimum;
+ sizeType = TQSizePolicy::Minimum;
else if ( n.firstChild().firstChild().toText().data() == "Maximum" )
- sizeType = QSizePolicy::Maximum;
+ sizeType = TQSizePolicy::Maximum;
else if ( n.firstChild().firstChild().toText().data() == "Preferred" )
- sizeType = QSizePolicy::Preferred;
+ sizeType = TQSizePolicy::Preferred;
else if ( n.firstChild().firstChild().toText().data() == "MinimumExpanding" )
- sizeType = QSizePolicy::MinimumExpanding;
+ sizeType = TQSizePolicy::MinimumExpanding;
else if ( n.firstChild().firstChild().toText().data() == "Expanding" )
- sizeType = QSizePolicy::Expanding;
+ sizeType = TQSizePolicy::Expanding;
} else if ( prop == "sizeHint" ) {
w = n.firstChild().firstChild().firstChild().toText().data().toInt();
h = n.firstChild().firstChild().nextSibling().firstChild().toText().data().toInt();
@@ -881,21 +881,21 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout )
rowspan = 1;
if ( colspan < 1 )
colspan = 1;
- QSpacerItem *item = new QSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : QSizePolicy::Minimum,
- orient == Qt::Vertical ? sizeType : QSizePolicy::Minimum );
+ TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum,
+ orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum );
if ( layout ) {
- if ( layout->inherits( "QBoxLayout" ) )
- ( (QBoxLayout*)layout )->addItem( item );
+ if ( layout->inherits( "TQBoxLayout" ) )
+ ( (TQBoxLayout*)layout )->addItem( item );
else
- ( (QGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
+ ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
orient == Qt::Horizontal ? Qt::AlignVCenter : Qt::AlignHCenter );
}
}
-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();
@@ -912,12 +912,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 {
@@ -928,14 +928,14 @@ static QImage loadImageData( QDomElement &n2 )
return img;
}
-void KommanderFactory::loadImageCollection( const QDomElement &e )
+void KommanderFactory::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 );
@@ -947,47 +947,47 @@ void KommanderFactory::loadImageCollection( const QDomElement &e )
}
}
-QImage KommanderFactory::loadFromCollection( const QString &name )
+TQImage KommanderFactory::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();
}
-QPixmap KommanderFactory::loadPixmap( const QDomElement &e )
+TQPixmap KommanderFactory::loadPixmap( const TQDomElement &e )
{
- QString arg = e.firstChild().toText().data();
+ TQString arg = e.firstChild().toText().data();
if ( usePixmapCollection ) {
- const QMimeSource *m = QMimeSourceFactory::defaultFactory()->data( arg );
+ const TQMimeSource *m = TQMimeSourceFactory::defaultFactory()->data( arg );
if ( !m )
- return QPixmap();
- QPixmap pix;
- QImageDrag::decode( m, pix );
+ return TQPixmap();
+ TQPixmap pix;
+ TQImageDrag::decode( m, pix );
return pix;
}
- QImage img = loadFromCollection( arg );
- QPixmap pix;
+ TQImage img = loadFromCollection( arg );
+ TQPixmap pix;
pix.convertFromImage( img );
return pix;
}
-QColorGroup KommanderFactory::loadColorGroup( const QDomElement &e )
+TQColorGroup KommanderFactory::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();
}
@@ -996,8 +996,8 @@ QColorGroup KommanderFactory::loadColorGroup( const QDomElement &e )
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 ;
@@ -1007,27 +1007,27 @@ struct Connection
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 ); }
};
-void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector )
+void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connector )
{
- 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();
Connection conn;
while ( !n2.isNull() ) {
if ( n2.tagName() == "sender" ) {
- 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();
@@ -1039,11 +1039,11 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector
} 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();
@@ -1059,8 +1059,8 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector
conn.signal = NormalizeObject::normalizeSignalSlot( conn.signal );
conn.slot = NormalizeObject::normalizeSignalSlot( conn.slot );
- QObject *sender = 0, *receiver = 0;
- QObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
+ TQObject *sender = 0, *receiver = 0;
+ TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
sender = toplevel;
} else {
@@ -1089,13 +1089,13 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector
}
if ( lang == "C++" ) {
- 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 );
// if this is a connection to a custom slot and we have a connector, try this as receiver
if ( slotList.find( conn.slot ) == -1 && receiver == toplevel && connector ) {
@@ -1109,32 +1109,32 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector
n = n.nextSibling().toElement();
continue;
}
- QObject::connect( sender, s, receiver, s2 );
+ TQObject::connect( sender, s, receiver, s2 );
} else {
EventFunction ef = eventMap[ conn.sender ];
ef.events.append( conn.signal );
- ef.functions.append( QStringList::split( ',', conn.slot ) );
+ ef.functions.append( TQStringList::split( ',', conn.slot ) );
eventMap.replace( conn.sender, ef );
}
} else if ( n.tagName() == "slot" ) {
- QString s = n.firstChild().toText().data();
+ TQString s = n.firstChild().toText().data();
languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language" ) );
}
n = n.nextSibling().toElement();
}
}
-void KommanderFactory::loadTabOrder( const QDomElement &e )
+void KommanderFactory::loadTabOrder( const TQDomElement &e )
{
- QWidget *last = 0;
- QDomElement n = e.firstChild().toElement();
+ TQWidget *last = 0;
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "tabstop" ) {
- QString name = n.firstChild().toText().data();
- QObjectList *l = toplevel->queryList( 0, name, false );
+ TQString name = n.firstChild().toText().data();
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() ) {
- QWidget *w = (QWidget*)l->first();
+ TQWidget *w = (TQWidget*)l->first();
if ( last )
toplevel->setTabOrder( last, w );
last = w;
@@ -1146,19 +1146,19 @@ void KommanderFactory::loadTabOrder( const QDomElement &e )
}
}
-void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget )
+void KommanderFactory::createColumn( const TQDomElement &e, TQWidget *widget )
{
- 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 = translate(v.toString());
else if ( attrib == "pixmap" ) {
@@ -1182,10 +1182,10 @@ void KommanderFactory::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;
#ifndef QT_NO_SQL
- bool isSql = (widget->inherits( "QDataTable" ));
+ bool isSql = (widget->inherits( "TQDataTable" ));
#endif
bool isRow;
if ( ( isRow = e.tagName() == "row" ) )
@@ -1197,20 +1197,20 @@ void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget )
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;
- QValueList<Field> fieldMap;
+ TQString txt;
+ TQString field;
+ TQValueList<Field> fieldMap;
if ( fieldMaps.find( table ) != fieldMaps.end() ) {
fieldMap = *fieldMaps.find( table );
fieldMaps.remove( 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 = translate(v.toString());
else if ( attrib == "pixmap" ) {
@@ -1224,39 +1224,39 @@ void KommanderFactory::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 ) {
#ifndef QT_NO_SQL
if ( isSql )
- ((QDataTable*)table)->addColumn( field, txt, -1, pix );
+ ((TQDataTable*)table)->addColumn( field, txt, -1, pix );
else
#endif
h->setLabel( i, pix, txt );
} else {
#ifndef QT_NO_SQL
if ( isSql ) {
- ((QDataTable*)table)->addColumn( field, txt );
+ ((TQDataTable*)table)->addColumn( field, txt );
}
else
#endif
h->setLabel( i, txt );
}
if ( !isRow && !field.isEmpty() ) {
- fieldMap.append( Field( txt, (hasPixmap ? pix : QPixmap()), field ) );
+ fieldMap.append( Field( txt, (hasPixmap ? pix : TQPixmap()), field ) );
fieldMaps.insert( table, fieldMap );
}
}
#endif
}
-void KommanderFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap )
+void KommanderFactory::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 = translate(v.toString());
else if ( attrib == "pixmap" ) {
@@ -1268,56 +1268,56 @@ void KommanderFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &tx
}
}
-void KommanderFactory::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i )
+void KommanderFactory::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i )
{
- 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 );
}
#ifndef QT_NO_ICONVIEW
- } 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 );
+ TQIconView *iv = (TQIconView*)widget;
+ new TQIconViewItem( iv, txt, pix );
#endif
- } else if ( widget->inherits( "QListView" ) ) {
- QDomElement n = e.firstChild().toElement();
- QPixmap pix;
- QValueList<QPixmap> pixmaps;
- QStringList textes;
- QListViewItem *item = 0;
- QListView *lv = (QListView*)widget;
+ } 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 << translate(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;
@@ -1341,28 +1341,28 @@ void KommanderFactory::createItem( const QDomElement &e, QWidget *widget, QListV
-void KommanderFactory::loadChildAction( QObject *parent, const QDomElement &e )
+void KommanderFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
{
- QDomElement n = e;
- QAction *a = 0;
+ TQDomElement n = e;
+ TQAction *a = 0;
EventFunction ef;
if ( n.tagName() == "action" ) {
- a = new QAction( parent );
- QDomElement n2 = n.firstChild().toElement();
+ a = new TQAction( parent );
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
setProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
} else if ( n2.tagName() == "event" ) {
ef.events.append( n2.attribute( "name" ) );
- ef.functions.append( QStringList::split( ',', n2.attribute( "functions" ) ) );
+ ef.functions.append( TQStringList::split( ',', n2.attribute( "functions" ) ) );
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( "QAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
actionList.append( a );
} else if ( n.tagName() == "actiongroup" ) {
- a = new QActionGroup( parent );
- QDomElement n2 = n.firstChild().toElement();
+ a = new TQActionGroup( parent );
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
setProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() );
@@ -1371,20 +1371,20 @@ void KommanderFactory::loadChildAction( QObject *parent, const QDomElement &e )
loadChildAction( a, n2 );
} else if ( n2.tagName() == "event" ) {
ef.events.append( n2.attribute( "name" ) );
- ef.functions.append( QStringList::split( ',', n2.attribute( "functions" ) ) );
+ ef.functions.append( TQStringList::split( ',', n2.attribute( "functions" ) ) );
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( "QAction" ) )
+ if ( !parent->inherits( "TQAction" ) )
actionList.append( a );
}
if ( a )
eventMap.insert( a, ef );
}
-void KommanderFactory::loadActions( const QDomElement &e )
+void KommanderFactory::loadActions( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
loadChildAction( toplevel, n );
@@ -1395,27 +1395,27 @@ void KommanderFactory::loadActions( const QDomElement &e )
}
}
-void KommanderFactory::loadToolBars( const QDomElement &e )
+void KommanderFactory::loadToolBars( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMainWindow *mw = ( (QMainWindow*)toplevel );
- QToolBar *tb = 0;
+ TQDomElement n = e.firstChild().toElement();
+ TQMainWindow *mw = ( (TQMainWindow*)toplevel );
+ TQToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
- tb = new QToolBar( QString::null, mw, dock );
+ tb = new TQToolBar( TQString::null, mw, dock );
tb->setLabel( n.attribute( "label" ) );
tb->setName( n.attribute( "name" ) );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
- QAction *a = findAction( n2.attribute( "name" ) );
+ TQAction *a = findAction( n2.attribute( "name" ) );
if ( a )
a->addTo( tb );
} else if ( n2.tagName() == "separator" ) {
tb->addSeparator();
} else if ( n2.tagName() == "widget" ) {
- (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "QWidget" ) );
+ (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) );
} else if ( n2.tagName() == "property" ) {
setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
}
@@ -1426,19 +1426,19 @@ void KommanderFactory::loadToolBars( const QDomElement &e )
}
}
-void KommanderFactory::loadMenuBar( const QDomElement &e )
+void KommanderFactory::loadMenuBar( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
- QMainWindow *mw = ( (QMainWindow*)toplevel );
- QMenuBar *mb = mw->menuBar();
+ TQDomElement n = e.firstChild().toElement();
+ TQMainWindow *mw = ( (TQMainWindow*)toplevel );
+ TQMenuBar *mb = mw->menuBar();
while ( !n.isNull() ) {
if ( n.tagName() == "item" ) {
- QPopupMenu *popup = new QPopupMenu( mw );
+ TQPopupMenu *popup = new TQPopupMenu( 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 = findAction( n2.attribute( "name" ) );
+ TQAction *a = findAction( n2.attribute( "name" ) );
if ( a )
a->addTo( popup );
} else if ( n2.tagName() == "separator" ) {
@@ -1455,27 +1455,27 @@ void KommanderFactory::loadMenuBar( const QDomElement &e )
}
-QAction *KommanderFactory::findAction( const QString &name )
+TQAction *KommanderFactory::findAction( const TQString &name )
{
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( QString( a->name() ) == name )
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
+ if ( TQString( a->name() ) == name )
return a;
- QAction *ac = (QAction*)a->child( name.latin1(), "QAction" );
+ TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" );
if ( ac )
return ac;
}
return 0;
}
-void KommanderFactory::loadImages( const QString &dir )
+void KommanderFactory::loadImages( const TQString &dir )
{
- QDir d(dir);
- QStringList l = d.entryList(QDir::Files);
- for (QStringList::Iterator it = l.begin(); it != l.end(); ++it)
- QMimeSourceFactory::defaultFactory()->setPixmap(*it, QPixmap(d.path() + "/" + *it, "PNG"));
+ TQDir d(dir);
+ TQStringList l = d.entryList(TQDir::Files);
+ for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it)
+ TQMimeSourceFactory::defaultFactory()->setPixmap(*it, TQPixmap(d.path() + "/" + *it, "PNG"));
}
-QString KommanderFactory::translate( const QString& sourceText, const QString& comment )
+TQString KommanderFactory::translate( const TQString& sourceText, const TQString& comment )
{
if (!sourceText.isEmpty() && !comment.isEmpty())
return KGlobal::locale()->translate(comment.utf8(), sourceText.utf8());
diff --git a/kommander/factory/kommanderfactory.h b/kommander/factory/kommanderfactory.h
index 0b9a7eab..03861c85 100644
--- a/kommander/factory/kommanderfactory.h
+++ b/kommander/factory/kommanderfactory.h
@@ -22,13 +22,13 @@
#ifndef _HAVE_KOMMANDERFACTORY_H_
#define _HAVE_KOMMANDERFACTORY_H_
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qaction.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqaction.h>
#include "kommander_export.h"
class QWidget;
@@ -42,17 +42,17 @@ class KommanderPlugin;
struct KommanderWidgetInfo
{
KommanderWidgetInfo() {}
- KommanderWidgetInfo( const QString &g, const QString &t, QIconSet *i, const QString &w = QString::null, bool c = FALSE )
+ KommanderWidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString::null, bool c = FALSE )
: group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c )
{
}
- QString group;
- QString toolTip;
- QIconSet *iconSet;
- QString whatsThis;
+ TQString group;
+ TQString toolTip;
+ TQIconSet *iconSet;
+ TQString whatsThis;
bool isContainer;
};
-typedef QMap<QString, KommanderWidgetInfo> FeatureList;
+typedef TQMap<TQString, KommanderWidgetInfo> FeatureList;
class KOMMANDER_EXPORT KommanderFactory
{
@@ -60,42 +60,42 @@ public:
KommanderFactory();
virtual ~KommanderFactory();
- static QWidget *create( const QString &uiFile, QObject *connector = 0, QWidget *parent = 0, const char *name = 0 );
- static QWidget *create( QIODevice *dev, QObject *connector = 0, QWidget *parent = 0, const char *name = 0 );
+ static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
+ static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
static int loadPlugins( bool force = FALSE );
static void addPlugin( KommanderPlugin *plugin );
- static void loadImages( const QString &dir );
+ static void loadImages( const TQString &dir );
- static QWidget *createWidget( const QString &className, QWidget *parent, const char *name );
+ static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name );
static FeatureList featureList();
private:
enum LayoutType { HBox, VBox, Grid, NoLayout };
- void loadImageCollection( const QDomElement &e );
- void loadConnections( const QDomElement &e, QObject *connector );
- void loadTabOrder( const QDomElement &e );
- QWidget *createWidgetInternal( const QDomElement &e, QWidget *parent, QLayout* layout, const QString &classNameArg );
- QLayout *createLayout( QWidget *widget, QLayout* layout, LayoutType type );
- LayoutType layoutType( QLayout *l ) const;
- void setProperty( QObject* widget, const QString &prop, const QDomElement &e );
- void createSpacer( const QDomElement &e, QLayout *layout );
- QImage loadFromCollection( const QString &name );
- QPixmap loadPixmap( const QDomElement &e );
- QColorGroup loadColorGroup( const QDomElement &e );
- void createColumn( const QDomElement &e, QWidget *widget );
- void loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap );
- void createItem( const QDomElement &e, QWidget *widget, QListViewItem *i = 0 );
- void loadChildAction( QObject *parent, const QDomElement &e );
- void loadActions( const QDomElement &e );
- void loadToolBars( const QDomElement &e );
- void loadMenuBar( const QDomElement &e );
- QAction *findAction( const QString &name );
- QString translate( const QString& sourceText, const QString& comment = "" );
+ void loadImageCollection( const TQDomElement &e );
+ void loadConnections( const TQDomElement &e, TQObject *connector );
+ void loadTabOrder( const TQDomElement &e );
+ TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg );
+ TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
+ LayoutType layoutType( TQLayout *l ) const;
+ void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e );
+ void createSpacer( const TQDomElement &e, TQLayout *layout );
+ TQImage loadFromCollection( const TQString &name );
+ TQPixmap loadPixmap( const TQDomElement &e );
+ TQColorGroup loadColorGroup( const TQDomElement &e );
+ void createColumn( const TQDomElement &e, TQWidget *widget );
+ void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap );
+ void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
+ void loadChildAction( TQObject *parent, const TQDomElement &e );
+ void loadActions( const TQDomElement &e );
+ void loadToolBars( const TQDomElement &e );
+ void loadMenuBar( const TQDomElement &e );
+ TQAction *findAction( const TQString &name );
+ TQString translate( const TQString& sourceText, const TQString& comment = "" );
private:
struct Image {
- QImage img;
- QString name;
+ TQImage img;
+ TQString name;
bool operator==( const Image &i ) const {
return ( i.name == name &&
i.img == img );
@@ -105,10 +105,10 @@ private:
struct Field
{
Field() {}
- Field( const QString &s1, const QPixmap &p, const QString &s2 ) : name( s1 ), pix( p ), field( s2 ) {}
- QString name;
- QPixmap pix;
- QString field;
+ Field( const TQString &s1, const TQPixmap &p, const TQString &s2 ) : name( s1 ), pix( p ), field( s2 ) {}
+ TQString name;
+ TQPixmap pix;
+ TQString field;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Field& ) const { return FALSE; }
#endif
@@ -117,41 +117,41 @@ private:
struct EventFunction
{
EventFunction() {}
- EventFunction( const QString &e, const QStringList &f )
+ EventFunction( const TQString &e, const TQStringList &f )
: events( e ) { functions.append( f ); }
- QStringList events;
- QValueList<QStringList> functions;
+ TQStringList events;
+ TQValueList<TQStringList> functions;
};
struct SqlWidgetConnection
{
SqlWidgetConnection() {}
- SqlWidgetConnection( const QString &c, const QString &t )
- : conn( c ), table( t ), dbControls( new QMap<QString, QString>() ) {}
- QString conn;
- QString table;
- QMap<QString, QString> *dbControls;
+ SqlWidgetConnection( const TQString &c, const TQString &t )
+ : conn( c ), table( t ), dbControls( new TQMap<TQString, TQString>() ) {}
+ TQString conn;
+ TQString table;
+ TQMap<TQString, TQString> *dbControls;
};
struct Functions
{
- QString functions;
+ TQString functions;
};
- QValueList<Image> images;
- QWidget *toplevel;
- QListViewItem *lastItem;
- QMap<QString, QString> *dbControls;
- QMap<QString, QStringList> dbTables;
- QMap<QWidget*, SqlWidgetConnection> sqlWidgetConnections;
- QMap<QString, QString> buddies;
- QMap<QTable*, QValueList<Field> > fieldMaps;
- QPtrList<QAction> actionList;
- QMap<QObject *, EventFunction> eventMap;
- QMap<QString, QString> languageSlots;
- QMap<QString, Functions*> languageFunctions;
- QStringList variables;
- QStringList noDatabaseWidgets;
+ TQValueList<Image> images;
+ TQWidget *toplevel;
+ TQListViewItem *lastItem;
+ TQMap<TQString, TQString> *dbControls;
+ TQMap<TQString, TQStringList> dbTables;
+ TQMap<TQWidget*, SqlWidgetConnection> sqlWidgetConnections;
+ TQMap<TQString, TQString> buddies;
+ TQMap<TQTable*, TQValueList<Field> > fieldMaps;
+ TQPtrList<TQAction> actionList;
+ TQMap<TQObject *, EventFunction> eventMap;
+ TQMap<TQString, TQString> languageSlots;
+ TQMap<TQString, Functions*> languageFunctions;
+ TQStringList variables;
+ TQStringList noDatabaseWidgets;
bool usePixmapCollection;
int defMargin, defSpacing;
diff --git a/kommander/part/kommander_part.cpp b/kommander/part/kommander_part.cpp
index ef8ab5e1..d8645bc9 100644
--- a/kommander/part/kommander_part.cpp
+++ b/kommander/part/kommander_part.cpp
@@ -19,9 +19,9 @@
#include <kinstance.h>
#include <kparts/genericfactory.h>
-#include <qpoint.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqpoint.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include "instance.h"
#include "kommanderversion.h"
@@ -33,15 +33,15 @@ typedef KParts::GenericFactory<KommanderPart> KommanderPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkommander_part, KommanderPartFactory )
-KommanderPart::KommanderPart( QWidget *parentWidget, const char * /*widgetName*/,
- QObject *parent, const char *name, const QStringList & /*args*/ )
+KommanderPart::KommanderPart( TQWidget *parentWidget, const char * /*widgetName*/,
+ TQObject *parent, const char *name, const TQStringList & /*args*/ )
: KParts::ReadOnlyPart(parent, name)
{
setInstance( KommanderPartFactory::instance() );
m_instance = 0L;
- m_widget = new QWidget(parentWidget);
+ m_widget = new TQWidget(parentWidget);
setWidget(m_widget);
- m_layout = new QGridLayout(m_widget);
+ m_layout = new TQGridLayout(m_widget);
}
KommanderPart::~KommanderPart()
@@ -66,7 +66,7 @@ bool KommanderPart::openFile()
delete m_instance;
m_instance = new Instance(0L);
m_instance->build(m_url);
- QTimer::singleShot(0, this, SLOT(slotRun()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotRun()));
emit setStatusBarText( m_url.prettyURL() );
return true;
@@ -74,10 +74,10 @@ bool KommanderPart::openFile()
void KommanderPart::slotRun()
{
- QWidget *w = m_instance->widget();
+ TQWidget *w = m_instance->widget();
if (w)
{
- w->reparent(m_widget, 0, QPoint(0,0));
+ w->reparent(m_widget, 0, TQPoint(0,0));
m_layout->addWidget(w, 0, 0);
w->show(); //show, not execute, so it doesn't block the parent
}
diff --git a/kommander/part/kommander_part.h b/kommander/part/kommander_part.h
index fc9b876c..7b417a24 100644
--- a/kommander/part/kommander_part.h
+++ b/kommander/part/kommander_part.h
@@ -25,8 +25,8 @@ class KommanderPart : public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- KommanderPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &args);
+ KommanderPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &args);
virtual ~KommanderPart();
@@ -40,8 +40,8 @@ protected slots:
private:
Instance *m_instance;
- QWidget *m_widget;
- QGridLayout *m_layout;
+ TQWidget *m_widget;
+ TQGridLayout *m_layout;
};
diff --git a/kommander/plugin/kommanderplugin.cpp b/kommander/plugin/kommanderplugin.cpp
index 9be1c2d5..f0d94faf 100644
--- a/kommander/plugin/kommanderplugin.cpp
+++ b/kommander/plugin/kommanderplugin.cpp
@@ -25,46 +25,46 @@ KommanderPlugin::~KommanderPlugin()
{
}
-void KommanderPlugin::addWidget( const QString &name, const QString &group, const QString &toolTip, QIconSet *iconSet, const QString &whatsThis, bool isContainer)
+void KommanderPlugin::addWidget( const TQString &name, const TQString &group, const TQString &toolTip, TQIconSet *iconSet, const TQString &whatsThis, bool isContainer)
{
m_widgets[name] = WidgetInfo( group, toolTip, iconSet, whatsThis, isContainer );
}
-void KommanderPlugin::removeWidget( const QString &name )
+void KommanderPlugin::removeWidget( const TQString &name )
{
m_widgets.remove( name );
}
-QStringList KommanderPlugin::widgets() const
+TQStringList KommanderPlugin::widgets() const
{
- QStringList ws;
+ TQStringList ws;
WidgetInfos::ConstIterator it;
for( it = m_widgets.begin() ; it != m_widgets.end() ; ++ it )
ws += it.key();
return ws;
}
-QString KommanderPlugin::group( const QString &name ) const
+TQString KommanderPlugin::group( const TQString &name ) const
{
return m_widgets[name].group;
}
-QString KommanderPlugin::toolTip( const QString &name ) const
+TQString KommanderPlugin::toolTip( const TQString &name ) const
{
return m_widgets[name].toolTip;
}
-QString KommanderPlugin::whatsThis( const QString &name ) const
+TQString KommanderPlugin::whatsThis( const TQString &name ) const
{
return m_widgets[name].whatsThis;
}
-bool KommanderPlugin::isContainer( const QString &name ) const
+bool KommanderPlugin::isContainer( const TQString &name ) const
{
return m_widgets[name].isContainer;
}
-QIconSet* KommanderPlugin::iconSet( const QString &name ) const
+TQIconSet* KommanderPlugin::iconSet( const TQString &name ) const
{
return m_widgets[name].iconSet;
}
@@ -74,7 +74,7 @@ void KommanderPlugin::setDefaultGroup( int id )
SpecialInformation::setDefaultGroup(id);
}
-bool KommanderPlugin::registerFunction(int id, const QString& function, const QString description , int minArgs, int maxArgs)
+bool KommanderPlugin::registerFunction(int id, const TQString& function, const TQString description , int minArgs, int maxArgs)
{
return SpecialInformation::insert(id, function, description, minArgs, maxArgs);
}
diff --git a/kommander/plugin/kommanderplugin.h b/kommander/plugin/kommanderplugin.h
index ecba3384..b22af6ac 100644
--- a/kommander/plugin/kommanderplugin.h
+++ b/kommander/plugin/kommanderplugin.h
@@ -34,31 +34,31 @@
#ifndef _HAVE_KOMMANDERPLUGIN_H_
#define _HAVE_KOMMANDERPLUGIN_H_
-#include <qobject.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "kommander_export.h"
class QWidget;
class QIconSet;
-class KOMMANDER_EXPORT KommanderPlugin : public QObject
+class KOMMANDER_EXPORT KommanderPlugin : public TQObject
{
Q_OBJECT
public:
KommanderPlugin();
~KommanderPlugin();
- virtual void addWidget( const QString &name, const QString &group, const QString &toolTip, QIconSet *iconSet, const QString &whatsThis = QString::null, bool isContainer = false);
- virtual void removeWidget( const QString &name );
- virtual QStringList widgets() const;
+ virtual void addWidget( const TQString &name, const TQString &group, const TQString &toolTip, TQIconSet *iconSet, const TQString &whatsThis = TQString::null, bool isContainer = false);
+ virtual void removeWidget( const TQString &name );
+ virtual TQStringList widgets() const;
- virtual QWidget *create( const QString &key, QWidget *parent = 0, const char *name = 0 ) = 0;
- virtual QString group( const QString &key ) const;
- virtual QString toolTip( const QString &key ) const;
- virtual QString whatsThis( const QString &key ) const;
- virtual bool isContainer( const QString &key ) const;
- virtual QIconSet *iconSet( const QString &key ) const;
+ virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ) = 0;
+ virtual TQString group( const TQString &key ) const;
+ virtual TQString toolTip( const TQString &key ) const;
+ virtual TQString whatsThis( const TQString &key ) const;
+ virtual bool isContainer( const TQString &key ) const;
+ virtual TQIconSet *iconSet( const TQString &key ) const;
/**
* Sets the default group for functions. Must be called before registerFunction.
@@ -75,7 +75,7 @@ class KOMMANDER_EXPORT KommanderPlugin : public QObject
* @param maxArgs maximum number of accepted arguments
* @return true if registration was successful
*/
- static bool registerFunction(int id, const QString& function, const QString description = QString::null,
+ static bool registerFunction(int id, const TQString& function, const TQString description = TQString::null,
int minArgs = -1, int maxArgs = -1);
@@ -84,17 +84,17 @@ private:
struct WidgetInfo
{
WidgetInfo() { }
- WidgetInfo( const QString &g, const QString &t, QIconSet *i, const QString &w = QString::null, bool c = false)
+ WidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString::null, bool c = false)
: group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c )
{}
- QString group;
- QString toolTip;
- QIconSet *iconSet;
- QString whatsThis;
+ TQString group;
+ TQString toolTip;
+ TQIconSet *iconSet;
+ TQString whatsThis;
bool isContainer;
};
- typedef QMap<QString, WidgetInfo> WidgetInfos;
+ typedef TQMap<TQString, WidgetInfo> WidgetInfos;
WidgetInfos m_widgets;
};
diff --git a/kommander/plugin/specialinformation.cpp b/kommander/plugin/specialinformation.cpp
index 5e86eb16..d6ed318b 100644
--- a/kommander/plugin/specialinformation.cpp
+++ b/kommander/plugin/specialinformation.cpp
@@ -18,7 +18,7 @@
#include <klocale.h>
-SpecialFunction::SpecialFunction(const QString& name, const QString& description,
+SpecialFunction::SpecialFunction(const TQString& name, const TQString& description,
int minArgs, int maxArgs)
{
m_parserTypes = AllParsers;
@@ -28,8 +28,8 @@ SpecialFunction::SpecialFunction(const QString& name, const QString& description
m_description = description;
if (lbracket != -1 && rbracket != -1)
{
- QString part = name.mid(lbracket+1, rbracket - lbracket - 1);
- QStringList args = QStringList::split(",", part);
+ TQString part = name.mid(lbracket+1, rbracket - lbracket - 1);
+ TQStringList args = TQStringList::split(",", part);
for (uint i=0; i<args.count(); i++)
{
m_types.append(args[i].stripWhiteSpace().section(' ', 0, 0));
@@ -40,7 +40,7 @@ SpecialFunction::SpecialFunction(const QString& name, const QString& description
m_maxArgs = (maxArgs == -1) ? m_types.count() : maxArgs;
}
-SpecialFunction::SpecialFunction(ParserType p, const QString& name, const QString& description,
+SpecialFunction::SpecialFunction(ParserType p, const TQString& name, const TQString& description,
int minArgs, int maxArgs)
{
m_parserTypes = p;
@@ -50,8 +50,8 @@ SpecialFunction::SpecialFunction(ParserType p, const QString& name, const QStrin
m_description = description;
if (lbracket != -1 && rbracket != -1)
{
- QString part = name.mid(lbracket+1, rbracket - lbracket - 1);
- QStringList args = QStringList::split(",", part);
+ TQString part = name.mid(lbracket+1, rbracket - lbracket - 1);
+ TQStringList args = TQStringList::split(",", part);
for (uint i=0; i<args.count(); i++)
{
m_types.append(args[i].stripWhiteSpace().section(' ', 0, 0));
@@ -63,37 +63,37 @@ SpecialFunction::SpecialFunction(ParserType p, const QString& name, const QStrin
}
-QString SpecialFunction::prototype(uint prototypeFlags) const
+TQString SpecialFunction::prototype(uint prototypeFlags) const
{
if (!m_types.count())
return m_function;
int start = (prototypeFlags & SkipFirstArgument) ? 1 : 0;
- QStringList params;
+ TQStringList params;
for (uint i=start; i<m_types.count(); i++)
if (prototypeFlags & ShowArgumentNames)
- params.append(QString("%1 %2").arg(m_types[i]).arg(m_args[i]));
+ params.append(TQString("%1 %2").arg(m_types[i]).arg(m_args[i]));
else
params.append(m_types[i]);
if (!params.count())
return m_function;
else if (prototypeFlags & NoSpaces)
- return QString("%1(%2)").arg(m_function).arg(params.join(","));
+ return TQString("%1(%2)").arg(m_function).arg(params.join(","));
else
- return QString("%1(%2)").arg(m_function).arg(params.join(", "));
+ return TQString("%1(%2)").arg(m_function).arg(params.join(", "));
}
-QString SpecialFunction::argumentName(uint i) const
+TQString SpecialFunction::argumentName(uint i) const
{
if (i < m_args.count())
return m_args[i];
- return QString();
+ return TQString();
}
-QString SpecialFunction::argumentType(uint i) const
+TQString SpecialFunction::argumentType(uint i) const
{
if (i < m_types.count())
return m_types[i];
- return QString();
+ return TQString();
}
int SpecialFunction::argumentCount() const
@@ -104,9 +104,9 @@ int SpecialFunction::argumentCount() const
-int SpecialInformation::function(int group, const QString& fname)
+int SpecialInformation::function(int group, const TQString& fname)
{
- QString f = fname.lower();
+ TQString f = fname.lower();
if (m_functions.contains(group) && m_functions[group].contains(f))
return m_functions[group][f];
else if (m_aliases.contains(group) && m_aliases[group].contains(f))
@@ -114,13 +114,13 @@ int SpecialInformation::function(int group, const QString& fname)
return -1;
}
-SpecialFunction SpecialInformation::functionObject(const QString& gname, const QString& fname)
+SpecialFunction SpecialInformation::functionObject(const TQString& gname, const TQString& fname)
{
int gid = group(gname);
return m_specials[gid][function(gid, fname)];
}
-int SpecialInformation::group(const QString& gname)
+int SpecialInformation::group(const TQString& gname)
{
if (m_groups.contains(gname))
return m_groups[gname];
@@ -132,7 +132,7 @@ bool SpecialInformation::isValid(int gname, int fname)
return m_specials.contains(gname) && m_specials[gname].contains(fname);
}
-bool SpecialInformation::isValid(const QString& gname, const QString& fname)
+bool SpecialInformation::isValid(const TQString& gname, const TQString& fname)
{
return function(group(gname), fname) != -1;
}
@@ -143,7 +143,7 @@ bool SpecialInformation::isValid(int gname, int fname, SpecialFunction::ParserTy
&& m_specials[gname][fname].isSupported(p);
}
-bool SpecialInformation::isValid(const QString& gname, const QString& fname,
+bool SpecialInformation::isValid(const TQString& gname, const TQString& fname,
SpecialFunction::ParserType p)
{
int g = group(gname);
@@ -179,21 +179,21 @@ bool SpecialInformation::isValidArg(int gname, int fname, int args)
return -1;
}
-QString SpecialInformation::description(int gname, int fname)
+TQString SpecialInformation::description(int gname, int fname)
{
if (isValid(gname, fname))
return m_specials[gname][fname].description();
- return QString();
+ return TQString();
}
-QString SpecialInformation::prototype(int gname, int fname, uint flags)
+TQString SpecialInformation::prototype(int gname, int fname, uint flags)
{
if (isValid(gname, fname))
return m_specials[gname][fname].prototype(flags);
- return QString();
+ return TQString();
}
-bool SpecialInformation::insert(int id, const QString& function, const QString description,
+bool SpecialInformation::insert(int id, const TQString& function, const TQString description,
int minArgs, int maxArgs, SpecialFunction::ParserType pType)
{
if (isValid(m_defaultGroup, id)) /* function already defined */
@@ -208,19 +208,19 @@ bool SpecialInformation::insert(int id, const QString& function, const QString d
return true;
}
-bool SpecialInformation::insertMacro(int id, const QString& function, const QString description,
+bool SpecialInformation::insertMacro(int id, const TQString& function, const TQString description,
int minArgs, int maxArgs)
{
return insert(id, function, description, minArgs, maxArgs, SpecialFunction::MacroParser);
}
-bool SpecialInformation::insertInternal(int id, const QString& function, const QString description,
+bool SpecialInformation::insertInternal(int id, const TQString& function, const TQString description,
int minArgs, int maxArgs)
{
return insert(id, function, description, minArgs, maxArgs, SpecialFunction::InternalParser);
}
-bool SpecialInformation::insertAlias(int id, const QString& alias)
+bool SpecialInformation::insertAlias(int id, const TQString& alias)
{
if (!isValid(m_defaultGroup, id)) /* function doesn't exists */
return false;
@@ -237,7 +237,7 @@ void SpecialInformation::setDefaultGroup(int gname)
m_defaultGroup = gname;
}
-void SpecialInformation::insertGroup(int id, const QString& name, const QString& parserName)
+void SpecialInformation::insertGroup(int id, const TQString& name, const TQString& parserName)
{
if (group(name) == -1) {
m_groups[name] = id;
@@ -246,7 +246,7 @@ void SpecialInformation::insertGroup(int id, const QString& name, const QString&
}
}
-QString SpecialInformation::parserGroupName(const QString& name)
+TQString SpecialInformation::parserGroupName(const TQString& name)
{
if (m_parserGroups.contains(name))
return m_parserGroups[name];
@@ -254,21 +254,21 @@ QString SpecialInformation::parserGroupName(const QString& name)
return name;
}
-QStringList SpecialInformation::groups()
+TQStringList SpecialInformation::groups()
{
return m_groups.keys();
}
-QStringList SpecialInformation::functions(const QString& g)
+TQStringList SpecialInformation::functions(const TQString& g)
{
int gid = group(g);
if (gid == -1)
- return QStringList();
+ return TQStringList();
else
{
- QStringList list;
- const QMap<int, SpecialFunction> fgroup = m_specials[gid];
- for(QMap<int, SpecialFunction>::ConstIterator it = fgroup.begin(); it != fgroup.end(); ++it)
+ TQStringList list;
+ const TQMap<int, SpecialFunction> fgroup = m_specials[gid];
+ for(TQMap<int, SpecialFunction>::ConstIterator it = fgroup.begin(); it != fgroup.end(); ++it)
list.append(it.data().name());
return list;
}
@@ -282,108 +282,108 @@ bool SpecialFunction::isSupported(ParserType p) const
void SpecialInformation::registerSpecials()
{
insertGroup(Group::DCOP, "DCOP", "");
- insert(DCOP::addUniqueItem, "addUniqueItem(QString widget, QString item)",
+ insert(DCOP::addUniqueItem, "addUniqueItem(TQString widget, TQString item)",
i18n("Inserts the item if it will not create a duplicate."), 2);
- insert(DCOP::associatedText, "associatedText(QString widget)",
+ insert(DCOP::associatedText, "associatedText(TQString widget)",
i18n("Returns scripts associated with widget. This is an advanced feature that would not be commonly used."), 1);
- insert(DCOP::cancel, "cancel(QString widget)", i18n("Stops execution of the script associated with the widget."), 1);
- insert(DCOP::cellText, "cellText(QString widget, int row, int column)",
+ insert(DCOP::cancel, "cancel(TQString widget)", i18n("Stops execution of the script associated with the widget."), 1);
+ insert(DCOP::cellText, "cellText(TQString widget, int row, int column)",
i18n("Returns text of a cell in a table."), 3);
- insert(DCOP::checked, "checked(QString widget)",
+ insert(DCOP::checked, "checked(TQString widget)",
i18n("Returns 1 for checked boxes, 0 for unchecked."), 1);
- insert(DCOP::children, "children(QString widget, bool recursive)",
+ insert(DCOP::children, "children(TQString widget, bool recursive)",
i18n("Returns the list of child widgets contained in the parent widget. Set the <i>recursive</i> parameter to <i>true</i> to include widgets contained by child widgets."), 2);
- insert(DCOP::clear, "clear(QString widget)",
+ insert(DCOP::clear, "clear(TQString widget)",
i18n("Removes all content from the widget."), 1);
insertAlias(DCOP::clear, "clearList");
- insertInternal(DCOP::columnCount, "columnCount(QString widget)",
+ insertInternal(DCOP::columnCount, "columnCount(TQString widget)",
i18n("Get the column count"), 1);
- insert(DCOP::count, "count(QString widget)",
+ insert(DCOP::count, "count(TQString widget)",
i18n("Returns number of items in a widget such as combobox or listbox."), 1);
- insert(DCOP::currentColumn, "currentColumn(QString widget)",
+ insert(DCOP::currentColumn, "currentColumn(TQString widget)",
i18n("Returns index of current column."), 1);
- insert(DCOP::currentItem, "currentItem(QString widget)",
+ insert(DCOP::currentItem, "currentItem(TQString widget)",
i18n("Returns index of current item."), 1);
- insert(DCOP::currentRow, "currentRow(QString widget)",
+ insert(DCOP::currentRow, "currentRow(TQString widget)",
i18n("Returns index of current row."), 1);
- insert(DCOP::execute, "execute(QString widget)",
+ insert(DCOP::execute, "execute(TQString widget)",
i18n("Executes the script associated with the widget. With the new parser the execute method can take one or more arguments."), 1, 9);
- insert(DCOP::findItem, "findItem(QString widget, QString item, int column, bool CaseSensitive, bool ExactMatch)",
+ insert(DCOP::findItem, "findItem(TQString widget, TQString item, int column, bool CaseSensitive, bool ExactMatch)",
i18n("Returns the index of an item with the given text. Defaults to case sensitive. Matching can be an exact match or match if it contains the string. Only the first argument is requred. If no column is given it will search the first by default."), 2, 5);
- insert(DCOP::insertColumn, "insertColumn(QString widget, int column, int count)",
+ insert(DCOP::insertColumn, "insertColumn(TQString widget, int column, int count)",
i18n("Inserts new column (or <i>count</i> columns) at <i>column</i> position."), 2);
- insert(DCOP::insertItem, "insertItem(QString widget, QString item, int index)",
+ insert(DCOP::insertItem, "insertItem(TQString widget, TQString item, int index)",
i18n("Inserts item at <i>index</i> position."), 3);
insertAlias(DCOP::insertItem, "addListItem");
- insert(DCOP::insertItems, "insertItems(QString widget, QStringList items, int index)",
+ insert(DCOP::insertItems, "insertItems(TQString widget, TQStringList items, int index)",
i18n("Inserts multiple items (EOL-separated) at <i>index</i> position."), 3);
insertAlias(DCOP::insertItems, "addListItems");
- insert(DCOP::insertRow, "insertRow(QString widget, int row, int count)",
+ insert(DCOP::insertRow, "insertRow(TQString widget, int row, int count)",
i18n("Inserts new row (or <i>count</i> rows) at <i>row</i> position."), 2);
- insert(DCOP::item, "item(QString widget, int index)",
+ insert(DCOP::item, "item(TQString widget, int index)",
i18n("Returns the text of the item at the given index."), 2);
- insert(DCOP::itemDepth, "itemDepth(QString widget, int index)",
+ insert(DCOP::itemDepth, "itemDepth(TQString widget, int index)",
i18n("Returns the depth of the current item in the tree. Root items have depth 0."), 2);
- insert(DCOP::itemPath, "itemPath(QString widget, int index)",
+ insert(DCOP::itemPath, "itemPath(TQString widget, int index)",
i18n("Returns the slash-separated path to the given item in the tree."), 2);
- insert(DCOP::removeColumn, "removeColumn(QString widget, int column, int count)",
+ insert(DCOP::removeColumn, "removeColumn(TQString widget, int column, int count)",
i18n("Removes the column (or <i>count</i> consecutive columns) with the given index."), 2, 3);
- insert(DCOP::removeItem, "removeItem(QString widget, int index)",
+ insert(DCOP::removeItem, "removeItem(TQString widget, int index)",
i18n("Removes the item with the given index."), 2);
insertAlias(DCOP::removeItem, "removeListItem");
- insert(DCOP::removeRow, "removeRow(QString widget, int row, int count)",
+ insert(DCOP::removeRow, "removeRow(TQString widget, int row, int count)",
i18n("Removes the row (or <i>count</i> consecutive rows) with the given index."), 3);
insertAlias(DCOP::removeItem, "removeListItem");
- insert(DCOP::selection, "selection(QString widget)",
+ insert(DCOP::selection, "selection(TQString widget)",
i18n("Returns selected text or text of current item.\nIn case of Table widgets, returns the selection coordinates, separated by commas in TopRow,LeftColumn,BottomRow,RightColumn form. "), 1);
- insert(DCOP::setAssociatedText, "setAssociatedText(QString widget, QString text)",
+ insert(DCOP::setAssociatedText, "setAssociatedText(TQString widget, TQString text)",
i18n("Sets scripts associated with widget. This is an advanced feature that would not be commonly used."), 2);
- insert(DCOP::setEnabled, "setEnabled(QString widget, bool enabled)",
+ insert(DCOP::setEnabled, "setEnabled(TQString widget, bool enabled)",
i18n("Enables or disables widget."), 2);
insertAlias(DCOP::setEnabled, "enableWidget");
- insert(DCOP::setCellText, "setCellText(QString widget, int row, int col, QString text)",
+ insert(DCOP::setCellText, "setCellText(TQString widget, int row, int col, TQString text)",
i18n("Sets text of a cell in a table."), 4);
- insert(DCOP::setCellWidget, "setCellWidget(QString widget, int row, int col, QString cellWidget)",
+ insert(DCOP::setCellWidget, "setCellWidget(TQString widget, int row, int col, TQString cellWidget)",
i18n("Inserts a widget into a cell of a table."), 4);
- insert(DCOP::cellWidget, "cellWidget(QString widget, int row, int col)",
+ insert(DCOP::cellWidget, "cellWidget(TQString widget, int row, int col)",
i18n("Returns the name of a widget inserted into a cell, or an empty string if the cell contains no widget or an unknown widget type."), 3);
- insert(DCOP::setChecked, "setChecked(QString widget, bool checked)",
+ insert(DCOP::setChecked, "setChecked(TQString widget, bool checked)",
i18n("Sets/unsets checkbox."), 2);
- insert(DCOP::setColumnCaption, "setColumnCaption(QString widget, int column, QString text)",
+ insert(DCOP::setColumnCaption, "setColumnCaption(TQString widget, int column, TQString text)",
i18n("Sets caption of the column <i>column</i>."), 3);
- insert(DCOP::setCurrentItem, "setCurrentItem(QString widget, int index)",
+ insert(DCOP::setCurrentItem, "setCurrentItem(TQString widget, int index)",
i18n("Selects the item at the specified index. Indexes are zero based."), 2);
insertAlias(DCOP::setCurrentItem, "setCurrentTab");
- insert(DCOP::insertTab, "insertTab(QString widget, QString label,int index)",
+ insert(DCOP::insertTab, "insertTab(TQString widget, TQString label,int index)",
i18n("Inserts a tab to the tabwidget with the specified label at the given index. Indexes are zero based."), 3); //enable for 3.5.8
- insert(DCOP::setMaximum, "setMaximum(QString widget, int value)",
+ insert(DCOP::setMaximum, "setMaximum(TQString widget, int value)",
i18n("Sets maximum numeric value"), 2);
- insert(DCOP::setPixmap, "setPixmap(QString widget, QString iconName, int index)",
+ insert(DCOP::setPixmap, "setPixmap(TQString widget, TQString iconName, int index)",
i18n("Sets pixmap at the given index to the specified icon. Use <i>index = -1</i> to set the pixmap for all items."), 3);
- insert(DCOP::setRowCaption, "setRowCaption(QString widget, int row, QString text)",
+ insert(DCOP::setRowCaption, "setRowCaption(TQString widget, int row, TQString text)",
i18n("Sets caption of the row <i>row</i>."), 3);
- insert(DCOP::setSelection, "setSelection(QString widget, QString text)",
+ insert(DCOP::setSelection, "setSelection(TQString widget, TQString text)",
i18n("Selects given text or select item containing given text."), 2);
insertAlias(DCOP::setSelection, "setCurrentListItem");
- insert(DCOP::setText, "setText(QString widget, QString text)",
+ insert(DCOP::setText, "setText(TQString widget, TQString text)",
i18n("Sets widget's content."), 2);
insertAlias(DCOP::setText, "changeWidgetText");
- insert(DCOP::setVisible, "setVisible(QString widget, bool visible)",
+ insert(DCOP::setVisible, "setVisible(TQString widget, bool visible)",
i18n("Shows/hides widget."), 2);
- insert(DCOP::text, "text(QString widget)", i18n("Returns content of widget."), 1);
- insert(DCOP::type, "type(QString widget)",
+ insert(DCOP::text, "text(TQString widget)", i18n("Returns content of widget."), 1);
+ insert(DCOP::type, "type(TQString widget)",
i18n("Returns type(class) of widget."), 1);
- insert(DCOP::setEditable, "setEditable(QString widget, bool editable)",
+ insert(DCOP::setEditable, "setEditable(TQString widget, bool editable)",
i18n("Makes the widget editable or read only, depending on the editable argument."), 2);
- insertInternal(DCOP::geometry, "geometry(QString widget)",
+ insertInternal(DCOP::geometry, "geometry(TQString widget)",
i18n("Return the widget's geometry as <i>x y w h</i>. This is useful for positioning a created widget."), 1);
- insertInternal(DCOP::hasFocus, "hasFocus(QString widget)",
+ insertInternal(DCOP::hasFocus, "hasFocus(TQString widget)",
i18n("Returns true if the widget has focus."), 1);
- insertInternal(DCOP::getBackgroundColor, "getBackgroundColor(QString widget)",
+ insertInternal(DCOP::getBackgroundColor, "getBackgroundColor(TQString widget)",
i18n("Gets the widget's background color."), 1);
- insertInternal(DCOP::setBackgroundColor, "setBackgroundColor(QString widget, QString Color)",
+ insertInternal(DCOP::setBackgroundColor, "setBackgroundColor(TQString widget, TQString Color)",
i18n("Sets the widget's background color. Colors can be by name, like blue, or in hex like #0000ff for blue. Use the color dialog or a color picker if unsure."), 2);
- insertInternal(DCOP::isModified, "isModified(QString widget)",
+ insertInternal(DCOP::isModified, "isModified(TQString widget)",
i18n("See if widget has been modified."), 1);
insertGroup(Group::Slots, i18n("Slots"), "");
@@ -402,53 +402,53 @@ void SpecialInformation::registerSpecials()
0);
insert(Kommander::parentPid, "parentPid",
i18n("Returns the pid of the parent Kommander window."), 0);
- insert(Kommander::debug, "debug(QString text)",
+ insert(Kommander::debug, "debug(TQString text)",
i18n("Writes <i>text</i> on stderr."), 1);
- insert(Kommander::echo, "echo(QString text)",
+ insert(Kommander::echo, "echo(TQString text)",
i18n("Writes <i>text</i> on standard output."), 1);
- insertMacro(Kommander::execBegin, "execBegin(QString shell)",
+ insertMacro(Kommander::execBegin, "execBegin(TQString shell)",
i18n("Executes a script block. Bash is used if no shell is given. It is primarily for use in non-button widgets where script actions are not expected. Full path is not required for the shell which may be useful for portability. <p><i>If this is used inside a button it allows alternate script languages to be used and will return a value to the main script, which may be unexpected.</i>"), 0);
- insert(Kommander::env, "env(QString variable)",
+ insert(Kommander::env, "env(TQString variable)",
i18n("Returns value of an environment (shell) variable. Do not use <i>$</i> in the name. For example, <i>@env(PATH)</i>."), 1);
- insert(Kommander::exec, "exec(QString command)",
+ insert(Kommander::exec, "exec(TQString command)",
i18n("Executes an external shell command."), 1);
- insertInternal(Kommander::execBackground, "execBackground(QString command)",
+ insertInternal(Kommander::execBackground, "execBackground(TQString command)",
i18n("Executes an external shell command."), 1);
- insertMacro(Kommander::expr, "expr(QString expression)",
+ insertMacro(Kommander::expr, "expr(TQString expression)",
i18n("Parses an expression and returns computed value."), 1);
- insert(Kommander::forEachBlock, "forEach(QString variable, QString items)",
+ insert(Kommander::forEachBlock, "forEach(TQString variable, TQString items)",
i18n("Executes loop: values from <i>items</i> list (passed as EOL-separated string) are assigned to the variable. <br><b>Old</b><br> <i>@forEach(i,A\\nB\\nC\\n)<br> @# @i=A<br>@end</i><br><b>New</b><br><i>foreach i in MyArray do<br> //i = key, MyArray[i] = val<br>end "), 2);
- insert(Kommander::forBlock, "for(QString variable, int start, int end, int step)",
+ insert(Kommander::forBlock, "for(TQString variable, int start, int end, int step)",
i18n("Executes loop: variable is set to <i>start</i> and is increased by <i>step</i> each time loop is executed. Execution stops when variable becomes larger then <i>end</i>. <br><b>Old</b><br><i>@for(i,1,10,1)<br> @# @i=1<br>@endif</i><br><b>New</b><br><i>for i=0 to 20 step 5 do<br> debug(i)<br>end</i>."), 3);
- insertMacro(Kommander::global, "global(QString variable)",
+ insertMacro(Kommander::global, "global(TQString variable)",
i18n("Returns the value of a global variable."), 1);
- insert(Kommander::i18n, "i18n(QString variable)",
+ insert(Kommander::i18n, "i18n(TQString variable)",
i18n("Translates the string into the current language. Texts in GUI would be automatically extracted for translation."), 1);
- insert(Kommander::ifBlock, "if(QString expression)",
+ insert(Kommander::ifBlock, "if(TQString expression)",
i18n("Executes block if expression is true (non-zero number or non-empty string.) <p><b>Old</b>Close with <b>@endif</b></p><p><b>New</b><br>if val == true then<br>// do op<br>elseif cond<br>// second chance<br>else<br>// cond failed<br>endif</p>"), 1);
- insert(Kommander::dialog, "dialog(QString file, QString args)",
+ insert(Kommander::dialog, "dialog(TQString file, TQString args)",
i18n("Executes another Kommander dialog. Current dialog directory is used if no path is given. Arguments may be given as named arguments which will become global variables in the new dialog. For instance: <i>var=val</i>"), 1);
- insert(Kommander::readSetting, "readSetting(QString key, QString default)",
+ insert(Kommander::readSetting, "readSetting(TQString key, TQString default)",
i18n("Reads setting from configration file for this dialog."), 2);
- insert(Kommander::setGlobal, "setGlobal(QString variable, QString value)",
+ insert(Kommander::setGlobal, "setGlobal(TQString variable, TQString value)",
i18n("Sets the value of a global variable. Global variables exist for the life of the Kommander window."), 2);
- insert(Kommander::writeSetting, "writeSetting(QString key, QString value)",
+ insert(Kommander::writeSetting, "writeSetting(TQString key, TQString value)",
i18n("Stores setting in configuration file for this dialog."), 2);
- insertMacro(Kommander::switchBlock, "switch(QString expresion)",
+ insertMacro(Kommander::switchBlock, "switch(TQString expresion)",
i18n("Begin of <b>switch</b> block. Following <b>case</b> values are compared to <i>expression</i>.<p>@switch()<br>@case()<br>@end"), 1);
- insert(Kommander::dcop, "dcop(QString id, QString interface, QString function, QString args)",
+ insert(Kommander::dcop, "dcop(TQString id, TQString interface, TQString function, TQString args)",
i18n("Executes an external DCOP call."), 3, 9);
insertMacro(Kommander::comment, "#",
i18n("Adds a comment to EOL that Kommander will not parse"), 0);
- insertInternal(Kommander::createWidget, "createWidget(QString widgetName, QString widgetType, QString parent)",
+ insertInternal(Kommander::createWidget, "createWidget(TQString widgetName, TQString widgetType, TQString parent)",
i18n("Creates a new widget with the specified type and as the child of parent."), 3);
- insertInternal(Kommander::widgetExists, "widgetExists(QString widgetName)",
+ insertInternal(Kommander::widgetExists, "widgetExists(TQString widgetName)",
i18n("Returns true if there is a widget with the passed name, false otherwise."), 1);
- insertInternal(Kommander::connect, "connect(QString sender, QString signal, QString receiver, QString slot)",
+ insertInternal(Kommander::connect, "connect(TQString sender, TQString signal, TQString receiver, TQString slot)",
i18n("Connects the signal of sender with the slot of the receiver"), 4);
- insertInternal(Kommander::disconnect, "disconnect(QString sender, QString signal, QString receiver, QString slot)",
+ insertInternal(Kommander::disconnect, "disconnect(TQString sender, TQString signal, TQString receiver, TQString slot)",
i18n("Disconnects the signal of sender from the slot of the receiver"), 4);
-/* insertInternal(Kommander::switchInternal, "switch(QString Variable)",
+/* insertInternal(Kommander::switchInternal, "switch(TQString Variable)",
i18n("Can use can use <br>switch var<br>case 1<br> //code<br>else<br> //code<br>end<p>also can use the form of <br>switch var {<br>case 1; //code<br>else; code<br>}<p> semicolons are optional in place of returns. Currently switch does not parse value from arrays.") );
*/
insertInternal(Kommander::exit, "exit",
@@ -457,167 +457,167 @@ void SpecialInformation::registerSpecials()
i18n("Exits the current block of a while, for or foreach loop"), 0);
insertInternal(Kommander::Continue, "continue",
i18n("Exit a step and return to the beginning of a loop"), 0);
- insertInternal(Kommander::Return, "return(QString value)",
+ insertInternal(Kommander::Return, "return(TQString value)",
i18n("Return from a script, optionaly with a value from the script to the caller"), 0, 1);
insertGroup(Group::Array, "Array", "array");
- insert(Array::values, "values(QString array)",
+ insert(Array::values, "values(TQString array)",
i18n("Returns an EOL-separated list of all values in the array."), 1);
- insert(Array::keys,"keys(QString array)",
+ insert(Array::keys,"keys(TQString array)",
i18n("Returns an EOL-separated list of all keys in the array."), 1);
- insert(Array::clear,"clear(QString array)",
+ insert(Array::clear,"clear(TQString array)",
i18n("Removes all elements from the array."), 1);
- insert(Array::count,"count(QString array)",
+ insert(Array::count,"count(TQString array)",
i18n("Returns the number of elements in the array."), 1);
- insertMacro(Array::value, "value(QString array, QString key)",
+ insertMacro(Array::value, "value(TQString array, TQString key)",
i18n("Returns the value associated with the given key."), 2);
- insert(Array::remove,"remove(QString array, QString key)",
+ insert(Array::remove,"remove(TQString array, TQString key)",
i18n("Removes element with the given key from the array."), 2);
- insertMacro(Array::setValue,"setValue(QString array, QString key, QString value)",
+ insertMacro(Array::setValue,"setValue(TQString array, TQString key, TQString value)",
i18n("Adds element with the given key and value to the array"), 3);
- insert(Array::fromString, "fromString(QString array, QString string)",
+ insert(Array::fromString, "fromString(TQString array, TQString string)",
i18n("Adds all elements in the string to the array. "
"String should have <i>key\\tvalue\\n</i> format."), 2);
- insert(Array::toString, "toString(QString array)",
+ insert(Array::toString, "toString(TQString array)",
i18n("Returns all elements in the array in <pre>key\\tvalue\\n</pre> format."), 1);
- insertInternal(Array::indexedFromString, "indexedFromString(QString array, QString string, QString separator)",
+ insertInternal(Array::indexedFromString, "indexedFromString(TQString array, TQString string, TQString separator)",
i18n( "Create an integer indexed array - starting from 0 - from a string. Use the separator character to split the string. The separator's default value is '\\t'."), 2, 3);
- insertInternal(Array::indexedToString, "indexedToString(QString array, QString separator)",
+ insertInternal(Array::indexedToString, "indexedToString(TQString array, TQString separator)",
i18n( "Create a string from an integer indexed array. Concatenate the elements with the separator character. The separator's default value is '\\t'."), 1, 2);
- insertInternal(Array::indexedRemoveElements, "indexedRemoveElements(QString array, int keyStart, int keyNum)",
+ insertInternal(Array::indexedRemoveElements, "indexedRemoveElements(TQString array, int keyStart, int keyNum)",
i18n( "Remove keyNum elements starting with keyStart from an indexed array and reindex the array. If keyNum is not specified, remove only the keyStart element."), 2, 3);
- insertInternal(Array::indexedInsertElements, "indexedInsertElements(QString array, int key, QString string, QString separator)",
+ insertInternal(Array::indexedInsertElements, "indexedInsertElements(TQString array, int key, TQString string, TQString separator)",
i18n( "Insert the elements from string starting at key and reindex the array. Use the separator to separate the elements from the string. The separator's default value is '\\t'."), 3, 4);
- insertInternal(Array::flipCopy, "flipCopy(QString Array, QString Copy)",
+ insertInternal(Array::flipCopy, "flipCopy(TQString Array, TQString Copy)",
i18n("Create a flipped copy of the array where the keys and values switch places. NOTE: If the values are not unique they will be overwritten as keys! Set the name of the array to copy to and go. Useful with combos and lists were you have an index, a key and a value for data purposes."), 2, 2);
insertGroup(Group::Matrix, "Matrix", "matrix");
- insertInternal(Matrix::fromString, "fromString(QString matrix, QString String, bool With-Row-Keys, bool With-Col-Keys)",
+ insertInternal(Matrix::fromString, "fromString(TQString matrix, TQString String, bool With-Row-Keys, bool With-Col-Keys)",
i18n("Create a 2D array with zero based integer keys. Rows seperated with returns or \\n and columns with tabs or \\t. You can then read and alter values with \"name[0][1]\".<br><b>NOTE: Watch keys!</b> The row and column keys when set to true will read respectively the first row and first column as headings. If for instance you set one where there is no column or row heading to read it will read data, and if the data is not unique you will have missing columns or rows as well as addressing not working."), 2, 4);
- insertInternal(Matrix::toString, "toString(QString matrix, bool RowHeadings, bool ColHeadings)",
+ insertInternal(Matrix::toString, "toString(TQString matrix, bool RowHeadings, bool ColHeadings)",
i18n("Convert 2D array to string, optionaly with row and column headings. If written without values set it will default to no headings."), 1, 3);
- insertInternal(Matrix::rows, "rows(QString matrix)",
+ insertInternal(Matrix::rows, "rows(TQString matrix)",
i18n("Return the number of rows in the matrix"), 1);
- insertInternal(Matrix::columns, "columns(QString matrix)",
+ insertInternal(Matrix::columns, "columns(TQString matrix)",
i18n("Return the number of columns in the matrix"), 1);
- insertInternal(Matrix::clear, "clear(QString matrix)",
+ insertInternal(Matrix::clear, "clear(TQString matrix)",
i18n("Clear the entire matrix"), 1);
- insertInternal(Matrix::rowToArray, "rowToArray(QString matrix, QString Row, QString Array, bool Clear-First, bool Indexed)",
+ insertInternal(Matrix::rowToArray, "rowToArray(TQString matrix, TQString Row, TQString Array, bool Clear-First, bool Indexed)",
i18n("Convert row to array. Useful break out rows of data to work with. If you want to avoid spurious data Clear-First will wipe the array before filling it. If you choose indexed it will use a zero based index. Otherwise it will use the column keys."), 3, 5);
- insertInternal(Matrix::columnToArray, "columnToArray(QString matrix, QString Column, QString Array)",
+ insertInternal(Matrix::columnToArray, "columnToArray(TQString matrix, TQString Column, TQString Array)",
i18n("Copy a column of a Matrix to an array and optionally clear array first to avoid spurious data in loops"), 3);
- insertInternal(Matrix::columnToIndexedArray, "columnToIndexedArray(QString matrix, QString Column, QString Array)",
+ insertInternal(Matrix::columnToIndexedArray, "columnToIndexedArray(TQString matrix, TQString Column, TQString Array)",
i18n("Copy a column of a Matrix to an indexed array"), 3);
- insertInternal(Matrix::rowKeys, "rowKeys(QString Matrix, QString Seperator)",
+ insertInternal(Matrix::rowKeys, "rowKeys(TQString Matrix, TQString Seperator)",
i18n("Return the row keys from the matrix. Separator defaults to [tab] \"\\t\" if left empty"), 1, 2);
- insertInternal(Matrix::columnKeys, "columnKeys(QString Matrix, QString Seperator)",
+ insertInternal(Matrix::columnKeys, "columnKeys(TQString Matrix, TQString Seperator)",
i18n("Return the column keys from the matrix. Separator defaults to [tab] \"\\t\" if left empty"), 1, 2);
- insertInternal(Matrix::addRow, "addRow(QString Matrix, QString RowKey, QString data)",
+ insertInternal(Matrix::addRow, "addRow(TQString Matrix, TQString RowKey, TQString data)",
i18n("Add a row to the matrix. Specifiy the row key and format the data as column key [tab] column value on each line using key\\tval\\nkey\\tval format"), 3);
- insertInternal(Matrix::removeRow, "removeRow(QString Matrix, QString RowKey)",
+ insertInternal(Matrix::removeRow, "removeRow(TQString Matrix, TQString RowKey)",
i18n("Remove a row from the matrix by key name. Returns true if key is found."), 2);
- insertInternal(Matrix::removeColumn, "removeColumn(QString Matrix, QString ColKey)",
+ insertInternal(Matrix::removeColumn, "removeColumn(TQString Matrix, TQString ColKey)",
i18n("Remove a column from the matrix by key name. Returns true if key is found."), 2);
- insertInternal(Matrix::findRow, "findRow(QString Matrix, QString Col-Key, QString Col-Value, int Iteration)",
+ insertInternal(Matrix::findRow, "findRow(TQString Matrix, TQString Col-Key, TQString Col-Value, int Iteration)",
i18n("Find the row key that matches a column value. Use this for unique key searches. Iteration may be omitted and the default is to return the first instance. In a loop it will return sequential finds until there are no more, in which case it returns null."), 3, 4);
insertGroup(Group::String, "String", "str");
- insert(String::length, "length(QString string)",
+ insert(String::length, "length(TQString string)",
i18n("Returns number of chars in the string."), 1);
- insert(String::contains, "contains(QString string, QString substring)",
+ insert(String::contains, "contains(TQString string, TQString substring)",
i18n("Checks if the the string contains the given substring."), 2);
- insert(String::find, "find(QString string, QString sought, int index)",
+ insert(String::find, "find(TQString string, TQString sought, int index)",
i18n("Returns the position of a substring in the string, or -1 if it is not found."), 2);
- insert(String::findRev, "findRev(QString string, QString sought, int index)",
+ insert(String::findRev, "findRev(TQString string, TQString sought, int index)",
i18n("Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards"), 2);
- insertInternal(String::count, "count(QString String, QString substring)",
+ insertInternal(String::count, "count(TQString String, TQString substring)",
i18n("Returns the count of a given substring in the given string."), 2);
- insert(String::left, "left(QString string, int n)",
+ insert(String::left, "left(TQString string, int n)",
i18n("Returns the first <i>n</i> chars of the string."), 2);
- insert(String::right, "right(QString string, int n)",
+ insert(String::right, "right(TQString string, int n)",
i18n("Returns the last <i>n</i> chars of the string."), 2);
- insert(String::mid, "mid(QString string, int start, int n)",
+ insert(String::mid, "mid(TQString string, int start, int n)",
i18n("Returns <i>n</i> chars of the string, starting from <i>start</i>."), 3);
- insert(String::remove, "remove(QString string, QString substring)",
+ insert(String::remove, "remove(TQString string, TQString substring)",
i18n("Removes all occurrences of given substring."), 2);
- insert(String::replace, "replace(QString string, QString substring, QString replacement)",
+ insert(String::replace, "replace(TQString string, TQString substring, TQString replacement)",
i18n("Replaces all occurrences of the given substring with the given replacement."), 3);
- insert(String::upper, "upper(QString string)",
+ insert(String::upper, "upper(TQString string)",
i18n("Converts the string to uppercase."), 1);
- insert(String::lower, "lower(QString string)",
+ insert(String::lower, "lower(TQString string)",
i18n("Converts the string to lowercase."), 1);
- insert(String::compare, "compare(QString string1, QString string2)",
+ insert(String::compare, "compare(TQString string1, TQString string2)",
i18n("Compares two strings. Returns 0 if they are equal, "
"-1 if the first one is lower, 1 if the first one is higher"), 2);
- insert(String::isEmpty, "isEmpty(QString string)",
+ insert(String::isEmpty, "isEmpty(TQString string)",
i18n("Checks if the string is empty."), 1);
- insert(String::isNumber, "isNumber(QString string)",
+ insert(String::isNumber, "isNumber(TQString string)",
i18n("Checks if the string is a valid number."), 1);
- insert(String::section, "section(QString string, QString separator, int index)",
+ insert(String::section, "section(TQString string, TQString separator, int index)",
i18n("Returns given section of a string."), 1);
- insert(String::args, "args(QString string, QString arg1, QString arg2, QString arg3)",
+ insert(String::args, "args(TQString string, TQString arg1, TQString arg2, TQString arg3)",
i18n("Returns the given string with %1, %2, %3 replaced with <i>arg1</i>, <i>arg2</i>, <i>arg3</i> accordingly."), 2);
- insert(String::round, "round(QString Number, int Digits)",
+ insert(String::round, "round(TQString Number, int Digits)",
i18n("Round a floating point number by x digits."), 2);
- insertInternal(String::sort, "sort(QString String, QString Separator)",
+ insertInternal(String::sort, "sort(TQString String, TQString Separator)",
i18n("Sort a string list. Only first paramter is required. Default separator is a newline."), 1, 2);
- insertInternal(String::trim, "trim(QString String)",
+ insertInternal(String::trim, "trim(TQString String)",
i18n("Strips white space from beginning and end of string."), 1);
- insertInternal(String::padLeft, "padLeft(QString String, int Length, QString Pad)",
+ insertInternal(String::padLeft, "padLeft(TQString String, int Length, TQString Pad)",
i18n("Pads the string to the total length indicated. if no pad character is given spaces will be used. Try this with 0 on integer sequences and read them with str_toint."), 1, 2);
- insertInternal(String::padRight, "padRight(QString String, int Length, QString Pad)",
+ insertInternal(String::padRight, "padRight(TQString String, int Length, TQString Pad)",
i18n("Pads the string to the total length indicated. if no pad character is given spaces will be used."), 1, 2);
- insertInternal(String::toInt, "toint(QString string, QString default)",
+ insertInternal(String::toInt, "toint(TQString string, TQString default)",
i18n("Convert a string to an integer. If not possible use the default value"), 1, 2);
- insertInternal(String::toDouble, "todouble(QString string, QString default)",
+ insertInternal(String::toDouble, "todouble(TQString string, TQString default)",
i18n("Convert a string to a double precision floating point value. If not possible use the default value"), 1, 2);
insertGroup(Group::File, "File", "file");
- insert(File::read, "read(QString file)",
+ insert(File::read, "read(TQString file)",
i18n("Returns content of given file."), 1);
- insert(File::write, "write(QString file, QString string)",
+ insert(File::write, "write(TQString file, TQString string)",
i18n("Writes given string to a file."), 2);
- insert(File::append, "append(QString file, QString string)",
+ insert(File::append, "append(TQString file, TQString string)",
i18n("Appends given string to the end of a file."), 2);
- insert(File::exists, "exists(QString file)",
+ insert(File::exists, "exists(TQString file)",
i18n("Checks to see if file exists."), 1);
insertGroup(Group::Input, "Input", "input");
- insert(Input::color, "color(QString defaultColor)", i18n("Shows color dialog. Returns color in #RRGGBB format. Defaults to the parameter, if specified."), 0, 1);
- insert(Input::text, "text(QString caption, QString label, QString default)",
+ insert(Input::color, "color(TQString defaultColor)", i18n("Shows color dialog. Returns color in #RRGGBB format. Defaults to the parameter, if specified."), 0, 1);
+ insert(Input::text, "text(TQString caption, TQString label, TQString default)",
i18n("Shows text selection dialog. Returns entered text."), 2);
- insert(Input::password, "password(QString caption, QString password)",
+ insert(Input::password, "password(TQString caption, TQString password)",
i18n("Shows a dialog asking user for password and returns it."), 1);
- insert(Input::value, "value(QString caption, QString label, int value, int min, int max, int step)",
+ insert(Input::value, "value(TQString caption, TQString label, int value, int min, int max, int step)",
i18n("Shows value selection dialog. Returns entered value."), 5);
- insert(Input::valueDouble, "double(QString caption, QString label, double value, double min, double max, double step)",
+ insert(Input::valueDouble, "double(TQString caption, TQString label, double value, double min, double max, double step)",
i18n("Shows float value selection dialog. Returns entered value."), 6);
- insert(Input::openfile, "openfile(QString startdir, QString filter, QString caption)",
+ insert(Input::openfile, "openfile(TQString startdir, TQString filter, TQString caption)",
i18n("Shows existing file selection dialog. Returns selected file."), 0);
- insert(Input::savefile, "savefile(QString startdir, QString filter, QString caption)",
+ insert(Input::savefile, "savefile(TQString startdir, TQString filter, TQString caption)",
i18n("Shows save file selection dialog. Returns selected file."), 0);
- insert(Input::directory, "directory(QString startdir, QString filter, QString caption)",
+ insert(Input::directory, "directory(TQString startdir, TQString filter, TQString caption)",
i18n("Shows directory selection dialog. Returns selected directory."), 0);
- insert(Input::openfiles, "openfiles(QString startdir, QString filter, QString caption)",
+ insert(Input::openfiles, "openfiles(TQString startdir, TQString filter, TQString caption)",
i18n("Shows multiple files selection dialog. Returns EOL-separated list of selected files."), 0);
insertGroup(Group::Message, "Message", "message");
- insert(Message::info, "info(QString text, QString caption)",
+ insert(Message::info, "info(TQString text, TQString caption)",
i18n("Shows an information dialog. Returns true when clicked so you can check for user response."), 1);
- insert(Message::error, "error(QString text, QString caption)",
+ insert(Message::error, "error(TQString text, TQString caption)",
i18n("Shows an error dialog. Returns true when clicked so you can check for user response."), 1);
- insert(Message::warning, "warning(QString text, QString caption, QString button1, QString button2, QString button3)",
+ insert(Message::warning, "warning(TQString text, TQString caption, TQString button1, TQString button2, TQString button3)",
i18n("Shows a warning dialog with up to three buttons. Returns number of selected button."), 1);
- insert(Message::question, "question(QString text, QString caption, QString button1, QString button2, QString button3)",
+ insert(Message::question, "question(TQString text, TQString caption, TQString button1, TQString button2, TQString button3)",
i18n("Shows a question dialog with up to three buttons. Returns number of selected button."), 1);
}
-QMap<int, QMap<int, SpecialFunction> > SpecialInformation::m_specials;
-QMap<QString, int> SpecialInformation::m_groups;
-QMap<QString, QString> SpecialInformation::m_parserGroups;
-QMap<int, QMap<QString, int> > SpecialInformation::m_functions;
-QMap<int, QMap<QString, int> > SpecialInformation::m_aliases;
+TQMap<int, TQMap<int, SpecialFunction> > SpecialInformation::m_specials;
+TQMap<TQString, int> SpecialInformation::m_groups;
+TQMap<TQString, TQString> SpecialInformation::m_parserGroups;
+TQMap<int, TQMap<TQString, int> > SpecialInformation::m_functions;
+TQMap<int, TQMap<TQString, int> > SpecialInformation::m_aliases;
int SpecialInformation::m_defaultGroup;
diff --git a/kommander/plugin/specialinformation.h b/kommander/plugin/specialinformation.h
index 20b6ea04..fa898620 100644
--- a/kommander/plugin/specialinformation.h
+++ b/kommander/plugin/specialinformation.h
@@ -18,10 +18,10 @@
#define _HAVE_SPECIALINFORMATION_H_
/* QT INCLUDES */
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqpair.h>
class SpecialFunction
{
@@ -35,10 +35,10 @@ public:
enum PrototypeFlags {SkipFirstArgument = 1, ShowArgumentNames = 2, NoSpaces = 4};
/* Flags describing which parser supports the function */
enum ParserType {MacroParser = 1, InternalParser = 2, AllParsers = 3};
- SpecialFunction(const QString& function, const QString& description
- = QString::null, int minArgs = -1, int maxArgs = -1);
- SpecialFunction(ParserType p, const QString& function, const QString& description
- = QString::null, int minArgs = -1, int maxArgs = -1);
+ SpecialFunction(const TQString& function, const TQString& description
+ = TQString::null, int minArgs = -1, int maxArgs = -1);
+ SpecialFunction(ParserType p, const TQString& function, const TQString& description
+ = TQString::null, int minArgs = -1, int maxArgs = -1);
SpecialFunction() {m_minArgs = m_maxArgs = 0;}
/* minimum number of arguments */
int minArg() const {return m_minArgs;}
@@ -47,25 +47,25 @@ public:
/* checks number of arguments */
bool isValidArg(int args) const {return args >= minArg() && args <= maxArg();}
/* function description */
- QString description() const {return m_description;}
+ TQString description() const {return m_description;}
/* function name */
- QString name() const {return m_function;}
+ TQString name() const {return m_function;}
/* function prototype: with parameter types and optional names */
- QString prototype(uint prototypeFlags = 0) const;
+ TQString prototype(uint prototypeFlags = 0) const;
/* i-th parameter name */
- QString argumentName(uint i) const;
+ TQString argumentName(uint i) const;
/* i-th parameter type */
- QString argumentType(uint i) const;
+ TQString argumentType(uint i) const;
/* number of named arguments */
int argumentCount() const;
/* check whether given parser supports the function */
bool isSupported(ParserType p) const;
protected:
- QString m_function;
- QString m_description;
+ TQString m_function;
+ TQString m_description;
int m_minArgs, m_maxArgs;
- QStringList m_args;
- QStringList m_types;
+ TQStringList m_args;
+ TQStringList m_types;
unsigned m_parserTypes;
};
@@ -76,41 +76,41 @@ class SpecialInformation
{
public:
SpecialInformation() {m_defaultGroup = -1;}
- static int function(int group, const QString& fname);
- static SpecialFunction functionObject(const QString& gname, const QString& fname);
- static int group(const QString& gname);
+ static int function(int group, const TQString& fname);
+ static SpecialFunction functionObject(const TQString& gname, const TQString& fname);
+ static int group(const TQString& gname);
static bool isValid(int gname, int fname);
- static bool isValid(const QString& gname, const QString& fname);
+ static bool isValid(const TQString& gname, const TQString& fname);
static bool isValid(int gname, int fname, SpecialFunction::ParserType p);
- static bool isValid(const QString& gname, const QString& fname, SpecialFunction::ParserType p);
+ static bool isValid(const TQString& gname, const TQString& fname, SpecialFunction::ParserType p);
static int minArg(int gname, int fname);
static int maxArg(int gname, int fname);
static int argCount(int gname, int fname);
static bool isValidArg(int gname, int fname, int args);
- static QString description(int gname, int fname);
- static QString prototype(int gname, int fname, uint prototypeFlags = 0);
+ static TQString description(int gname, int fname);
+ static TQString prototype(int gname, int fname, uint prototypeFlags = 0);
/* Insert function supported by all parsers */
- static bool insert(int id, const QString& function, const QString description = QString::null,
+ static bool insert(int id, const TQString& function, const TQString description = TQString::null,
int minArgs = -1, int maxArgs = -1, SpecialFunction::ParserType = SpecialFunction::AllParsers);
/* Insert function supported by (old) macro parser */
- static bool insertMacro(int id, const QString& function, const QString description = QString::null,
+ static bool insertMacro(int id, const TQString& function, const TQString description = TQString::null,
int minArgs = -1, int maxArgs = -1);
/* Insert function supported by (new) internal parser */
- static bool insertInternal(int id, const QString& function, const QString description = QString::null,
+ static bool insertInternal(int id, const TQString& function, const TQString description = TQString::null,
int minArgs = -1, int maxArgs = -1);
- static bool insertAlias(int id, const QString& alias);
- static void insertGroup(int id, const QString& name, const QString& parserName);
+ static bool insertAlias(int id, const TQString& alias);
+ static void insertGroup(int id, const TQString& name, const TQString& parserName);
static void setDefaultGroup(int gname);
static void registerSpecials();
- static QString parserGroupName(const QString&);
- static QStringList groups();
- static QStringList functions(const QString& group);
+ static TQString parserGroupName(const TQString&);
+ static TQStringList groups();
+ static TQStringList functions(const TQString& group);
protected:
- static QMap<int, QMap<int, SpecialFunction> > m_specials;
- static QMap<QString, int> m_groups;
- static QMap<QString, QString> m_parserGroups;
- static QMap<int, QMap<QString, int> > m_functions;
- static QMap<int, QMap<QString, int> > m_aliases;
+ static TQMap<int, TQMap<int, SpecialFunction> > m_specials;
+ static TQMap<TQString, int> m_groups;
+ static TQMap<TQString, TQString> m_parserGroups;
+ static TQMap<int, TQMap<TQString, int> > m_functions;
+ static TQMap<int, TQMap<TQString, int> > m_aliases;
static int m_defaultGroup;
};
diff --git a/kommander/pluginmanager/main.cpp b/kommander/pluginmanager/main.cpp
index cdbf9cd5..74561925 100644
--- a/kommander/pluginmanager/main.cpp
+++ b/kommander/pluginmanager/main.cpp
@@ -20,12 +20,12 @@
#include <kaboutdata.h>
#include <klocale.h>
#include <kurl.h>
-#include <qapplication.h>
-#include <qobject.h>
+#include <tqapplication.h>
+#include <tqobject.h>
#include <kapplication.h>
/* QT INCLUDES */
-#include <qstringlist.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include "pluginmanager.h"
@@ -86,8 +86,8 @@ int main(int argc, char *argv[])
if (args->isSet("list"))
{
- QStringList plugins = P.items();
- for (QStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
+ TQStringList plugins = P.items();
+ for (TQStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
cout << (*it).local8Bit() << "\n";
}
}
diff --git a/kommander/pluginmanager/mainwindow.cpp b/kommander/pluginmanager/mainwindow.cpp
index 4cc67d62..94d365f5 100644
--- a/kommander/pluginmanager/mainwindow.cpp
+++ b/kommander/pluginmanager/mainwindow.cpp
@@ -28,14 +28,14 @@
#include <kglobal.h>
#include <kstandarddirs.h>
-MainWindow::MainWindow( QWidget* parent, const char *name, WFlags f )
+MainWindow::MainWindow( TQWidget* parent, const char *name, WFlags f )
: KMainWindow( parent, name, f )
{
KToolBar *toolBar = new KToolBar( this );
toolBar->insertButton("fileopen", Add, true, i18n("Add") );
toolBar->insertButton("no", Remove, true, i18n("Remove") );
toolBar->insertButton("reload", Refresh, true, i18n("Refresh") );
- connect( toolBar, SIGNAL(clicked(int)), this, SLOT(toolButton(int)) );
+ connect( toolBar, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(toolButton(int)) );
m_list = new KListBox( this );
setCentralWidget(m_list);
@@ -67,17 +67,17 @@ void MainWindow::toolButton( int id )
void MainWindow::add()
{
- QString libDir = KGlobal::dirs()->findResourceDir("lib", "libkommanderplugin");
- QString plugin = KFileDialog::getOpenFileName(libDir, "lib*", this,
+ TQString libDir = KGlobal::dirs()->findResourceDir("lib", "libkommanderplugin");
+ TQString plugin = KFileDialog::getOpenFileName(libDir, "lib*", this,
i18n("Add Kommander Plugin"));
add(plugin);
}
-void MainWindow::add(const QString &plugin)
+void MainWindow::add(const TQString &plugin)
{
if (!m_pluginManager->add(plugin))
{
- QString errMsg = i18n("<qt>Unable to load Kommander plugin<br><b>%1</b></qt>").arg(plugin);
+ TQString errMsg = i18n("<qt>Unable to load Kommander plugin<br><b>%1</b></qt>").arg(plugin);
KMessageBox::error(this, errMsg, i18n("Cannot add plugin"));
}
else
@@ -86,7 +86,7 @@ void MainWindow::add(const QString &plugin)
void MainWindow::remove()
{
- QString plugin = m_list->currentText();
+ TQString plugin = m_list->currentText();
if (m_pluginManager->remove(plugin))
refresh();
}
diff --git a/kommander/pluginmanager/mainwindow.h b/kommander/pluginmanager/mainwindow.h
index addf1a5f..c774832f 100644
--- a/kommander/pluginmanager/mainwindow.h
+++ b/kommander/pluginmanager/mainwindow.h
@@ -27,7 +27,7 @@ class MainWindow : public KMainWindow
{
Q_OBJECT
public:
- MainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ MainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
~MainWindow();
protected slots:
@@ -38,7 +38,7 @@ protected slots:
// Show dialogbox for selecting plugin, then add it
void add();
// Add given plugin if is not added yet
- void add( const QString &plugin );
+ void add( const TQString &plugin );
// Check whether installed plugins are valid
void verify();
private:
diff --git a/kommander/pluginmanager/pluginmanager.cpp b/kommander/pluginmanager/pluginmanager.cpp
index e9301b26..79da4d81 100644
--- a/kommander/pluginmanager/pluginmanager.cpp
+++ b/kommander/pluginmanager/pluginmanager.cpp
@@ -22,7 +22,7 @@
PluginManager::PluginManager()
{
m_cfg = new KConfig("kommanderrc");
- m_list = new QStringList(m_cfg->readListEntry("plugins"));
+ m_list = new TQStringList(m_cfg->readListEntry("plugins"));
}
PluginManager::~PluginManager()
@@ -37,14 +37,14 @@ int PluginManager::count() const
return m_list->count();
}
-QString PluginManager::item(int i) const
+TQString PluginManager::item(int i) const
{
return (*m_list)[i];
}
-bool PluginManager::add(const QString& plugin, bool)
+bool PluginManager::add(const TQString& plugin, bool)
{
- QString plugName= libraryName(plugin);
+ TQString plugName= libraryName(plugin);
if (plugName.isNull())
return false;
if (m_list->contains(plugName))
@@ -53,7 +53,7 @@ bool PluginManager::add(const QString& plugin, bool)
return true;
}
-bool PluginManager::remove(const QString& plugin)
+bool PluginManager::remove(const TQString& plugin)
{
if (!m_list->contains(plugin))
return false;
@@ -63,8 +63,8 @@ bool PluginManager::remove(const QString& plugin)
int PluginManager::verify()
{
- QStringList verified;
- for (QStringList::ConstIterator it = m_list->begin(); it != m_list->end(); ++it)
+ TQStringList verified;
+ for (TQStringList::ConstIterator it = m_list->begin(); it != m_list->end(); ++it)
if (!libraryName(*it).isNull())
verified.append(*it);
int removed = count() - verified.count();
@@ -73,16 +73,16 @@ int PluginManager::verify()
return removed;
}
-QString PluginManager::libraryName(const QString& plugin) const
+TQString PluginManager::libraryName(const TQString& plugin) const
{
KLibrary *l = KLibLoader::self()->library(plugin.latin1());
- QString libname;
+ TQString libname;
if (l && l->hasSymbol("kommander_plugin"))
libname = l->fileName();
return libname;
}
-QStringList PluginManager::items() const
+TQStringList PluginManager::items() const
{
return (*m_list);
}
diff --git a/kommander/pluginmanager/pluginmanager.h b/kommander/pluginmanager/pluginmanager.h
index 0c7c79b7..10bcc183 100644
--- a/kommander/pluginmanager/pluginmanager.h
+++ b/kommander/pluginmanager/pluginmanager.h
@@ -17,7 +17,7 @@
#ifndef __HAVE_PLUGINMANAGER_H
#define __HAVE_PLUGINMANAGER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KConfig;
@@ -30,21 +30,21 @@ public:
// number of known plugins
int count() const;
// n-th plugin
- QString item(int i) const;
+ TQString item(int i) const;
// adds a plugin if valid;
// FIXME: if overwrite is true, plugin with the same base name will be removed
- bool add(const QString& plugin, bool overwrite = true);
+ bool add(const TQString& plugin, bool overwrite = true);
// removes given plugin
- bool remove(const QString& plugin);
+ bool remove(const TQString& plugin);
// remove invalid plugins, returns number of removed plugins
int verify();
// list of plugins
- QStringList items() const;
+ TQStringList items() const;
private:
// returns expanded library name or null if it is invalid
- QString libraryName(const QString& plugin) const;
+ TQString libraryName(const TQString& plugin) const;
- QStringList* m_list;
+ TQStringList* m_list;
KConfig *m_cfg;
};
diff --git a/kommander/widget/expression.cpp b/kommander/widget/expression.cpp
index 88d46b51..d29d94e8 100644
--- a/kommander/widget/expression.cpp
+++ b/kommander/widget/expression.cpp
@@ -22,17 +22,17 @@ Expression::Expression() : m_start(0), m_error(false)
{
}
-Expression::Expression(const QString& expr)
+Expression::Expression(const TQString& expr)
{
*this = expr;
}
-Expression& Expression::operator=(const QString& s)
+Expression& Expression::operator=(const TQString& s)
{
m_start = 0;
m_error = false;
m_parts.clear();
- const QString single = "()<>!+-/*%";
+ const TQString single = "()<>!+-/*%";
int start = 0;
int len = s.length();
int i = 0;
@@ -41,30 +41,30 @@ Expression& Expression::operator=(const QString& s)
if (((s[i] == '>' || s[i] == '<' || s[i] == '=' || s[i] == '!') &&
s[i + 1] == '=') || (s[i] == '<' && s[i + 1] == '>'))
{
- m_parts.append(QVariant(s.mid(i, 2)));
+ m_parts.append(TQVariant(s.mid(i, 2)));
i += 2;
} else if (s[i].isDigit())
{
i++;
bool decimal = false;
- while (i < len && (s[i].isDigit() || (!decimal && s[i] == QChar('.'))))
+ while (i < len && (s[i].isDigit() || (!decimal && s[i] == TQChar('.'))))
{
if (s[i] == '.')
decimal = true;
i++;
}
if (decimal)
- m_parts.append(QVariant(s.mid(start, i - start).toDouble()));
+ m_parts.append(TQVariant(s.mid(start, i - start).toDouble()));
else
- m_parts.append(QVariant(s.mid(start, i - start).toInt()));
+ m_parts.append(TQVariant(s.mid(start, i - start).toInt()));
} else if (single.contains(s[i]))
- m_parts.append(QVariant(QString(s[i++])));
+ m_parts.append(TQVariant(TQString(s[i++])));
else if (s[i] == '\"')
{
i++;
while (i < len && s[i] != '\"')
i++;
- m_parts.append(QVariant(s.mid(start + 1, i - start - 1)));
+ m_parts.append(TQVariant(s.mid(start + 1, i - start - 1)));
i++;
} else if (s[i].isSpace())
while (i < len && s[i].isSpace())
@@ -73,25 +73,25 @@ Expression& Expression::operator=(const QString& s)
{
while (i < len && !s[i].isSpace())
i++;
- QString keyword = s.mid(start, i - start);
+ TQString keyword = s.mid(start, i - start);
if (keyword == "true")
- m_parts.append(QVariant(true));
+ m_parts.append(TQVariant(true));
else if (keyword == "false")
- m_parts.append(QVariant(false));
+ m_parts.append(TQVariant(false));
else /* will be deprecated soon */
- m_parts.append(QVariant(keyword));
+ m_parts.append(TQVariant(keyword));
}
start = i;
}
return *this;
}
-QString Expression::next() const
+TQString Expression::next() const
{
if (m_start < m_parts.count())
return m_parts[m_start].toString();
else
- return QString();
+ return TQString();
}
bool Expression::validate()
@@ -100,11 +100,11 @@ bool Expression::validate()
setError();
return !m_error;
}
-Expression::Type Expression::commonType(const QVariant v1, const QVariant v2) const
+Expression::Type Expression::commonType(const TQVariant v1, const TQVariant v2) const
{
- if (v1.type() == QVariant::String || v2.type() == QVariant::String)
+ if (v1.type() == TQVariant::String || v2.type() == TQVariant::String)
return TypeString;
- else if (v1.type() == QVariant::Double || v2.type() == QVariant::Double)
+ else if (v1.type() == TQVariant::Double || v2.type() == TQVariant::Double)
return TypeDouble;
return TypeInt;
}
@@ -115,7 +115,7 @@ static int expression_compareDouble(const double A, const double B)
}
-int Expression::compare(const QVariant v1, const QVariant v2) const
+int Expression::compare(const TQVariant v1, const TQVariant v2) const
{
switch (commonType(v1, v2)) {
case TypeString: return v1.toString().compare(v2.toString());
@@ -132,22 +132,22 @@ void Expression::setError(int pos)
m_error = true;
}
-QVariant Expression::parseNumber()
+TQVariant Expression::parseNumber()
{
if (!validate())
return -1;
return m_parts[m_start++];
}
-QVariant Expression::parseMinus()
+TQVariant Expression::parseMinus()
{
if (!validate()) return -1;
bool sign = next() == "-";
if (sign)
{
m_start++;
- QVariant value = parseNumber();
- if (value.type() == QVariant::Double)
+ TQVariant value = parseNumber();
+ if (value.type() == TQVariant::Double)
return -value.toDouble();
else
return -value.toInt();
@@ -158,13 +158,13 @@ QVariant Expression::parseMinus()
-QVariant Expression::parseBracket()
+TQVariant Expression::parseBracket()
{
if (!validate()) return -1;
if (next() == "(")
{
m_start++;
- QVariant value = parse();
+ TQVariant value = parse();
if (next() == ")")
m_start++;
else
@@ -176,15 +176,15 @@ QVariant Expression::parseBracket()
}
-QVariant Expression::parseMultiply()
+TQVariant Expression::parseMultiply()
{
if (!validate()) return -1;
- QVariant value = parseBracket();
- QString op = next();
+ TQVariant value = parseBracket();
+ TQString op = next();
while (op == "*" || op == "/" || op == "%")
{
m_start++;
- QVariant value2 = parseBracket();
+ TQVariant value2 = parseBracket();
Type mode = commonType(value, value2);
if (op == "*")
{
@@ -216,15 +216,15 @@ QVariant Expression::parseMultiply()
return value;
}
-QVariant Expression::parseAdd()
+TQVariant Expression::parseAdd()
{
if (!validate()) return -1;
- QVariant value = parseMultiply();
- QString op = next();
+ TQVariant value = parseMultiply();
+ TQString op = next();
while (op == "+" || op == "-")
{
m_start++;
- QVariant value2 = parseMultiply();
+ TQVariant value2 = parseMultiply();
Type mode = commonType(value, value2);
if (op == "+")
if (mode == TypeDouble)
@@ -241,15 +241,15 @@ QVariant Expression::parseAdd()
return value;
}
-QVariant Expression::parseComparison()
+TQVariant Expression::parseComparison()
{
if (!validate()) return -1;
- QVariant value = parseAdd();
- QString cmp = next();
+ TQVariant value = parseAdd();
+ TQString cmp = next();
if (cmp == "<" || cmp == "<=" || cmp == "==" || cmp == ">=" || cmp == ">" || cmp == "<>" || cmp == "!=")
{
m_start++;
- QVariant value2 = parseAdd();
+ TQVariant value2 = parseAdd();
if (cmp == "<")
return compare(value, value2) < 0;
else if (cmp == "<=")
@@ -266,7 +266,7 @@ QVariant Expression::parseComparison()
return value;
}
-QVariant Expression::parseNot()
+TQVariant Expression::parseNot()
{
if (next() == "!" || next() == "not")
{
@@ -277,10 +277,10 @@ QVariant Expression::parseNot()
return parseComparison();
}
-QVariant Expression::parseAnd()
+TQVariant Expression::parseAnd()
{
if (!validate()) return -1;
- QVariant value = parseNot();
+ TQVariant value = parseNot();
while (next() == "&&" || next() == "and")
{
m_start++;
@@ -290,10 +290,10 @@ QVariant Expression::parseAnd()
return value;
}
-QVariant Expression::parseOr()
+TQVariant Expression::parseOr()
{
if (!validate()) return -1;
- QVariant value = parseAnd();
+ TQVariant value = parseAnd();
while (next() == "||" || next() == "or")
{
m_start++;
@@ -302,31 +302,31 @@ QVariant Expression::parseOr()
return value;
}
-QVariant Expression::parse()
+TQVariant Expression::parse()
{
return parseOr();
}
-QVariant Expression::value(bool* valid)
+TQVariant Expression::value(bool* valid)
{
m_start = 0;
m_error = false;
- QVariant val = parse();
+ TQVariant val = parse();
if (valid)
*valid = !m_error && m_start == m_parts.count();
return val;
}
-QVariant Expression::value(const QString& s, bool* valid)
+TQVariant Expression::value(const TQString& s, bool* valid)
{
*this = s;
return value(valid);
}
-bool Expression::isTrue(const QString& s, bool* valid)
+bool Expression::isTrue(const TQString& s, bool* valid)
{
- QVariant v = value(s, valid);
- return (v.type() == QVariant::String && !v.toString().isNull()) ||
- (v.type() != QVariant::String && v.toInt() != 0);
+ TQVariant v = value(s, valid);
+ return (v.type() == TQVariant::String && !v.toString().isNull()) ||
+ (v.type() != TQVariant::String && v.toInt() != 0);
}
diff --git a/kommander/widget/expression.h b/kommander/widget/expression.h
index 7ab163e2..2302ba46 100644
--- a/kommander/widget/expression.h
+++ b/kommander/widget/expression.h
@@ -17,59 +17,59 @@
#ifndef _HAVE_EXPRESSION_H_
#define _HAVE_EXPRESSION_H_
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
class Expression
{
public:
Expression();
- Expression(const QString& expr);
+ Expression(const TQString& expr);
/* set string to parse */
- Expression& operator=(const QString& s);
+ Expression& operator=(const TQString& s);
/* calculate value */
- QVariant value(bool* valid = 0);
+ TQVariant value(bool* valid = 0);
/* equivalent of setString(s) and value(valid) */
- QVariant value(const QString& s, bool* valid = 0);
+ TQVariant value(const TQString& s, bool* valid = 0);
/* equivalent of setString(s) and checking if value(valid) is true */
- bool isTrue(const QString& s, bool* valid = 0);
+ bool isTrue(const TQString& s, bool* valid = 0);
private:
enum Type {TypeInt, TypeDouble, TypeString};
/* parsing function - top-down approach */
/* parse terminal (number or string) */
- QVariant parseNumber();
+ TQVariant parseNumber();
/* parse -x expression */
- QVariant parseMinus();
+ TQVariant parseMinus();
/* parse (x) expression */
- QVariant parseBracket();
+ TQVariant parseBracket();
/* parse x*y, x/y and x%y expressions */
- QVariant parseMultiply();
+ TQVariant parseMultiply();
/* parse x+y and x-y expressions */
- QVariant parseAdd();
+ TQVariant parseAdd();
/* parse !x and (equivalent) not x expressions */
- QVariant parseNot();
+ TQVariant parseNot();
/* parse x==y, x<=y, x>=y, x<y and x>y expressions */
- QVariant parseComparison();
+ TQVariant parseComparison();
/* parse x && y, (equivalent) x and y expressions */
- QVariant parseAnd();
+ TQVariant parseAnd();
/* parse x || y and (equivalent) x or y expressions */
- QVariant parseOr();
+ TQVariant parseOr();
/* starting point of parsing - just call first function above */
- QVariant parse();
+ TQVariant parse();
/* check if we still have next argument */
bool validate();
/* return next argument to parse or null if there is none */
- QString next() const;
+ TQString next() const;
/* set error position for future error reporting */
void setError(int pos = -1);
- /* compare various types of QVariant (strings, floats, ints */
- int compare(const QVariant v1, const QVariant v2) const;
+ /* compare various types of TQVariant (strings, floats, ints */
+ int compare(const TQVariant v1, const TQVariant v2) const;
/* return common type for binary operations */
- Type commonType(const QVariant v1, const QVariant v2) const;
+ Type commonType(const TQVariant v1, const TQVariant v2) const;
- QValueList<QVariant> m_parts;
+ TQValueList<TQVariant> m_parts;
uint m_start;
bool m_error;
uint m_errorPosition;
diff --git a/kommander/widget/function.h b/kommander/widget/function.h
index fbd8b99b..47631b22 100644
--- a/kommander/widget/function.h
+++ b/kommander/widget/function.h
@@ -18,12 +18,12 @@
#define _HAVE_FUNCTION_H_
#include "parsenode.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class Parser;
-typedef QValueVector<ParseNode> ParameterList;
-typedef QValueVector<Parse::ValueType> TypeList;
+typedef TQValueVector<ParseNode> ParameterList;
+typedef TQValueVector<Parse::ValueType> TypeList;
typedef ParseNode(*FunctionPointer)(Parser*, const ParameterList&);
class Function
diff --git a/kommander/widget/functionlib.cpp b/kommander/widget/functionlib.cpp
index d763ff96..416207b7 100644
--- a/kommander/widget/functionlib.cpp
+++ b/kommander/widget/functionlib.cpp
@@ -26,10 +26,10 @@
#include <iostream>
#include <stdlib.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qmetaobject.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -57,7 +57,7 @@ static ParseNode f_stringContains(Parser*, const ParameterList& params)
static ParseNode f_stringCompare(Parser*, const ParameterList& params)
{
- int result = QString::compare(params[0].toString(),params[1].toString());
+ int result = TQString::compare(params[0].toString(),params[1].toString());
if (result < 0)
{
result = -1;
@@ -163,7 +163,7 @@ static ParseNode f_return(Parser* p, const ParameterList& params)
static ParseNode f_stringRound(Parser*, const ParameterList& params)
{
- QString s;
+ TQString s;
s.sprintf("%."+params[1].toString()+"f", params[0].toDouble());
return s;
}
@@ -191,22 +191,22 @@ static ParseNode f_echo(Parser*, const ParameterList& params)
/******************* File function ********************************/
static ParseNode f_fileRead(Parser*, const ParameterList& params)
{
- QFile file(params[0].toString());
+ TQFile file(params[0].toString());
if (!file.exists() || !file.open(IO_ReadOnly))
return ParseNode("");
- QTextStream text(&file);
+ TQTextStream text(&file);
return text.read();
}
static ParseNode f_fileWrite(Parser*, const ParameterList& params)
{
- QString fname = params[0].toString();
+ TQString fname = params[0].toString();
if (fname.isEmpty())
return 0;
- QFile file(fname);
+ TQFile file(fname);
if (!file.open(IO_WriteOnly))
return 0;
- QTextStream text(&file);
+ TQTextStream text(&file);
for (uint i=1; i<params.count(); i++)
text << params[i].toString();
return 1;
@@ -214,13 +214,13 @@ static ParseNode f_fileWrite(Parser*, const ParameterList& params)
static ParseNode f_fileAppend(Parser*, const ParameterList& params)
{
- QString fname = params[0].toString();
+ TQString fname = params[0].toString();
if (fname.isEmpty())
return 0;
- QFile file(fname);
+ TQFile file(fname);
if (!file.open(IO_WriteOnly | IO_Append))
return 0;
- QTextStream text(&file);
+ TQTextStream text(&file);
for (uint i=1; i<params.count(); i++)
text << params[i].toString();
return 1;
@@ -228,7 +228,7 @@ static ParseNode f_fileAppend(Parser*, const ParameterList& params)
static ParseNode f_fileExists(Parser*, const ParameterList& params)
{
- QFile file(params[0].toString());
+ TQFile file(params[0].toString());
if (!file.exists())
return 0;
else
@@ -238,20 +238,20 @@ static ParseNode f_fileExists(Parser*, const ParameterList& params)
static ParseNode f_executeSlot(Parser* parser, const ParameterList& params)
{
ParameterList::ConstIterator it = params.begin();
- QString slotName = (*it).toString()+"(";
+ TQString slotName = (*it).toString()+"(";
++it;
- QString widgetName = (*it).toString();
+ TQString widgetName = (*it).toString();
KommanderWidget* widget = parser->currentWidget();
if (!widget)
return ParseNode::error("unknown widget");
widget = widget->widgetByName(widgetName);
if (!widget)
return ParseNode::error("unknown widget");
- QObject *object = widget->object();
+ TQObject *object = widget->object();
if (!object)
return ParseNode::error("unknown widget");
- QStrList slotSignatures = object->metaObject()->slotNames(true);
- QStringList slotNames = QStringList::fromStrList(slotSignatures);
+ TQStrList slotSignatures = object->metaObject()->slotNames(true);
+ TQStringList slotNames = TQStringList::fromStrList(slotSignatures);
int slotNum = -1;
uint i = 0;
while (i < slotNames.count())
@@ -265,7 +265,7 @@ static ParseNode f_executeSlot(Parser* parser, const ParameterList& params)
}
if (slotNum == -1)
return ParseNode::error("unknown function");
- QStringList args;
+ TQStringList args;
++it; // skip widget
while (it != params.end())
{
@@ -283,17 +283,17 @@ static ParseNode f_executeSlot(Parser* parser, const ParameterList& params)
/******************* DCOP function ********************************/
static ParseNode f_dcopid(Parser*, const ParameterList& )
{
- return QString(kapp->dcopClient()->appId());
+ return TQString(kapp->dcopClient()->appId());
}
static ParseNode f_pid(Parser*, const ParameterList& )
{
- return QString::number(getpid());
+ return TQString::number(getpid());
}
static ParseNode f_parentPid(Parser*p, const ParameterList& )
{
- return p->variable("_PARENTPID").toString().isEmpty() ? QString::number(getppid()) : p->variable("_PARENTPID");
+ return p->variable("_PARENTPID").toString().isEmpty() ? TQString::number(getppid()) : p->variable("_PARENTPID");
}
static ParseNode f_internalDcop(Parser* parser, const ParameterList& params)
@@ -312,7 +312,7 @@ static ParseNode f_internalDcop(Parser* parser, const ParameterList& params)
widget = widget->widgetByName(params[1].toString());
if (!widget)
return ParseNode::error("unknown widget");
- QStringList args;
+ TQStringList args;
ParameterList::ConstIterator it = params.begin();
++it; // skip function
++it; // skip widget
@@ -327,12 +327,12 @@ static ParseNode f_internalDcop(Parser* parser, const ParameterList& params)
static ParseNode f_dcop(Parser*, const ParameterList& params)
{
- QCString appId = params[0].toString().latin1();
- QCString object = params[1].toString().latin1();
- QString function = params[2].toString().section('(', 0, 0);
- QStringList items = QStringList::split(",", params[2].toString().section('(', 1, 1).section(')', 0, 0));
- QByteArray byteData;
- QDataStream byteDataStream(byteData, IO_WriteOnly);
+ TQCString appId = params[0].toString().latin1();
+ TQCString object = params[1].toString().latin1();
+ TQString function = params[2].toString().section('(', 0, 0);
+ TQStringList items = TQStringList::split(",", params[2].toString().section('(', 1, 1).section(')', 0, 0));
+ TQByteArray byteData;
+ TQDataStream byteDataStream(byteData, IO_WriteOnly);
if (items.count() != params.count() - 3)
{
@@ -340,7 +340,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
return ParseNode();
}
int i = 3;
- for (QStringList::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQStringList::Iterator it = items.begin(); it != items.end(); ++it)
{
*it = (*it).stripWhiteSpace();
if (*it == "int")
@@ -353,16 +353,16 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
byteDataStream << params[i++].toDouble();
else if (*it == "bool")
byteDataStream << (bool)params[i++].toInt();
- else if (*it == "QStringList")
+ else if (*it == "TQStringList")
if (params[i].toString().find('\n') != -1)
- byteDataStream << QStringList::split("\n", params[i++].toString(), true);
+ byteDataStream << TQStringList::split("\n", params[i++].toString(), true);
else
- byteDataStream << QStringList::split("\\n", params[i++].toString(), true);
+ byteDataStream << TQStringList::split("\\n", params[i++].toString(), true);
else
byteDataStream << params[i++].toString();
}
- function.append(QString("(%1)").arg(items.join(",")));
- QCString replyType, byteReply;
+ function.append(TQString("(%1)").arg(items.join(",")));
+ TQCString replyType, byteReply;
DCOPClient* cl = KApplication::dcopClient();
if (!cl || !cl->call(appId, object, function.latin1(),
byteData, replyType, byteReply))
@@ -370,10 +370,10 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
qDebug("DCOP failure");
return ParseNode();
}
- QDataStream byteReplyStream(byteReply, IO_ReadOnly);
- if (replyType == "QString")
+ TQDataStream byteReplyStream(byteReply, IO_ReadOnly);
+ if (replyType == "TQString")
{
- QString text;
+ TQString text;
byteReplyStream >> text;
return text;
}
@@ -389,15 +389,15 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
byteReplyStream >> b;
return b;
}
- else if (replyType == "QStringList")
+ else if (replyType == "TQStringList")
{
- QStringList text;
+ TQStringList text;
byteReplyStream >> text;
return text.join("\n");
}
else if(replyType != "void")
{
- qDebug("%s", QString("DCOP return type %1 is not yet implemented.").arg(replyType.data()).latin1());
+ qDebug("%s", TQString("DCOP return type %1 is not yet implemented.").arg(replyType.data()).latin1());
}
return ParseNode();
@@ -405,14 +405,14 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
static ParseNode f_createWidget(Parser* p, const ParameterList& params)
{
- QString widgetName = params[0].toString();
- QString widgetType = params[1].toString();
- QString parentName = params[2].toString();
+ TQString widgetName = params[0].toString();
+ TQString widgetType = params[1].toString();
+ TQString parentName = params[2].toString();
KommanderWidget *widget = p->currentWidget()->widgetByName(parentName);
if (!widget)
return ParseNode::error("unknown widget");
- QWidget *parent = dynamic_cast<QWidget*>(widget->object());
- QWidget *w = KommanderFactory::createWidget(widgetType, parent, widgetName.latin1());
+ TQWidget *parent = dynamic_cast<TQWidget*>(widget->object());
+ TQWidget *w = KommanderFactory::createWidget(widgetType, parent, widgetName.latin1());
if (w)
w->adjustSize();
return ParseNode();
@@ -420,7 +420,7 @@ static ParseNode f_createWidget(Parser* p, const ParameterList& params)
static ParseNode f_widgetExists(Parser* p, const ParameterList& params)
{
- QString widgetName = params[0].toString();
+ TQString widgetName = params[0].toString();
KommanderWidget *widget = p->currentWidget()->widgetByName(widgetName);
return (widget ? true : false);
}
@@ -428,33 +428,33 @@ static ParseNode f_widgetExists(Parser* p, const ParameterList& params)
static ParseNode f_connect(Parser* p, const ParameterList& params)
{
- QString sender = params[0].toString();
- QString signal = QString::number(QSIGNAL_CODE) + params[1].toString();
- QString receiver = params[2].toString();
- QString slot = QString::number(QSLOT_CODE) + params[3].toString();
+ TQString sender = params[0].toString();
+ TQString signal = TQString::number(QSIGNAL_CODE) + params[1].toString();
+ TQString receiver = params[2].toString();
+ TQString slot = TQString::number(QSLOT_CODE) + params[3].toString();
KommanderWidget *senderW = p->currentWidget()->widgetByName(sender);
if (!senderW)
return ParseNode::error("unknown widget");
KommanderWidget *receiverW = p->currentWidget()->widgetByName(receiver);
if (!receiverW)
return ParseNode::error("unknown widget");
- dynamic_cast<QObject*>(senderW)->connect(dynamic_cast<QObject*>(senderW), signal.ascii(), dynamic_cast<QObject*>(receiverW), slot.ascii());
+ dynamic_cast<TQObject*>(senderW)->connect(dynamic_cast<TQObject*>(senderW), signal.ascii(), dynamic_cast<TQObject*>(receiverW), slot.ascii());
return ParseNode();
}
static ParseNode f_disconnect(Parser* p, const ParameterList& params)
{
- QString sender = params[0].toString();
- QString signal = QString::number(QSIGNAL_CODE) + params[1].toString();
- QString receiver = params[2].toString();
- QString slot = QString::number(QSLOT_CODE) + params[3].toString();
+ TQString sender = params[0].toString();
+ TQString signal = TQString::number(QSIGNAL_CODE) + params[1].toString();
+ TQString receiver = params[2].toString();
+ TQString slot = TQString::number(QSLOT_CODE) + params[3].toString();
KommanderWidget *senderW = p->currentWidget()->widgetByName(sender);
if (!senderW)
return ParseNode::error("unknown widget");
KommanderWidget *receiverW = p->currentWidget()->widgetByName(receiver);
if (!receiverW)
return ParseNode::error("unknown widget");
- dynamic_cast<QObject*>(senderW)->disconnect(dynamic_cast<QObject*>(senderW), signal.ascii(), dynamic_cast<QObject*>(receiverW), slot.ascii());
+ dynamic_cast<TQObject*>(senderW)->disconnect(dynamic_cast<TQObject*>(senderW), signal.ascii(), dynamic_cast<TQObject*>(receiverW), slot.ascii());
return ParseNode();
}
@@ -462,7 +462,7 @@ static ParseNode f_disconnect(Parser* p, const ParameterList& params)
static ParseNode f_exec(Parser* P, const ParameterList& params)
{
MyProcess proc(P->currentWidget());
- QString text;
+ TQString text;
// qDebug("Trying %s", params[0].toString().latin1());
if (params.count() > 1)
text = proc.run(params[0].toString().local8Bit(), params[1].toString());
@@ -475,7 +475,7 @@ static ParseNode f_execBackground(Parser* P, const ParameterList& params)
{
MyProcess proc(P->currentWidget());
proc.setBlocking(false);
- QString text;
+ TQString text;
qDebug("Trying %s", params[0].toString().latin1());
if (params.count() > 1)
text = proc.run(params[0].toString().local8Bit(), params[1].toString());
@@ -486,23 +486,23 @@ static ParseNode f_execBackground(Parser* P, const ParameterList& params)
static ParseNode f_dialog(Parser* P, const ParameterList& params)
{
- QString a_dialog = params[0].toString().local8Bit();
- QString a_params = params[1].toString().local8Bit();
+ TQString a_dialog = params[0].toString().local8Bit();
+ TQString a_params = params[1].toString().local8Bit();
- QString pFileName = P->currentWidget()->global("_KDDIR") + QString("/") + a_dialog;
- QFileInfo pDialogFile(pFileName);
+ TQString pFileName = P->currentWidget()->global("_KDDIR") + TQString("/") + a_dialog;
+ TQFileInfo pDialogFile(pFileName);
if (!pDialogFile.exists())
{
pFileName = a_dialog;
pDialogFile.setFile(pFileName);
if (!pDialogFile.exists())
- return QString();
+ return TQString();
}
- QString cmd = QString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
+ TQString cmd = TQString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
.arg(pFileName).arg(a_params).arg(getpid()).arg(getpid());
MyProcess proc(P->currentWidget());
- QString text;
+ TQString text;
text = proc.run(cmd);
return text;
@@ -515,7 +515,7 @@ static ParseNode f_i18n(Parser*, const ParameterList& params)
static ParseNode f_env(Parser*, const ParameterList& params)
{
- return QString(getenv(params[0].toString().latin1()));
+ return TQString(getenv(params[0].toString().latin1()));
}
/******************* Array functions ********************************/
@@ -537,16 +537,16 @@ static ParseNode f_arrayKeys(Parser* P, const ParameterList& params)
{
if (!P->isArray(params[0].toString()))
return ParseNode();
- return QStringList(P->array(params[0].toString()).keys()).join("\n");
+ return TQStringList(P->array(params[0].toString()).keys()).join("\n");
}
static ParseNode f_arrayValues(Parser* P, const ParameterList& params)
{
if (!P->isArray(params[0].toString()))
return ParseNode();
- QValueList<ParseNode> values = P->array(params[0].toString()).values();
- QString array;
- for (QValueList<ParseNode>::ConstIterator it = values.begin(); it != values.end(); ++it )
+ TQValueList<ParseNode> values = P->array(params[0].toString()).values();
+ TQString array;
+ for (TQValueList<ParseNode>::ConstIterator it = values.begin(); it != values.end(); ++it )
array += (*it).toString() + '\n';
return array;
}
@@ -560,18 +560,18 @@ static ParseNode f_arrayRemove(Parser* P, const ParameterList& params)
static ParseNode f_arrayToString(Parser* P, const ParameterList& params)
{
- QString name = params[0].toString();
+ TQString name = params[0].toString();
if (!P->isArray(name))
return ParseNode();
- QString array;
- QStringList keys = P->array(name).keys();
- QValueList<ParseNode> values = P->array(name).values();
+ TQString array;
+ TQStringList keys = P->array(name).keys();
+ TQValueList<ParseNode> values = P->array(name).values();
- QStringList::Iterator it = keys.begin();
- QValueList<ParseNode>::Iterator itval = values.begin();
+ TQStringList::Iterator it = keys.begin();
+ TQValueList<ParseNode>::Iterator itval = values.begin();
while (*it)
{
- array += QString("%1\t%2\n").arg(*it).arg((*itval).toString());
+ array += TQString("%1\t%2\n").arg(*it).arg((*itval).toString());
++it;
++itval;
}
@@ -580,11 +580,11 @@ static ParseNode f_arrayToString(Parser* P, const ParameterList& params)
static ParseNode f_arrayFromString(Parser* P, const ParameterList& params)
{
- QString name = params[0].toString();
- QStringList lines = QStringList::split("\n", params[1].toString());
- for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ TQString name = params[0].toString();
+ TQStringList lines = TQStringList::split("\n", params[1].toString());
+ for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
{
- QString key = (*it).section('\t', 0, 0).stripWhiteSpace();
+ TQString key = (*it).section('\t', 0, 0).stripWhiteSpace();
if (!key.isEmpty())
P->setArray(name, key, (*it).section('\t', 1));
}
@@ -594,16 +594,16 @@ static ParseNode f_arrayFromString(Parser* P, const ParameterList& params)
static ParseNode f_arrayIndexedFromString(Parser* P, const ParameterList& params)
{
- QString name = params[0].toString();
- QStringList lines;
+ TQString name = params[0].toString();
+ TQStringList lines;
if (params.count() == 2)
- lines = QStringList::split('\t', params[1].toString(), true);
+ lines = TQStringList::split('\t', params[1].toString(), true);
else
- lines = QStringList::split(params[2].toString(), params[1].toString(), true);
+ lines = TQStringList::split(params[2].toString(), params[1].toString(), true);
int i = 0;
- for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
{
- P->setArray(name, QString::number(i), (*it));
+ P->setArray(name, TQString::number(i), (*it));
i++;
}
return ParseNode();
@@ -611,28 +611,28 @@ static ParseNode f_arrayIndexedFromString(Parser* P, const ParameterList& params
static ParseNode f_arrayIndexedToString(Parser* P, const ParameterList& params)
{
- QString name = params[0].toString();
+ TQString name = params[0].toString();
if (!P->isArray(name))
return ParseNode();
- QString separator = "\t";
+ TQString separator = "\t";
if (params.count() == 2)
separator = params[1].toString();
- QString array;
+ TQString array;
int count = P->array(name).keys().count();
- QValueList<ParseNode> values = P->array(name).values();
+ TQValueList<ParseNode> values = P->array(name).values();
for (int i = 0; i < count; i++)
{
if (i != 0)
array.append(separator);
- array.append(P->arrayValue(name, QString::number(i)).toString());
+ array.append(P->arrayValue(name, TQString::number(i)).toString());
}
return array;
}
static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& params)
{
- QString name = params[0].toString();
+ TQString name = params[0].toString();
if (!P->isArray(name))
return ParseNode();
int key = params[1].toInt();
@@ -641,29 +641,29 @@ static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& pa
num = params[2].toInt() - 1;
if (num < 0)
num = 0;
- QString array;
- QStringList keys = P->array(name).keys();
+ TQString array;
+ TQStringList keys = P->array(name).keys();
int count = keys.count();
if (key + num > count - 1 || key < 0)
return ParseNode(); //out of index range
for (int i = 0; i < count; i++)
{
- if (keys.contains(QString::number(i)) != 1)
+ if (keys.contains(TQString::number(i)) != 1)
return ParseNode(); //array is not indexed
}
for (int i = key; i <= key + num; i++)
{
- P->unsetArray(name, QString::number(i));
+ P->unsetArray(name, TQString::number(i));
}
int j = key;
for (int i = key + num + 1; i < count; i++)
{
- P->setArray(name, QString::number(j), P->arrayValue(name, QString::number(i)));
+ P->setArray(name, TQString::number(j), P->arrayValue(name, TQString::number(i)));
j++;
}
for (int i = 1; i <= num + 1; i++)
{
- P->unsetArray(name, QString::number(count - i));
+ P->unsetArray(name, TQString::number(count - i));
}
return ParseNode();
}
@@ -671,27 +671,27 @@ static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& pa
static ParseNode f_arrayIndexedInsertElements(Parser* P, const ParameterList& params)
{
- QString name = params[0].toString();
+ TQString name = params[0].toString();
if (!P->isArray(name))
return ParseNode();
int key = params[1].toInt();
- QStringList keys = P->array(name).keys();
+ TQStringList keys = P->array(name).keys();
int count = keys.count();
if (key > count || key < 0)
return ParseNode(); //out of index range
- QString separator = "\t";
+ TQString separator = "\t";
if (params.count() == 4)
separator = params[3].toString();
- QStringList elements = QStringList::split(separator, params[2].toString(), true);
+ TQStringList elements = TQStringList::split(separator, params[2].toString(), true);
int num = elements.count();
for (int i = count - 1; i >= key; i--)
{
- P->setArray(name, QString::number(i + num), P->arrayValue(name, QString::number(i)));
+ P->setArray(name, TQString::number(i + num), P->arrayValue(name, TQString::number(i)));
}
int i = key;
- for (QStringList::Iterator it = elements.begin(); it != elements.end(); ++it )
+ for (TQStringList::Iterator it = elements.begin(); it != elements.end(); ++it )
{
- P->setArray(name, QString::number(i), (*it));
+ P->setArray(name, TQString::number(i), (*it));
i++;
}
return ParseNode();
@@ -700,7 +700,7 @@ static ParseNode f_arrayIndexedInsertElements(Parser* P, const ParameterList& pa
/********** input functions *********************/
static ParseNode f_inputColor(Parser*, const ParameterList& params)
{
- QColor color;
+ TQColor color;
if (params.count())
color.setNamedColor(params[0].toString());
KColorDialog::getColor(color);
@@ -709,7 +709,7 @@ static ParseNode f_inputColor(Parser*, const ParameterList& params)
static ParseNode f_inputText(Parser*, const ParameterList& params)
{
- QString value;
+ TQString value;
if (params.count() > 2)
value = params[2].toString();
return KInputDialog::getText(params[0].toString(), params[1].toString(), value);
@@ -717,11 +717,11 @@ static ParseNode f_inputText(Parser*, const ParameterList& params)
static ParseNode f_inputPassword(Parser*, const ParameterList& params)
{
- QCString value;
+ TQCString value;
if (params.count() > 1)
value = params[1].toString().local8Bit();
KPasswordDialog::getPassword(value, params[0].toString());
- return QString::fromLocal8Bit(value);
+ return TQString::fromLocal8Bit(value);
}
static ParseNode f_inputValue(Parser*, const ParameterList& params)
@@ -741,7 +741,7 @@ static ParseNode f_inputValueDouble(Parser*, const ParameterList& params)
static ParseNode f_inputOpenFile(Parser*, const ParameterList& params)
{
- QString startdir, filter, caption;
+ TQString startdir, filter, caption;
if (params.count() > 0)
startdir = params[0].toString();
if (params.count() > 1)
@@ -753,7 +753,7 @@ static ParseNode f_inputOpenFile(Parser*, const ParameterList& params)
static ParseNode f_inputOpenFiles(Parser*, const ParameterList& params)
{
- QString startdir, filter, caption;
+ TQString startdir, filter, caption;
if (params.count() > 0)
startdir = params[0].toString();
if (params.count() > 1)
@@ -765,7 +765,7 @@ static ParseNode f_inputOpenFiles(Parser*, const ParameterList& params)
static ParseNode f_inputSaveFile(Parser*, const ParameterList& params)
{
- QString startdir, filter, caption;
+ TQString startdir, filter, caption;
if (params.count() > 0)
startdir = params[0].toString();
if (params.count() > 1)
@@ -777,7 +777,7 @@ static ParseNode f_inputSaveFile(Parser*, const ParameterList& params)
static ParseNode f_inputDirectory(Parser*, const ParameterList& params)
{
- QString startdir, caption;
+ TQString startdir, caption;
if (params.count() > 0)
startdir = params[0].toString();
if (params.count() > 1)
@@ -787,7 +787,7 @@ static ParseNode f_inputDirectory(Parser*, const ParameterList& params)
static ParseNode f_message_info(Parser*, const ParameterList& params)
{
- QString text, caption;
+ TQString text, caption;
if (params.count() > 0)
text = params[0].toString();
if (params.count() > 1)
@@ -798,7 +798,7 @@ static ParseNode f_message_info(Parser*, const ParameterList& params)
static ParseNode f_message_error(Parser*, const ParameterList& params)
{
- QString text, caption;
+ TQString text, caption;
if (params.count() > 0)
text = params[0].toString();
if (params.count() > 1)
@@ -810,7 +810,7 @@ static ParseNode f_message_error(Parser*, const ParameterList& params)
static ParseNode f_message_warning(Parser*, const ParameterList& params)
{
int result;
- QString text, caption, button1, button2, button3;
+ TQString text, caption, button1, button2, button3;
if (params.count() > 0)
text = params[0].toString();
if (params.count() > 1)
@@ -843,7 +843,7 @@ static ParseNode f_message_warning(Parser*, const ParameterList& params)
static ParseNode f_message_question(Parser*, const ParameterList& params)
{
int result;
- QString text, caption, button1, button2, button3;
+ TQString text, caption, button1, button2, button3;
if (params.count() > 0)
text = params[0].toString();
if (params.count() > 1)
@@ -875,12 +875,12 @@ static ParseNode f_message_question(Parser*, const ParameterList& params)
static ParseNode f_read_setting(Parser* parser, const ParameterList& params)
{
- QString def;
+ TQString def;
if (params.count() > 1)
def = params[1].toString();
if (parser->currentWidget())
{
- QString fname = parser->currentWidget()->fileName();
+ TQString fname = parser->currentWidget()->fileName();
if (fname.isEmpty())
return ParseNode();
KConfig cfg("kommanderrc", true);
@@ -894,7 +894,7 @@ static ParseNode f_write_setting(Parser* parser, const ParameterList& params)
{
if (parser->currentWidget())
{
- QString fname = parser->currentWidget()->fileName();
+ TQString fname = parser->currentWidget()->fileName();
if (fname.isEmpty())
return ParseNode();
KConfig cfg("kommanderrc", false);
diff --git a/kommander/widget/invokeclass.cpp b/kommander/widget/invokeclass.cpp
index b5de4678..866f629b 100644
--- a/kommander/widget/invokeclass.cpp
+++ b/kommander/widget/invokeclass.cpp
@@ -12,27 +12,27 @@
#include "invokeclass.h"
-#include <qcolor.h>
-#include <qregexp.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
-InvokeClass::InvokeClass(QObject *parent):QObject(parent)
+InvokeClass::InvokeClass(TQObject *parent):TQObject(parent)
{
m_acceptedSlots = acceptedSlots();
}
-void InvokeClass::invokeSlot(QObject *object, const QString& slot, QStringList args)
+void InvokeClass::invokeSlot(TQObject *object, const TQString& slot, TQStringList args)
{
- QString invokeName = slot;
+ TQString invokeName = slot;
invokeName = invokeName.mid(invokeName.find('('));
- invokeName.prepend(QString::number(QSIGNAL_CODE) + "invoke");
- QString slotName = QString::number(QSLOT_CODE) + slot;
+ invokeName.prepend(TQString::number(QSIGNAL_CODE) + "invoke");
+ TQString slotName = TQString::number(QSLOT_CODE) + slot;
connect(this, invokeName.ascii(), object, slotName.ascii());
if (args.count() == 0)
emit invoke();
else
{
- QString slotArgStr = slot.section(QRegExp("\\(|\\)"), 1);
+ TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1);
uint argNum = slotArgStr.contains(',') + 1;
for (uint i = args.count(); i < argNum; i++)
args << "";
@@ -52,7 +52,7 @@ void InvokeClass::invokeSlot(QObject *object, const QString& slot, QStringList a
else if (slotArgStr == m_acceptedSlots[6])
emit invoke(args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
else if (slotArgStr == m_acceptedSlots[7])
- emit invoke(QColor(args[0]));
+ emit invoke(TQColor(args[0]));
}
disconnect(this, invokeName.ascii(), object, slotName.ascii());
diff --git a/kommander/widget/invokeclass.h b/kommander/widget/invokeclass.h
index 61688b3e..4b1a8c0b 100644
--- a/kommander/widget/invokeclass.h
+++ b/kommander/widget/invokeclass.h
@@ -13,43 +13,43 @@
#ifndef INVOKECLASS_H
#define INVOKECLASS_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
-class InvokeClass : public QObject {
+class InvokeClass : public TQObject {
Q_OBJECT
public:
- InvokeClass(QObject *parent);
- void invokeSlot(QObject *object, const QString& slot, QStringList args);
+ InvokeClass(TQObject *parent);
+ void invokeSlot(TQObject *object, const TQString& slot, TQStringList args);
- static QStringList acceptedSlots()
+ static TQStringList acceptedSlots()
{
- static QStringList acceptedSlots;
- acceptedSlots << "const QString&";
- acceptedSlots << "const QString&,const QString&";
+ static TQStringList acceptedSlots;
+ acceptedSlots << "const TQString&";
+ acceptedSlots << "const TQString&,const TQString&";
acceptedSlots << "bool";
acceptedSlots << "int";
acceptedSlots << "int,int";
acceptedSlots << "int,int,int";
acceptedSlots << "int,int,int,int";
- acceptedSlots << "const QColor&";
+ acceptedSlots << "const TQColor&";
return acceptedSlots;
}
signals:
void invoke();
- void invoke(const QString&);
- void invoke(const QString&,const QString&);
+ void invoke(const TQString&);
+ void invoke(const TQString&,const TQString&);
void invoke(bool);
void invoke(int);
void invoke(int,int);
void invoke(int,int,int);
void invoke(int,int,int,int);
- void invoke(const QColor&);
+ void invoke(const TQColor&);
private:
- QStringList m_acceptedSlots;
+ TQStringList m_acceptedSlots;
};
diff --git a/kommander/widget/kmdrmainwindow.cpp b/kommander/widget/kmdrmainwindow.cpp
index cfe79d0c..e123a035 100644
--- a/kommander/widget/kmdrmainwindow.cpp
+++ b/kommander/widget/kmdrmainwindow.cpp
@@ -11,12 +11,12 @@
//
#include "kmdrmainwindow.h"
-#include <qtimer.h>
+#include <tqtimer.h>
-KmdrMainWindow::KmdrMainWindow(QWidget *parent, const char *name, WFlags f)
+KmdrMainWindow::KmdrMainWindow(TQWidget *parent, const char *name, WFlags f)
: KMainWindow(parent, name, f)
{
- QTimer::singleShot(10, this, SIGNAL(initialize()));
+ TQTimer::singleShot(10, this, TQT_SIGNAL(initialize()));
}
diff --git a/kommander/widget/kmdrmainwindow.h b/kommander/widget/kmdrmainwindow.h
index 059b514e..6637ffc8 100644
--- a/kommander/widget/kmdrmainwindow.h
+++ b/kommander/widget/kmdrmainwindow.h
@@ -21,7 +21,7 @@ class KmdrMainWindow : public KMainWindow
{
Q_OBJECT
public:
- KmdrMainWindow(QWidget *parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose);
+ KmdrMainWindow(TQWidget *parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose);
~KmdrMainWindow();
diff --git a/kommander/widget/kommanderfunctions.cpp b/kommander/widget/kommanderfunctions.cpp
index a5a678db..6ef6e6f0 100644
--- a/kommander/widget/kommanderfunctions.cpp
+++ b/kommander/widget/kommanderfunctions.cpp
@@ -17,9 +17,9 @@
#include <iostream>
#include <stdlib.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -33,7 +33,7 @@
#include "expression.h"
#include "parser.h"
-QString KommanderWidget::evalFunction(const QString& function, const QStringList& args)
+TQString KommanderWidget::evalFunction(const TQString& function, const TQStringList& args)
{
switch (SpecialInformation::function(Group::Kommander, function)) {
case Kommander::widgetText:
@@ -43,56 +43,56 @@ QString KommanderWidget::evalFunction(const QString& function, const QStringList
case Kommander::dcopid:
return kapp->dcopClient()->appId();
case Kommander::pid:
- return QString().setNum(getpid());
+ return TQString().setNum(getpid());
case Kommander::null:
- return QString();
+ return TQString();
case Kommander::comment:
- return QString("#");
+ return TQString("#");
case Kommander::exec:
return execCommand(args[0]);
case Kommander::dcop:
return DCOPQuery(args);
case Kommander::parentPid:
- return global("_PARENTPID").isEmpty() ? QString().setNum(getppid()) : global("_PARENTPID");
+ return global("_PARENTPID").isEmpty() ? TQString().setNum(getppid()) : global("_PARENTPID");
case Kommander::env:
- return QString(getenv(args[0].latin1()));
+ return TQString(getenv(args[0].latin1()));
case Kommander::i18n:
return KGlobal::locale()->translate(args[0]);
case Kommander::global:
return global(args[0]);
case Kommander::setGlobal:
setGlobal(args[0], args[1]);
- return QString();
+ return TQString();
case Kommander::debug:
qDebug("%s", args[0].latin1());
fflush(stderr);
- return QString::null;
+ return TQString::null;
case Kommander::echo:
for (uint i=0; i<args.count(); i++)
std::cout << args[i].latin1();
fflush(stdout);
- return QString::null;
+ return TQString::null;
case Kommander::readSetting:
{
- QString fname = fileName();
+ TQString fname = fileName();
if (!fname.isEmpty())
{
KConfig cfg("kommanderrc", true);
cfg.setGroup(fname);
return cfg.readEntry(args[0], args[1]);
}
- return QString::null;
+ return TQString::null;
}
case Kommander::writeSetting:
{
- QString fname = fileName();
+ TQString fname = fileName();
if (!fname.isEmpty())
{
KConfig cfg("kommanderrc", false);
cfg.setGroup(fname);
cfg.writeEntry(args[0], args[1]);
}
- return QString::null;
+ return TQString::null;
}
case Kommander::dialog:
if (args.count() > 1)
@@ -103,73 +103,73 @@ QString KommanderWidget::evalFunction(const QString& function, const QStringList
{
Expression expr(args[0]);
bool ok;
- QVariant value = expr.value(&ok);
- return ok ? value.toString() : QString();
+ TQVariant value = expr.value(&ok);
+ return ok ? value.toString() : TQString();
}
default:
- return QString();
+ return TQString();
}
}
-QString KommanderWidget::evalExecBlock(const QStringList& args, const QString& s, int& pos)
+TQString KommanderWidget::evalExecBlock(const TQStringList& args, const TQString& s, int& pos)
{
int f = s.find("@execEnd", pos);
if (f == -1)
{
printError(i18n("Unterminated @execBegin ... @execEnd block."));
- return QString();
+ return TQString();
}
else
{
- QString shell = args.count() ? args[0] : QString();
+ TQString shell = args.count() ? args[0] : TQString();
int start = pos;
- pos = f + QString("@execEnd").length()+1;
+ pos = f + TQString("@execEnd").length()+1;
return execCommand(evalAssociatedText(s.mid(start, f - start)), shell);
}
}
-QString KommanderWidget::evalForEachBlock(const QStringList& args, const QString& s, int& pos)
+TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQString& s, int& pos)
{
int f = s.find("@end", pos);
//FIXME: better detection of block boundaries
if (f == -1)
{
printError(i18n("Unterminated @forEach ... @end block."));
- return QString();
+ return TQString();
}
else
{
int start = pos;
- pos = f + QString("@end").length()+1;
- QString var = args[0];
- QStringList loop = QStringList::split("\n", args[1]);
- QString output;
- QString block = substituteVariable(s.mid(start, f - start), QString("%1_count").arg(var),
- QString::number(loop.count()));
- QString varidx = QString("%1_index").arg(var);
+ pos = f + TQString("@end").length()+1;
+ TQString var = args[0];
+ TQStringList loop = TQStringList::split("\n", args[1]);
+ TQString output;
+ TQString block = substituteVariable(s.mid(start, f - start), TQString("%1_count").arg(var),
+ TQString::number(loop.count()));
+ TQString varidx = TQString("%1_index").arg(var);
for (uint i=0; i<loop.count(); i++)
- output += evalAssociatedText(substituteVariable(substituteVariable(block, varidx, QString::number(i+1)),
+ output += evalAssociatedText(substituteVariable(substituteVariable(block, varidx, TQString::number(i+1)),
var, loop[i]));
return output;
}
}
-QString KommanderWidget::evalForBlock(const QStringList& args, const QString& s, int& pos)
+TQString KommanderWidget::evalForBlock(const TQStringList& args, const TQString& s, int& pos)
{
int f = s.find("@end", pos);
//FIXME: better detection of block boundaries
if (f == -1)
{
printError(i18n("Unterminated @forEach ... @end block."));
- return QString();
+ return TQString();
}
else
{
int start = pos;
- pos = f + QString("@end").length()+1;
- QString block = s.mid(start, f - start);
- QString variable = args[0];
+ pos = f + TQString("@end").length()+1;
+ TQString block = s.mid(start, f - start);
+ TQString variable = args[0];
Expression expr;
int loopstart = expr.value(args[1]).toInt();
@@ -182,16 +182,16 @@ QString KommanderWidget::evalForBlock(const QStringList& args, const QString& s,
loopstep = 1;
}
- QString output;
+ TQString output;
for (int i=loopstart; i<=loopend; i+=loopstep)
{
- output += evalAssociatedText(substituteVariable(block, variable, QString::number(i)));
+ output += evalAssociatedText(substituteVariable(block, variable, TQString::number(i)));
}
return output;
}
}
-QString KommanderWidget::evalIfBlock(const QStringList& args, const QString& s, int& pos)
+TQString KommanderWidget::evalIfBlock(const TQStringList& args, const TQString& s, int& pos)
{
int f = s.find("@endif", pos);
//FIXME: better detection of block boundaries; add error message
@@ -199,32 +199,32 @@ QString KommanderWidget::evalIfBlock(const QStringList& args, const QString& s,
{
pos = s.length()+1;
printError(i18n("Unterminated @if ... @endif block."));
- return QString();
+ return TQString();
}
else
{
- QString block = s.mid(pos, f - pos);
- pos = f + QString("@endif").length()+1;
+ TQString block = s.mid(pos, f - pos);
+ pos = f + TQString("@endif").length()+1;
Expression expr;
if (expr.isTrue(args[0]))
return evalAssociatedText(block);
- return QString();
+ return TQString();
}
}
-QString KommanderWidget::evalSwitchBlock(const QStringList& args, const QString& s, int& pos)
+TQString KommanderWidget::evalSwitchBlock(const TQStringList& args, const TQString& s, int& pos)
{
int f = s.find("@end", pos);
//FIXME: better detection of block boundaries; add error message
if (f == -1)
{
printError(i18n("Unterminated @switch ... @end block."));
- return QString();
+ return TQString();
}
else
{
- QString block = s.mid(pos, f - pos);
- pos = f + QString("@end").length()+1;
+ TQString block = s.mid(pos, f - pos);
+ pos = f + TQString("@end").length()+1;
f = parseBlockBoundary(block, 0, "@case");
bool finished = f == -1;
while (!finished)
@@ -237,99 +237,99 @@ QString KommanderWidget::evalSwitchBlock(const QStringList& args, const QString&
finished = true;
}
bool ok;
- QString value = parseBrackets(block, f, ok);
+ TQString value = parseBrackets(block, f, ok);
if (!ok)
break;
if (value == args[0] || value == "*")
return evalAssociatedText(block.mid(f, end-f));
f = end;
}
- return QString();
+ return TQString();
}
}
-QString KommanderWidget::evalArrayFunction(const QString& function, const QStringList& args)
+TQString KommanderWidget::evalArrayFunction(const TQString& function, const TQStringList& args)
{
Parser parser(internalParserData());
int fname = SpecialInformation::function(Group::Array, function);
- QString array = args[0].startsWith("_") ? args[0] : QString("_")+ args[0];
+ TQString array = args[0].startsWith("_") ? args[0] : TQString("_")+ args[0];
if (fname == Array::setValue)
parser.setArray(array, args[1], args[2]);
else if (fname == Array::fromString)
{
- QStringList lines = QStringList::split("\n", args[1]);
- for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split("\n", args[1]);
+ for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- QString key = (*it).section('\t', 0, 0).stripWhiteSpace();
+ TQString key = (*it).section('\t', 0, 0).stripWhiteSpace();
if (!key.isEmpty())
parser.setArray(array, key, (*it).section('\t', 1));
}
}
else if (!parser.isArray(array))
- return QString();
+ return TQString();
else switch (fname) {
case Array::value:
return parser.arrayValue(array, args[1]).toString();
case Array::keys:
{
- const QMap<QString, ParseNode> map = parser.array(array);
- QStringList keys;
- for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
+ const TQMap<TQString, ParseNode> map = parser.array(array);
+ TQStringList keys;
+ for (TQMap<TQString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
keys.append(it.key());
return keys.join("\n");
}
case Array::values:
{
- const QMap<QString, ParseNode> map = parser.array(array);
- QStringList values;
- for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
+ const TQMap<TQString, ParseNode> map = parser.array(array);
+ TQStringList values;
+ for (TQMap<TQString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
values.append(it.data().toString());
return values.join("\n");
}
case Array::clear:
parser.unsetArray(array);
- return QString();
+ return TQString();
case Array::remove:
parser.unsetArray(array, args[1]);
- return QString();
+ return TQString();
case Array::count:
- return QString::number(parser.array(array).count());
+ return TQString::number(parser.array(array).count());
case Array::toString:
{
- const QMap<QString, ParseNode> map = parser.array(array);
- QString arraystring;
- for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
- arraystring += QString("%1\t%2\n").arg(it.key()).arg(it.data().toString());
+ const TQMap<TQString, ParseNode> map = parser.array(array);
+ TQString arraystring;
+ for (TQMap<TQString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
+ arraystring += TQString("%1\t%2\n").arg(it.key()).arg(it.data().toString());
return arraystring;
}
default:
- return QString();
+ return TQString();
}
- return QString();
+ return TQString();
}
-QString KommanderWidget::evalWidgetFunction(const QString& identifier, const QString& s, int& pos)
+TQString KommanderWidget::evalWidgetFunction(const TQString& identifier, const TQString& s, int& pos)
{
KommanderWidget* pWidget = parseWidget(identifier);
if (!pWidget)
{
printError(i18n("Unknown widget: @%1.").arg(identifier));
- return QString();
+ return TQString();
}
if (s[pos] == '.')
{
pos++;
bool ok = true;
- QString function = parseIdentifier(s, pos);
- QStringList args = parseFunction("DCOP", function, s, pos, ok);
+ TQString function = parseIdentifier(s, pos);
+ TQStringList args = parseFunction("DCOP", function, s, pos, ok);
if (!ok)
- return QString();
+ return TQString();
args.prepend(pWidget->widgetName());
- QString prototype = SpecialInformation::prototype(Group::DCOP,
+ TQString prototype = SpecialInformation::prototype(Group::DCOP,
SpecialInformation::function(Group::DCOP, function));
return localDCOPQuery(prototype, args);
}
@@ -337,12 +337,12 @@ QString KommanderWidget::evalWidgetFunction(const QString& identifier, const QSt
{
printError(i18n("Infinite loop: @%1 called inside @%2.").arg(pWidget->widgetName())
.arg(pWidget->widgetName()));
- return QString();
+ return TQString();
}
else if (!pWidget->hasAssociatedText())
{
printError(i18n("Script for @%1 is empty.").arg(pWidget->widgetName()));
- return QString();
+ return TQString();
}
return pWidget->evalAssociatedText();
}
diff --git a/kommander/widget/kommanderwidget.cpp b/kommander/widget/kommanderwidget.cpp
index 525f662b..4cfbba8c 100644
--- a/kommander/widget/kommanderwidget.cpp
+++ b/kommander/widget/kommanderwidget.cpp
@@ -26,16 +26,16 @@
#include <kprocess.h>
/* QT INCLUDES */
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
/* UNIX INCLUDES */
@@ -51,7 +51,7 @@
#include "parserdata.h"
#include "kommanderwindow.h"
-KommanderWidget::KommanderWidget(QObject *a_thisObject)
+KommanderWidget::KommanderWidget(TQObject *a_thisObject)
{
m_thisObject = a_thisObject;
}
@@ -60,14 +60,14 @@ KommanderWidget::~KommanderWidget()
{
}
-void KommanderWidget::setAssociatedText(const QStringList& a_associations)
+void KommanderWidget::setAssociatedText(const TQStringList& a_associations)
{
m_associatedText = a_associations;
while(m_associatedText.count() < (states().count()))
- m_associatedText += QString(); // sync states and associations
+ m_associatedText += TQString(); // sync states and associations
}
-QStringList KommanderWidget::associatedText() const
+TQStringList KommanderWidget::associatedText() const
{
return m_associatedText;
}
@@ -81,48 +81,48 @@ bool KommanderWidget::hasAssociatedText()
}
-void KommanderWidget::setPopulationText(const QString& a_txt)
+void KommanderWidget::setPopulationText(const TQString& a_txt)
{
m_populationText = a_txt;
}
-QString KommanderWidget::populationText() const
+TQString KommanderWidget::populationText() const
{
return m_populationText;
}
-QStringList KommanderWidget::states() const
+TQStringList KommanderWidget::states() const
{
return m_states;
}
-QStringList KommanderWidget::displayStates() const
+TQStringList KommanderWidget::displayStates() const
{
return m_displayStates;
}
-void KommanderWidget::setStates(const QStringList& a_states)
+void KommanderWidget::setStates(const TQStringList& a_states)
{
m_states = a_states;
}
-void KommanderWidget::setDisplayStates(const QStringList& a_displayStates)
+void KommanderWidget::setDisplayStates(const TQStringList& a_displayStates)
{
m_displayStates = a_displayStates;
}
-QString KommanderWidget::evalAssociatedText() // expands and returns associated text as a string
+TQString KommanderWidget::evalAssociatedText() // expands and returns associated text as a string
{
int index = ( states().findIndex( currentState()) );
if (index == -1)
{
printError(i18n("Invalid state for associated text."));
- return QString();
+ return TQString();
}
return evalAssociatedText(m_associatedText[index]);
}
-QString KommanderWidget::evalAssociatedText(const QString& a_text)
+TQString KommanderWidget::evalAssociatedText(const TQString& a_text)
{
/* New internal parser is used if global flag is set */
if ((KommanderWidget::useInternalParser && !a_text.startsWith("#!")) || a_text.startsWith("#!kommander"))
@@ -132,14 +132,14 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text)
p.setString(a_text);
if (!p.setString(a_text) || !p.parse())
printError(i18n("Line %1: %2.\n").arg(p.errorLine()+1).arg(p.errorMessage()));
- return QString();
+ return TQString();
}
/* Old macro-only parser is implemented below */
bool parserType = KommanderWidget::useInternalParser;
KommanderWidget::useInternalParser = false; //shebang is used, switch to old parser
- QString evalText;
+ TQString evalText;
int pos = 0, baseTextLength = a_text.length();
while (pos < baseTextLength)
{
@@ -159,7 +159,7 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text)
continue;
}
- QString identifier = parseIdentifier(a_text, pos);
+ TQString identifier = parseIdentifier(a_text, pos);
/* comment */
if (identifier.isEmpty())
{
@@ -176,16 +176,16 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text)
continue;
}
bool ok = true;
- QStringList args;
+ TQStringList args;
/* Standard, non-prefixed special */
if (identifier == "if") // if required special handling as it takes expression
{
- QString arg = parseBrackets(a_text, pos, ok);
+ TQString arg = parseBrackets(a_text, pos, ok);
if (!ok)
- return QString();
+ return TQString();
args.append(evalAssociatedText(arg));
evalText += evalIfBlock(args, a_text, pos);
}
@@ -193,7 +193,7 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text)
{
args = parseFunction("Kommander", identifier, a_text, pos, ok);
if (!ok)
- return QString();
+ return TQString();
else if (identifier == "execBegin")
evalText += evalExecBlock(args, a_text, pos);
else if (identifier == "forEach")
@@ -214,10 +214,10 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text)
else if (a_text[pos] == '.')
{
pos++;
- QString function = parseIdentifier(a_text, pos);
+ TQString function = parseIdentifier(a_text, pos);
args = parseFunction(identifier, function, a_text, pos, ok);
if (!ok)
- return QString();
+ return TQString();
switch (SpecialInformation::group(identifier))
{
case Group::Array:
@@ -236,13 +236,13 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text)
evalText += Parser::function(internalParserData(), "input_" + function, args);
break;
default:
- return QString();
+ return TQString();
}
}
else
{
printError(i18n("Unknown special: \'%1\'.").arg(identifier));
- return QString();
+ return TQString();
}
}
@@ -251,14 +251,14 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text)
}
-QString KommanderWidget::DCOPQuery(const QStringList& a_query)
+TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
{
- QString app = a_query[0];
+ TQString app = a_query[0];
app.remove("\"");
- QCString appId = app.latin1(), object = a_query[1].latin1();
+ TQCString appId = app.latin1(), object = a_query[1].latin1();
// parse function arguments
- QString function = a_query[2], pTypes;
+ TQString function = a_query[2], pTypes;
function.remove(' ');
int start = function.find('(');
bool ok = false;
@@ -272,18 +272,18 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query)
if (!ok)
{
printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").arg(a_query[2]));
- return QString();
+ return TQString();
}
- const QStringList argTypes = parseArgs(pTypes, ok);
+ const TQStringList argTypes = parseArgs(pTypes, ok);
if (!ok || argTypes.count() != a_query.count() - 3)
{
printError(i18n("Incorrect arguments in DCOP call \'%1\'.").arg(a_query[2]));
- return QString();
+ return TQString();
}
- QCString replyType;
- QByteArray byteData, byteReply;
- QDataStream byteDataStream(byteData, IO_WriteOnly);
+ TQCString replyType;
+ TQByteArray byteData, byteReply;
+ TQDataStream byteDataStream(byteData, IO_WriteOnly);
for (uint i=0 ; i<argTypes.count(); i++) {
if (argTypes[i] == "int")
byteDataStream << a_query[i+3].toInt();
@@ -295,11 +295,11 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query)
byteDataStream << a_query[i+3].toDouble();
else if (argTypes[i] == "bool")
byteDataStream << (bool)(a_query[i+3] != "false" && a_query[i+3] != "false" && a_query[i+3] != "0");
- else if (argTypes[i] == "QStringList")
+ else if (argTypes[i] == "TQStringList")
if (a_query[i+3].find('\n') != -1)
- byteDataStream << QStringList::split("\n", a_query[i+3], true);
+ byteDataStream << TQStringList::split("\n", a_query[i+3], true);
else
- byteDataStream << QStringList::split("\\n", a_query[i+3], true);
+ byteDataStream << TQStringList::split("\\n", a_query[i+3], true);
else
byteDataStream << a_query[i+3];
}
@@ -308,13 +308,13 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query)
if (!cl || !cl->call(appId, object, function.latin1(), byteData, replyType, byteReply))
{
printError(i18n("Tried to perform DCOP query, but failed."));
- return QString();
+ return TQString();
}
- QDataStream byteReplyStream(byteReply, IO_ReadOnly);
- if (replyType == "QString")
+ TQDataStream byteReplyStream(byteReply, IO_ReadOnly);
+ if (replyType == "TQString")
{
- QString text;
+ TQString text;
byteReplyStream >> text;
return text;
}
@@ -322,17 +322,17 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query)
{
int i;
byteReplyStream >> i;
- return QString::number(i);
+ return TQString::number(i);
}
else if(replyType == "bool")
{
bool b;
byteReplyStream >> b;
- return QString::number(b);
+ return TQString::number(b);
}
- else if (replyType == "QStringList")
+ else if (replyType == "TQStringList")
{
- QStringList text;
+ TQStringList text;
byteReplyStream >> text;
return text.join("\n");
}
@@ -341,12 +341,12 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query)
printError(i18n("DCOP return type %1 is not yet implemented.").arg(replyType.data()));
}
- return QString();
+ return TQString();
}
-QString KommanderWidget::localDCOPQuery(const QString function, const QStringList& args)
+TQString KommanderWidget::localDCOPQuery(const TQString function, const TQStringList& args)
{
- QStringList pArgs;
+ TQStringList pArgs;
pArgs.append(kapp->dcopClient()->appId());
pArgs.append("KommanderIf");
pArgs.append(function);
@@ -355,10 +355,10 @@ QString KommanderWidget::localDCOPQuery(const QString function, const QStringLis
return DCOPQuery(pArgs);
}
-QString KommanderWidget::localDCOPQuery(const QString function, const QString& arg1,
- const QString& arg2, const QString& arg3, const QString& arg4)
+TQString KommanderWidget::localDCOPQuery(const TQString function, const TQString& arg1,
+ const TQString& arg2, const TQString& arg3, const TQString& arg4)
{
- QStringList pArgs;
+ TQStringList pArgs;
pArgs.append(kapp->dcopClient()->appId());
pArgs.append("KommanderIf");
pArgs.append(function);
@@ -372,53 +372,53 @@ QString KommanderWidget::localDCOPQuery(const QString function, const QString& a
}
-QString KommanderWidget::execCommand(const QString& a_command, const QString& a_shell) const
+TQString KommanderWidget::execCommand(const TQString& a_command, const TQString& a_shell) const
{
MyProcess proc(this);
- QString text = proc.run(a_command.local8Bit(), a_shell.latin1());
+ TQString text = proc.run(a_command.local8Bit(), a_shell.latin1());
//FIXME check if exec was successful
return text;
}
-QString KommanderWidget::runDialog(const QString& a_dialog, const QString& a_params)
+TQString KommanderWidget::runDialog(const TQString& a_dialog, const TQString& a_params)
{
- QString pFileName = localDCOPQuery("global(QString)", "_KDDIR") + QString("/") + a_dialog;
- QFileInfo pDialogFile(pFileName);
+ TQString pFileName = localDCOPQuery("global(TQString)", "_KDDIR") + TQString("/") + a_dialog;
+ TQFileInfo pDialogFile(pFileName);
if (!pDialogFile.exists())
{
pFileName = a_dialog;
pDialogFile.setFile(pFileName);
if (!pDialogFile.exists())
- return QString();
+ return TQString();
}
- QString cmd = QString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
+ TQString cmd = TQString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
.arg(pFileName).arg(a_params).arg(getpid()).arg(getpid());
return execCommand(cmd);
}
-void KommanderWidget::printError(const QString& a_error) const
+void KommanderWidget::printError(const TQString& a_error) const
{
if (showErrors)
{
KDialogBase* dialog = new KDialogBase("Error", KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel,
KDialogBase::Yes, KDialogBase::No, 0, 0, true, false,
i18n("Continue"), i18n("Continue && Ignore Next Errors"), i18n("Stop"));
- switch (KMessageBox::createKMessageBox(dialog, QMessageBox::Warning,
- i18n("<qt>Error in widget <b>%1</b>:<p><i>%2</i></qt>").arg(QString(m_thisObject->name()))
- .arg(a_error), QStringList(), QString(), 0, 0))
+ switch (KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning,
+ i18n("<qt>Error in widget <b>%1</b>:<p><i>%2</i></qt>").arg(TQString(m_thisObject->name()))
+ .arg(a_error), TQStringList(), TQString(), 0, 0))
{
case KDialogBase::No:
showErrors = false;
case KDialogBase::Yes:
break;
case KDialogBase::Cancel:
- if (parentDialog()->inherits("QDialog"))
+ if (parentDialog()->inherits("TQDialog"))
{
parentDialog()->close();
exit(-1);
}
- else if (parentDialog()->inherits("QMainWindow"))
+ else if (parentDialog()->inherits("TQMainWindow"))
kapp->quit();
}
}
@@ -430,7 +430,7 @@ void KommanderWidget::printError(const QString& a_error) const
-QString KommanderWidget::parseIdentifier(const QString& s, int& from) const
+TQString KommanderWidget::parseIdentifier(const TQString& s, int& from) const
{
uint start = from;
while (start < s.length() && s[start].isSpace())
@@ -442,14 +442,14 @@ QString KommanderWidget::parseIdentifier(const QString& s, int& from) const
return s.mid(start, end-start);
}
-QString KommanderWidget::parseBrackets(const QString& s, int& from, bool& ok) const
+TQString KommanderWidget::parseBrackets(const TQString& s, int& from, bool& ok) const
{
ok = true;
uint start = from;
while (start < s.length() && s[start].isSpace())
start++;
if (start == s.length() || s[start] != '(')
- return QString();
+ return TQString();
bool quoteSingle = false, quoteDouble = false;
int brackets = 1;
for (uint end = start+1; end < s.length(); end++)
@@ -470,13 +470,13 @@ QString KommanderWidget::parseBrackets(const QString& s, int& from, bool& ok) co
}
}
ok = false;
- return QString();
+ return TQString();
}
-QStringList KommanderWidget::parseArgs(const QString& s, bool &ok)
+TQStringList KommanderWidget::parseArgs(const TQString& s, bool &ok)
{
- QStringList argList;
+ TQStringList argList;
bool quoteDouble = false, quoteSingle = false;
uint i, start = 0, brackets=0;
for (i = 0; i < s.length(); i++)
@@ -495,7 +495,7 @@ QStringList KommanderWidget::parseArgs(const QString& s, bool &ok)
quoteDouble = !quoteDouble;
else if (s[i] == ',' && !quoteDouble && !quoteSingle)
{
- QString arg = s.mid(start, i - start).stripWhiteSpace();
+ TQString arg = s.mid(start, i - start).stripWhiteSpace();
if (!arg.isEmpty())
argList.append(evalAssociatedText(parseQuotes(arg)));
start = i+1;
@@ -504,7 +504,7 @@ QStringList KommanderWidget::parseArgs(const QString& s, bool &ok)
}
if (!quoteDouble && !quoteSingle)
{
- QString arg = s.mid(start, s.length() - start + 1).stripWhiteSpace();
+ TQString arg = s.mid(start, s.length() - start + 1).stripWhiteSpace();
if (!arg.isEmpty())
argList.append(evalAssociatedText(parseQuotes(arg)));
}
@@ -513,11 +513,11 @@ QStringList KommanderWidget::parseArgs(const QString& s, bool &ok)
return argList;
}
-QString KommanderWidget::parseQuotes(const QString& s) const
+TQString KommanderWidget::parseQuotes(const TQString& s) const
{
if (s[0] == s[s.length()-1] && (s[0] == '\'' || s[0] == '\"'))
{
- QMemArray<QChar> buf(s.length());
+ TQMemArray<TQChar> buf(s.length());
int start = 0;
int end = s.length() - 1;
for (int i=1; i<end; i++)
@@ -538,51 +538,51 @@ QString KommanderWidget::parseQuotes(const QString& s) const
}
else
buf[start++] = s[i];
- return QString(buf, start);
+ return TQString(buf, start);
//return s.mid(1, s.length()-2);
}
else return s;
}
-bool KommanderWidget::isWidget(const QString& a_name) const
+bool KommanderWidget::isWidget(const TQString& a_name) const
{
return parseWidget(a_name);
}
-KommanderWidget* KommanderWidget::widgetByName(const QString& a_name) const
+KommanderWidget* KommanderWidget::widgetByName(const TQString& a_name) const
{
return parseWidget(a_name);
}
-KommanderWidget* KommanderWidget::parseWidget(const QString& widgetName) const
+KommanderWidget* KommanderWidget::parseWidget(const TQString& widgetName) const
{
- if (QString(parentDialog()->name()) == widgetName)
+ if (TQString(parentDialog()->name()) == widgetName)
return dynamic_cast <KommanderWidget*>(parentDialog());
- QCString s = widgetName.lower() == "self" ? m_thisObject->name() : widgetName.latin1();
- QObject* childObj = parentDialog()->child(s);
+ TQCString s = widgetName.lower() == "self" ? m_thisObject->name() : widgetName.latin1();
+ TQObject* childObj = parentDialog()->child(s);
/* if (!childObj)
{
Parser parser(internalParserData());
- QString variableValue = parser.variable(widgetName).toString();
+ TQString variableValue = parser.variable(widgetName).toString();
s = variableValue.lower() == "self" ? m_thisObject->name() : variableValue.latin1();
childObj = parentDialog()->child(s);
}*/
return dynamic_cast <KommanderWidget*>(childObj);
}
-QStringList KommanderWidget::parseFunction(const QString& group, const QString& function,
- const QString& s, int& from, bool& ok)
+TQStringList KommanderWidget::parseFunction(const TQString& group, const TQString& function,
+ const TQString& s, int& from, bool& ok)
{
ok = true;
bool success = false;
- QString arg = parseBrackets(s, from, ok);
+ TQString arg = parseBrackets(s, from, ok);
if (!ok)
{
printError(i18n("Unmatched parenthesis after \'%1\'.").arg(function));
- return QString();
+ return TQString();
}
- const QStringList args = parseArgs(arg, ok);
+ const TQStringList args = parseArgs(arg, ok);
int gname = SpecialInformation::group(group);
int fname = SpecialInformation::function(gname, function);
bool extraArg = gname == Group::DCOP;
@@ -611,7 +611,7 @@ QStringList KommanderWidget::parseFunction(const QString& group, const QString&
return args;
}
-int KommanderWidget::parseBlockBoundary(const QString& s, int from, const QStringList& args) const
+int KommanderWidget::parseBlockBoundary(const TQString& s, int from, const TQStringList& args) const
{
int shortest = -1;
for (uint i=0; i<args.count(); i++)
@@ -625,10 +625,10 @@ int KommanderWidget::parseBlockBoundary(const QString& s, int from, const QStrin
-QString KommanderWidget::substituteVariable(QString text, QString variable, QString value) const
+TQString KommanderWidget::substituteVariable(TQString text, TQString variable, TQString value) const
{
- QString var = QString("@%1").arg(variable);
- QString newtext;
+ TQString var = TQString("@%1").arg(variable);
+ TQString newtext;
int newpos, pos = 0;
while (true)
{
@@ -649,40 +649,40 @@ QString KommanderWidget::substituteVariable(QString text, QString variable, QStr
-QWidget* KommanderWidget::parentDialog() const
+TQWidget* KommanderWidget::parentDialog() const
{
- QObject *superParent = m_thisObject;
+ TQObject *superParent = m_thisObject;
while (superParent->parent())
{
superParent = superParent->parent();
- if (superParent->inherits("QDialog") || superParent->inherits("QMainWindow"))
+ if (superParent->inherits("TQDialog") || superParent->inherits("TQMainWindow"))
break;
}
- return (QWidget*)superParent;
+ return (TQWidget*)superParent;
}
-QString KommanderWidget::global(const QString& variableName)
+TQString KommanderWidget::global(const TQString& variableName)
{
- QString var = variableName.startsWith("_") ? variableName : QString("_")+ variableName;
+ TQString var = variableName.startsWith("_") ? variableName : TQString("_")+ variableName;
Parser parser(internalParserData());
return parser.variable(var).toString();
}
-void KommanderWidget::setGlobal(const QString& variableName, const QString& value)
+void KommanderWidget::setGlobal(const TQString& variableName, const TQString& value)
{
- QString var = variableName.startsWith("_") ? variableName : QString("_")+ variableName;
+ TQString var = variableName.startsWith("_") ? variableName : TQString("_")+ variableName;
Parser parser(internalParserData());
parser.setVariable(var, value);
}
-QString KommanderWidget::handleDCOP(const int function, const QStringList& args)
+TQString KommanderWidget::handleDCOP(const int function, const TQStringList& args)
{
- QWidget* current = dynamic_cast<QWidget*>(m_thisObject);
+ TQWidget* current = dynamic_cast<TQWidget*>(m_thisObject);
if (!current)
- return QString();
+ return TQString();
switch(function) {
case DCOP::setEnabled:
current->setEnabled( args[0] != "false" && args[0] != "0");
@@ -694,15 +694,15 @@ QString KommanderWidget::handleDCOP(const int function, const QStringList& args)
return current->className();
case DCOP::children:
{
- QStringList matching;
- QObjectList* widgets = current->queryList("QWidget", 0, false, args.count() == 0 || args[0] != "false");
- for (QObject* w = widgets->first(); w; w = widgets->next())
+ TQStringList matching;
+ TQObjectList* widgets = current->queryList("TQWidget", 0, false, args.count() == 0 || args[0] != "false");
+ for (TQObject* w = widgets->first(); w; w = widgets->next())
if (w->name() && (dynamic_cast<KommanderWidget*>(w)))
matching.append(w->name());
return matching.join("\n");
}
}
- return QString();
+ return TQString();
}
bool KommanderWidget::isFunctionSupported(int f)
@@ -720,21 +720,21 @@ ParserData* KommanderWidget::internalParserData() const
return m_parserData;
}
-QString KommanderWidget::fileName()
+TQString KommanderWidget::fileName()
{
KommanderWindow* window = dynamic_cast<KommanderWindow*>(parentDialog());
if (window)
- return QString(window->fileName());
+ return TQString(window->fileName());
else
- return QString();
+ return TQString();
}
-QString KommanderWidget::widgetName() const
+TQString KommanderWidget::widgetName() const
{
if (m_thisObject)
- return QString::fromLatin1(m_thisObject->name());
+ return TQString::fromLatin1(m_thisObject->name());
else
- return QString();
+ return TQString();
}
bool KommanderWidget::inEditor = false;
diff --git a/kommander/widget/kommanderwidget.h b/kommander/widget/kommanderwidget.h
index 90a748b2..c9576010 100644
--- a/kommander/widget/kommanderwidget.h
+++ b/kommander/widget/kommanderwidget.h
@@ -23,11 +23,11 @@
#include "kommander_export.h"
/* QT INCLUDES */
-#include <qmap.h>
-#include <qobject.h>
-#include <qpair.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqpair.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class ParserData;
@@ -35,64 +35,64 @@ class KOMMANDER_EXPORT KommanderWidget
{
friend class MyProcess;
public:
- KommanderWidget(QObject *);
+ KommanderWidget(TQObject *);
virtual ~KommanderWidget();
//List of available states. Most widgets have only one state, but f. e. radiobutton has both
// 'checked' and 'unchecked'
- virtual QStringList states() const;
- virtual QStringList displayStates() const;
- virtual QString currentState() const = 0;
+ virtual TQStringList states() const;
+ virtual TQStringList displayStates() const;
+ virtual TQString currentState() const = 0;
virtual bool isKommanderWidget() const = 0;
// Associated script
- virtual void setAssociatedText(const QStringList& a_associations);
- virtual QStringList associatedText() const;
+ virtual void setAssociatedText(const TQStringList& a_associations);
+ virtual TQStringList associatedText() const;
virtual bool hasAssociatedText();
// Execute default script, expanding all @macros.
- virtual QString evalAssociatedText();
+ virtual TQString evalAssociatedText();
// Execute given script, expanding all @macros.
- virtual QString evalAssociatedText(const QString&);
+ virtual TQString evalAssociatedText(const TQString&);
// Evaluate given Kommander function using given args.
- virtual QString evalFunction(const QString& function, const QStringList& args);
+ virtual TQString evalFunction(const TQString& function, const TQStringList& args);
// Parse and evaluate function for given widget, converting it to appropriate DCOP call.
- virtual QString evalWidgetFunction(const QString& identifier, const QString& s, int& pos);
+ virtual TQString evalWidgetFunction(const TQString& identifier, const TQString& s, int& pos);
// Evaluate given array function using given args.
- virtual QString evalArrayFunction(const QString&, const QStringList&);
+ virtual TQString evalArrayFunction(const TQString&, const TQStringList&);
// Parse and evaluate given execBegin..execEnd block.
- virtual QString evalExecBlock(const QStringList&, const QString& s, int& pos);
+ virtual TQString evalExecBlock(const TQStringList&, const TQString& s, int& pos);
// Parse and evaluate given forEach..end block.
- virtual QString evalForEachBlock(const QStringList&, const QString& s, int& pos);
+ virtual TQString evalForEachBlock(const TQStringList&, const TQString& s, int& pos);
// Parse and evaluate given for..end block.
- virtual QString evalForBlock(const QStringList&, const QString& s, int& pos);
+ virtual TQString evalForBlock(const TQStringList&, const TQString& s, int& pos);
// Parse and evaluate given switch..case..end block.
- virtual QString evalSwitchBlock(const QStringList&, const QString& s, int& pos);
+ virtual TQString evalSwitchBlock(const TQStringList&, const TQString& s, int& pos);
// Parse and evaluate given if..endif block.
- virtual QString evalIfBlock(const QStringList&, const QString& s, int& pos);
+ virtual TQString evalIfBlock(const TQStringList&, const TQString& s, int& pos);
// Population text. It will become widgetText after populate() is called
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
virtual void populate() = 0;
// Handles all widget-specific DCOP calls
- virtual QString handleDCOP(int function, const QStringList& args = QStringList());
+ virtual TQString handleDCOP(int function, const TQStringList& args = TQStringList());
// Checks if appropriate function is supported by widget. By default all functions
// are reported as supported: use this to allow recognizing incorrect function calls.
virtual bool isFunctionSupported(int function);
// Checks if the function is common widget function (i. e. supported by all widgets)
virtual bool isCommonFunction(int function);
// Checks if the string is a valid widget name)
- virtual bool isWidget(const QString& a_name) const;
+ virtual bool isWidget(const TQString& a_name) const;
// Returns widget from name
- virtual KommanderWidget* widgetByName(const QString& a_name) const;
+ virtual KommanderWidget* widgetByName(const TQString& a_name) const;
// Returns current widget name;
- virtual QString widgetName() const;
+ virtual TQString widgetName() const;
// Returns filename associated with the dialog
- virtual QString fileName();
+ virtual TQString fileName();
- QObject* object() { return m_thisObject;}
+ TQObject* object() { return m_thisObject;}
// Recognizes editor vs executor mode
@@ -102,55 +102,55 @@ public:
// Default parser
static bool useInternalParser;
// Return global variable value
- QString global(const QString& variableName);
+ TQString global(const TQString& variableName);
// Set global variable value
- void setGlobal(const QString& variableName, const QString& value);
+ void setGlobal(const TQString& variableName, const TQString& value);
protected:
- virtual void setStates(const QStringList& a_states);
- virtual void setDisplayStates(const QStringList& a_displayStates);
+ virtual void setStates(const TQStringList& a_states);
+ virtual void setDisplayStates(const TQStringList& a_displayStates);
// Execute DCOP query and return its result or null on failure
- // Only QString and int are now handled
- QString DCOPQuery(const QStringList& args);
- QString localDCOPQuery(const QString function, const QStringList& args = QStringList());
- QString localDCOPQuery(const QString function, const QString& arg1,
- const QString& arg2, const QString& arg3 = QString::null,
- const QString& arg4 = QString::null);
+ // Only TQString and int are now handled
+ TQString DCOPQuery(const TQStringList& args);
+ TQString localDCOPQuery(const TQString function, const TQStringList& args = TQStringList());
+ TQString localDCOPQuery(const TQString function, const TQString& arg1,
+ const TQString& arg2, const TQString& arg3 = TQString::null,
+ const TQString& arg4 = TQString::null);
// Execute given command, return its result
- QString execCommand(const QString& a_command, const QString& a_shell = QString::null) const;
+ TQString execCommand(const TQString& a_command, const TQString& a_shell = TQString::null) const;
// Find and run dialog (with optional parameters)
- QString runDialog(const QString& a_dialog, const QString& a_params = QString::null);
+ TQString runDialog(const TQString& a_dialog, const TQString& a_params = TQString::null);
// Display error message a_error; display current class name if no other is given
- void printError(const QString& a_error) const;
+ void printError(const TQString& a_error) const;
// Auxiliary functions for parser
// Find matching brackets starting from current position
- QString parseBrackets(const QString& s, int& from, bool& ok) const;
+ TQString parseBrackets(const TQString& s, int& from, bool& ok) const;
// Return identifier: the longest string of letters and numbers starting from i
- QString parseIdentifier(const QString& s, int& from) const;
+ TQString parseIdentifier(const TQString& s, int& from) const;
// Parse arguments for given function. Returns list of arguments without quotations
- QStringList parseArgs(const QString& s, bool &ok);
+ TQStringList parseArgs(const TQString& s, bool &ok);
// Remove quotes from given identifier
- QString parseQuotes(const QString& s) const;
+ TQString parseQuotes(const TQString& s) const;
// Parse function
- QStringList parseFunction(const QString& group, const QString& function,
- const QString& s, int& from, bool& ok);
+ TQStringList parseFunction(const TQString& group, const TQString& function,
+ const TQString& s, int& from, bool& ok);
// Detect and return block boundary
- int parseBlockBoundary(const QString& s, int from, const QStringList& args) const;
+ int parseBlockBoundary(const TQString& s, int from, const TQStringList& args) const;
// Parse given identifier as widget name
- KommanderWidget* parseWidget(const QString& name) const;
+ KommanderWidget* parseWidget(const TQString& name) const;
// Return parent dialog of this widget
- QWidget* parentDialog() const;
- QString substituteVariable(QString text, QString variable, QString value) const;
+ TQWidget* parentDialog() const;
+ TQString substituteVariable(TQString text, TQString variable, TQString value) const;
ParserData* internalParserData() const;
- QObject *m_thisObject;
- QStringList m_states;
- QStringList m_displayStates;
- QStringList m_associatedText;
- QString m_populationText;
+ TQObject *m_thisObject;
+ TQStringList m_states;
+ TQStringList m_displayStates;
+ TQStringList m_associatedText;
+ TQString m_populationText;
// Internal parser data
static ParserData* m_parserData;
diff --git a/kommander/widget/kommanderwindow.cpp b/kommander/widget/kommanderwindow.cpp
index b536eb87..e8b597b2 100644
--- a/kommander/widget/kommanderwindow.cpp
+++ b/kommander/widget/kommanderwindow.cpp
@@ -15,7 +15,7 @@
#include "kommanderwindow.h"
-KommanderWindow::KommanderWindow(QObject* object) : KommanderWidget(object)
+KommanderWindow::KommanderWindow(TQObject* object) : KommanderWidget(object)
{
}
@@ -24,12 +24,12 @@ KommanderWindow::~KommanderWindow()
}
-void KommanderWindow::setFileName(const QString& s)
+void KommanderWindow::setFileName(const TQString& s)
{
m_fileName = s;
}
-QString KommanderWindow::fileName()
+TQString KommanderWindow::fileName()
{
return m_fileName;
}
diff --git a/kommander/widget/kommanderwindow.h b/kommander/widget/kommanderwindow.h
index 023bd395..18c0ee29 100644
--- a/kommander/widget/kommanderwindow.h
+++ b/kommander/widget/kommanderwindow.h
@@ -21,14 +21,14 @@
class KOMMANDER_EXPORT KommanderWindow : public KommanderWidget
{
public:
- KommanderWindow(QObject *);
+ KommanderWindow(TQObject *);
virtual ~KommanderWindow();
- virtual void setFileName(const QString& s);
- virtual QString fileName();
+ virtual void setFileName(const TQString& s);
+ virtual TQString fileName();
protected:
private:
- QString m_fileName;
+ TQString m_fileName;
};
diff --git a/kommander/widget/myprocess.cpp b/kommander/widget/myprocess.cpp
index e7e05e3b..59eb67fb 100644
--- a/kommander/widget/myprocess.cpp
+++ b/kommander/widget/myprocess.cpp
@@ -19,9 +19,9 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qapplication.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include "myprocess.h"
@@ -32,15 +32,15 @@ MyProcess::MyProcess(const KommanderWidget *a_atw)
{
}
-void qt_enter_modal(QWidget *widget);
-void qt_leave_modal(QWidget *widget);
+void qt_enter_modal(TQWidget *widget);
+void qt_leave_modal(TQWidget *widget);
void MyProcess::setBlocking(bool blocking)
{
m_blocking = blocking;
}
-QString MyProcess::output() const
+TQString MyProcess::output() const
{
return m_output;
}
@@ -59,16 +59,16 @@ void MyProcess::cancel()
}
}
-QString MyProcess::run(const QString& a_command, const QString& a_shell)
+TQString MyProcess::run(const TQString& a_command, const TQString& a_shell)
{
- QString at = a_command.stripWhiteSpace();
+ TQString at = a_command.stripWhiteSpace();
if (at.isEmpty())
{
emit processExited(0);
- return QString();
+ return TQString();
}
- QString shellName = a_shell;
+ TQString shellName = a_shell;
if (shellName.isEmpty())
shellName = "/bin/sh";
@@ -85,24 +85,24 @@ QString MyProcess::run(const QString& a_command, const QString& a_shell)
mProcess = new KProcess;
(*mProcess) << shellName.latin1();
- connect(mProcess, SIGNAL(receivedStdout(KProcess*, char*, int)),
- SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(mProcess, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
+ connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(mProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
if(!mProcess->start(KProcess::NotifyOnExit, KProcess::All))
{
m_atw->printError(i18n("<qt>Failed to start shell process<br><b>%1</b></qt>").arg(shellName));
- return QString();
+ return TQString();
}
mProcess->writeStdin(m_input, m_input.length());
mProcess->closeStdin();
if (!m_blocking)
- return QString();
+ return TQString();
else
{
- QWidget dummy(0, 0, WType_Dialog | WShowModal);
- dummy.setFocusPolicy(QWidget::NoFocus);
+ TQWidget dummy(0, 0, WType_Dialog | WShowModal);
+ dummy.setFocusPolicy(TQWidget::NoFocus);
m_loopStarted = true;
qt_enter_modal(&dummy);
qApp->enter_loop();
@@ -117,7 +117,7 @@ QString MyProcess::run(const QString& a_command, const QString& a_shell)
void MyProcess::slotReceivedStdout(KProcess*, char* a_buffer, int a_len)
{
- m_output += QString::fromLocal8Bit(a_buffer, a_len);
+ m_output += TQString::fromLocal8Bit(a_buffer, a_len);
emit processReceivedStdout(this, a_buffer, a_len);
}
diff --git a/kommander/widget/myprocess.h b/kommander/widget/myprocess.h
index 8487f170..36af1b48 100644
--- a/kommander/widget/myprocess.h
+++ b/kommander/widget/myprocess.h
@@ -20,8 +20,8 @@
#include <kprocess.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include "kommander_export.h"
class KommanderWidget;
@@ -33,12 +33,12 @@ public:
MyProcess(const KommanderWidget *);
// Run given command, using a_shell as a shell (this can be overridden by shebang in the first line)
// Process is run in blocking mode.
- QString run(const QString& a_command, const QString& a_shell = "/bin/sh");
+ TQString run(const TQString& a_command, const TQString& a_shell = "/bin/sh");
// Kill running process
void cancel();
void setBlocking(bool blocking);
bool isBlocking() const;
- QString output() const;
+ TQString output() const;
signals:
void processExited(MyProcess*);
void processReceivedStdout(MyProcess*, char*, int);
@@ -47,8 +47,8 @@ private slots:
void slotProcessExited(KProcess*);
protected:
const KommanderWidget *m_atw;
- QString m_output;
- QCString m_input;
+ TQString m_output;
+ TQCString m_input;
bool m_loopStarted;
bool m_blocking;
bool m_handleOutput;
diff --git a/kommander/widget/parsenode.cpp b/kommander/widget/parsenode.cpp
index d080e114..492c00fb 100644
--- a/kommander/widget/parsenode.cpp
+++ b/kommander/widget/parsenode.cpp
@@ -22,7 +22,7 @@ ParseNode::ParseNode() : m_type(ValueNone), m_context(-1)
{
}
-ParseNode::ParseNode(const QString& s) : m_type(ValueString), m_string(s), m_context(-1)
+ParseNode::ParseNode(const TQString& s) : m_type(ValueString), m_string(s), m_context(-1)
{
}
@@ -38,16 +38,16 @@ ParseNode::ParseNode(double d) : m_type(ValueDouble), m_double(d), m_context(-1)
{
}
-ParseNode::ParseNode(Keyword k) : m_type(ValueKeyword), m_keyword(k), m_string(QString::null), m_context(-1)
+ParseNode::ParseNode(Keyword k) : m_type(ValueKeyword), m_keyword(k), m_string(TQString::null), m_context(-1)
{
}
-ParseNode::ParseNode(Keyword k, const QString& name) : m_type(ValueKeyword), m_keyword(k), m_context(-1)
+ParseNode::ParseNode(Keyword k, const TQString& name) : m_type(ValueKeyword), m_keyword(k), m_context(-1)
{
- m_string = (k == Variable) ? name : QString::null;
+ m_string = (k == Variable) ? name : TQString::null;
}
-ParseNode ParseNode::error(const QString& s)
+ParseNode ParseNode::error(const TQString& s)
{
ParseNode p;
p.m_string = s;
@@ -65,13 +65,13 @@ Keyword ParseNode::keyword() const
return isKeyword() ? m_keyword : Invalid;
}
-QString ParseNode::toString() const
+TQString ParseNode::toString() const
{
switch(type()) {
case ValueString: return m_string;
- case ValueInt: return QString::number(m_int);
- case ValueDouble: return QString::number(m_double);
- default: return QString();
+ case ValueInt: return TQString::number(m_int);
+ case ValueDouble: return TQString::number(m_double);
+ default: return TQString();
}
}
@@ -120,14 +120,14 @@ bool ParseNode::isVariable() const
return type() == ValueKeyword && keyword() == Variable;
}
-QString ParseNode::variableName() const
+TQString ParseNode::variableName() const
{
- return isVariable() ? m_string : QString();
+ return isVariable() ? m_string : TQString();
}
-QString ParseNode::errorMessage() const
+TQString ParseNode::errorMessage() const
{
- return isValid() ? QString() : m_string;
+ return isValid() ? TQString() : m_string;
}
@@ -168,7 +168,7 @@ bool ParseNode::operator==(bool b) const
return toBool() == b;
}
-bool ParseNode::operator==(const QString& s) const
+bool ParseNode::operator==(const TQString& s) const
{
return toString() == s;
}
@@ -215,13 +215,13 @@ void ParseNode::setValue(double d)
m_double = d;
}
-void ParseNode::setValue(const QString& s)
+void ParseNode::setValue(const TQString& s)
{
m_type = ValueString;
m_string = s;
}
-void ParseNode::setVariable(const QString& name)
+void ParseNode::setVariable(const TQString& name)
{
m_type = ValueKeyword;
m_keyword = Variable;
diff --git a/kommander/widget/parsenode.h b/kommander/widget/parsenode.h
index aa657d35..42ffbf71 100644
--- a/kommander/widget/parsenode.h
+++ b/kommander/widget/parsenode.h
@@ -17,7 +17,7 @@
#ifndef _HAVE_PARSENODE_H_
#define _HAVE_PARSENODE_H_
-#include <qstring.h>
+#include <tqstring.h>
namespace Parse
{
@@ -40,7 +40,7 @@ public:
/* Default constructor */
ParseNode();
/* Create node from string */
- ParseNode(const QString& s);
+ ParseNode(const TQString& s);
/* Create node from integer */
ParseNode(int i);
/* Create node from integer */
@@ -50,16 +50,16 @@ public:
/* Create node from keyword */
ParseNode(Parse::Keyword k);
/* Create node from keyword and variable name */
- ParseNode(Parse::Keyword k, const QString& s);
+ ParseNode(Parse::Keyword k, const TQString& s);
/* Create error node with optional error message */
- static ParseNode error(const QString& s);
+ static ParseNode error(const TQString& s);
/* Return current type */
Parse::ValueType type() const;
/* Return current keyword if appropriate */
Parse::Keyword keyword() const;
/* Cast value to string */
- QString toString() const;
+ TQString toString() const;
/* Cast value to integer */
int toInt() const;
/* Cast value to double */
@@ -75,9 +75,9 @@ public:
/* Check if current value is a variable */
bool isVariable() const;
/* Return the name of variable */
- QString variableName() const;
+ TQString variableName() const;
/* Return error message if applicable */
- QString errorMessage() const;
+ TQString errorMessage() const;
/* Calculate common type for two nodes */
Parse::ValueType commonType(const ParseNode& p) const;
/* Find common type and compare values */
@@ -85,7 +85,7 @@ public:
/* Various comparing functions */
bool operator==(int i) const;
bool operator==(bool b) const;
- bool operator==(const QString& s) const;
+ bool operator==(const TQString& s) const;
bool operator==(const ParseNode& p) const;
bool operator!=(const ParseNode& p) const;
bool operator>=(const ParseNode& p) const;
@@ -97,9 +97,9 @@ public:
/* set value as double */
void setValue(double d);
/* set value as string */
- void setValue(const QString& s);
+ void setValue(const TQString& s);
/* set value as variable */
- void setVariable(const QString& name);
+ void setVariable(const TQString& name);
/* check if it is correct value */
bool isValue() const;
/* for setting some context information, f. e. for bug reporting */
@@ -114,7 +114,7 @@ private:
double m_double;
Parse::Keyword m_keyword;
};
- QString m_string;
+ TQString m_string;
int m_context;
};
diff --git a/kommander/widget/parser.cpp b/kommander/widget/parser.cpp
index 1424d6c7..04748e45 100644
--- a/kommander/widget/parser.cpp
+++ b/kommander/widget/parser.cpp
@@ -22,23 +22,23 @@
using namespace Parse;
-QString unescape(QString s)
+TQString unescape(TQString s)
{
return s.replace("\\\"", "\"").replace("\\t", "\t").replace("\\n", "\n").replace("\\\\", "\\");
}
-Parser::Parser(ParserData* pData) : m_data(pData), m_start(0), m_error(QString::null), m_errorPosition(0),
+Parser::Parser(ParserData* pData) : m_data(pData), m_start(0), m_error(TQString::null), m_errorPosition(0),
m_widget(0)
{
}
-Parser::Parser(ParserData* pData, const QString& expr) : m_data(pData), m_start(0),
- m_error(QString::null), m_errorPosition(0), m_widget(0)
+Parser::Parser(ParserData* pData, const TQString& expr) : m_data(pData), m_start(0),
+ m_error(TQString::null), m_errorPosition(0), m_widget(0)
{
setString(expr);
}
-bool Parser::setString(const QString& s)
+bool Parser::setString(const TQString& s)
{
reset();
m_parts.clear();
@@ -78,7 +78,7 @@ bool Parser::setString(const QString& s)
else if (s[start].isDigit()) // number: 1000 or 2.45
{
bool decimal = false;
- for (i = start+1; s[i].isDigit() || (!decimal && s[i] == QChar('.')); i++)
+ for (i = start+1; s[i].isDigit() || (!decimal && s[i] == TQChar('.')); i++)
if (s[i] == '.')
decimal = true;
if (decimal)
@@ -91,7 +91,7 @@ bool Parser::setString(const QString& s)
{
for (i = start+1; s[i].isLetterOrNumber() || s[i] == '_'; i++)
;
- QString name = s.mid(start, i - start);
+ TQString name = s.mid(start, i - start);
insertNode(ParseNode(m_data->stringToKeyword(name), name), lines);
start = i;
} // comment
@@ -131,28 +131,28 @@ void Parser::insertNode(ParseNode p, int line)
m_parts.append(p);
}
-QString Parser::errorMessage() const
+TQString Parser::errorMessage() const
{
return m_error;
}
-QString Parser::function(ParserData* data, const QString& name, const QStringList& params)
+TQString Parser::function(ParserData* data, const TQString& name, const TQStringList& params)
{
ParameterList par;
- for (QStringList::ConstIterator Iter = params.begin(); Iter != params.end(); ++Iter)
+ for (TQStringList::ConstIterator Iter = params.begin(); Iter != params.end(); ++Iter)
par.append(*Iter);
Function f = data->function(name);
return f.execute(0, par).toString();
}
-QString Parser::expression(Mode mode)
+TQString Parser::expression(Mode mode)
{
reset();
ParseNode p = parseExpression(mode);
if (!isError())
return p.toString();
else
- return QString();
+ return TQString();
}
bool Parser::isError() const
@@ -206,14 +206,14 @@ ParseNode Parser::parseValue(Mode mode)
{
if (tryKeyword(LeftBracket, CheckOnly))
{
- QString index = parseValue(mode).toString();
+ TQString index = parseValue(mode).toString();
tryKeyword(RightBracket);
- QString arr = p.variableName();
+ TQString arr = p.variableName();
return arrayValue(arr, index);
}
else if (tryKeyword(Dot, CheckOnly))
{
- QString value = variable(p.variableName()).toString();
+ TQString value = variable(p.variableName()).toString();
if (m_widget && m_widget->isWidget(value))
{
m_start--;
@@ -300,7 +300,7 @@ ParseNode Parser::parseAdd(Mode mode)
{
if (k == Plus)
if (type == ValueString)
- p = QString(p.toString() + p2.toString());
+ p = TQString(p.toString() + p2.toString());
else if (type == ValueDouble)
p = p.toDouble() + p2.toDouble();
else
@@ -410,7 +410,7 @@ ParseNode Parser::parseExpression(Mode mode)
ParseNode Parser::parseFunction(Mode mode)
{
int pos = m_start;
- QString name = next().variableName();
+ TQString name = next().variableName();
Function f = m_data->function(name);
m_start++;
ParameterList params;
@@ -440,10 +440,10 @@ ParseNode Parser::parseFunction(Mode mode)
return ParseNode();
}
-ParseNode Parser::parseWidget(Mode mode, const QString &widgetName)
+ParseNode Parser::parseWidget(Mode mode, const TQString &widgetName)
{
int pos = m_start;
- QString widget;
+ TQString widget;
if (widgetName.isNull())
widget = nextVariable(mode);
else
@@ -452,7 +452,7 @@ ParseNode Parser::parseWidget(Mode mode, const QString &widgetName)
if (!tryKeyword(Dot))
return ParseNode();
- QString var = nextVariable();
+ TQString var = nextVariable();
if (var.isNull())
return ParseNode();
ParameterList params;
@@ -483,10 +483,10 @@ ParseNode Parser::parseWidget(Mode mode, const QString &widgetName)
ParseNode Parser::parseAssignment(Mode mode)
{
- QString var = nextVariable();
+ TQString var = nextVariable();
if (tryKeyword(LeftBracket, CheckOnly))
{
- QString index = parseValue(mode).toString();
+ TQString index = parseValue(mode).toString();
tryKeyword(RightBracket);
tryKeyword(Assign);
ParseNode p = parseExpression(mode);
@@ -501,7 +501,7 @@ ParseNode Parser::parseAssignment(Mode mode)
}
else if (tryKeyword(Dot, CheckOnly))
{
- QString value = variable(var).toString();
+ TQString value = variable(var).toString();
if (m_widget && m_widget->isWidget(value))
{
m_start--;
@@ -585,7 +585,7 @@ Parse::Flow Parser::parseWhile(Mode mode)
Parse::Flow Parser::parseFor(Mode mode)
{
m_start++;
- QString var = nextVariable();
+ TQString var = nextVariable();
tryKeyword(Assign);
int start = parseExpression(mode).toInt();
tryKeyword(To);
@@ -620,16 +620,16 @@ Parse::Flow Parser::parseFor(Mode mode)
Parse::Flow Parser::parseForeach(Mode mode)
{
m_start++;
- QString var = nextVariable();
+ TQString var = nextVariable();
tryKeyword(In);
- QString arr = nextVariable();
+ TQString arr = nextVariable();
tryKeyword(Do);
int start = m_start;
Parse::Flow flow = FlowStandard;
if (isArray(arr) && array(arr).count())
{
- const QMap<QString, ParseNode> A = array(arr);
- for (QMapConstIterator<QString, ParseNode> It = A.begin(); It != A.end(); ++It)
+ const TQMap<TQString, ParseNode> A = array(arr);
+ for (TQMapConstIterator<TQString, ParseNode> It = A.begin(); It != A.end(); ++It)
{
m_start = start;
setVariable(var, It.key());
@@ -652,7 +652,7 @@ Parse::Flow Parser::parseForeach(Mode mode)
void Parser::parseSwitch(Mode mode)
{
m_start++;
- QString var = nextVariable();
+ TQString var = nextVariable();
ParseNode caseValue = variable(var);
bool executed = false;
tryKeyword(Semicolon, CheckOnly);
@@ -688,7 +688,7 @@ Flow Parser::parseCommand(Mode mode)
return FlowBreak;
else if (isFunction())
{
- QString name = next().variableName();
+ TQString name = next().variableName();
parseFunction(mode);
if (name == "return" && mode == Execute)
return FlowExit;
@@ -749,7 +749,7 @@ bool Parser::tryVariable(Mode mode)
{
if (next().isVariable())
{
- QString name = next().variableName();
+ TQString name = next().variableName();
m_start++;
return true;
}
@@ -758,17 +758,17 @@ bool Parser::tryVariable(Mode mode)
return false;
}
-QString Parser::nextVariable(Mode mode)
+TQString Parser::nextVariable(Mode mode)
{
if (next().isVariable())
{
- QString name = next().variableName();
+ TQString name = next().variableName();
m_start++;
return name;
}
else if (mode == Execute)
setError(i18n("Expected variable"));
- return QString();
+ return TQString();
}
@@ -785,16 +785,16 @@ bool Parser::isWidget() const
void Parser::reset()
{
m_start = 0;
- m_error = QString::null;
+ m_error = TQString::null;
m_errorPosition = 0;
}
-void Parser::setError(const QString& msg)
+void Parser::setError(const TQString& msg)
{
setError(msg, m_start);
}
-void Parser::setError(const QString& msg, int pos)
+void Parser::setError(const TQString& msg, int pos)
{
if (m_error.isNull())
{
@@ -803,7 +803,7 @@ void Parser::setError(const QString& msg, int pos)
}
}
-void Parser::setVariable(const QString& name, ParseNode value)
+void Parser::setVariable(const TQString& name, ParseNode value)
{
if (isGlobal(name))
m_globalVariables[name] = value;
@@ -811,7 +811,7 @@ void Parser::setVariable(const QString& name, ParseNode value)
m_variables[name] = value;
}
-ParseNode Parser::variable(const QString& name) const
+ParseNode Parser::variable(const TQString& name) const
{
if (isGlobal(name))
return m_globalVariables.contains(name) ? m_globalVariables[name] : ParseNode();
@@ -819,17 +819,17 @@ ParseNode Parser::variable(const QString& name) const
return m_variables.contains(name) ? m_variables[name] : ParseNode();
}
-bool Parser::isGlobal(const QString& name) const
+bool Parser::isGlobal(const TQString& name) const
{
return !name.isEmpty() && name[0] == '_';
}
-bool Parser::isVariable(const QString& name) const
+bool Parser::isVariable(const TQString& name) const
{
return m_variables.contains(name) || m_globalVariables.contains(name);
}
-void Parser::unsetVariable(const QString& key)
+void Parser::unsetVariable(const TQString& key)
{
if (isGlobal(key))
m_globalVariables.remove(key);
@@ -837,7 +837,7 @@ void Parser::unsetVariable(const QString& key)
m_variables.remove(key);
}
-const QMap<QString, ParseNode>& Parser::array(const QString& name) const
+const TQMap<TQString, ParseNode>& Parser::array(const TQString& name) const
{
if (isGlobal(name))
return m_globalArrays[name];
@@ -845,12 +845,12 @@ const QMap<QString, ParseNode>& Parser::array(const QString& name) const
return m_arrays[name];
}
-bool Parser::isArray(const QString& name) const
+bool Parser::isArray(const TQString& name) const
{
return m_arrays.contains(name) || m_globalArrays.contains(name);
}
-void Parser::setArray(const QString& name, const QString& key, ParseNode value)
+void Parser::setArray(const TQString& name, const TQString& key, ParseNode value)
{
if (isGlobal(name))
m_globalArrays[name][key] = value;
@@ -858,7 +858,7 @@ void Parser::setArray(const QString& name, const QString& key, ParseNode value)
m_arrays[name][key] = value;
}
-void Parser::unsetArray(const QString& name, const QString& key)
+void Parser::unsetArray(const TQString& name, const TQString& key)
{
if (isGlobal(name))
{
@@ -876,7 +876,7 @@ void Parser::unsetArray(const QString& name, const QString& key)
}
}
-ParseNode Parser::arrayValue(const QString& name, const QString& key) const
+ParseNode Parser::arrayValue(const TQString& name, const TQString& key) const
{
if (!isArray(name))
return ParseNode();
@@ -893,7 +893,7 @@ KommanderWidget* Parser::currentWidget() const
return m_widget;
}
-QMap<QString, ParseNode> Parser::m_globalVariables;
-QMap<QString, QMap<QString, ParseNode> > Parser::m_globalArrays;
+TQMap<TQString, ParseNode> Parser::m_globalVariables;
+TQMap<TQString, TQMap<TQString, ParseNode> > Parser::m_globalArrays;
diff --git a/kommander/widget/parser.h b/kommander/widget/parser.h
index 6dc66258..3ad7d59c 100644
--- a/kommander/widget/parser.h
+++ b/kommander/widget/parser.h
@@ -20,9 +20,9 @@
#include "kommander_export.h"
#include "parsenode.h"
-#include <qvaluevector.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class KommanderWidget;
class ParserData;
@@ -31,43 +31,43 @@ class Parser
{
public:
Parser(ParserData* data);
- Parser(ParserData* data, const QString& expr);
+ Parser(ParserData* data, const TQString& expr);
// set string to parse
- bool setString(const QString& s);
+ bool setString(const TQString& s);
// set Kommander widget associated with parser
void setWidget(KommanderWidget* w);
// parse generic expression
- QString expression(Parse::Mode mode = Parse::Execute);
+ TQString expression(Parse::Mode mode = Parse::Execute);
// execute single command; return true if ok
bool command(Parse::Mode mode = Parse::Execute);
// special class method to execute single parser function without creating parser object
- static QString function(ParserData* data, const QString& name, const QStringList& params);
+ static TQString function(ParserData* data, const TQString& name, const TQStringList& params);
// execute whole block; return true if ok
bool parse(Parse::Mode mode = Parse::Execute);
// return line of errorneous node
int errorLine() const;
// return error message
- QString errorMessage() const;
+ TQString errorMessage() const;
// check if this is a name of standard variable
- bool isVariable(const QString& name) const;
+ bool isVariable(const TQString& name) const;
// set variable value
- void setVariable(const QString& name, ParseNode value);
+ void setVariable(const TQString& name, ParseNode value);
// unset variable
- void unsetVariable(const QString& key);
+ void unsetVariable(const TQString& key);
// get variable value
- ParseNode variable(const QString& name) const;
+ ParseNode variable(const TQString& name) const;
// access associative array
- const QMap<QString, ParseNode>& array(const QString& name) const;
+ const TQMap<TQString, ParseNode>& array(const TQString& name) const;
// check if this is a name of an array
- bool isArray(const QString& name) const;
+ bool isArray(const TQString& name) const;
// set array key
- void setArray(const QString& name, const QString& key, ParseNode value);
+ void setArray(const TQString& name, const TQString& key, ParseNode value);
// unset array key or whole array
- void unsetArray(const QString& name, const QString& key = QString::null);
+ void unsetArray(const TQString& name, const TQString& key = TQString::null);
// array value
- ParseNode arrayValue(const QString& name, const QString& key) const;
+ ParseNode arrayValue(const TQString& name, const TQString& key) const;
// get associated widget
KommanderWidget* currentWidget() const;
@@ -110,7 +110,7 @@ private:
// parse parameters
ParseNode parseFunction(Parse::Mode mode = Parse::Execute);
// parse widget function
- ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const QString &widgetName = QString::null);
+ ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const TQString &widgetName = TQString::null);
// parse assignment
ParseNode parseAssignment(Parse::Mode mode = Parse::Execute);
@@ -139,9 +139,9 @@ private:
bool tryVariable(Parse::Mode mode = Parse::Execute);
// get the name of the next node treated as variable
- QString nextVariable(Parse::Mode mode = Parse::Execute);
+ TQString nextVariable(Parse::Mode mode = Parse::Execute);
// check whether variable/array name is global (preceded with _)
- bool isGlobal(const QString& name) const;
+ bool isGlobal(const TQString& name) const;
// check if next item is a function
bool isFunction() const;
// check if next item is a widget
@@ -150,8 +150,8 @@ private:
// reset to default state
void reset();
// set error state if no error was set before; err is expected symbol that wasn't found
- void setError(const QString& msg);
- void setError(const QString& msg, int pos);
+ void setError(const TQString& msg);
+ void setError(const TQString& msg, int pos);
// check whether parsing was successful
bool isError() const;
@@ -160,21 +160,21 @@ private:
// current parsing position
uint m_start;
// current error message
- QString m_error;
+ TQString m_error;
// in case of error, this keeps position of first error
uint m_errorPosition;
// parsing nodes
- QValueVector<ParseNode> m_parts;
+ TQValueVector<ParseNode> m_parts;
// variables
- QMap<QString, ParseNode> m_variables;
+ TQMap<TQString, ParseNode> m_variables;
// arrays
- QMap<QString, QMap<QString, ParseNode> > m_arrays;
+ TQMap<TQString, TQMap<TQString, ParseNode> > m_arrays;
// Kommander
KommanderWidget* m_widget;
// global variables
- static QMap<QString, ParseNode> m_globalVariables;
+ static TQMap<TQString, ParseNode> m_globalVariables;
// global arrays
- static QMap<QString, QMap<QString, ParseNode> > m_globalArrays;
+ static TQMap<TQString, TQMap<TQString, ParseNode> > m_globalArrays;
};
#endif
diff --git a/kommander/widget/parserdata.cpp b/kommander/widget/parserdata.cpp
index f803283e..274d7220 100644
--- a/kommander/widget/parserdata.cpp
+++ b/kommander/widget/parserdata.cpp
@@ -25,24 +25,24 @@ KeywordGroup ParserData::keywordGroup(Keyword k) const
return GroupMisc;
}
-Keyword ParserData::stringToKeyword(const QString& s) const
+Keyword ParserData::stringToKeyword(const TQString& s) const
{
- QString k = s.lower();
+ TQString k = s.lower();
if (m_keywords.contains(k))
return m_keywords[k];
else
return Variable;
}
-QString ParserData::keywordToString(Parse::Keyword k) const
+TQString ParserData::keywordToString(Parse::Keyword k) const
{
- for (QMapConstIterator<QString, Keyword> it = m_keywords.begin(); it != m_keywords.end(); ++it)
+ for (TQMapConstIterator<TQString, Keyword> it = m_keywords.begin(); it != m_keywords.end(); ++it)
if (it.data() == k)
return it.key();
- return QString();
+ return TQString();
}
-bool ParserData::registerFunction(const QString& name, Function f)
+bool ParserData::registerFunction(const TQString& name, Function f)
{
m_functions[name.lower()] = f;
return true;
@@ -114,12 +114,12 @@ ParserData::ParserData()
registerStandardFunctions();
}
-bool ParserData::isFunction(const QString& name) const
+bool ParserData::isFunction(const TQString& name) const
{
return m_functions.contains(name.lower());
}
-const Function& ParserData::function(const QString& name) const
+const Function& ParserData::function(const TQString& name) const
{
return m_functions[name.lower()];
}
diff --git a/kommander/widget/parserdata.h b/kommander/widget/parserdata.h
index 4c7f8d50..e427e600 100644
--- a/kommander/widget/parserdata.h
+++ b/kommander/widget/parserdata.h
@@ -19,7 +19,7 @@
#include "parsenode.h"
#include "function.h"
-#include <qmap.h>
+#include <tqmap.h>
class ParserData {
public:
@@ -28,22 +28,22 @@ public:
/* Return group of given keyword */
Parse::KeywordGroup keywordGroup(Parse::Keyword k) const;
/* Convert string to keyword */
- Parse::Keyword stringToKeyword(const QString& s) const;
+ Parse::Keyword stringToKeyword(const TQString& s) const;
/* Convert keyword to string */
- QString keywordToString(Parse::Keyword k) const;
+ TQString keywordToString(Parse::Keyword k) const;
/* register a function */
- bool registerFunction(const QString& name, Function f);
+ bool registerFunction(const TQString& name, Function f);
/* check if this is a name of standard function */
- bool isFunction(const QString& name) const;
+ bool isFunction(const TQString& name) const;
/* Return function with given name. Warning: this function has undefined behavior when there is
no such function. */
- const Function& function(const QString& name) const;
+ const Function& function(const TQString& name) const;
private:
// register standard function
void registerStandardFunctions();
- QMap<QString, Parse::Keyword> m_keywords;
- QMap<Parse::Keyword, Parse::KeywordGroup> m_groups;
- QMap<QString, Function> m_functions;
+ TQMap<TQString, Parse::Keyword> m_keywords;
+ TQMap<Parse::Keyword, Parse::KeywordGroup> m_groups;
+ TQMap<TQString, Function> m_functions;
};
diff --git a/kommander/widgets/aboutdialog.cpp b/kommander/widgets/aboutdialog.cpp
index 7f8c3428..9377b377 100644
--- a/kommander/widgets/aboutdialog.cpp
+++ b/kommander/widgets/aboutdialog.cpp
@@ -9,7 +9,7 @@
// Copyright: See COPYING file that comes with this distribution
//
//
-#include <qfile.h>
+#include <tqfile.h>
#include "aboutdialog.h"
#include "kommanderplugin.h"
@@ -21,7 +21,7 @@
#include <klocale.h>
#include <kstandarddirs.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
enum Functions {
FirstFunction = 159,
@@ -36,17 +36,17 @@ enum Functions {
LastFunction
};
-AboutDialog::AboutDialog(QWidget *parent, const char *name)
- : QLabel(parent, name), KommanderWidget(this)
+AboutDialog::AboutDialog(TQWidget *parent, const char *name)
+ : TQLabel(parent, name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
if (KommanderWidget::inEditor)
{
setPixmap(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium));
- setFrameStyle(QFrame::Box | QFrame::Plain);
+ setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(1);
setFixedSize(pixmap()->size());
}
@@ -55,21 +55,21 @@ AboutDialog::AboutDialog(QWidget *parent, const char *name)
m_aboutData = 0L;
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(Initialize, "initialize(QString widget, QString appName, QString icon, QString version, QString copyright)",
+ KommanderPlugin::registerFunction(Initialize, "initialize(TQString widget, TQString appName, TQString icon, TQString version, TQString copyright)",
i18n("Sets information about the application. This is the first method that must me called, any addition to the dialog done before initialization will be ignored."), 5);
- KommanderPlugin::registerFunction(AddAuthor, "addAuthor(QString widget, QString author, QString task, QString email, QString webAddress)",
+ KommanderPlugin::registerFunction(AddAuthor, "addAuthor(TQString widget, TQString author, TQString task, TQString email, TQString webAddress)",
i18n("Add an author. Only the author name is required."), 2, 5);
- KommanderPlugin::registerFunction(AddTranslator, "addTranslator(QString widget, QString author, QString email)",
+ KommanderPlugin::registerFunction(AddTranslator, "addTranslator(TQString widget, TQString author, TQString email)",
i18n("Add a translator. Only the name is required."), 2, 3);
- KommanderPlugin::registerFunction(SetDescription, "setDescription(QString widget, QString description)",
+ KommanderPlugin::registerFunction(SetDescription, "setDescription(TQString widget, TQString description)",
i18n("Set a short description text."), 2);
- KommanderPlugin::registerFunction(SetHomepage, "setHomepage(QString widget, QString homepage)",
+ KommanderPlugin::registerFunction(SetHomepage, "setHomepage(TQString widget, TQString homepage)",
i18n("Set a homepage address."), 2);
- KommanderPlugin::registerFunction(SetBugAddress, "setBugAddress(QString widget, QString address)",
+ KommanderPlugin::registerFunction(SetBugAddress, "setBugAddress(TQString widget, TQString address)",
i18n("Set an email address, where bugs can be reported."), 2);
- KommanderPlugin::registerFunction(SetLicense, "setLicense(QString widget, QString license)",
+ KommanderPlugin::registerFunction(SetLicense, "setLicense(TQString widget, TQString license)",
i18n("Sets license information of the application. The parameter can be one of the license keys - GPL_V2, LGPL_V2, BSD, ARTISTIC -, or a freely specified text."), 2);
- KommanderPlugin::registerFunction(Version, "version(QString widget)",
+ KommanderPlugin::registerFunction(Version, "version(TQString widget)",
i18n("Returns the set version string."), 1);
}
@@ -80,21 +80,21 @@ AboutDialog::~AboutDialog()
m_aboutData = 0L;
}
-QString AboutDialog::currentState() const
+TQString AboutDialog::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool AboutDialog::isKommanderWidget() const
{
return true;
}
-QStringList AboutDialog::associatedText() const
+TQStringList AboutDialog::associatedText() const
{
return KommanderWidget::associatedText();
}
-void AboutDialog::setAssociatedText(const QStringList& a_at)
+void AboutDialog::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
@@ -105,7 +105,7 @@ bool AboutDialog::isFunctionSupported(int f)
return (f > FirstFunction && f < LastFunction) || f == DCOP::execute;
}
-void AboutDialog::initialize(const QString& appName, const QString &icon, const QString& version, const QString& copyright)
+void AboutDialog::initialize(const TQString& appName, const TQString &icon, const TQString& version, const TQString& copyright)
{
delete m_aboutData;
m_authors.clear();
@@ -125,7 +125,7 @@ void AboutDialog::initialize(const QString& appName, const QString &icon, const
m_aboutData->setProgramLogo(KGlobal::iconLoader()->loadIcon(m_icon, KIcon::NoGroup, KIcon::SizeMedium).convertToImage());
}
-void AboutDialog::addAuthor(const QString& author, const QString &task, const QString& email, const QString &webAddress)
+void AboutDialog::addAuthor(const TQString& author, const TQString &task, const TQString& email, const TQString &webAddress)
{
if (!m_aboutData)
return;
@@ -136,7 +136,7 @@ void AboutDialog::addAuthor(const QString& author, const QString &task, const QS
m_aboutData->addAuthor(author, task, email, webAddress);
}
-void AboutDialog::addTranslator(const QString& author, const QString& email)
+void AboutDialog::addTranslator(const TQString& author, const TQString& email)
{
if (!m_aboutData)
return;
@@ -145,7 +145,7 @@ void AboutDialog::addTranslator(const QString& author, const QString& email)
m_aboutData->setTranslator(author, email);
}
-void AboutDialog::setDescription(const QString& description)
+void AboutDialog::setDescription(const TQString& description)
{
if (!m_aboutData)
return;
@@ -153,7 +153,7 @@ void AboutDialog::setDescription(const QString& description)
m_aboutData->setShortDescription(m_description);
}
-void AboutDialog::setHomepage(const QString &homepage)
+void AboutDialog::setHomepage(const TQString &homepage)
{
if (!m_aboutData)
return;
@@ -161,7 +161,7 @@ void AboutDialog::setHomepage(const QString &homepage)
m_aboutData->setHomepage(m_homepage);
}
-void AboutDialog::setBugAddress(const QString &bugAddress)
+void AboutDialog::setBugAddress(const TQString &bugAddress)
{
if (!m_aboutData)
return;
@@ -169,12 +169,12 @@ void AboutDialog::setBugAddress(const QString &bugAddress)
m_aboutData->setBugAddress(m_bugaddress);
}
-void AboutDialog::setLicense(const QString &key)
+void AboutDialog::setLicense(const TQString &key)
{
if (!m_aboutData)
return;
- QString license = key.upper();
- QString file;
+ TQString license = key.upper();
+ TQString file;
if (key == "GPL_V2")
{
file = locate("data", "LICENSES/GPL_V2");
@@ -191,7 +191,7 @@ void AboutDialog::setLicense(const QString &key)
{
file = locate("data", "LICENSES/ARTISTIC");
}
- if (file.isEmpty() && !QFile::exists( key ))
+ if (file.isEmpty() && !TQFile::exists( key ))
{
if (!key.isEmpty())
m_license = key;
@@ -209,12 +209,12 @@ void AboutDialog::setLicense(const QString &key)
}
-void AboutDialog::setPopulationText(const QString& a_text)
+void AboutDialog::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString AboutDialog::populationText() const
+TQString AboutDialog::populationText() const
{
return KommanderWidget::populationText();
}
@@ -233,7 +233,7 @@ void AboutDialog::execute()
}
}
-QString AboutDialog::handleDCOP(int function, const QStringList& args)
+TQString AboutDialog::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case Initialize:
@@ -289,7 +289,7 @@ QString AboutDialog::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "aboutdialog.moc"
diff --git a/kommander/widgets/aboutdialog.h b/kommander/widgets/aboutdialog.h
index 0d0249a7..64d6c9ab 100644
--- a/kommander/widgets/aboutdialog.h
+++ b/kommander/widgets/aboutdialog.h
@@ -12,7 +12,7 @@
#ifndef ABOUTDIALOG_H
#define ABOUTDIALOG_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kommanderwidget.h>
class KAboutApplication;
@@ -21,52 +21,52 @@ class KAboutData;
/**
@author Andras Mantia <amantia@kdewebdev.org>
*/
-class AboutDialog : public QLabel, public KommanderWidget
+class AboutDialog : public TQLabel, public KommanderWidget
{
Q_OBJECT
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
public:
- AboutDialog(QWidget *parent = 0, const char *name = 0);
+ AboutDialog(TQWidget *parent = 0, const char *name = 0);
~AboutDialog();
virtual bool isKommanderWidget() const;
- virtual QString currentState() const;
+ virtual TQString currentState() const;
virtual bool isFunctionSupported(int function);
- virtual QString handleDCOP(int function, const QStringList& args);
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
- virtual QStringList associatedText() const;
- virtual void setAssociatedText(const QStringList&);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
+ virtual TQStringList associatedText() const;
+ virtual void setAssociatedText(const TQStringList&);
public slots:
virtual void populate();
virtual void execute();
private:
- void initialize(const QString& appName, const QString &icon, const QString& version, const QString& copyright);
- void addAuthor(const QString& author, const QString &task, const QString& email, const QString &webAddress);
- void addTranslator(const QString& author, const QString& email);
- void setDescription(const QString& description);
- void setHomepage(const QString &homepage);
- void setBugAddress(const QString &bugAddress);
- void setLicense(const QString &license);
+ void initialize(const TQString& appName, const TQString &icon, const TQString& version, const TQString& copyright);
+ void addAuthor(const TQString& author, const TQString &task, const TQString& email, const TQString &webAddress);
+ void addTranslator(const TQString& author, const TQString& email);
+ void setDescription(const TQString& description);
+ void setHomepage(const TQString &homepage);
+ void setBugAddress(const TQString &bugAddress);
+ void setLicense(const TQString &license);
KAboutData *m_aboutData;
- QString m_version;
- QString m_appName;
- QString m_copyright;
- QString m_icon;
- QString m_bugaddress;
- QStringList m_authors;
- QStringList m_emails;
- QStringList m_tasks;
- QStringList m_addresses;
- QString m_description;
- QString m_homepage;
- QString m_license;
+ TQString m_version;
+ TQString m_appName;
+ TQString m_copyright;
+ TQString m_icon;
+ TQString m_bugaddress;
+ TQStringList m_authors;
+ TQStringList m_emails;
+ TQStringList m_tasks;
+ TQStringList m_addresses;
+ TQString m_description;
+ TQString m_homepage;
+ TQString m_license;
};
#endif
diff --git a/kommander/widgets/buttongroup.cpp b/kommander/widgets/buttongroup.cpp
index 0a6eafc2..751c8e5c 100644
--- a/kommander/widgets/buttongroup.cpp
+++ b/kommander/widgets/buttongroup.cpp
@@ -17,12 +17,12 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qbuttongroup.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqbuttongroup.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -38,17 +38,17 @@ enum Functions {
LastFunction
};
-ButtonGroup::ButtonGroup(QWidget *a_parent, const char *a_name)
- : QButtonGroup(a_parent, a_name), KommanderWidget(this)
+ButtonGroup::ButtonGroup(TQWidget *a_parent, const char *a_name)
+ : TQButtonGroup(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "checked";
states << "unchecked";
setStates(states);
setDisplayStates(states);
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(BG_selectedId, "selectedId(QString widget)", i18n("Returns the ID of the selected button."), 1);
+ KommanderPlugin::registerFunction(BG_selectedId, "selectedId(TQString widget)", i18n("Returns the ID of the selected button."), 1);
}
@@ -56,7 +56,7 @@ ButtonGroup::~ButtonGroup()
{
}
-QString ButtonGroup::currentState() const
+TQString ButtonGroup::currentState() const
{
if (!isCheckable() || isChecked())
return "checked";
@@ -69,22 +69,22 @@ bool ButtonGroup::isKommanderWidget() const
return true;
}
-QStringList ButtonGroup::associatedText() const
+TQStringList ButtonGroup::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ButtonGroup::setAssociatedText(const QStringList& a_at)
+void ButtonGroup::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ButtonGroup::setPopulationText(const QString& a_text)
+void ButtonGroup::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText( a_text );
}
-QString ButtonGroup::populationText() const
+TQString ButtonGroup::populationText() const
{
return KommanderWidget::populationText();
}
@@ -94,16 +94,16 @@ void ButtonGroup::populate()
//FIXME: implement
}
-void ButtonGroup::showEvent(QShowEvent* e)
+void ButtonGroup::showEvent(TQShowEvent* e)
{
- QButtonGroup::showEvent(e);
+ TQButtonGroup::showEvent(e);
emit widgetOpened();
}
-void ButtonGroup::contextMenuEvent( QContextMenuEvent * e )
+void ButtonGroup::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -113,29 +113,29 @@ bool ButtonGroup::isFunctionSupported(int f)
}
-QString ButtonGroup::handleDCOP(int function, const QStringList& args)
+TQString ButtonGroup::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
{
- QString text;
+ TQString text;
for (int i = 0; i < count(); i++)
if (dynamic_cast<KommanderWidget*>(find(i)))
text += (dynamic_cast<KommanderWidget*>(find(i)))->evalAssociatedText();
return text;
}
case DCOP::checked:
- return QString::number(isChecked());
+ return TQString::number(isChecked());
case DCOP::setChecked:
setCheckable(true);
setChecked(args[0] != "false");
break;
case BG_selectedId:
- return QString::number(this->selectedId() );
+ return TQString::number(this->selectedId() );
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
@@ -144,7 +144,7 @@ QString ButtonGroup::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -152,7 +152,7 @@ QString ButtonGroup::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/buttongroup.h b/kommander/widgets/buttongroup.h
index 0e123864..f5a01be3 100644
--- a/kommander/widgets/buttongroup.h
+++ b/kommander/widgets/buttongroup.h
@@ -19,10 +19,10 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qbuttongroup.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqbuttongroup.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -31,36 +31,36 @@
class QWidget;
class QShowEvent;
-class KOMMANDER_EXPORT ButtonGroup : public QButtonGroup, public KommanderWidget
+class KOMMANDER_EXPORT ButtonGroup : public TQButtonGroup, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget DESIGNABLE false)
public:
- ButtonGroup(QWidget *a_parent, const char *a_name);
+ ButtonGroup(TQWidget *a_parent, const char *a_name);
~ButtonGroup();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent* e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent* e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/checkbox.cpp b/kommander/widgets/checkbox.cpp
index e78dbdb8..f7fe20be 100644
--- a/kommander/widgets/checkbox.cpp
+++ b/kommander/widgets/checkbox.cpp
@@ -16,27 +16,27 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qcheckbox.h>
-#include <qbutton.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqcheckbox.h>
+#include <tqbutton.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "checkbox.h"
-CheckBox::CheckBox(QWidget *a_parent, const char *a_name)
- : QCheckBox(a_parent, a_name), KommanderWidget(this)
+CheckBox::CheckBox(TQWidget *a_parent, const char *a_name)
+ : TQCheckBox(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "unchecked";
states << "semichecked";
states << "checked";
setStates(states);
- QStringList displayStates;
+ TQStringList displayStates;
displayStates << "checked";
displayStates << "semichecked";
displayStates << "unchecked";
@@ -47,15 +47,15 @@ CheckBox::~CheckBox()
{
}
-QString CheckBox::currentState() const
+TQString CheckBox::currentState() const
{
- if (state() == QButton::Off)
+ if (state() == TQButton::Off)
return "unchecked";
- else if (state() == QButton::NoChange)
+ else if (state() == TQButton::NoChange)
return "semichecked";
- else if (state() == QButton::On)
+ else if (state() == TQButton::On)
return "checked";
- return QString();
+ return TQString();
}
bool CheckBox::isKommanderWidget() const
@@ -63,22 +63,22 @@ bool CheckBox::isKommanderWidget() const
return true;
}
-QStringList CheckBox::associatedText() const
+TQStringList CheckBox::associatedText() const
{
return KommanderWidget::associatedText();
}
-void CheckBox::setAssociatedText(const QStringList & a_at)
+void CheckBox::setAssociatedText(const TQStringList & a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void CheckBox::setPopulationText(const QString & a_text)
+void CheckBox::setPopulationText(const TQString & a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString CheckBox::populationText() const
+TQString CheckBox::populationText() const
{
return KommanderWidget::populationText();
}
@@ -88,15 +88,15 @@ void CheckBox::populate()
setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
}
-void CheckBox::setWidgetText(const QString& a_text)
+void CheckBox::setWidgetText(const TQString& a_text)
{
setText(a_text);
emit widgetTextChanged(a_text);
}
-void CheckBox::showEvent(QShowEvent* e)
+void CheckBox::showEvent(TQShowEvent* e)
{
- QCheckBox::showEvent(e);
+ TQCheckBox::showEvent(e);
emit widgetOpened();
}
@@ -105,14 +105,14 @@ bool CheckBox::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
-void CheckBox::contextMenuEvent( QContextMenuEvent * e )
+void CheckBox::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
-QString CheckBox::handleDCOP(int function, const QStringList& args)
+TQString CheckBox::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -121,13 +121,13 @@ QString CheckBox::handleDCOP(int function, const QStringList& args)
setWidgetText(args[0]);
break;
case DCOP::checked:
- return QString::number(isChecked());
+ return TQString::number(isChecked());
case DCOP::setChecked:
setChecked(args[0] != "false" && args[0] != "0");
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
@@ -136,7 +136,7 @@ QString CheckBox::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -144,7 +144,7 @@ QString CheckBox::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/checkbox.h b/kommander/widgets/checkbox.h
index c9743434..f3da677f 100644
--- a/kommander/widgets/checkbox.h
+++ b/kommander/widgets/checkbox.h
@@ -19,10 +19,10 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qcheckbox.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -31,36 +31,36 @@
class QWidget;
class QShowEvent;
-class KOMMANDER_EXPORT CheckBox : public QCheckBox, public KommanderWidget
+class KOMMANDER_EXPORT CheckBox : public TQCheckBox, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- CheckBox(QWidget *a_parent, const char *a_name);
+ CheckBox(TQWidget *a_parent, const char *a_name);
~CheckBox();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/closebutton.cpp b/kommander/widgets/closebutton.cpp
index 9da9f1a0..d30a9346 100644
--- a/kommander/widgets/closebutton.cpp
+++ b/kommander/widgets/closebutton.cpp
@@ -19,45 +19,45 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qdialog.h>
-#include <qevent.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqdialog.h>
+#include <tqevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "closebutton.h"
-CloseButton::CloseButton(QWidget* a_parent, const char* a_name)
+CloseButton::CloseButton(TQWidget* a_parent, const char* a_name)
: KPushButton(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
setWriteStdout(true);
- connect(this, SIGNAL(clicked()), this, SLOT(startProcess()));
+ connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(startProcess()));
- QObject *parent = this;
+ TQObject *parent = this;
while (parent->parent() != 0)
{
parent = parent->parent();
- if (parent->inherits("QDialog"))
+ if (parent->inherits("TQDialog"))
break;
}
- connect(this, SIGNAL(clicked()), parent, SLOT(reject()));
+ connect(this, TQT_SIGNAL(clicked()), parent, TQT_SLOT(reject()));
}
CloseButton::~CloseButton()
{
}
-QString CloseButton::currentState() const
+TQString CloseButton::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool CloseButton::isKommanderWidget() const
@@ -65,22 +65,22 @@ bool CloseButton::isKommanderWidget() const
return true;
}
-QStringList CloseButton::associatedText() const
+TQStringList CloseButton::associatedText() const
{
return KommanderWidget::associatedText();
}
-void CloseButton::setAssociatedText(const QStringList& a_at)
+void CloseButton::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void CloseButton::setPopulationText(const QString& a_text)
+void CloseButton::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString CloseButton::populationText() const
+TQString CloseButton::populationText() const
{
return KommanderWidget::populationText();
}
@@ -90,7 +90,7 @@ void CloseButton::populate()
setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
}
-void CloseButton::setWidgetText(const QString& a_text)
+void CloseButton::setWidgetText(const TQString& a_text)
{
setText(a_text);
emit widgetTextChanged(a_text);
@@ -98,17 +98,17 @@ void CloseButton::setWidgetText(const QString& a_text)
void CloseButton::startProcess()
{
- QString at = evalAssociatedText();
+ TQString at = evalAssociatedText();
if (!at.isEmpty())
{
KShellProcess *process = new KShellProcess("/bin/sh");
*process << at;
- connect(process, SIGNAL(processExited(KProcess *)), SLOT(endProcess(KProcess *)));
- connect(process, SIGNAL(receivedStdout(KProcess *, char *, int)), SLOT(appendOutput(KProcess *,
+ connect(process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(endProcess(KProcess *)));
+ connect(process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(appendOutput(KProcess *,
char *, int)));
- connect(process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(appendOutput(KProcess *,
+ connect(process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(appendOutput(KProcess *,
char *, int)));
if (!process->start(KProcess::Block, KProcess::Stdout))
@@ -128,7 +128,7 @@ void CloseButton::appendOutput(KProcess *, char *a_buffer, int a_len)
for (int i = 0; i < a_len; ++i)
buffer[i] = a_buffer[i];
- QString bufferString(buffer);
+ TQString bufferString(buffer);
m_output += bufferString;
if (writeStdout())
{
@@ -155,9 +155,9 @@ void CloseButton::setWriteStdout(bool a_enable)
m_writeStdout = a_enable;
}
-void CloseButton::showEvent(QShowEvent *e)
+void CloseButton::showEvent(TQShowEvent *e)
{
- QPushButton::showEvent(e);
+ TQPushButton::showEvent(e);
emit widgetOpened();
}
@@ -166,7 +166,7 @@ bool CloseButton::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText;
}
-QString CloseButton::handleDCOP(int function, const QStringList& args)
+TQString CloseButton::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -177,7 +177,7 @@ QString CloseButton::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "closebutton.moc"
diff --git a/kommander/widgets/closebutton.h b/kommander/widgets/closebutton.h
index 8b7aa57a..20c44eac 100644
--- a/kommander/widgets/closebutton.h
+++ b/kommander/widgets/closebutton.h
@@ -22,7 +22,7 @@
#include <kpushbutton.h>
/* QT INCLUDES */
-#include <qobject.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -34,38 +34,38 @@ class KOMMANDER_EXPORT CloseButton : public KPushButton, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
Q_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout)
public:
- CloseButton(QWidget* a_parent, const char* a_name);
+ CloseButton(TQWidget* a_parent, const char* a_name);
~CloseButton();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
bool writeStdout() const;
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
virtual void setWriteStdout(bool);
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void startProcess();
virtual void appendOutput(KProcess*, char*, int);
virtual void endProcess(KProcess*);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
protected:
bool m_writeStdout;
- QString m_output;
- void showEvent(QShowEvent* e);
+ TQString m_output;
+ void showEvent(TQShowEvent* e);
private:
};
diff --git a/kommander/widgets/combobox.cpp b/kommander/widgets/combobox.cpp
index 250d3820..cab29337 100644
--- a/kommander/widgets/combobox.cpp
+++ b/kommander/widgets/combobox.cpp
@@ -19,10 +19,10 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include <kommanderplugin.h>
@@ -36,18 +36,18 @@ enum Functions {
};
-ComboBox::ComboBox(QWidget *a_parent, const char *a_name)
+ComboBox::ComboBox(TQWidget *a_parent, const char *a_name)
: KComboBox(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
- connect(this, SIGNAL(activated(int)), this, SLOT(emitWidgetTextChanged(int)));
+ connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(emitWidgetTextChanged(int)));
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(popupList, "popupList(QString widget)", i18n("Make the ComboBox expose it's list without mousing around."), 1);
+ KommanderPlugin::registerFunction(popupList, "popupList(TQString widget)", i18n("Make the ComboBox expose it's list without mousing around."), 1);
}
@@ -55,9 +55,9 @@ ComboBox::~ComboBox()
{
}
-QString ComboBox::currentState() const
+TQString ComboBox::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ComboBox::isKommanderWidget() const
@@ -65,22 +65,22 @@ bool ComboBox::isKommanderWidget() const
return true;
}
-QStringList ComboBox::associatedText() const
+TQStringList ComboBox::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ComboBox::setAssociatedText(const QStringList& a_at)
+void ComboBox::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ComboBox::setPopulationText(const QString& a_text)
+void ComboBox::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ComboBox::populationText() const
+TQString ComboBox::populationText() const
{
return KommanderWidget::populationText();
}
@@ -90,10 +90,10 @@ void ComboBox::populate()
setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
}
-void ComboBox::setWidgetText(const QString& a_text)
+void ComboBox::setWidgetText(const TQString& a_text)
{
clear();
- insertStringList(QStringList::split("\n", a_text));
+ insertStringList(TQStringList::split("\n", a_text));
emit widgetTextChanged(a_text);
}
@@ -102,16 +102,16 @@ void ComboBox::emitWidgetTextChanged(int a_index)
emit widgetTextChanged(text(a_index));
}
-void ComboBox::showEvent(QShowEvent *e)
+void ComboBox::showEvent(TQShowEvent *e)
{
- QComboBox::showEvent( e );
+ TQComboBox::showEvent( e );
emit widgetOpened();
}
-void ComboBox::contextMenuEvent( QContextMenuEvent * e )
+void ComboBox::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -124,7 +124,7 @@ bool ComboBox::isFunctionSupported(int f)
f == DCOP::addUniqueItem || f == DCOP::clear || f == DCOP::count || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
-QString ComboBox::handleDCOP(int function, const QStringList& args)
+TQString ComboBox::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -135,7 +135,7 @@ QString ComboBox::handleDCOP(int function, const QStringList& args)
case DCOP::selection:
return currentText();
case DCOP::currentItem:
- return QString::number(currentItem());
+ return TQString::number(currentItem());
case DCOP::setCurrentItem:
setCurrentItem(args[0].toUInt());
break;
@@ -153,19 +153,19 @@ QString ComboBox::handleDCOP(int function, const QStringList& args)
insertItem(args[0], args[1].toInt());
break;
case DCOP::insertItems:
- insertStringList(QStringList::split("\n", args[0]), args[1].toInt());
+ insertStringList(TQStringList::split("\n", args[0]), args[1].toInt());
break;
case DCOP::addUniqueItem:
for (int i=0; i<count(); i++)
if (text(i) == args[0])
- return QString();
+ return TQString();
insertItem(args[0]);
break;
case DCOP::clear:
clear();
break;
case DCOP::count:
- return QString::number(count());
+ return TQString::number(count());
case DCOP::setSelection:
{
for (int i = 0; i < count(); i++)
@@ -184,27 +184,27 @@ QString ComboBox::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
}
case popupList:
- QComboBox::popup();
+ TQComboBox::popup();
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "combobox.moc"
diff --git a/kommander/widgets/combobox.h b/kommander/widgets/combobox.h
index 916846d9..6dd4fb71 100644
--- a/kommander/widgets/combobox.h
+++ b/kommander/widgets/combobox.h
@@ -20,9 +20,9 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kcombobox.h>
@@ -35,35 +35,35 @@ class KOMMANDER_EXPORT ComboBox : public KComboBox, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- ComboBox(QWidget *a_parent, const char *a_name);
+ ComboBox(TQWidget *a_parent, const char *a_name);
~ComboBox();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void populate();
virtual void emitWidgetTextChanged(int);
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/datepicker.cpp b/kommander/widgets/datepicker.cpp
index c1b1f834..928e1b81 100644
--- a/kommander/widgets/datepicker.cpp
+++ b/kommander/widgets/datepicker.cpp
@@ -17,19 +17,19 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "datepicker.h"
-DatePicker::DatePicker(QWidget *a_parent, const char *a_name)
+DatePicker::DatePicker(TQWidget *a_parent, const char *a_name)
: KDatePicker(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -39,9 +39,9 @@ DatePicker::~DatePicker()
{
}
-QString DatePicker::currentState() const
+TQString DatePicker::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool DatePicker::isKommanderWidget() const
@@ -49,22 +49,22 @@ bool DatePicker::isKommanderWidget() const
return true;
}
-QStringList DatePicker::associatedText() const
+TQStringList DatePicker::associatedText() const
{
return KommanderWidget::associatedText();
}
-void DatePicker::setAssociatedText(const QStringList& a_at)
+void DatePicker::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void DatePicker::setPopulationText(const QString& a_text)
+void DatePicker::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString DatePicker::populationText() const
+TQString DatePicker::populationText() const
{
return KommanderWidget::populationText();
}
@@ -74,27 +74,27 @@ void DatePicker::populate()
setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
}
-void DatePicker::setWidgetText(const QString& a_text)
+void DatePicker::setWidgetText(const TQString& a_text)
{
- setDate(QDate::fromString(a_text, Qt::ISODate));
+ setDate(TQDate::fromString(a_text, Qt::ISODate));
emit widgetTextChanged(a_text);
}
-QString DatePicker::widgetText() const
+TQString DatePicker::widgetText() const
{
return date().toString(Qt::ISODate);
}
-void DatePicker::showEvent(QShowEvent *e)
+void DatePicker::showEvent(TQShowEvent *e)
{
KDatePicker::showEvent( e );
emit widgetOpened();
}
-void DatePicker::contextMenuEvent( QContextMenuEvent * e )
+void DatePicker::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -104,27 +104,27 @@ bool DatePicker::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || f == DCOP::hasFocus ;
}
-QString DatePicker::handleDCOP(int function, const QStringList& args)
+TQString DatePicker::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
return date().toString(Qt::ISODate);
case DCOP::setText:
- setDate(QDate::fromString(args[0], Qt::ISODate));
+ setDate(TQDate::fromString(args[0], Qt::ISODate));
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "datepicker.moc"
diff --git a/kommander/widgets/datepicker.h b/kommander/widgets/datepicker.h
index 0383937a..242f1a65 100644
--- a/kommander/widgets/datepicker.h
+++ b/kommander/widgets/datepicker.h
@@ -20,9 +20,9 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kdatepicker.h>
@@ -35,35 +35,35 @@ class KOMMANDER_EXPORT DatePicker : public KDatePicker, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- DatePicker(QWidget *a_parent, const char *a_name);
+ DatePicker(TQWidget *a_parent, const char *a_name);
~DatePicker();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
- virtual QString widgetText() const;
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
+ virtual TQString widgetText() const;
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/dialog.cpp b/kommander/widgets/dialog.cpp
index ef9b727b..fd3b0b27 100644
--- a/kommander/widgets/dialog.cpp
+++ b/kommander/widgets/dialog.cpp
@@ -17,14 +17,14 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qdialog.h>
-#include <qpoint.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqdialog.h>
+#include <tqpoint.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -40,10 +40,10 @@ enum Functions {
LastFunction
};
-Dialog::Dialog(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
- : QDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(this)
+Dialog::Dialog(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
+ : TQDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
states << "initialization";
states << "destroy";
@@ -53,9 +53,9 @@ Dialog::Dialog(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
m_shebang = "#!/usr/bin/kmdr-executor";
m_firstShow = true;
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(D_focusWidget, "focusWidget(QString widget)", i18n("The name of the widget having focus"), 1);
- KommanderPlugin::registerFunction(D_waitCursor, "waitCursor(QString widget)", i18n("Set a wait cursor. CAUTION: if set more than once an equal number of calls to restore must be made to clear it."), 1);
- KommanderPlugin::registerFunction(D_restoreCursor, "restoreCursor(QString widget)", i18n("Restore normal curser. NOTE: must be called as many times as wait was."), 1);
+ KommanderPlugin::registerFunction(D_focusWidget, "focusWidget(TQString widget)", i18n("The name of the widget having focus"), 1);
+ KommanderPlugin::registerFunction(D_waitCursor, "waitCursor(TQString widget)", i18n("Set a wait cursor. CAUTION: if set more than once an equal number of calls to restore must be made to clear it."), 1);
+ KommanderPlugin::registerFunction(D_restoreCursor, "restoreCursor(TQString widget)", i18n("Restore normal curser. NOTE: must be called as many times as wait was."), 1);
}
Dialog::~Dialog()
@@ -64,9 +64,9 @@ Dialog::~Dialog()
destroy();
}
-QString Dialog::currentState() const
+TQString Dialog::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool Dialog::isKommanderWidget() const
@@ -86,22 +86,22 @@ void Dialog::setUseInternalParser(bool b)
}
-QStringList Dialog::associatedText() const
+TQStringList Dialog::associatedText() const
{
return KommanderWidget::associatedText();
}
-void Dialog::setAssociatedText(const QStringList& a_at)
+void Dialog::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void Dialog::setPopulationText(const QString& a_text)
+void Dialog::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText( a_text );
}
-QString Dialog::populationText() const
+TQString Dialog::populationText() const
{
return KommanderWidget::populationText();
}
@@ -113,7 +113,7 @@ void Dialog::populate()
void Dialog::initialize()
{
- const QStringList assoc = associatedText();
+ const TQStringList assoc = associatedText();
if (assoc.count() > 1 && !assoc[1].isEmpty())
{
MyProcess proc(this);
@@ -123,7 +123,7 @@ void Dialog::initialize()
void Dialog::destroy()
{
- const QStringList assoc = associatedText();
+ const TQStringList assoc = associatedText();
if (assoc.count() > 2 && !assoc[2].isEmpty())
{
MyProcess proc(this);
@@ -132,7 +132,7 @@ void Dialog::destroy()
}
-void Dialog::setWidgetText(const QString& a_text)
+void Dialog::setWidgetText(const TQString& a_text)
{
setCaption(a_text);
emit widgetTextChanged(a_text);
@@ -140,7 +140,7 @@ void Dialog::setWidgetText(const QString& a_text)
void Dialog::exec()
{
- QDialog::exec();
+ TQDialog::exec();
emit finished();
}
@@ -148,14 +148,14 @@ void Dialog::show()
{
//if the dialog is embedded in a KPart, the show can be called many times.
//to avoid re-init and sending signals we don't want, in that case call only the
-//QWidget's show method to show the widgets, but don't do any QDialog specific
+//QWidget's show method to show the widgets, but don't do any TQDialog specific
//task
if (!m_firstShow)
{
- QWidget::show();
+ TQWidget::show();
} else
{
- QDialog::show();
+ TQDialog::show();
if (!inEditor)
initialize();
m_firstShow = false;
@@ -166,28 +166,28 @@ void Dialog::done(int r)
{
/* if (!inEditor)
destroy();*/
- QDialog::done(r);
+ TQDialog::done(r);
}
-void Dialog::showEvent(QShowEvent *e)
+void Dialog::showEvent(TQShowEvent *e)
{
- QDialog::showEvent( e );
+ TQDialog::showEvent( e );
emit widgetOpened();
}
-void Dialog::keyPressEvent( QKeyEvent *e )
+void Dialog::keyPressEvent( TQKeyEvent *e )
{
if ( e->state() == 0 && e->key() == Key_Escape)
return;
else
- QDialog::keyPressEvent(e);
+ TQDialog::keyPressEvent(e);
}
-void Dialog::contextMenuEvent( QContextMenuEvent * e )
+void Dialog::contextMenuEvent( TQContextMenuEvent * e )
{
- QDialog::contextMenuEvent( e );
- QPoint p = e->globalPos();
+ TQDialog::contextMenuEvent( e );
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -196,7 +196,7 @@ bool Dialog::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || (f > FirstFunction && f < LastFunction);
}
-QString Dialog::handleDCOP(int function, const QStringList& args)
+TQString Dialog::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -205,21 +205,21 @@ QString Dialog::handleDCOP(int function, const QStringList& args)
setWidgetText(args[0]);
break;
case DCOP::geometry:
- return QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ return TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
break;
case D_focusWidget:
return focusWidget()->name();
break;
case D_waitCursor:
- QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ TQApplication::setOverrideCursor(TQCursor(Qt::WaitCursor));
break;
case D_restoreCursor:
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
break;
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/dialog.h b/kommander/widgets/dialog.h
index 091ff890..794e5dbc 100644
--- a/kommander/widgets/dialog.h
+++ b/kommander/widgets/dialog.h
@@ -20,46 +20,46 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qdialog.h>
+#include <tqdialog.h>
/* OTHER INCLUDES */
#include <kommanderwindow.h>
#include <kommander_export.h>
class QShowEvent;
-class KOMMANDER_EXPORT Dialog : public QDialog, public KommanderWindow
+class KOMMANDER_EXPORT Dialog : public TQDialog, public KommanderWindow
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
Q_PROPERTY(bool useInternalParser READ useInternalParser WRITE setUseInternalParser)
Q_PROPERTY(bool useShebang READ useShebang WRITE setUseShebang DESIGNABLE true)
- Q_PROPERTY(QString shebang READ Shebang WRITE setShebang DESIGNABLE true)
+ Q_PROPERTY(TQString shebang READ Shebang WRITE setShebang DESIGNABLE true)
Q_OVERRIDE(bool modal DESIGNABLE false)
public:
- Dialog(QWidget *, const char *, bool = true, int=0);
+ Dialog(TQWidget *, const char *, bool = true, int=0);
~Dialog();
virtual bool isKommanderWidget() const;
virtual bool useInternalParser() const;
virtual void setUseInternalParser(bool b);
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
virtual void show();
bool useShebang() const { return m_useShebang; }
void setUseShebang(bool useit) { m_useShebang = useit; }
- QString Shebang() const { return m_shebang; }
- void setShebang(const QString &text) { m_shebang = text; }
+ TQString Shebang() const { return m_shebang; }
+ void setShebang(const TQString &text) { m_shebang = text; }
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void exec();
virtual void populate();
virtual void done(int r);
@@ -69,19 +69,19 @@ protected slots:
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void finished();
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent( QShowEvent *e );
- void keyPressEvent( QKeyEvent * );
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent( TQShowEvent *e );
+ void keyPressEvent( TQKeyEvent * );
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
- QString m_fileName;
+ TQString m_fileName;
bool m_useInternalParser;
bool m_useShebang; //add m_shebang at the beginning of the dialog code or not
bool m_firstShow; //tells if the show method was called before or not
- QString m_shebang; //#!/usr/bin/kmdr-executor or similar
+ TQString m_shebang; //#!/usr/bin/kmdr-executor or similar
};
#endif
diff --git a/kommander/widgets/execbutton.cpp b/kommander/widgets/execbutton.cpp
index 69d06f8b..eccfe306 100644
--- a/kommander/widgets/execbutton.cpp
+++ b/kommander/widgets/execbutton.cpp
@@ -20,14 +20,14 @@
#include <kmessagebox.h>
/* QT INCLUDES */
-#include <qcursor.h>
-#include <qevent.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
-#include <qwidgetlist.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
+#include <tqwidgetlist.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -47,30 +47,30 @@ enum Functions {
LastFunction
};
-ExecButton::ExecButton(QWidget* a_parent, const char* a_name)
+ExecButton::ExecButton(TQWidget* a_parent, const char* a_name)
: KPushButton(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
setWriteStdout(true);
setBlockGUI(Button);
- connect(this, SIGNAL(clicked()), this, SLOT(startProcess()));
+ connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(startProcess()));
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(EB_isOn, "isOn(QString widget)", i18n("For use only when button is togle type."), 1);
- KommanderPlugin::registerFunction(EB_setPopup, "setPopup(QString widget, QString Menu)", i18n("Associate a Kommander PopupMenu with this ExecButton."), 2);
- KommanderPlugin::registerFunction(EB_setButtonText, "setButtonText(QString widget, QString Text)", i18n("Set the text on the ExecButton."), 2);
+ KommanderPlugin::registerFunction(EB_isOn, "isOn(TQString widget)", i18n("For use only when button is togle type."), 1);
+ KommanderPlugin::registerFunction(EB_setPopup, "setPopup(TQString widget, TQString Menu)", i18n("Associate a Kommander PopupMenu with this ExecButton."), 2);
+ KommanderPlugin::registerFunction(EB_setButtonText, "setButtonText(TQString widget, TQString Text)", i18n("Set the text on the ExecButton."), 2);
}
ExecButton::~ExecButton()
{
}
-QString ExecButton::currentState() const
+TQString ExecButton::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ExecButton::isKommanderWidget() const
@@ -78,33 +78,33 @@ bool ExecButton::isKommanderWidget() const
return true;
}
-QStringList ExecButton::associatedText() const
+TQStringList ExecButton::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ExecButton::setAssociatedText(const QStringList& a_at)
+void ExecButton::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ExecButton::setPopulationText(const QString& a_text)
+void ExecButton::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ExecButton::populationText() const
+TQString ExecButton::populationText() const
{
return KommanderWidget::populationText();
}
void ExecButton::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void ExecButton::setWidgetText(const QString& a_text)
+void ExecButton::setWidgetText(const TQString& a_text)
{
setText(a_text);
emit widgetTextChanged(a_text);
@@ -112,15 +112,15 @@ void ExecButton::setWidgetText(const QString& a_text)
void ExecButton::startProcess()
{
- QString at = evalAssociatedText().stripWhiteSpace();
+ TQString at = evalAssociatedText().stripWhiteSpace();
bool enabledStatus = isEnabled();
if (m_blockGUI != None)
setEnabled(false);
if (m_blockGUI == GUI)
- KApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ KApplication::setOverrideCursor(TQCursor(Qt::WaitCursor));
MyProcess* process = new MyProcess(this);
process->setBlocking(m_blockGUI == GUI);
- connect(process, SIGNAL(processExited(MyProcess*)), SLOT(processExited(MyProcess*)));
+ connect(process, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*)));
m_output = process->run(at);
if (m_blockGUI == GUI)
{
@@ -165,16 +165,16 @@ void ExecButton::processExited(MyProcess* p)
}
}
-void ExecButton::showEvent(QShowEvent* e)
+void ExecButton::showEvent(TQShowEvent* e)
{
KPushButton::showEvent(e);
emit widgetOpened();
}
-void ExecButton::contextMenuEvent( QContextMenuEvent * e )
+void ExecButton::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -183,7 +183,7 @@ bool ExecButton::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::execute || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
-QString ExecButton::handleDCOP(int function, const QStringList& args)
+TQString ExecButton::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -195,21 +195,21 @@ QString ExecButton::handleDCOP(int function, const QStringList& args)
startProcess();
break;
case EB_isOn:
- return QString::number(this->isOn() );
+ return TQString::number(this->isOn() );
break;
case EB_setButtonText:
ExecButton::setText(args[0]);
break;
case EB_setPopup:
{
- QWidgetList *list = QApplication::allWidgets();
- QWidgetListIt it( *list );
- QWidget * w;
+ TQWidgetList *list = TQApplication::allWidgets();
+ TQWidgetListIt it( *list );
+ TQWidget * w;
while ( (w=it.current()) != 0 ) { // for each widget...
++it;
if (w->name() == args[0] && w->className() == "PopupMenu")
{
- QPopupMenu *popup = dynamic_cast<QPopupMenu*>(w->child("unnamed", "KPopupMenu"));
+ TQPopupMenu *popup = dynamic_cast<TQPopupMenu*>(w->child("unnamed", "KPopupMenu"));
this->setPopup(popup);
}
}
@@ -217,7 +217,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args)
}
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
@@ -226,7 +226,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -234,7 +234,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/execbutton.h b/kommander/widgets/execbutton.h
index 2e2ea60a..925fa498 100644
--- a/kommander/widgets/execbutton.h
+++ b/kommander/widgets/execbutton.h
@@ -22,7 +22,7 @@
#include <kpushbutton.h>
/* QT INCLUDES */
-#include <qobject.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -38,23 +38,23 @@ class KOMMANDER_EXPORT ExecButton : public KPushButton, public KommanderWidget
Q_OBJECT
Q_ENUMS(Blocking)
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
Q_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout)
Q_PROPERTY(Blocking blockGUI READ blockGUI WRITE setBlockGUI)
public:
- ExecButton(QWidget *a_parent, const char *a_name);
+ ExecButton(TQWidget *a_parent, const char *a_name);
~ExecButton();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
// Handle stdout setting
virtual void setWriteStdout(bool);
@@ -64,11 +64,11 @@ public:
virtual void setBlockGUI(Blocking a_enable);
Blocking blockGUI() const;
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
virtual void populate();
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
// Execute script from associastedText
virtual void startProcess();
@@ -76,18 +76,18 @@ public slots:
virtual void processExited(MyProcess* p);
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void contextMenuEvent( QContextMenuEvent * e );
+ void contextMenuEvent( TQContextMenuEvent * e );
// Whether output from process should be put in real stdout
bool m_writeStdout;
// Whether pressing execubtton should block GUI until process ends
Blocking m_blockGUI;
// Output from process
- QString m_output;
- void showEvent( QShowEvent *e );
+ TQString m_output;
+ void showEvent( TQShowEvent *e );
private:
};
diff --git a/kommander/widgets/fileselector.cpp b/kommander/widgets/fileselector.cpp
index b220b8d9..a7c29673 100644
--- a/kommander/widgets/fileselector.cpp
+++ b/kommander/widgets/fileselector.cpp
@@ -23,21 +23,21 @@
#include <kiconloader.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qsizepolicy.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqsizepolicy.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "fileselector.h"
-FileSelector::FileSelector(QWidget * a_parent, const char *a_name)
- : QWidget(a_parent, a_name), KommanderWidget(this)
+FileSelector::FileSelector(TQWidget * a_parent, const char *a_name)
+ : TQWidget(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -46,15 +46,15 @@ FileSelector::FileSelector(QWidget * a_parent, const char *a_name)
m_selectButton = new KPushButton(BarIconSet("fileopen"), "", this);
- m_boxLayout = new QHBoxLayout(this, 0, 11);
+ m_boxLayout = new TQHBoxLayout(this, 0, 11);
m_boxLayout->addWidget(m_lineEdit);
m_boxLayout->addWidget(m_selectButton);
setSizePolicy(m_lineEdit->sizePolicy());
- m_lineEdit->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- m_selectButton->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding));
+ m_lineEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ m_selectButton->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding));
- connect(m_selectButton, SIGNAL(clicked()), this, SLOT(makeSelection()));
+ connect(m_selectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(makeSelection()));
setSelectionType(Open);
setSelectionOpenMultiple(false);
@@ -64,9 +64,9 @@ FileSelector::~FileSelector()
{
}
-QString FileSelector::currentState() const
+TQString FileSelector::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool FileSelector::isKommanderWidget() const
@@ -74,33 +74,33 @@ bool FileSelector::isKommanderWidget() const
return true;
}
-QStringList FileSelector::associatedText() const
+TQStringList FileSelector::associatedText() const
{
return KommanderWidget::associatedText();
}
-void FileSelector::setAssociatedText(const QStringList& a_at)
+void FileSelector::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void FileSelector::setPopulationText(const QString& a_text)
+void FileSelector::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString FileSelector::populationText() const
+TQString FileSelector::populationText() const
{
return KommanderWidget::populationText();
}
void FileSelector::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void FileSelector::setWidgetText(const QString& a_text)
+void FileSelector::setWidgetText(const TQString& a_text)
{
m_lineEdit->setText(a_text);
emit widgetTextChanged(a_text);
@@ -122,22 +122,22 @@ void FileSelector::setSelectionType(SelectionType a_selectionType)
}
-QString FileSelector::selectionFilter() const
+TQString FileSelector::selectionFilter() const
{
return m_filter;
}
-void FileSelector::setSelectionFilter(const QString& a_filter)
+void FileSelector::setSelectionFilter(const TQString& a_filter)
{
m_filter = a_filter;
}
-QString FileSelector::selectionCaption() const
+TQString FileSelector::selectionCaption() const
{
return m_caption;
}
-void FileSelector::setSelectionCaption(const QString& a_caption)
+void FileSelector::setSelectionCaption(const TQString& a_caption)
{
m_caption = a_caption;
}
@@ -154,7 +154,7 @@ void FileSelector::setSelectionOpenMultiple(bool a_openMultiple)
void FileSelector::makeSelection()
{
- QString text;
+ TQString text;
if (m_selectionType == Open && m_openMultiple)
text = KFileDialog::getOpenFileNames(m_lineEdit->text(), m_filter, this, m_caption).join("\n");
else if (m_selectionType == Open && !m_openMultiple)
@@ -168,12 +168,12 @@ void FileSelector::makeSelection()
setWidgetText(text);
}
-QString FileSelector::caption() const
+TQString FileSelector::caption() const
{
return m_selectButton->text();
}
-void FileSelector::setCaption(const QString& a_text)
+void FileSelector::setCaption(const TQString& a_text)
{
m_selectButton->setText(a_text);
}
@@ -191,16 +191,16 @@ void FileSelector::setShowEditor(bool a_visible)
m_lineEdit->hide();
}
-void FileSelector::showEvent(QShowEvent * e)
+void FileSelector::showEvent(TQShowEvent * e)
{
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
emit widgetOpened();
}
-void FileSelector::contextMenuEvent( QContextMenuEvent * e )
+void FileSelector::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -210,7 +210,7 @@ bool FileSelector::isFunctionSupported(int f)
f == DCOP::clear;
}
-QString FileSelector::handleDCOP(int function, const QStringList& args)
+TQString FileSelector::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -228,12 +228,12 @@ QString FileSelector::handleDCOP(int function, const QStringList& args)
break;
}
case DCOP::clear:
- setWidgetText(QString::null);
+ setWidgetText(TQString::null);
break;
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/fileselector.h b/kommander/widgets/fileselector.h
index 9da6847d..c80648e0 100644
--- a/kommander/widgets/fileselector.h
+++ b/kommander/widgets/fileselector.h
@@ -19,10 +19,10 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -33,69 +33,69 @@ class KPushButton;
class KLineEdit;
class QShowEvent;
-class KOMMANDER_EXPORT FileSelector : public QWidget, public KommanderWidget
+class KOMMANDER_EXPORT FileSelector : public TQWidget, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
Q_PROPERTY(bool showEditor READ showEditor WRITE setShowEditor)
- Q_PROPERTY(QString buttonCaption READ caption WRITE setCaption)
- Q_PROPERTY(QString selectionFilter READ selectionFilter WRITE setSelectionFilter)
- Q_PROPERTY(QString selectionCaption READ selectionCaption WRITE setSelectionCaption)
+ Q_PROPERTY(TQString buttonCaption READ caption WRITE setCaption)
+ Q_PROPERTY(TQString selectionFilter READ selectionFilter WRITE setSelectionFilter)
+ Q_PROPERTY(TQString selectionCaption READ selectionCaption WRITE setSelectionCaption)
Q_PROPERTY(SelectionType selectionType READ selectionType WRITE setSelectionType)
Q_ENUMS(SelectionType)
Q_PROPERTY(bool selectionOpenMultiple READ selectionOpenMultiple WRITE setSelectionOpenMultiple)
public:
- FileSelector(QWidget *a_parent, const char *a_name);
+ FileSelector(TQWidget *a_parent, const char *a_name);
~FileSelector();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
enum SelectionType { Open, Save, Directory };
SelectionType selectionType() const;
void setSelectionType(SelectionType);
bool selectionOpenMultiple() const;
void setSelectionOpenMultiple(bool);
- QString selectionFilter() const;
- void setSelectionFilter(const QString&);
- QString selectionCaption() const;
- void setSelectionCaption(const QString&);
- QString caption() const;
- void setCaption(const QString&);
+ TQString selectionFilter() const;
+ void setSelectionFilter(const TQString&);
+ TQString selectionCaption() const;
+ void setSelectionCaption(const TQString&);
+ TQString caption() const;
+ void setCaption(const TQString&);
bool showEditor() const;
void setShowEditor(bool);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void makeSelection();
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void contextMenuEvent( QContextMenuEvent * e );
+ void contextMenuEvent( TQContextMenuEvent * e );
bool m_openMultiple;
- QString m_caption;
- QString m_filter;
+ TQString m_caption;
+ TQString m_filter;
SelectionType m_selectionType;
KLineEdit *m_lineEdit;
KPushButton *m_selectButton;
- QBoxLayout *m_boxLayout;
- void showEvent(QShowEvent *e);
+ TQBoxLayout *m_boxLayout;
+ void showEvent(TQShowEvent *e);
private:
};
diff --git a/kommander/widgets/fontdialog.cpp b/kommander/widgets/fontdialog.cpp
index 432b2d7f..5fc17edc 100644
--- a/kommander/widgets/fontdialog.cpp
+++ b/kommander/widgets/fontdialog.cpp
@@ -28,32 +28,32 @@ enum Functions {
LastFunction
};
-FontDialog::FontDialog(QWidget *parent, const char *name)
- : QLabel(parent, name), KommanderWidget(this)
+FontDialog::FontDialog(TQWidget *parent, const char *name)
+ : TQLabel(parent, name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
if (KommanderWidget::inEditor)
{
setPixmap(KGlobal::iconLoader()->loadIcon("kfontcombo", KIcon::NoGroup, KIcon::SizeMedium));
- setFrameStyle(QFrame::Box | QFrame::Plain);
+ setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(1);
setFixedSize(pixmap()->size());
}
else
setHidden(true);
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(SetFont, "setFont(QString widget, QString family, int pointSize, bool bold, bool italic)",
+ KommanderPlugin::registerFunction(SetFont, "setFont(TQString widget, TQString family, int pointSize, bool bold, bool italic)",
i18n("Sets the default font for the dialog, by specifying the family, the size and other style options."), 2, 5);
- KommanderPlugin::registerFunction(Family, "family(QString widget)",
+ KommanderPlugin::registerFunction(Family, "family(TQString widget)",
i18n("Returns the font family."), 1);
- KommanderPlugin::registerFunction(PointSize, "pointSize(QString widget)",
+ KommanderPlugin::registerFunction(PointSize, "pointSize(TQString widget)",
i18n("Returns the font size in point."), 1);
- KommanderPlugin::registerFunction(Bold, "bold(QString widget)",
+ KommanderPlugin::registerFunction(Bold, "bold(TQString widget)",
i18n("Returns true, if the font is bold."), 1);
- KommanderPlugin::registerFunction(Italic, "italic(QString widget)",
+ KommanderPlugin::registerFunction(Italic, "italic(TQString widget)",
i18n("Returns true, if the font is italic."), 1);
}
@@ -61,9 +61,9 @@ FontDialog::~FontDialog()
{
}
-QString FontDialog::currentState() const
+TQString FontDialog::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool FontDialog::isKommanderWidget() const
@@ -71,27 +71,27 @@ bool FontDialog::isKommanderWidget() const
return true;
}
-QStringList FontDialog::associatedText() const
+TQStringList FontDialog::associatedText() const
{
return KommanderWidget::associatedText();
}
-void FontDialog::setAssociatedText(const QStringList& a_at)
+void FontDialog::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void FontDialog::setWidgetText(const QString& a_text)
+void FontDialog::setWidgetText(const TQString& a_text)
{
KommanderWidget::setAssociatedText(a_text);
}
-void FontDialog::setPopulationText(const QString& a_text)
+void FontDialog::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString FontDialog::populationText() const
+TQString FontDialog::populationText() const
{
return KommanderWidget::populationText();
}
@@ -106,7 +106,7 @@ bool FontDialog::isFunctionSupported(int f)
return (f > FirstFunction && f < LastFunction) || f == DCOP::execute;
}
-QString FontDialog::handleDCOP(int function, const QStringList& args)
+TQString FontDialog::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case SetFont:
@@ -127,7 +127,7 @@ QString FontDialog::handleDCOP(int function, const QStringList& args)
}
case PointSize:
{
- return QString::number(m_font.pointSize());
+ return TQString::number(m_font.pointSize());
break;
}
case Bold:
@@ -150,7 +150,7 @@ QString FontDialog::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/fontdialog.h b/kommander/widgets/fontdialog.h
index 38bf7830..f7ccdf0f 100644
--- a/kommander/widgets/fontdialog.h
+++ b/kommander/widgets/fontdialog.h
@@ -12,39 +12,39 @@
#ifndef FONTDIALOG_H
#define FONTDIALOG_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kommanderwidget.h>
-#include <qfont.h>
+#include <tqfont.h>
/**
@author Andras Mantia <amantia@kdewebdev.org>
*/
-class FontDialog : public QLabel, public KommanderWidget
+class FontDialog : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- FontDialog(QWidget *parent = 0, const char *name = 0);
+ FontDialog(TQWidget *parent = 0, const char *name = 0);
~FontDialog();
virtual bool isKommanderWidget() const;
- virtual QString currentState() const;
+ virtual TQString currentState() const;
virtual bool isFunctionSupported(int function);
- virtual QString handleDCOP(int function, const QStringList& args);
- virtual QStringList associatedText() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
+ virtual TQStringList associatedText() const;
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
public slots:
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void populate();
- QFont m_font;
+ TQFont m_font;
};
#endif
diff --git a/kommander/widgets/groupbox.cpp b/kommander/widgets/groupbox.cpp
index 29947eb1..7ca1c199 100644
--- a/kommander/widgets/groupbox.cpp
+++ b/kommander/widgets/groupbox.cpp
@@ -16,13 +16,13 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qgroupbox.h>
-#include <qobjectlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqgroupbox.h>
+#include <tqobjectlist.h>
#include <klocale.h>
/* OTHER INCLUDES */
@@ -31,10 +31,10 @@
#include "groupbox.h"
-GroupBox::GroupBox(QWidget *a_parent, const char *a_name)
- : QGroupBox(a_parent, a_name), KommanderWidget(this)
+GroupBox::GroupBox(TQWidget *a_parent, const char *a_name)
+ : TQGroupBox(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -44,9 +44,9 @@ GroupBox::~GroupBox()
{
}
-QString GroupBox::currentState() const
+TQString GroupBox::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool GroupBox::isKommanderWidget() const
@@ -54,55 +54,55 @@ bool GroupBox::isKommanderWidget() const
return true;
}
-QStringList GroupBox::associatedText() const
+TQStringList GroupBox::associatedText() const
{
return KommanderWidget::associatedText();
}
-void GroupBox::setAssociatedText(const QStringList& a_at)
+void GroupBox::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void GroupBox::setPopulationText(const QString& a_text)
+void GroupBox::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString GroupBox::populationText() const
+TQString GroupBox::populationText() const
{
return KommanderWidget::populationText();
}
void GroupBox::populate()
{
- QString txt = KommanderWidget::evalAssociatedText( populationText() );
+ TQString txt = KommanderWidget::evalAssociatedText( populationText() );
//FIXME: setWidgetText( txt );
}
/* We need to keep track of all widgets created as a child of a groupbox, in order of creation. */
-void GroupBox::insertChild(QObject *a_child)
+void GroupBox::insertChild(TQObject *a_child)
{
m_childList.append(a_child);
- QObject::insertChild(a_child);
+ TQObject::insertChild(a_child);
}
-void GroupBox::removeChild(QObject *a_child)
+void GroupBox::removeChild(TQObject *a_child)
{
m_childList.remove(a_child);
- QObject::removeChild(a_child);
+ TQObject::removeChild(a_child);
}
-void GroupBox::showEvent( QShowEvent *e )
+void GroupBox::showEvent( TQShowEvent *e )
{
- QGroupBox::showEvent(e);
+ TQGroupBox::showEvent(e);
emit widgetOpened();
}
-void GroupBox::contextMenuEvent( QContextMenuEvent * e )
+void GroupBox::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -112,13 +112,13 @@ bool GroupBox::isFunctionSupported(int f)
// || (f >= FirstFunction && f <= LastFunction);
}
-QString GroupBox::handleDCOP(int function, const QStringList& args)
+TQString GroupBox::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
{
- QString text;
- for (QObjectListIt it(m_childList); it.current(); ++it)
+ TQString text;
+ for (TQObjectListIt it(m_childList); it.current(); ++it)
if (dynamic_cast<KommanderWidget*>(it.current()))
text += (dynamic_cast<KommanderWidget*>(it.current()))->evalAssociatedText();
return text;
@@ -128,7 +128,7 @@ QString GroupBox::handleDCOP(int function, const QStringList& args)
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
@@ -137,7 +137,7 @@ QString GroupBox::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -145,7 +145,7 @@ QString GroupBox::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/groupbox.h b/kommander/widgets/groupbox.h
index b7de75e1..47889416 100644
--- a/kommander/widgets/groupbox.h
+++ b/kommander/widgets/groupbox.h
@@ -19,11 +19,11 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qgroupbox.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qobjectlist.h>
+#include <tqgroupbox.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqobjectlist.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -31,39 +31,39 @@
class QWidget;
class QShowEvent;
-class KOMMANDER_EXPORT GroupBox : public QGroupBox, public KommanderWidget
+class KOMMANDER_EXPORT GroupBox : public TQGroupBox, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- GroupBox(QWidget *a_parent, const char *a_name);
+ GroupBox(TQWidget *a_parent, const char *a_name);
~GroupBox();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual void insertChild(QObject*);
- virtual void removeChild(QObject*);
+ virtual void insertChild(TQObject*);
+ virtual void removeChild(TQObject*);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString &);
+ void widgetTextChanged(const TQString &);
void contextMenuRequested(int xpos, int ypos);
protected:
- QObjectList m_childList;
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
+ TQObjectList m_childList;
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/konsole.cpp b/kommander/widgets/konsole.cpp
index 587f2318..c27cb8fe 100644
--- a/kommander/widgets/konsole.cpp
+++ b/kommander/widgets/konsole.cpp
@@ -14,10 +14,10 @@
***************************************************************************/
/* QT INCLUDES */
-#include <qcursor.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqcursor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -25,10 +25,10 @@
#include "konsole.h"
#include <myprocess.h>
-Konsole::Konsole(QWidget* a_parent, const char* a_name)
+Konsole::Konsole(TQWidget* a_parent, const char* a_name)
: KTextEdit(a_parent, a_name), KommanderWidget(this), mSeenEOL(false), mProcess(false)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -38,9 +38,9 @@ Konsole::~Konsole()
{
}
-QString Konsole::currentState() const
+TQString Konsole::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool Konsole::isKommanderWidget() const
@@ -48,48 +48,48 @@ bool Konsole::isKommanderWidget() const
return true;
}
-QStringList Konsole::associatedText() const
+TQStringList Konsole::associatedText() const
{
return KommanderWidget::associatedText();
}
-void Konsole::setAssociatedText(const QStringList& a_at)
+void Konsole::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void Konsole::setPopulationText(const QString& a_text)
+void Konsole::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString Konsole::populationText() const
+TQString Konsole::populationText() const
{
return KommanderWidget::populationText();
}
void Konsole::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void Konsole::setWidgetText(const QString&)
+void Konsole::setWidgetText(const TQString&)
{
// FIXME: emit widgetTextChanged(a_text);
}
void Konsole::execute()
{
- QString at = evalAssociatedText().stripWhiteSpace();
+ TQString at = evalAssociatedText().stripWhiteSpace();
if (mProcess)
cancel();
mSeenEOL = false;
mProcess = new MyProcess(this);
mProcess->setBlocking(false);
- connect(mProcess, SIGNAL(processExited(MyProcess*)), SLOT(processExited(MyProcess*)));
- connect(mProcess, SIGNAL(processReceivedStdout(MyProcess*, char*, int)), SLOT(processReceivedStdout(MyProcess*, char*, int)));
- setCursor(QCursor(Qt::WaitCursor));
+ connect(mProcess, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*)));
+ connect(mProcess, TQT_SIGNAL(processReceivedStdout(MyProcess*, char*, int)), TQT_SLOT(processReceivedStdout(MyProcess*, char*, int)));
+ setCursor(TQCursor(Qt::WaitCursor));
mProcess->run(at);
}
@@ -104,7 +104,7 @@ void Konsole::cancel()
void Konsole::processReceivedStdout(MyProcess*, char* buffer, int buflen)
{
- QString pBuf = QString::fromLocal8Bit(buffer, buflen);
+ TQString pBuf = TQString::fromLocal8Bit(buffer, buflen);
if (mSeenEOL)
pBuf = '\n' + pBuf;
mSeenEOL = pBuf[pBuf.length()-1] == '\n';
@@ -126,7 +126,7 @@ bool Konsole::isFunctionSupported(int f)
return f == DCOP::setText || f == DCOP::text || f == DCOP::clear || f == DCOP::execute || f == DCOP::cancel;
}
-QString Konsole::handleDCOP(int function, const QStringList& args)
+TQString Konsole::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setText:
@@ -146,7 +146,7 @@ QString Konsole::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/konsole.h b/kommander/widgets/konsole.h
index a031adef..feddbbac 100644
--- a/kommander/widgets/konsole.h
+++ b/kommander/widgets/konsole.h
@@ -21,7 +21,7 @@
#include <ktextedit.h>
/* QT INCLUDES */
-#include <qobject.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -33,28 +33,28 @@ class KOMMANDER_EXPORT Konsole : public KTextEdit, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_OVERRIDE(bool readOnly DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- Konsole(QWidget *a_parent, const char *a_name);
+ Konsole(TQWidget *a_parent, const char *a_name);
~Konsole();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
virtual void populate();
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
// Execute current script
virtual void execute();
// Stop executing current script
diff --git a/kommander/widgets/label.cpp b/kommander/widgets/label.cpp
index a9a24e3b..ee422325 100644
--- a/kommander/widgets/label.cpp
+++ b/kommander/widgets/label.cpp
@@ -14,21 +14,21 @@
***************************************************************************/
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <specials.h>
#include "label.h"
-Label::Label(QWidget *a_parent, const char *a_name)
- : QLabel(a_parent, a_name), KommanderWidget(this)
+Label::Label(TQWidget *a_parent, const char *a_name)
+ : TQLabel(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -40,9 +40,9 @@ Label::~Label()
{
}
-QString Label::currentState() const
+TQString Label::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool Label::isKommanderWidget() const
@@ -50,22 +50,22 @@ bool Label::isKommanderWidget() const
return true;
}
-QStringList Label::associatedText() const
+TQStringList Label::associatedText() const
{
return KommanderWidget::associatedText();
}
-void Label::setAssociatedText(const QStringList& a_at)
+void Label::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void Label::setPopulationText(const QString& a_text)
+void Label::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString Label::populationText() const
+TQString Label::populationText() const
{
return KommanderWidget::populationText();
}
@@ -75,14 +75,14 @@ void Label::populate()
setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
}
-void Label::setWidgetText(const QString& a_text)
+void Label::setWidgetText(const TQString& a_text)
{
setText(a_text);
}
-void Label::showEvent(QShowEvent *e)
+void Label::showEvent(TQShowEvent *e)
{
- QLabel::showEvent(e);
+ TQLabel::showEvent(e);
emit widgetOpened();
}
@@ -91,7 +91,7 @@ bool Label::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
-QString Label::handleDCOP(int function, const QStringList& args)
+TQString Label::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -104,7 +104,7 @@ QString Label::handleDCOP(int function, const QStringList& args)
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
@@ -113,7 +113,7 @@ QString Label::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -121,7 +121,7 @@ QString Label::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "label.moc"
diff --git a/kommander/widgets/label.h b/kommander/widgets/label.h
index 216998db..8ce4b58c 100644
--- a/kommander/widgets/label.h
+++ b/kommander/widgets/label.h
@@ -19,45 +19,45 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class QWidget;
class QShowEvent;
-class KOMMANDER_EXPORT Label : public QLabel, public KommanderWidget
+class KOMMANDER_EXPORT Label : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- Label(QWidget *a_parent, const char *a_name);
+ Label(TQWidget *a_parent, const char *a_name);
~Label();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
protected:
- void showEvent(QShowEvent *e);
+ void showEvent(TQShowEvent *e);
private:
};
diff --git a/kommander/widgets/lineedit.cpp b/kommander/widgets/lineedit.cpp
index d243660a..08913b4e 100644
--- a/kommander/widgets/lineedit.cpp
+++ b/kommander/widgets/lineedit.cpp
@@ -15,8 +15,8 @@
***************************************************************************/
/* QT INCLUDES */
-#include <qlayout.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -30,42 +30,42 @@ enum functions {
LastFunction
};
-LineEdit::LineEdit(QWidget *a_parent, const char *a_name)
- : KLineEdit(a_parent, a_name), KommanderWidget((QObject *)this)
+LineEdit::LineEdit(TQWidget *a_parent, const char *a_name)
+ : KLineEdit(a_parent, a_name), KommanderWidget((TQObject *)this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
- connect(this, SIGNAL(textChanged(const QString &)), this,
- SIGNAL(widgetTextChanged(const QString &)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString &)), this,
+ TQT_SIGNAL(widgetTextChanged(const TQString &)));
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(LE_clearModified, "clearModified(QString widget)", i18n("Clear widget modified status."), 1);
+ KommanderPlugin::registerFunction(LE_clearModified, "clearModified(TQString widget)", i18n("Clear widget modified status."), 1);
}
-void LineEdit::showEvent(QShowEvent *e)
+void LineEdit::showEvent(TQShowEvent *e)
{
- QLineEdit::showEvent(e);
+ TQLineEdit::showEvent(e);
emit widgetOpened();
}
-void LineEdit::focusInEvent( QFocusEvent * e)
+void LineEdit::focusInEvent( TQFocusEvent * e)
{
- QLineEdit::focusInEvent(e);
+ TQLineEdit::focusInEvent(e);
emit gotFocus();
}
-void LineEdit::focusOutEvent( QFocusEvent * e)
+void LineEdit::focusOutEvent( TQFocusEvent * e)
{
- QLineEdit::focusOutEvent(e);
+ TQLineEdit::focusOutEvent(e);
emit lostFocus();
}
-QString LineEdit::currentState() const
+TQString LineEdit::currentState() const
{
- return QString("default");
+ return TQString("default");
}
LineEdit::~LineEdit()
@@ -77,47 +77,47 @@ bool LineEdit::isKommanderWidget() const
return true;
}
-QStringList LineEdit::associatedText() const
+TQStringList LineEdit::associatedText() const
{
return KommanderWidget::associatedText();
}
-void LineEdit::setAssociatedText(const QStringList& a_at)
+void LineEdit::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void LineEdit::setPopulationText(const QString& a_text)
+void LineEdit::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString LineEdit::populationText() const
+TQString LineEdit::populationText() const
{
return KommanderWidget::populationText();
}
void LineEdit::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void LineEdit::setSelectedWidgetText(const QString& a_text)
+void LineEdit::setSelectedWidgetText(const TQString& a_text)
{
insert(a_text);
}
-void LineEdit::setWidgetText(const QString& a_text)
+void LineEdit::setWidgetText(const TQString& a_text)
{
setText(a_text);
emit widgetTextChanged(a_text);
}
-void LineEdit::contextMenuEvent( QContextMenuEvent * e )
+void LineEdit::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -127,7 +127,7 @@ bool LineEdit::isFunctionSupported(int f)
f == DCOP::clear || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction) ;
}
-QString LineEdit::handleDCOP(int function, const QStringList& args)
+TQString LineEdit::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -148,19 +148,19 @@ QString LineEdit::handleDCOP(int function, const QStringList& args)
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
case DCOP::getBackgroundColor:
return this->paletteBackgroundColor().name();
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -174,7 +174,7 @@ QString LineEdit::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/lineedit.h b/kommander/widgets/lineedit.h
index 8b4d403a..05fb79c4 100644
--- a/kommander/widgets/lineedit.h
+++ b/kommander/widgets/lineedit.h
@@ -21,9 +21,9 @@
#include <klineedit.h>
/* QT INCLUDES */
-#include <qtextedit.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqtextedit.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -35,37 +35,37 @@ class KOMMANDER_EXPORT LineEdit : public KLineEdit, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- LineEdit(QWidget *, const char *);
+ LineEdit(TQWidget *, const char *);
virtual ~LineEdit();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString &);
- virtual void setSelectedWidgetText(const QString &a_text);
+ virtual void setWidgetText(const TQString &);
+ virtual void setSelectedWidgetText(const TQString &a_text);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString &);
+ void widgetTextChanged(const TQString &);
void contextMenuRequested(int xpos, int ypos);
void gotFocus();
void lostFocus();
protected:
- virtual void showEvent( QShowEvent *e );
- void contextMenuEvent( QContextMenuEvent * e );
- void focusInEvent( QFocusEvent* e);
- void focusOutEvent( QFocusEvent* e);
+ virtual void showEvent( TQShowEvent *e );
+ void contextMenuEvent( TQContextMenuEvent * e );
+ void focusInEvent( TQFocusEvent* e);
+ void focusOutEvent( TQFocusEvent* e);
private:
};
diff --git a/kommander/widgets/listbox.cpp b/kommander/widgets/listbox.cpp
index 19b1b540..3dd36357 100644
--- a/kommander/widgets/listbox.cpp
+++ b/kommander/widgets/listbox.cpp
@@ -18,21 +18,21 @@
#include <kiconloader.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <specials.h>
#include "listbox.h"
-ListBox::ListBox(QWidget *a_parent, const char *a_name)
+ListBox::ListBox(TQWidget *a_parent, const char *a_name)
: KListBox(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -42,9 +42,9 @@ ListBox::~ListBox()
{
}
-QString ListBox::currentState() const
+TQString ListBox::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ListBox::isKommanderWidget() const
@@ -52,42 +52,42 @@ bool ListBox::isKommanderWidget() const
return true;
}
-QStringList ListBox::associatedText() const
+TQStringList ListBox::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ListBox::setAssociatedText(const QStringList& a_at)
+void ListBox::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ListBox::setPopulationText(const QString& a_text)
+void ListBox::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ListBox::populationText() const
+TQString ListBox::populationText() const
{
return KommanderWidget::populationText();
}
void ListBox::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void ListBox::setWidgetText(const QString& a_text)
+void ListBox::setWidgetText(const TQString& a_text)
{
clear();
- insertStringList(QStringList::split("\n", a_text));
+ insertStringList(TQStringList::split("\n", a_text));
emit widgetTextChanged(a_text);
}
-void ListBox::showEvent(QShowEvent *e)
+void ListBox::showEvent(TQShowEvent *e)
{
- QListBox::showEvent(e);
+ TQListBox::showEvent(e);
emit widgetOpened();
}
@@ -99,15 +99,15 @@ bool ListBox::isFunctionSupported(int f)
f == DCOP::findItem || f == DCOP::setPixmap || f == DCOP::count || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
-void ListBox::contextMenuEvent( QContextMenuEvent * e )
+void ListBox::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
-QString ListBox::handleDCOP(int function, const QStringList& args)
+TQString ListBox::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setText:
@@ -117,7 +117,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
{
if (selectionMode() == Single)
return currentText();
- QString value;
+ TQString value;
for (uint i=0; i<count(); i++)
if (isSelected(i))
value += (value.length() ? "\n" : "") + item(i)->text();
@@ -125,13 +125,13 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
}
case DCOP::setSelection:
{
- QListBoxItem* found = findItem(args[0], Qt::ExactMatch);
+ TQListBoxItem* found = findItem(args[0], Qt::ExactMatch);
if (found)
setCurrentItem(index(found));
break;
}
case DCOP::insertItems:
- insertStringList(QStringList::split("\n", args[0]), args[1].toInt());
+ insertStringList(TQStringList::split("\n", args[0]), args[1].toInt());
break;
case DCOP::insertItem:
insertItem(args[0], args[1].toInt());
@@ -143,9 +143,9 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
clear();
break;
case DCOP::count:
- return QString::number(count());
+ return TQString::number(count());
case DCOP::currentItem:
- return QString::number(currentItem());
+ return TQString::number(currentItem());
case DCOP::setCurrentItem:
{
int index = args[0].toInt();
@@ -159,7 +159,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
if (index >= 0 && index < (int)count())
return item(index)->text();
else
- return QString();
+ return TQString();
}
case DCOP::addUniqueItem:
if (!findItem(args[0], Qt::ExactMatch))
@@ -167,17 +167,17 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
break;
case DCOP::findItem:
{
- QListBoxItem* found = findItem(args[0], Qt::ExactMatch);
+ TQListBoxItem* found = findItem(args[0], Qt::ExactMatch);
if (!found) found = findItem(args[0], Qt::BeginsWith);
if (!found) found = findItem(args[0], Qt::Contains);
if (found)
- return QString::number(index(found));
- else return QString::number(-1);
+ return TQString::number(index(found));
+ else return TQString::number(-1);
break;
}
case DCOP::setPixmap:
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small);
if (pixmap.isNull())
pixmap.load(args[0]);
int index = args[1].toInt();
@@ -192,26 +192,26 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
}
case DCOP::text:
{
- QStringList strings;
+ TQStringList strings;
for(uint i=0; i < count() ; ++i)
strings += item(i)->text();
return strings.join("\n");
}
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
case DCOP::getBackgroundColor:
return this->paletteBackgroundColor().name();
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -219,7 +219,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "listbox.moc"
diff --git a/kommander/widgets/listbox.h b/kommander/widgets/listbox.h
index 516e9f86..ebd5784f 100644
--- a/kommander/widgets/listbox.h
+++ b/kommander/widgets/listbox.h
@@ -20,9 +20,9 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -35,32 +35,32 @@ class KOMMANDER_EXPORT ListBox : public KListBox, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- ListBox(QWidget *a_parent, const char *a_name);
+ ListBox(TQWidget *a_parent, const char *a_name);
~ListBox();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/pixmaplabel.cpp b/kommander/widgets/pixmaplabel.cpp
index 7d7095e3..78077c5c 100644
--- a/kommander/widgets/pixmaplabel.cpp
+++ b/kommander/widgets/pixmaplabel.cpp
@@ -14,12 +14,12 @@
***************************************************************************/
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qpixmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqpixmap.h>
/* KDE INCLUDES */
#include <kglobal.h>
@@ -30,10 +30,10 @@
#include <specials.h>
#include "pixmaplabel.h"
-PixmapLabel::PixmapLabel(QWidget *a_parent, const char *a_name)
- : QLabel(a_parent, a_name), KommanderWidget(this)
+PixmapLabel::PixmapLabel(TQWidget *a_parent, const char *a_name)
+ : TQLabel(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -46,9 +46,9 @@ PixmapLabel::~PixmapLabel()
{
}
-QString PixmapLabel::currentState() const
+TQString PixmapLabel::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool PixmapLabel::isKommanderWidget() const
@@ -56,22 +56,22 @@ bool PixmapLabel::isKommanderWidget() const
return true;
}
-QStringList PixmapLabel::associatedText() const
+TQStringList PixmapLabel::associatedText() const
{
return KommanderWidget::associatedText();
}
-void PixmapLabel::setAssociatedText(const QStringList& a_at)
+void PixmapLabel::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void PixmapLabel::setPopulationText(const QString& a_text)
+void PixmapLabel::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString PixmapLabel::populationText() const
+TQString PixmapLabel::populationText() const
{
return KommanderWidget::populationText();
}
@@ -81,23 +81,23 @@ void PixmapLabel::populate()
setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
}
-void PixmapLabel::setWidgetText(const QString& a_text)
+void PixmapLabel::setWidgetText(const TQString& a_text)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (pixmap.load(a_text))
setPixmap(pixmap);
}
-void PixmapLabel::showEvent(QShowEvent *e)
+void PixmapLabel::showEvent(TQShowEvent *e)
{
- QLabel::showEvent(e);
+ TQLabel::showEvent(e);
emit widgetOpened();
}
-void PixmapLabel::contextMenuEvent( QContextMenuEvent * e )
+void PixmapLabel::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -106,27 +106,27 @@ bool PixmapLabel::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry;
}
-QString PixmapLabel::handleDCOP(int function, const QStringList& args)
+TQString PixmapLabel::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setText:
setWidgetText(args[0]);
break;
case DCOP::clear:
- setPixmap(QPixmap());
+ setPixmap(TQPixmap());
break;
case DCOP::text:
return text();
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "pixmaplabel.moc"
diff --git a/kommander/widgets/pixmaplabel.h b/kommander/widgets/pixmaplabel.h
index a932ad1e..a9ba9ca9 100644
--- a/kommander/widgets/pixmaplabel.h
+++ b/kommander/widgets/pixmaplabel.h
@@ -20,46 +20,46 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class QWidget;
class QShowEvent;
-class KOMMANDER_EXPORT PixmapLabel : public QLabel, public KommanderWidget
+class KOMMANDER_EXPORT PixmapLabel : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- PixmapLabel(QWidget *a_parent, const char *a_name);
+ PixmapLabel(TQWidget *a_parent, const char *a_name);
~PixmapLabel();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/plugin.cpp b/kommander/widgets/plugin.cpp
index 9319bc00..020ae6da 100644
--- a/kommander/widgets/plugin.cpp
+++ b/kommander/widgets/plugin.cpp
@@ -57,7 +57,7 @@ class KomStdPlugin : public KommanderPlugin
{
public:
KomStdPlugin();
- virtual QWidget *create( const QString &key, QWidget *parent = 0, const char *name = 0 );
+ virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 );
};
KomStdPlugin::KomStdPlugin()
@@ -80,7 +80,7 @@ KomStdPlugin::KomStdPlugin()
addWidget("SpinBoxInt", group, "", 0);
// addWidget("Wizard", group, "");
addWidget("TabWidget", group, "", 0);
- addWidget("ToolBox", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("toolbox", KIcon::NoGroup, KIcon::SizeMedium)), "", true);
+ addWidget("ToolBox", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("toolbox", KIcon::NoGroup, KIcon::SizeMedium)), "", true);
// addWidget("SubDialog", group, "");
addWidget("ListBox", group, "", 0);
addWidget("Timer", group, "", 0);
@@ -92,12 +92,12 @@ KomStdPlugin::KomStdPlugin()
addWidget("Slider", group, "", 0);
addWidget("Table", group, "", 0);
addWidget("DatePicker", group, "", 0);
- addWidget("PopupMenu", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("contents", KIcon::NoGroup, KIcon::SizeMedium)));
- addWidget("FontDialog", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("kfontcombo", KIcon::NoGroup, KIcon::SizeMedium)));
- addWidget("AboutDialog", group, "", new QIconSet(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium)));
+ addWidget("PopupMenu", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("contents", KIcon::NoGroup, KIcon::SizeMedium)));
+ addWidget("FontDialog", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("kfontcombo", KIcon::NoGroup, KIcon::SizeMedium)));
+ addWidget("AboutDialog", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium)));
}
-QWidget *KomStdPlugin::create( const QString &key, QWidget *parent, const char *name )
+TQWidget *KomStdPlugin::create( const TQString &key, TQWidget *parent, const char *name )
{
if (key == "ButtonGroup") return new ButtonGroup(parent, name);
else if (key == "CheckBox") return new CheckBox(parent, name);
diff --git a/kommander/widgets/popupmenu.cpp b/kommander/widgets/popupmenu.cpp
index 696bd0be..48bb4474 100644
--- a/kommander/widgets/popupmenu.cpp
+++ b/kommander/widgets/popupmenu.cpp
@@ -12,7 +12,7 @@
#include "popupmenu.h"
#include "specials.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kglobal.h>
#include <kiconloader.h>
@@ -32,17 +32,17 @@
#define INSERTSUBMENU 109
#define LAST_FUNCTION INSERTSUBMENU
-PopupMenu::PopupMenu(QWidget *parent, const char *name)
- : QLabel(parent, name), KommanderWidget(this)
+PopupMenu::PopupMenu(TQWidget *parent, const char *name)
+ : TQLabel(parent, name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
if (KommanderWidget::inEditor)
{
setPixmap(KGlobal::iconLoader()->loadIcon("contents", KIcon::NoGroup, KIcon::SizeMedium));
- setFrameStyle(QFrame::Box | QFrame::Plain);
+ setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(1);
setFixedSize(pixmap()->size());
}
@@ -50,19 +50,19 @@ PopupMenu::PopupMenu(QWidget *parent, const char *name)
setHidden(true);
m_menu = new KPopupMenu(this);
- connect(m_menu, SIGNAL(activated(int)), this, SLOT(slotMenuItemActivated(int)));
+ connect(m_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuItemActivated(int)));
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(INSERTMENUITEM, "insertMenuItem(QString widget, QString text, QString executeWidget, int index, QString icon)", i18n("Insert an item into the popup menu. The executeWidget's execute method will be run when this item is selected. Returns the id of the inserted item. Use -1 for index to insert to the end. The icon is optional."), 4, 5);
- KommanderPlugin::registerFunction(INSERTSEPARATOR, "insertSeparator(QString widget, int index)", i18n("Insert a separator item into the popup menu. Use -1 for index to insert to the end."), 2);
- KommanderPlugin::registerFunction(CHANGEMENUITEM, "changeMenuItem(QString widget, int id, QString text, QString executeWidget, QString icon)", i18n("Change an item specified by id in the popup menu. The executeWidget's execute method will be run when this item is selected."), 4, 5);
- KommanderPlugin::registerFunction(SETITEMENABLED, "setItemEnabled(QString widget, int id, bool enable)", i18n("Enable the item specified by id in the popup menu."), 3);
- KommanderPlugin::registerFunction(ITEMENABLED, "itemEnabled(QString widget, int id)", i18n("Check if the item specified by id is enabled."), 2);
- KommanderPlugin::registerFunction(SETITEMVISIBLE, "setItemVisible(QString widget, int id, bool enable)", i18n("Make the item specified by id visible."), 3);
- KommanderPlugin::registerFunction(SETITEMCHECKED, "setItemChecked(QString widget, int id, bool enable)", i18n("Apply checked status for the item specified by id."), 3);
- KommanderPlugin::registerFunction(ITEMVISIBLE, "itemVisible(QString widget, int id)", i18n("Check if the item specified by id is visible."), 2);
- KommanderPlugin::registerFunction(ITEMCHECKED, "itemChecked(QString widget, int id)", i18n("Verify if the item specified by id is checked."), 2);
- KommanderPlugin::registerFunction(INSERTSUBMENU, "insertSubmenu(QString widget, QString text, QString menuWidget, int index, QString icon)", i18n("Insert submenu widget into the popup menu. Use -1 for index to insert to the end. The icon is optional."), 4, 5);
+ KommanderPlugin::registerFunction(INSERTMENUITEM, "insertMenuItem(TQString widget, TQString text, TQString executeWidget, int index, TQString icon)", i18n("Insert an item into the popup menu. The executeWidget's execute method will be run when this item is selected. Returns the id of the inserted item. Use -1 for index to insert to the end. The icon is optional."), 4, 5);
+ KommanderPlugin::registerFunction(INSERTSEPARATOR, "insertSeparator(TQString widget, int index)", i18n("Insert a separator item into the popup menu. Use -1 for index to insert to the end."), 2);
+ KommanderPlugin::registerFunction(CHANGEMENUITEM, "changeMenuItem(TQString widget, int id, TQString text, TQString executeWidget, TQString icon)", i18n("Change an item specified by id in the popup menu. The executeWidget's execute method will be run when this item is selected."), 4, 5);
+ KommanderPlugin::registerFunction(SETITEMENABLED, "setItemEnabled(TQString widget, int id, bool enable)", i18n("Enable the item specified by id in the popup menu."), 3);
+ KommanderPlugin::registerFunction(ITEMENABLED, "itemEnabled(TQString widget, int id)", i18n("Check if the item specified by id is enabled."), 2);
+ KommanderPlugin::registerFunction(SETITEMVISIBLE, "setItemVisible(TQString widget, int id, bool enable)", i18n("Make the item specified by id visible."), 3);
+ KommanderPlugin::registerFunction(SETITEMCHECKED, "setItemChecked(TQString widget, int id, bool enable)", i18n("Apply checked status for the item specified by id."), 3);
+ KommanderPlugin::registerFunction(ITEMVISIBLE, "itemVisible(TQString widget, int id)", i18n("Check if the item specified by id is visible."), 2);
+ KommanderPlugin::registerFunction(ITEMCHECKED, "itemChecked(TQString widget, int id)", i18n("Verify if the item specified by id is checked."), 2);
+ KommanderPlugin::registerFunction(INSERTSUBMENU, "insertSubmenu(TQString widget, TQString text, TQString menuWidget, int index, TQString icon)", i18n("Insert submenu widget into the popup menu. Use -1 for index to insert to the end. The icon is optional."), 4, 5);
}
@@ -71,9 +71,9 @@ PopupMenu::~PopupMenu()
delete m_menu;
}
-QString PopupMenu::currentState() const
+TQString PopupMenu::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool PopupMenu::isKommanderWidget() const
@@ -81,40 +81,40 @@ bool PopupMenu::isKommanderWidget() const
return true;
}
-QStringList PopupMenu::associatedText() const
+TQStringList PopupMenu::associatedText() const
{
return KommanderWidget::associatedText();
}
-void PopupMenu::setAssociatedText(const QStringList& a_at)
+void PopupMenu::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void PopupMenu::setWidgetText(const QString& a_text)
+void PopupMenu::setWidgetText(const TQString& a_text)
{
KommanderWidget::setAssociatedText(a_text);
}
-void PopupMenu::setPopulationText(const QString& a_text)
+void PopupMenu::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString PopupMenu::populationText() const
+TQString PopupMenu::populationText() const
{
return KommanderWidget::populationText();
}
void PopupMenu::popup(int x, int y)
{
- m_menu->exec(QPoint(x, y));
+ m_menu->exec(TQPoint(x, y));
}
void PopupMenu::slotMenuItemActivated(int id)
{
- QString widget = m_associations[id];
- KommanderWidget::evalAssociatedText(QString("#!kommander\n%1.execute(%2)").arg(widget).arg(id));
+ TQString widget = m_associations[id];
+ KommanderWidget::evalAssociatedText(TQString("#!kommander\n%1.execute(%2)").arg(widget).arg(id));
}
void PopupMenu::populate()
@@ -122,17 +122,17 @@ void PopupMenu::populate()
setAssociatedText(KommanderWidget::evalAssociatedText( populationText()));
}
-QString PopupMenu::insertSubmenu(const QString& title, const QString &menuWidget, int index, const QString& icon)
+TQString PopupMenu::insertSubmenu(const TQString& title, const TQString &menuWidget, int index, const TQString& icon)
{
KommanderWidget *w = widgetByName(menuWidget);
if (dynamic_cast<PopupMenu*>(w))
{
if (icon.isEmpty())
- return QString::number(m_menu->insertItem(title, dynamic_cast<PopupMenu*>(w)->menu(), index));
+ return TQString::number(m_menu->insertItem(title, dynamic_cast<PopupMenu*>(w)->menu(), index));
else
- return QString::number( m_menu->insertItem(KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, KIcon::SizeMedium), title, dynamic_cast<PopupMenu*>(w)->menu(), index));
+ return TQString::number( m_menu->insertItem(KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, KIcon::SizeMedium), title, dynamic_cast<PopupMenu*>(w)->menu(), index));
}
- return QString();
+ return TQString();
}
@@ -141,7 +141,7 @@ bool PopupMenu::isFunctionSupported(int f)
return f == DCOP::clear || f == DCOP::execute || f == DCOP::item || (f >= INSERTMENUITEM && f <= LAST_FUNCTION) || f == DCOP::count || f == DCOP::geometry;
}
-QString PopupMenu::handleDCOP(int function, const QStringList& args)
+TQString PopupMenu::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::clear:
@@ -161,7 +161,7 @@ QString PopupMenu::handleDCOP(int function, const QStringList& args)
else
id = m_menu->insertItem(KGlobal::iconLoader()->loadIcon(args[3], KIcon::NoGroup, KIcon::SizeMedium), args[0], index);
m_associations[id] = args[1];
- return QString::number(id);
+ return TQString::number(id);
break;
}
case INSERTSUBMENU:
@@ -223,22 +223,22 @@ QString PopupMenu::handleDCOP(int function, const QStringList& args)
case DCOP::item:
{
uint index = args[0].toInt();
- return index < m_params.count() ? m_params[index] : QString::null;
+ return index < m_params.count() ? m_params[index] : TQString::null;
break;
}
case DCOP::count:
- return QString::number(m_menu->count());
+ return TQString::number(m_menu->count());
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/popupmenu.h b/kommander/widgets/popupmenu.h
index f2db18a6..dff28a86 100644
--- a/kommander/widgets/popupmenu.h
+++ b/kommander/widgets/popupmenu.h
@@ -12,8 +12,8 @@
#ifndef POPUPMENU_H
#define POPUPMENU_H
-#include <qlabel.h>
-#include <qmap.h>
+#include <tqlabel.h>
+#include <tqmap.h>
#include <kommanderwidget.h>
@@ -22,28 +22,28 @@ class KPopupMenu;
/**
@author Andras Mantia <amantia@kdewebdev.org>
*/
-class PopupMenu : public QLabel, public KommanderWidget
+class PopupMenu : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- PopupMenu(QWidget *parent = 0, const char *name = 0);
+ PopupMenu(TQWidget *parent = 0, const char *name = 0);
~PopupMenu();
virtual bool isKommanderWidget() const;
- virtual QString currentState() const;
+ virtual TQString currentState() const;
virtual bool isFunctionSupported(int function);
- virtual QString handleDCOP(int function, const QStringList& args);
- virtual QStringList associatedText() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
+ virtual TQStringList associatedText() const;
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
KPopupMenu *menu() {return m_menu;}
public slots:
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void populate();
void popup(int x, int y);
@@ -51,11 +51,11 @@ private slots:
void slotMenuItemActivated(int id);
private:
- QString insertSubmenu(const QString& title, const QString &menuWidget, int index, const QString& icon);
+ TQString insertSubmenu(const TQString& title, const TQString &menuWidget, int index, const TQString& icon);
KPopupMenu *m_menu;
- QMap<int, QString> m_associations;
- QStringList m_params;
+ TQMap<int, TQString> m_associations;
+ TQStringList m_params;
};
#endif
diff --git a/kommander/widgets/progressbar.cpp b/kommander/widgets/progressbar.cpp
index 874601f5..30d4f329 100644
--- a/kommander/widgets/progressbar.cpp
+++ b/kommander/widgets/progressbar.cpp
@@ -17,11 +17,11 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -35,25 +35,25 @@ enum Functions {
LastFunction
};
-ProgressBar::ProgressBar(QWidget *a_parent, const char *a_name)
+ProgressBar::ProgressBar(TQWidget *a_parent, const char *a_name)
: KProgress(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(PB_setHighlightColor, "setBarColor(QString widget, QString Color)", i18n("Sets the ProgresBar color"), 2);
- KommanderPlugin::registerFunction(PB_setHightlightTextColor, "setBarTextColor(QString widget, QString Color)", i18n("Sets the ProgresBar text color"), 2);
+ KommanderPlugin::registerFunction(PB_setHighlightColor, "setBarColor(TQString widget, TQString Color)", i18n("Sets the ProgresBar color"), 2);
+ KommanderPlugin::registerFunction(PB_setHightlightTextColor, "setBarTextColor(TQString widget, TQString Color)", i18n("Sets the ProgresBar text color"), 2);
}
ProgressBar::~ProgressBar()
{
}
-QString ProgressBar::currentState() const
+TQString ProgressBar::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ProgressBar::isKommanderWidget() const
@@ -61,22 +61,22 @@ bool ProgressBar::isKommanderWidget() const
return true;
}
-QStringList ProgressBar::associatedText() const
+TQStringList ProgressBar::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ProgressBar::setAssociatedText(const QStringList& a_at)
+void ProgressBar::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ProgressBar::setPopulationText(const QString& a_text)
+void ProgressBar::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ProgressBar::populationText() const
+TQString ProgressBar::populationText() const
{
return KommanderWidget::populationText();
}
@@ -86,9 +86,9 @@ void ProgressBar::populate()
setProgress(KommanderWidget::evalAssociatedText(populationText()).toUInt());
}
-void ProgressBar::showEvent(QShowEvent *e)
+void ProgressBar::showEvent(TQShowEvent *e)
{
- QProgressBar::showEvent(e);
+ TQProgressBar::showEvent(e);
emit widgetOpened();
}
@@ -97,11 +97,11 @@ bool ProgressBar::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::setMaximum || f == DCOP::geometry || (f > FirstFunction && f < LastFunction);
}
-QString ProgressBar::handleDCOP(int function, const QStringList& args)
+TQString ProgressBar::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
- return QString::number(progress());
+ return TQString::number(progress());
case DCOP::setText:
setProgress(args[0].toUInt());
break;
@@ -113,32 +113,32 @@ QString ProgressBar::handleDCOP(int function, const QStringList& args)
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case PB_setHighlightColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
- QPalette p = this->palette();
- p.setColor(QPalette::Active, QColorGroup::Highlight, color);
+ TQPalette p = this->palette();
+ p.setColor(TQPalette::Active, TQColorGroup::Highlight, color);
this->setPalette( p, TRUE );
break;
}
case PB_setHightlightTextColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
- QPalette p = this->palette();
- p.setColor(QPalette::Active, QColorGroup::HighlightedText, color);
+ TQPalette p = this->palette();
+ p.setColor(TQPalette::Active, TQColorGroup::HighlightedText, color);
this->setPalette( p, TRUE );
break;
}
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "progressbar.moc"
diff --git a/kommander/widgets/progressbar.h b/kommander/widgets/progressbar.h
index b4aa3d94..d54e1185 100644
--- a/kommander/widgets/progressbar.h
+++ b/kommander/widgets/progressbar.h
@@ -19,9 +19,9 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kprogress.h>
@@ -34,29 +34,29 @@ class KOMMANDER_EXPORT ProgressBar: public KProgress, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- ProgressBar(QWidget *a_parent, const char *a_name);
+ ProgressBar(TQWidget *a_parent, const char *a_name);
~ProgressBar();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
virtual void populate();
signals:
void widgetOpened();
protected:
- void showEvent(QShowEvent *e);
+ void showEvent(TQShowEvent *e);
private:
};
diff --git a/kommander/widgets/radiobutton.cpp b/kommander/widgets/radiobutton.cpp
index a7faa91a..ba46248d 100644
--- a/kommander/widgets/radiobutton.cpp
+++ b/kommander/widgets/radiobutton.cpp
@@ -16,25 +16,25 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qradiobutton.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqradiobutton.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "radiobutton.h"
-RadioButton::RadioButton(QWidget *a_parent, const char *a_name)
- : QRadioButton(a_parent, a_name), KommanderWidget(this)
+RadioButton::RadioButton(TQWidget *a_parent, const char *a_name)
+ : TQRadioButton(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "unchecked";
states << "checked";
setStates(states);
- QStringList displayStates;
+ TQStringList displayStates;
displayStates << "checked";
displayStates << "unchecked";
setDisplayStates(displayStates);
@@ -44,7 +44,7 @@ RadioButton::~RadioButton()
{
}
-QString RadioButton::currentState() const
+TQString RadioButton::currentState() const
{
return (isChecked() ? "checked" : "unchecked");
}
@@ -54,48 +54,48 @@ bool RadioButton::isKommanderWidget() const
return true;
}
-QStringList RadioButton::associatedText() const
+TQStringList RadioButton::associatedText() const
{
return KommanderWidget::associatedText();
}
-void RadioButton::setAssociatedText(const QStringList& a_at)
+void RadioButton::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void RadioButton::setWidgetText(const QString &a_text)
+void RadioButton::setWidgetText(const TQString &a_text)
{
setText(a_text);
emit widgetTextChanged(a_text);
}
-void RadioButton::setPopulationText(const QString& a_text)
+void RadioButton::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText( a_text );
}
-QString RadioButton::populationText() const
+TQString RadioButton::populationText() const
{
return KommanderWidget::populationText();
}
void RadioButton::populate()
{
- QString txt = KommanderWidget::evalAssociatedText( populationText() );
+ TQString txt = KommanderWidget::evalAssociatedText( populationText() );
setWidgetText( txt );
}
-void RadioButton::showEvent( QShowEvent *e )
+void RadioButton::showEvent( TQShowEvent *e )
{
- QRadioButton::showEvent( e );
+ TQRadioButton::showEvent( e );
emit widgetOpened();
}
-void RadioButton::contextMenuEvent( QContextMenuEvent * e )
+void RadioButton::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -104,7 +104,7 @@ bool RadioButton::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::setChecked || f == DCOP::checked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
-QString RadioButton::handleDCOP(int function, const QStringList& args)
+TQString RadioButton::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -116,10 +116,10 @@ QString RadioButton::handleDCOP(int function, const QStringList& args)
setChecked(args[0] != "false");
break;
case DCOP::checked:
- return QString::number(isOn());
+ return TQString::number(isOn());
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
@@ -128,7 +128,7 @@ QString RadioButton::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -136,7 +136,7 @@ QString RadioButton::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/radiobutton.h b/kommander/widgets/radiobutton.h
index f9fb5a16..88dcdcb1 100644
--- a/kommander/widgets/radiobutton.h
+++ b/kommander/widgets/radiobutton.h
@@ -19,10 +19,10 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qradiobutton.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqradiobutton.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -30,36 +30,36 @@
class QWidget;
class QShowEvent;
-class KOMMANDER_EXPORT RadioButton : public QRadioButton, public KommanderWidget
+class KOMMANDER_EXPORT RadioButton : public TQRadioButton, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- RadioButton(QWidget *a_parent, const char *a_name);
+ RadioButton(TQWidget *a_parent, const char *a_name);
~RadioButton();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString &);
+ void widgetTextChanged(const TQString &);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent( QShowEvent *e );
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent( TQShowEvent *e );
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp
index eea0b0d6..9e54f07c 100644
--- a/kommander/widgets/richtexteditor.cpp
+++ b/kommander/widgets/richtexteditor.cpp
@@ -17,18 +17,18 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qlayout.h>
-#include <qevent.h>
-#include <qtextedit.h>
-#include <qframe.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qpixmap.h>
-#include <qhbuttongroup.h>
-#include <qfont.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqtextedit.h>
+#include <tqframe.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqpixmap.h>
+#include <tqhbuttongroup.h>
+#include <tqfont.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -42,38 +42,38 @@
#include "pixmaps/textleft.xpm"
#include "pixmaps/textright.xpm"
-RichTextEditor::RichTextEditor(QWidget *a_parent, const char *a_name)
- : QWidget(a_parent, a_name), KommanderWidget((QObject *)this)
+RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name)
+ : TQWidget(a_parent, a_name), KommanderWidget((TQObject *)this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
// setup toolbar
- m_toolbar = new QFrame(this, "buttonBar");
+ m_toolbar = new TQFrame(this, "buttonBar");
m_toolbar->setMinimumSize(0, 32);
- m_toolbar->setFrameShape(QFrame::NoFrame);
- m_toolbar->setFrameShadow(QFrame::Plain);
+ m_toolbar->setFrameShape(TQFrame::NoFrame);
+ m_toolbar->setFrameShadow(TQFrame::Plain);
//setup textedit
- m_textedit = new QTextEdit(this, "editor");
+ m_textedit = new TQTextEdit(this, "editor");
m_textedit->setTextFormat(RichText);
// layout the widgets
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
layout->addWidget(m_toolbar);
layout->addWidget(m_textedit);
layout->setSpacing(1);
// setup buttons
- QHBoxLayout *tbLayout = new QHBoxLayout(m_toolbar);
+ TQHBoxLayout *tbLayout = new TQHBoxLayout(m_toolbar);
//bold italic underline left right center link
- m_formatGroup = new QHButtonGroup(m_toolbar, "formatGroup");
+ m_formatGroup = new TQHButtonGroup(m_toolbar, "formatGroup");
//m_formatGroup->setFlat(true);
- m_alignGroup = new QHButtonGroup(m_toolbar, "alignGroup");
+ m_alignGroup = new TQHButtonGroup(m_toolbar, "alignGroup");
//m_alignGroup->setFlat(true);
m_alignGroup->setExclusive(true);
tbLayout->insertStretch(0);
@@ -81,40 +81,40 @@ RichTextEditor::RichTextEditor(QWidget *a_parent, const char *a_name)
tbLayout->addWidget(m_alignGroup);
tbLayout->insertStretch(3);
- m_buttonTextBold = new QToolButton(m_formatGroup, "textBold");
- m_buttonTextBold->setPixmap(QPixmap((const char **)bold_xpm));
+ m_buttonTextBold = new TQToolButton(m_formatGroup, "textBold");
+ m_buttonTextBold->setPixmap(TQPixmap((const char **)bold_xpm));
m_buttonTextBold->setToggleButton(true);
- connect(m_buttonTextBold, SIGNAL(toggled(bool)), this, SLOT(textBold(bool)));
- m_buttonTextItalic = new QToolButton(m_formatGroup, "textItalic");
- m_buttonTextItalic->setPixmap(QPixmap((const char **)italic_xpm));
+ connect(m_buttonTextBold, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textBold(bool)));
+ m_buttonTextItalic = new TQToolButton(m_formatGroup, "textItalic");
+ m_buttonTextItalic->setPixmap(TQPixmap((const char **)italic_xpm));
m_buttonTextItalic->setToggleButton(true);
- connect(m_buttonTextItalic, SIGNAL(toggled(bool)), this, SLOT(textItalic(bool)));
- m_buttonTextUnder = new QToolButton(m_formatGroup, "textUnder");
- m_buttonTextUnder->setPixmap(QPixmap((const char **)under_xpm));
+ connect(m_buttonTextItalic, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textItalic(bool)));
+ m_buttonTextUnder = new TQToolButton(m_formatGroup, "textUnder");
+ m_buttonTextUnder->setPixmap(TQPixmap((const char **)under_xpm));
m_buttonTextUnder->setToggleButton(true);
- connect(m_buttonTextUnder, SIGNAL(toggled(bool)), this, SLOT(textUnder(bool)));
+ connect(m_buttonTextUnder, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textUnder(bool)));
- m_buttonTextLeft = new QToolButton(m_alignGroup, "textLeft");
- m_buttonTextLeft->setPixmap(QPixmap((const char **)left_xpm));
+ m_buttonTextLeft = new TQToolButton(m_alignGroup, "textLeft");
+ m_buttonTextLeft->setPixmap(TQPixmap((const char **)left_xpm));
m_buttonTextLeft->setToggleButton(true);
- m_buttonTextCenter = new QToolButton(m_alignGroup, "textCenter");
- m_buttonTextCenter->setPixmap(QPixmap((const char **)center_xpm));
+ m_buttonTextCenter = new TQToolButton(m_alignGroup, "textCenter");
+ m_buttonTextCenter->setPixmap(TQPixmap((const char **)center_xpm));
m_buttonTextCenter->setToggleButton(true);
- m_buttonTextRight = new QToolButton(m_alignGroup, "textRight");
- m_buttonTextRight->setPixmap(QPixmap((const char **)right_xpm));
+ m_buttonTextRight = new TQToolButton(m_alignGroup, "textRight");
+ m_buttonTextRight->setPixmap(TQPixmap((const char **)right_xpm));
m_buttonTextRight->setToggleButton(true);
- connect(m_alignGroup, SIGNAL(clicked(int)), this, SLOT(textAlign(int)));
- connect(m_textedit, SIGNAL(currentFontChanged(const QFont &)), this, SLOT(fontChanged(const QFont &)));
- connect(m_textedit, SIGNAL(currentAlignmentChanged(int)), this, SLOT(alignmentChanged(int)));
+ connect(m_alignGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(textAlign(int)));
+ connect(m_textedit, TQT_SIGNAL(currentFontChanged(const TQFont &)), this, TQT_SLOT(fontChanged(const TQFont &)));
+ connect(m_textedit, TQT_SIGNAL(currentAlignmentChanged(int)), this, TQT_SLOT(alignmentChanged(int)));
- connect(m_textedit, SIGNAL(textChanged()), this, SLOT(setTextChanged()));
+ connect(m_textedit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(setTextChanged()));
}
-QString RichTextEditor::currentState() const
+TQString RichTextEditor::currentState() const
{
- return QString("default");
+ return TQString("default");
}
RichTextEditor::~RichTextEditor()
@@ -126,33 +126,33 @@ bool RichTextEditor::isKommanderWidget() const
return true;
}
-QStringList RichTextEditor::associatedText() const
+TQStringList RichTextEditor::associatedText() const
{
return KommanderWidget::associatedText();
}
-void RichTextEditor::setAssociatedText(const QStringList& a_at)
+void RichTextEditor::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void RichTextEditor::setPopulationText(const QString& a_text)
+void RichTextEditor::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText( a_text );
}
-QString RichTextEditor::populationText() const
+TQString RichTextEditor::populationText() const
{
return KommanderWidget::populationText();
}
void RichTextEditor::populate()
{
- QString txt = KommanderWidget::evalAssociatedText( populationText() );
+ TQString txt = KommanderWidget::evalAssociatedText( populationText() );
setWidgetText( txt );
}
-void RichTextEditor::setWidgetText(const QString &a_text)
+void RichTextEditor::setWidgetText(const TQString &a_text)
{
m_textedit->setText(a_text);
emit widgetTextChanged(a_text);
@@ -180,7 +180,7 @@ void RichTextEditor::textItalic(bool a_isOn)
void RichTextEditor::textAlign(int a_id)
{
- QToolButton *b = (QToolButton *)m_alignGroup->find(a_id);
+ TQToolButton *b = (TQToolButton *)m_alignGroup->find(a_id);
if(b == m_buttonTextLeft)
m_textedit->setAlignment(Qt::AlignLeft);
else if(b == m_buttonTextCenter)
@@ -189,7 +189,7 @@ void RichTextEditor::textAlign(int a_id)
m_textedit->setAlignment(Qt::AlignRight);
}
-void RichTextEditor::fontChanged(const QFont &a_font)
+void RichTextEditor::fontChanged(const TQFont &a_font)
{
m_buttonTextBold->setOn(a_font.bold());
m_buttonTextItalic->setOn(a_font.italic());
@@ -206,16 +206,16 @@ void RichTextEditor::alignmentChanged(int a_alignment)
m_buttonTextRight->setOn(true);
}
-void RichTextEditor::showEvent( QShowEvent *e )
+void RichTextEditor::showEvent( TQShowEvent *e )
{
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
emit widgetOpened();
}
-void RichTextEditor::contextMenuEvent( QContextMenuEvent * e )
+void RichTextEditor::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -224,7 +224,7 @@ bool RichTextEditor::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::selection || f == DCOP::setEditable;
}
-QString RichTextEditor::handleDCOP(int function, const QStringList& args)
+TQString RichTextEditor::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -243,7 +243,7 @@ QString RichTextEditor::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "richtexteditor.moc"
diff --git a/kommander/widgets/richtexteditor.h b/kommander/widgets/richtexteditor.h
index 4436d73f..5a0ab8d6 100644
--- a/kommander/widgets/richtexteditor.h
+++ b/kommander/widgets/richtexteditor.h
@@ -19,9 +19,9 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -34,51 +34,51 @@ class QToolButton;
class QHButtonGroup;
class QShowEvent;
-class KOMMANDER_EXPORT RichTextEditor : public QWidget, public KommanderWidget
+class KOMMANDER_EXPORT RichTextEditor : public TQWidget, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- RichTextEditor(QWidget *, const char *);
+ RichTextEditor(TQWidget *, const char *);
virtual ~RichTextEditor();
bool isKommanderWidget() const;
- void setAssociatedText(const QStringList&);
- QStringList associatedText() const;
- QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ void setAssociatedText(const TQStringList&);
+ TQStringList associatedText() const;
+ TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
void setTextChanged();
- void setWidgetText(const QString &);
+ void setWidgetText(const TQString &);
void textAlign(int);
void textBold(bool);
void textUnder(bool);
void textItalic(bool);
- void fontChanged(const QFont &);
+ void fontChanged(const TQFont &);
void alignmentChanged(int);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent( QShowEvent *e );
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent( TQShowEvent *e );
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
- QFrame *m_toolbar;
- QTextEdit *m_textedit;
+ TQFrame *m_toolbar;
+ TQTextEdit *m_textedit;
- QToolButton *m_buttonTextBold, *m_buttonTextUnder, *m_buttonTextItalic,
+ TQToolButton *m_buttonTextBold, *m_buttonTextUnder, *m_buttonTextItalic,
*m_buttonTextLeft, *m_buttonTextCenter, *m_buttonTextRight;
- QHButtonGroup *m_formatGroup, *m_alignGroup;
+ TQHButtonGroup *m_formatGroup, *m_alignGroup;
};
diff --git a/kommander/widgets/scriptobject.cpp b/kommander/widgets/scriptobject.cpp
index 859d87d0..2824d81f 100644
--- a/kommander/widgets/scriptobject.cpp
+++ b/kommander/widgets/scriptobject.cpp
@@ -14,8 +14,8 @@
* *
***************************************************************************/
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
/* KDE INCLUDES */
#include <kglobal.h>
@@ -29,17 +29,17 @@
#include <myprocess.h>
#include <specials.h>
-ScriptObject::ScriptObject(QWidget *a_parent, const char *a_name)
- : QLabel(a_parent, a_name), KommanderWidget(this)
+ScriptObject::ScriptObject(TQWidget *a_parent, const char *a_name)
+ : TQLabel(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
if (KommanderWidget::inEditor)
{
setPixmap(KGlobal::iconLoader()->loadIcon("shellscript", KIcon::NoGroup, KIcon::SizeMedium));
- setFrameStyle(QFrame::Box | QFrame::Plain);
+ setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(1);
setFixedSize(pixmap()->size());
}
@@ -51,9 +51,9 @@ ScriptObject::~ScriptObject()
{
}
-QString ScriptObject::currentState() const
+TQString ScriptObject::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ScriptObject::isKommanderWidget() const
@@ -61,27 +61,27 @@ bool ScriptObject::isKommanderWidget() const
return true;
}
-QStringList ScriptObject::associatedText() const
+TQStringList ScriptObject::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ScriptObject::setAssociatedText(const QStringList& a_at)
+void ScriptObject::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ScriptObject::setWidgetText(const QString& a_text)
+void ScriptObject::setWidgetText(const TQString& a_text)
{
KommanderWidget::setAssociatedText(a_text);
}
-void ScriptObject::setPopulationText(const QString& a_text)
+void ScriptObject::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ScriptObject::populationText() const
+TQString ScriptObject::populationText() const
{
return KommanderWidget::populationText();
}
@@ -91,15 +91,15 @@ void ScriptObject::populate()
setAssociatedText(KommanderWidget::evalAssociatedText(populationText()));
}
-QString ScriptObject::executeProcess(bool blocking)
+TQString ScriptObject::executeProcess(bool blocking)
{
int index = ( states().findIndex( currentState()) );
if (index == -1)
{
printError(i18n("Invalid state for associated text."));
- return QString();
+ return TQString();
}
- QString evalText = m_associatedText[index];
+ TQString evalText = m_associatedText[index];
if ((KommanderWidget::useInternalParser && !evalText.startsWith("#!")) || evalText.startsWith("#!kommander"))
{
@@ -119,14 +119,14 @@ void ScriptObject::execute()
executeProcess(true);
}
-void ScriptObject::execute(const QString& s)
+void ScriptObject::execute(const TQString& s)
{
m_params.clear();
m_params.append(s);
executeProcess(true);
}
-void ScriptObject::execute(const QString& s1, const QString& s2)
+void ScriptObject::execute(const TQString& s1, const TQString& s2)
{
m_params.clear();
m_params.append(s1);
@@ -137,22 +137,22 @@ void ScriptObject::execute(const QString& s1, const QString& s2)
void ScriptObject::execute(int i)
{
m_params.clear();
- m_params.append(QString::number(i));
+ m_params.append(TQString::number(i));
executeProcess(true);
}
void ScriptObject::execute(int i, int j)
{
m_params.clear();
- m_params.append(QString::number(i));
- m_params.append(QString::number(j));
+ m_params.append(TQString::number(i));
+ m_params.append(TQString::number(j));
executeProcess(true);
}
void ScriptObject::execute(bool i)
{
m_params.clear();
- m_params.append(QString::number(i));
+ m_params.append(TQString::number(i));
executeProcess(true);
}
@@ -162,14 +162,14 @@ bool ScriptObject::isFunctionSupported(int f)
|| f == DCOP::count;
}
-QString ScriptObject::handleDCOP(int function, const QStringList& args)
+TQString ScriptObject::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setText:
setAssociatedText(args[0]);
break;
case DCOP::clear:
- setAssociatedText(QString::null);
+ setAssociatedText(TQString::null);
break;
case DCOP::execute:
m_params = args;
@@ -178,14 +178,14 @@ QString ScriptObject::handleDCOP(int function, const QStringList& args)
case DCOP::item:
{
uint index = args[0].toInt();
- return index < m_params.count() ? m_params[index] : QString::null;
+ return index < m_params.count() ? m_params[index] : TQString::null;
}
case DCOP::count:
- return QString::number(m_params.count());
+ return TQString::number(m_params.count());
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "scriptobject.moc"
diff --git a/kommander/widgets/scriptobject.h b/kommander/widgets/scriptobject.h
index 3906d5e4..325903cc 100644
--- a/kommander/widgets/scriptobject.h
+++ b/kommander/widgets/scriptobject.h
@@ -20,39 +20,39 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qlabel.h>
+#include <tqlabel.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <kommander_export.h>
-class KOMMANDER_EXPORT ScriptObject : public QLabel, public KommanderWidget
+class KOMMANDER_EXPORT ScriptObject : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- ScriptObject(QWidget *a_parent, const char *a_name);
+ ScriptObject(TQWidget *a_parent, const char *a_name);
~ScriptObject();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void populate();
virtual void execute();
- virtual void execute(const QString&);
- virtual void execute(const QString&, const QString&);
+ virtual void execute(const TQString&);
+ virtual void execute(const TQString&, const TQString&);
virtual void execute(int);
virtual void execute(int, int);
virtual void execute(bool);
@@ -60,9 +60,9 @@ signals:
void widgetOpened();
protected:
- virtual QString executeProcess(bool blocking);
+ virtual TQString executeProcess(bool blocking);
private:
- QStringList m_params;
+ TQStringList m_params;
};
#endif
diff --git a/kommander/widgets/slider.cpp b/kommander/widgets/slider.cpp
index 52f6d47a..b3bef6fc 100644
--- a/kommander/widgets/slider.cpp
+++ b/kommander/widgets/slider.cpp
@@ -15,25 +15,25 @@
***************************************************************************/
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "slider.h"
-Slider::Slider(QWidget * a_parent, const char *a_name)
- : QSlider(a_parent, a_name), KommanderWidget((QObject *) this)
+Slider::Slider(TQWidget * a_parent, const char *a_name)
+ : TQSlider(a_parent, a_name), KommanderWidget((TQObject *) this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
}
-QString Slider::currentState() const
+TQString Slider::currentState() const
{
- return QString("default");
+ return TQString("default");
}
Slider::~Slider()
@@ -45,40 +45,40 @@ bool Slider::isKommanderWidget() const
return true;
}
-QStringList Slider::associatedText() const
+TQStringList Slider::associatedText() const
{
return KommanderWidget::associatedText();
}
-void Slider::setAssociatedText(const QStringList & a_at)
+void Slider::setAssociatedText(const TQStringList & a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void Slider::setPopulationText(const QString & a_text)
+void Slider::setPopulationText(const TQString & a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString Slider::populationText() const
+TQString Slider::populationText() const
{
return KommanderWidget::populationText();
}
void Slider::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void Slider::setWidgetText(const QString & a_text)
+void Slider::setWidgetText(const TQString & a_text)
{
setValue(a_text.toInt());
}
-void Slider::showEvent(QShowEvent * e)
+void Slider::showEvent(TQShowEvent * e)
{
- QSlider::showEvent(e);
+ TQSlider::showEvent(e);
emit widgetOpened();
}
@@ -87,11 +87,11 @@ bool Slider::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::setMaximum || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
-QString Slider::handleDCOP(int function, const QStringList& args)
+TQString Slider::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
- return QString::number(value());
+ return TQString::number(value());
case DCOP::setText:
setValue(args[0].toInt());
break;
@@ -106,7 +106,7 @@ QString Slider::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -114,7 +114,7 @@ QString Slider::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/slider.h b/kommander/widgets/slider.h
index 59526deb..365abe3c 100644
--- a/kommander/widgets/slider.h
+++ b/kommander/widgets/slider.h
@@ -17,44 +17,44 @@
#define _HAVE_SLIDER_H_
/* KDE INCLUDES */
-#include <qslider.h>
+#include <tqslider.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <kommander_export.h>
class QShowEvent;
-class KOMMANDER_EXPORT Slider: public QSlider, public KommanderWidget
+class KOMMANDER_EXPORT Slider: public TQSlider, public KommanderWidget
{
- Q_OBJECT Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_OBJECT Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- Slider(QWidget*, const char*);
+ Slider(TQWidget*, const char*);
virtual ~Slider();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList &);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString &);
+ virtual void setAssociatedText(const TQStringList &);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString &);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void populate();
signals:
void widgetOpened();
protected:
- void showEvent(QShowEvent* e);
+ void showEvent(TQShowEvent* e);
};
#endif
diff --git a/kommander/widgets/spinboxint.cpp b/kommander/widgets/spinboxint.cpp
index ce013333..a2b9af6a 100644
--- a/kommander/widgets/spinboxint.cpp
+++ b/kommander/widgets/spinboxint.cpp
@@ -16,21 +16,21 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qspinbox.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqspinbox.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "spinboxint.h"
-SpinBoxInt::SpinBoxInt(QWidget *a_parent, const char *a_name)
- : QSpinBox(a_parent, a_name), KommanderWidget(this)
+SpinBoxInt::SpinBoxInt(TQWidget *a_parent, const char *a_name)
+ : TQSpinBox(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -40,7 +40,7 @@ SpinBoxInt::~SpinBoxInt()
{
}
-QString SpinBoxInt::currentState() const
+TQString SpinBoxInt::currentState() const
{
return "default";
}
@@ -50,22 +50,22 @@ bool SpinBoxInt::isKommanderWidget() const
return true;
}
-QStringList SpinBoxInt::associatedText() const
+TQStringList SpinBoxInt::associatedText() const
{
return KommanderWidget::associatedText();
}
-void SpinBoxInt::setAssociatedText(const QStringList& a_at)
+void SpinBoxInt::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void SpinBoxInt::setPopulationText(const QString& a_text)
+void SpinBoxInt::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString SpinBoxInt::populationText() const
+TQString SpinBoxInt::populationText() const
{
return KommanderWidget::populationText();
}
@@ -75,27 +75,27 @@ void SpinBoxInt::populate()
setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
}
-void SpinBoxInt::setWidgetText(const QString &a_text)
+void SpinBoxInt::setWidgetText(const TQString &a_text)
{
setValue(a_text.toInt());
emit widgetTextChanged(a_text);
}
-void SpinBoxInt::showEvent( QShowEvent *e )
+void SpinBoxInt::showEvent( TQShowEvent *e )
{
- QSpinBox::showEvent(e);
+ TQSpinBox::showEvent(e);
emit widgetOpened();
}
-void SpinBoxInt::focusOutEvent( QFocusEvent * e)
+void SpinBoxInt::focusOutEvent( TQFocusEvent * e)
{
- QSpinBox::focusOutEvent(e);
+ TQSpinBox::focusOutEvent(e);
emit lostFocus();
}
-void SpinBoxInt::focusInEvent( QFocusEvent * e)
+void SpinBoxInt::focusInEvent( TQFocusEvent * e)
{
- QSpinBox::focusInEvent(e);
+ TQSpinBox::focusInEvent(e);
emit gotFocus();
}
@@ -104,7 +104,7 @@ bool SpinBoxInt::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::setMaximum || f == DCOP::geometry|| f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
-QString SpinBoxInt::handleDCOP(int function, const QStringList& args)
+TQString SpinBoxInt::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -117,7 +117,7 @@ QString SpinBoxInt::handleDCOP(int function, const QStringList& args)
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
@@ -126,7 +126,7 @@ QString SpinBoxInt::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -134,7 +134,7 @@ QString SpinBoxInt::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "spinboxint.moc"
diff --git a/kommander/widgets/spinboxint.h b/kommander/widgets/spinboxint.h
index 03c30b24..ffd135e7 100644
--- a/kommander/widgets/spinboxint.h
+++ b/kommander/widgets/spinboxint.h
@@ -19,10 +19,10 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qspinbox.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqspinbox.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -30,38 +30,38 @@
class QWidget;
class QShowEvent;
-class KOMMANDER_EXPORT SpinBoxInt : public QSpinBox, public KommanderWidget
+class KOMMANDER_EXPORT SpinBoxInt : public TQSpinBox, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- SpinBoxInt(QWidget *a_parent, const char *a_name);
+ SpinBoxInt(TQWidget *a_parent, const char *a_name);
~SpinBoxInt();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void lostFocus();
void gotFocus();
protected:
- void showEvent(QShowEvent *e);
- void focusOutEvent( QFocusEvent* e);
- void focusInEvent( QFocusEvent* e);
+ void showEvent(TQShowEvent *e);
+ void focusOutEvent( TQFocusEvent* e);
+ void focusInEvent( TQFocusEvent* e);
private:
};
diff --git a/kommander/widgets/statusbar.cpp b/kommander/widgets/statusbar.cpp
index 90b23999..59070884 100644
--- a/kommander/widgets/statusbar.cpp
+++ b/kommander/widgets/statusbar.cpp
@@ -16,24 +16,24 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "statusbar.h"
-StatusBar::StatusBar(QWidget *a_parent, const char *a_name)
+StatusBar::StatusBar(TQWidget *a_parent, const char *a_name)
: KStatusBar(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
- insertItem(QString::null, 0, 1);
+ insertItem(TQString::null, 0, 1);
setItemAlignment(0, Qt::AlignLeft);
}
@@ -41,9 +41,9 @@ StatusBar::~StatusBar()
{
}
-QString StatusBar::currentState() const
+TQString StatusBar::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool StatusBar::isKommanderWidget() const
@@ -51,22 +51,22 @@ bool StatusBar::isKommanderWidget() const
return true;
}
-QStringList StatusBar::associatedText() const
+TQStringList StatusBar::associatedText() const
{
return KommanderWidget::associatedText();
}
-void StatusBar::setAssociatedText(const QStringList& a_at)
+void StatusBar::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void StatusBar::setPopulationText(const QString& a_text)
+void StatusBar::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString StatusBar::populationText() const
+TQString StatusBar::populationText() const
{
return KommanderWidget::populationText();
}
@@ -76,16 +76,16 @@ void StatusBar::populate()
changeItem(KommanderWidget::evalAssociatedText(populationText()), 0);
}
-void StatusBar::showEvent(QShowEvent *e)
+void StatusBar::showEvent(TQShowEvent *e)
{
- QStatusBar::showEvent(e);
+ TQStatusBar::showEvent(e);
emit widgetOpened();
}
-void StatusBar::contextMenuEvent( QContextMenuEvent * e )
+void StatusBar::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -94,7 +94,7 @@ bool StatusBar::isFunctionSupported(int f)
return f == DCOP::setText || f == DCOP::insertItem || f == DCOP::removeItem || f == DCOP::clear || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
-QString StatusBar::handleDCOP(int function, const QStringList& args)
+TQString StatusBar::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setText:
@@ -117,7 +117,7 @@ QString StatusBar::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -125,7 +125,7 @@ QString StatusBar::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "statusbar.moc"
diff --git a/kommander/widgets/statusbar.h b/kommander/widgets/statusbar.h
index 4920abca..30b9beae 100644
--- a/kommander/widgets/statusbar.h
+++ b/kommander/widgets/statusbar.h
@@ -19,9 +19,9 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kstatusbar.h>
@@ -34,22 +34,22 @@ class KOMMANDER_EXPORT StatusBar : public KStatusBar, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- StatusBar(QWidget *a_parent, const char *a_name);
+ StatusBar(TQWidget *a_parent, const char *a_name);
~StatusBar();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
virtual void populate();
@@ -57,8 +57,8 @@ signals:
void widgetOpened();
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/subdialog.cpp b/kommander/widgets/subdialog.cpp
index 4986d174..292ac541 100644
--- a/kommander/widgets/subdialog.cpp
+++ b/kommander/widgets/subdialog.cpp
@@ -16,13 +16,13 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qpushbutton.h>
-#include <qdialog.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqpushbutton.h>
+#include <tqdialog.h>
/* OTHER INCLUDES */
#include <kdebug.h>
@@ -31,15 +31,15 @@
#include <specials.h>
#include "subdialog.h"
-SubDialog::SubDialog(QWidget *a_parent, const char *a_name)
- : QPushButton(a_parent, a_name), KommanderWidget(this), m_dialog(0)
+SubDialog::SubDialog(TQWidget *a_parent, const char *a_name)
+ : TQPushButton(a_parent, a_name), KommanderWidget(this), m_dialog(0)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
- connect(this, SIGNAL(clicked()), this, SLOT(showDialog()));
+ connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(showDialog()));
}
@@ -47,9 +47,9 @@ SubDialog::~SubDialog()
{
}
-QString SubDialog::currentState() const
+TQString SubDialog::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool SubDialog::isKommanderWidget() const
@@ -57,39 +57,39 @@ bool SubDialog::isKommanderWidget() const
return true;
}
-QStringList SubDialog::associatedText() const
+TQStringList SubDialog::associatedText() const
{
return KommanderWidget::associatedText();
}
-void SubDialog::setAssociatedText(const QStringList& a_at)
+void SubDialog::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void SubDialog::setPopulationText(const QString& a_text)
+void SubDialog::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText( a_text );
}
-QString SubDialog::populationText() const
+TQString SubDialog::populationText() const
{
return KommanderWidget::populationText();
}
void SubDialog::populate()
{
- QString txt = KommanderWidget::evalAssociatedText( populationText() );
+ TQString txt = KommanderWidget::evalAssociatedText( populationText() );
//FIXME
}
-void SubDialog::setKmdrFile(QString a_kmdrFile)
+void SubDialog::setKmdrFile(TQString a_kmdrFile)
{
m_kmdrFile = a_kmdrFile;
}
-QString SubDialog::kmdrFile() const
+TQString SubDialog::kmdrFile() const
{
return m_kmdrFile;
}
@@ -99,11 +99,11 @@ void SubDialog::showDialog()
delete m_dialog;
KommanderFactory::loadPlugins();
- m_dialog = (QDialog *)KommanderFactory::create(kmdrFile());
+ m_dialog = (TQDialog *)KommanderFactory::create(kmdrFile());
if(!m_dialog)
{
kdWarning() << "Creation of sub dialog failed .." << endl;
- connect(m_dialog, SIGNAL(finished()), this, SLOT(slotFinished()));
+ connect(m_dialog, TQT_SIGNAL(finished()), this, TQT_SLOT(slotFinished()));
m_dialog->exec();
}
@@ -119,19 +119,19 @@ void SubDialog::slotFinished()
}
}
-void SubDialog::showEvent( QShowEvent *e )
+void SubDialog::showEvent( TQShowEvent *e )
{
- QPushButton::showEvent( e );
+ TQPushButton::showEvent( e );
emit widgetOpened();
}
-QString SubDialog::handleDCOP(int function, const QStringList& args)
+TQString SubDialog::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
{
if (!m_dialog)
- return QString();
+ return TQString();
KommanderWidget *atw = dynamic_cast<KommanderWidget *>(m_dialog);
if(atw)
return atw->evalAssociatedText();
@@ -139,7 +139,7 @@ QString SubDialog::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/subdialog.h b/kommander/widgets/subdialog.h
index ad19fec5..941455ca 100644
--- a/kommander/widgets/subdialog.h
+++ b/kommander/widgets/subdialog.h
@@ -19,10 +19,10 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qpushbutton.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqpushbutton.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -31,39 +31,39 @@ class QWidget;
class QDialog;
class QShowEvent;
-class KOMMANDER_EXPORT SubDialog : public QPushButton, public KommanderWidget
+class KOMMANDER_EXPORT SubDialog : public TQPushButton, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QString kmdrFile READ kmdrFile WRITE setKmdrFile)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQString kmdrFile READ kmdrFile WRITE setKmdrFile)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- SubDialog(QWidget *a_parent, const char *a_name);
+ SubDialog(TQWidget *a_parent, const char *a_name);
~SubDialog();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
- QString kmdrFile() const;
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
+ TQString kmdrFile() const;
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
public slots:
- void setKmdrFile(QString);
+ void setKmdrFile(TQString);
virtual void showDialog();
virtual void slotFinished();
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString &);
+ void widgetTextChanged(const TQString &);
protected:
- QDialog *m_dialog;
- QString m_kmdrFile;
- void showEvent( QShowEvent *e );
+ TQDialog *m_dialog;
+ TQString m_kmdrFile;
+ void showEvent( TQShowEvent *e );
private:
};
diff --git a/kommander/widgets/table.cpp b/kommander/widgets/table.cpp
index 358b548b..b7e2d68a 100644
--- a/kommander/widgets/table.cpp
+++ b/kommander/widgets/table.cpp
@@ -20,11 +20,11 @@
#include <kmessagebox.h>
/* QT INCLUDES */
-#include <qmetaobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qpoint.h>
+#include <tqmetaobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqpoint.h>
/* OTHER INCLUDES */
#include "kommanderplugin.h"
@@ -47,24 +47,24 @@ enum Functions {
};
-Table::Table(QWidget *a_parent, const char *a_name)
- : QTable(a_parent, a_name), KommanderWidget(this)
+Table::Table(TQWidget *a_parent, const char *a_name)
+ : TQTable(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(TBL_sortColumnExtra, "sortColumnExtra(QString widget, int col, bool ascending, bool wholeRows)", i18n("Sets a column to sort ascending or descending. Optionally can sort with rows intact for database use."), 2, 4);
- KommanderPlugin::registerFunction(TBL_keepCellVisible, "keepCellVisible(QString widget, int row, int col)", i18n("Scrolls the table so the cell indicated is visible."), 3);
- KommanderPlugin::registerFunction(TBL_selectCells, "selectCells(QString widget, int row, int col, int row, int col)", i18n("Select cells using the upper left and lower right cell addresses<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 5);
- KommanderPlugin::registerFunction(TBL_selectRow, "selectRow(QString widget, int row)", i18n("Select the row with the zero based index."), 2);
- KommanderPlugin::registerFunction(TBL_selectColumn, "selectColumn(QString widget, int col)", i18n("Select the column with the zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 2);
- KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(QString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
- KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(QString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
- KommanderPlugin::registerFunction(TBL_rowCount, "rowCount(QString widget)", i18n("Returns the number of rows of the table"), 1);
- KommanderPlugin::registerFunction(TBL_colHeader, "columnHeader(QString widget, int Column)", i18n("Returns the text of the header for the column index"), 2);
- KommanderPlugin::registerFunction(TBL_rowHeader, "rowHeader(QString widget, int Row)", i18n("Returns the text of the header for the row index"), 2);
+ KommanderPlugin::registerFunction(TBL_sortColumnExtra, "sortColumnExtra(TQString widget, int col, bool ascending, bool wholeRows)", i18n("Sets a column to sort ascending or descending. Optionally can sort with rows intact for database use."), 2, 4);
+ KommanderPlugin::registerFunction(TBL_keepCellVisible, "keepCellVisible(TQString widget, int row, int col)", i18n("Scrolls the table so the cell indicated is visible."), 3);
+ KommanderPlugin::registerFunction(TBL_selectCells, "selectCells(TQString widget, int row, int col, int row, int col)", i18n("Select cells using the upper left and lower right cell addresses<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 5);
+ KommanderPlugin::registerFunction(TBL_selectRow, "selectRow(TQString widget, int row)", i18n("Select the row with the zero based index."), 2);
+ KommanderPlugin::registerFunction(TBL_selectColumn, "selectColumn(TQString widget, int col)", i18n("Select the column with the zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 2);
+ KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(TQString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
+ KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(TQString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
+ KommanderPlugin::registerFunction(TBL_rowCount, "rowCount(TQString widget)", i18n("Returns the number of rows of the table"), 1);
+ KommanderPlugin::registerFunction(TBL_colHeader, "columnHeader(TQString widget, int Column)", i18n("Returns the text of the header for the column index"), 2);
+ KommanderPlugin::registerFunction(TBL_rowHeader, "rowHeader(TQString widget, int Row)", i18n("Returns the text of the header for the row index"), 2);
}
@@ -72,9 +72,9 @@ Table::~Table()
{
}
-QString Table::currentState() const
+TQString Table::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool Table::isKommanderWidget() const
@@ -82,22 +82,22 @@ bool Table::isKommanderWidget() const
return true;
}
-QStringList Table::associatedText() const
+TQStringList Table::associatedText() const
{
return KommanderWidget::associatedText();
}
-void Table::setAssociatedText(const QStringList& a_at)
+void Table::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void Table::setPopulationText(const QString& a_text)
+void Table::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString Table::populationText() const
+TQString Table::populationText() const
{
return KommanderWidget::populationText();
}
@@ -107,14 +107,14 @@ void Table::populate()
setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
}
-void Table::setWidgetText(const QString&)
+void Table::setWidgetText(const TQString&)
{
}
-QString Table::selectedArea()
+TQString Table::selectedArea()
{
- QTableSelection sel = selection(currentSelection());
- return QString("%1,%2,%3,%4").arg(sel.topRow()).arg(sel.leftCol()).arg(sel.bottomRow()).arg(sel.rightCol());
+ TQTableSelection sel = selection(currentSelection());
+ return TQString("%1,%2,%3,%4").arg(sel.topRow()).arg(sel.leftCol()).arg(sel.bottomRow()).arg(sel.rightCol());
}
@@ -126,48 +126,48 @@ bool Table::isFunctionSupported(int f)
f == DCOP::setRowCaption || f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
-void Table::setCellWidget(int row, int col, const QString & _widgetName)
+void Table::setCellWidget(int row, int col, const TQString & _widgetName)
{
KommanderWidget *w = widgetByName(_widgetName);
if (w)
{
- QWidget *widget = static_cast<QWidget*>(w->object());
- if (QTable::cellWidget(row, col) != widget)
+ TQWidget *widget = static_cast<TQWidget*>(w->object());
+ if (TQTable::cellWidget(row, col) != widget)
{
setCurrentCell(-1, -1); //hack to not delete the cellwidget after clicking away to another cell.
//I don't know why it does so, but without this on a click to another cell calls endEdit, which calls
//clearCellWidget, all this before the currentChanged signal is emitted.
//this hack does ugly things once table starts scrolling - let's try to minize damage
//we should have a way to test doe cellWidget looses focus and send it right or down too
- QTable::ensureCellVisible(row, col);
+ TQTable::ensureCellVisible(row, col);
clearCellWidget(row, col);
- QTable::setCellWidget(row, col, widget);
+ TQTable::setCellWidget(row, col, widget);
}
} else
clearCellWidget(row, col);
}
-QString Table::cellWidget(int row, int col)
+TQString Table::cellWidget(int row, int col)
{
- QWidget *widget = QTable::cellWidget(row, col);
+ TQWidget *widget = TQTable::cellWidget(row, col);
if (widget)
{
KommanderWidget *w = widgetByName(widget->name());
if (w)
return widget->name();
}
- return QString();
+ return TQString();
}
-void Table::setCellText(int row, int col, const QString& text)
+void Table::setCellText(int row, int col, const TQString& text)
{
- QWidget *widget = QTable::cellWidget(row, col);
+ TQWidget *widget = TQTable::cellWidget(row, col);
if (widget)
{
KommanderWidget *w = widgetByName(widget->name());
if (w)
- widget->reparent(parentDialog(), QPoint(0,0));
+ widget->reparent(parentDialog(), TQPoint(0,0));
}
setText(row, col, text);
endEdit(row, col, false, false);
@@ -175,13 +175,13 @@ void Table::setCellText(int row, int col, const QString& text)
void Table::clearCellWidget(int row, int col)
{
- QTable::clearCellWidget(row, col); //just for debugging
+ TQTable::clearCellWidget(row, col); //just for debugging
}
-void Table::contextMenuEvent( QContextMenuEvent * e )
+void Table::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -194,7 +194,7 @@ void Table::columnClicked(int col)
sortColumn( col, ascending, TRUE);
}
-QString Table::handleDCOP(int function, const QStringList& args)
+TQString Table::handleDCOP(int function, const TQStringList& args)
{
switch (function)
{
@@ -218,11 +218,11 @@ QString Table::handleDCOP(int function, const QStringList& args)
insertColumns(args[0].toInt(), args.count() == 1 ? 1 : args[1].toInt());
break;
case DCOP::currentColumn:
- return QString::number(currentColumn());
+ return TQString::number(currentColumn());
case DCOP::currentRow:
- return QString::number(currentRow());
+ return TQString::number(currentRow());
case DCOP::columnCount:
- return QString::number(numCols());
+ return TQString::number(numCols());
break;
case DCOP::removeColumn:
if (numCols() >= args[0].toInt())
@@ -239,7 +239,7 @@ QString Table::handleDCOP(int function, const QStringList& args)
break;
}
case TBL_rowCount:
- return QString::number(numRows());
+ return TQString::number(numRows());
break;
case DCOP::removeRow:
{
@@ -259,10 +259,10 @@ QString Table::handleDCOP(int function, const QStringList& args)
break;
case DCOP::text:
{
- QString rows;
+ TQString rows;
for (int r = 0; r < numRows(); r++)
{
- QString row;
+ TQString row;
for (int c = 0; c < numCols(); c++)
{
if (c)
@@ -280,17 +280,17 @@ QString Table::handleDCOP(int function, const QStringList& args)
int r = 0, c = 0;
setNumCols(0);
setNumRows(0);
- QStringList rows;
- QStringList row;
- rows = QStringList::split("\n", args[0], true);
+ TQStringList rows;
+ TQStringList row;
+ rows = TQStringList::split("\n", args[0], true);
setNumRows(rows.count());
- for (QStringList::Iterator it = rows.begin(); it != rows.end(); ++it, ++r)
+ for (TQStringList::Iterator it = rows.begin(); it != rows.end(); ++it, ++r)
{
- row = QStringList::split("\t", *it, true);
+ row = TQStringList::split("\t", *it, true);
if (!r)
setNumCols(row.count());
c = 0;
- for (QStringList::Iterator itr = row.begin(); itr != row.end(); ++itr, ++c)
+ for (TQStringList::Iterator itr = row.begin(); itr != row.end(); ++itr, ++c)
setText(r, c, *itr);
}
break;
@@ -303,42 +303,42 @@ QString Table::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
}
case TBL_sortColumnExtra:
if (numCols() >= args[0].toInt())
- QTable::sortColumn(args[0].toInt(), args[1].toInt(), args[2].toInt());
+ TQTable::sortColumn(args[0].toInt(), args[1].toInt(), args[2].toInt());
break;
case TBL_keepCellVisible:
if (numRows() >= args[0].toInt() && numCols() >+ args[1].toInt())
- QTable::ensureCellVisible(args[0].toInt()-1, args[1].toInt()-1);
+ TQTable::ensureCellVisible(args[0].toInt()-1, args[1].toInt()-1);
break;
case TBL_selectCells:
if (numRows() >= args[0].toInt() && numCols() >+ args[1].toInt() && numRows() >= args[2].toInt() && numCols() >+ args[3].toInt())
- QTable::selectCells (args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
+ TQTable::selectCells (args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
break;
case TBL_selectRow:
if (numRows() >= args[0].toInt())
- QTable::selectRow (args[0].toInt());
+ TQTable::selectRow (args[0].toInt());
break;
case TBL_selectColumn:
if (numCols() >= args[0].toInt())
- QTable::selectColumn (args[0].toInt());
+ TQTable::selectColumn (args[0].toInt());
break;
case TBL_setColumnReadOnly:
if (numCols() >= args[0].toInt())
- QTable::setColumnReadOnly (args[0].toInt(), args[1].toUInt());
+ TQTable::setColumnReadOnly (args[0].toInt(), args[1].toUInt());
break;
case TBL_setRowReadOnly:
if (numRows() >= args[0].toInt())
- QTable::setRowReadOnly (args[0].toInt(), args[1].toUInt());
+ TQTable::setRowReadOnly (args[0].toInt(), args[1].toUInt());
break;
case TBL_colHeader:
{
- QHeader* hdr = QTable::horizontalHeader();
+ TQHeader* hdr = TQTable::horizontalHeader();
if (numCols() >= args[0].toInt())
return hdr->label(args[0].toInt());
else
@@ -347,7 +347,7 @@ QString Table::handleDCOP(int function, const QStringList& args)
}
case TBL_rowHeader:
{
- QHeader* hdr = QTable::verticalHeader();
+ TQHeader* hdr = TQTable::verticalHeader();
if (numRows() >= args[0].toInt())
return hdr->label(args[0].toInt());
else
@@ -356,17 +356,17 @@ QString Table::handleDCOP(int function, const QStringList& args)
}
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "table.moc"
diff --git a/kommander/widgets/table.h b/kommander/widgets/table.h
index 26ed3b36..c2ec755e 100644
--- a/kommander/widgets/table.h
+++ b/kommander/widgets/table.h
@@ -20,53 +20,53 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qtable.h>
-#include <qobject.h>
+#include <tqtable.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
class QWidget;
-class KOMMANDER_EXPORT Table : public QTable, public KommanderWidget
+class KOMMANDER_EXPORT Table : public TQTable, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_OVERRIDE(bool readOnly DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- Table(QWidget *a_parent, const char *a_name);
+ Table(TQWidget *a_parent, const char *a_name);
~Table();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
virtual void clearCellWidget(int row, int col);
virtual void columnClicked(int col);
public slots:
virtual void populate();
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
//void adjustColumn(int col);
signals:
void contextMenuRequested(int xpos, int ypos);
void columnHeaderClicked(int col);
protected:
- void contextMenuEvent( QContextMenuEvent * e );
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
- QString selectedArea();
- QString cellWidget(int row, int col);
- void setCellWidget(int row, int col, const QString &widgetName);
- void setCellText(int row, int col, const QString &text);
+ TQString selectedArea();
+ TQString cellWidget(int row, int col);
+ void setCellWidget(int row, int col, const TQString &widgetName);
+ void setCellText(int row, int col, const TQString &text);
};
#endif
diff --git a/kommander/widgets/tabwidget.cpp b/kommander/widgets/tabwidget.cpp
index ec0a02cf..8ffc95b1 100644
--- a/kommander/widgets/tabwidget.cpp
+++ b/kommander/widgets/tabwidget.cpp
@@ -18,12 +18,12 @@
#include <kiconloader.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -43,31 +43,31 @@ enum Functions {
LastFunction
};
-TabWidget::TabWidget(QWidget *a_parent, const char *a_name, int a_flags)
- : QTabWidget(a_parent, a_name, a_flags), KommanderWidget(this)
+TabWidget::TabWidget(TQWidget *a_parent, const char *a_name, int a_flags)
+ : TQTabWidget(a_parent, a_name, a_flags), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(TAB_setTabIcon, "setTabIcon(QString widget, int Tab, QString Icon)", i18n("Sets an icon on the specified tab. Index is zero based."), 3);
- KommanderPlugin::registerFunction(TAB_tabLabel, "tabLabel(QString widget, int Tab)", i18n("Returns the tab label at the given index. Index is zero based."), 2);
- KommanderPlugin::registerFunction(TAB_isTabEnabled, "isTabEnabled(QString widget, int Tab)", i18n("Returns true if tab at specified index is enabled, otherwise returns false."), 2);
- KommanderPlugin::registerFunction(TAB_setTabEnabled, "setTabEnabled(QString widget, int Tab, bool Enabled)", i18n("Sets the tab at the given index to enabled or disabled."), 3);
- KommanderPlugin::registerFunction(TAB_showTabBar, "showTabBar(QString widget, bool Show)", i18n("Show or hide the tabs on the tab widget."), 2);
- KommanderPlugin::registerFunction(TAB_setCurrentPage, "setCurrentPage(QString widget, QString Page)", i18n("Set the current page by name."), 2);
- KommanderPlugin::registerFunction(TAB_setTabLabel, "setTabLabel(QString widget, int Tab, QString Text)", i18n("Sets the tab tab label."), 3);
+ KommanderPlugin::registerFunction(TAB_setTabIcon, "setTabIcon(TQString widget, int Tab, TQString Icon)", i18n("Sets an icon on the specified tab. Index is zero based."), 3);
+ KommanderPlugin::registerFunction(TAB_tabLabel, "tabLabel(TQString widget, int Tab)", i18n("Returns the tab label at the given index. Index is zero based."), 2);
+ KommanderPlugin::registerFunction(TAB_isTabEnabled, "isTabEnabled(TQString widget, int Tab)", i18n("Returns true if tab at specified index is enabled, otherwise returns false."), 2);
+ KommanderPlugin::registerFunction(TAB_setTabEnabled, "setTabEnabled(TQString widget, int Tab, bool Enabled)", i18n("Sets the tab at the given index to enabled or disabled."), 3);
+ KommanderPlugin::registerFunction(TAB_showTabBar, "showTabBar(TQString widget, bool Show)", i18n("Show or hide the tabs on the tab widget."), 2);
+ KommanderPlugin::registerFunction(TAB_setCurrentPage, "setCurrentPage(TQString widget, TQString Page)", i18n("Set the current page by name."), 2);
+ KommanderPlugin::registerFunction(TAB_setTabLabel, "setTabLabel(TQString widget, int Tab, TQString Text)", i18n("Sets the tab tab label."), 3);
}
TabWidget::~TabWidget()
{
}
-QString TabWidget::currentState() const
+TQString TabWidget::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool TabWidget::isKommanderWidget() const
@@ -75,22 +75,22 @@ bool TabWidget::isKommanderWidget() const
return true;
}
-QStringList TabWidget::associatedText() const
+TQStringList TabWidget::associatedText() const
{
return KommanderWidget::associatedText();
}
-void TabWidget::setAssociatedText(const QStringList& a_at)
+void TabWidget::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void TabWidget::setPopulationText(const QString& a_text)
+void TabWidget::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText( a_text );
}
-QString TabWidget::populationText() const
+TQString TabWidget::populationText() const
{
return KommanderWidget::populationText();
}
@@ -99,16 +99,16 @@ void TabWidget::populate()
{
}
-void TabWidget::showEvent(QShowEvent* e)
+void TabWidget::showEvent(TQShowEvent* e)
{
- QTabWidget::showEvent(e);
+ TQTabWidget::showEvent(e);
emit widgetOpened();
}
-void TabWidget::contextMenuEvent( QContextMenuEvent * e )
+void TabWidget::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -117,11 +117,11 @@ bool TabWidget::isFunctionSupported(int f)
return f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::insertTab || (f >= FirstFunction && f <= LastFunction) ;
}
-QString TabWidget::handleDCOP(int function, const QStringList& args)
+TQString TabWidget::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::currentItem:
- return QString::number(currentPageIndex());
+ return TQString::number(currentPageIndex());
case DCOP::setCurrentItem:
setCurrentPage(args[0].toUInt());
break;
@@ -130,31 +130,31 @@ QString TabWidget::handleDCOP(int function, const QStringList& args)
break;
case TAB_tabLabel:
{
- QString s = this->label(args[0].toInt());
+ TQString s = this->label(args[0].toInt());
return s.remove("&");
break;
}
case TAB_setTabIcon:
{
- QWidget *w = page(args[0].toInt());
+ TQWidget *w = page(args[0].toInt());
setTabIconSet(w, KGlobal::iconLoader()->loadIcon(args[1], KIcon::NoGroup, KIcon::SizeMedium));
break;
}
case TAB_isTabEnabled:
{
- QWidget *w = page(args[0].toInt());
- return QString::number(this->isTabEnabled(w));
+ TQWidget *w = page(args[0].toInt());
+ return TQString::number(this->isTabEnabled(w));
break;
}
case TAB_setTabLabel:
{
- QWidget *w = page(args[0].toInt());
+ TQWidget *w = page(args[0].toInt());
setTabLabel(w, args[1]);
break;
}
case TAB_setTabEnabled:
{
- QWidget *w = page(args[0].toInt());
+ TQWidget *w = page(args[0].toInt());
this->setTabEnabled(w, args[1].toInt());
break;
}
@@ -164,7 +164,7 @@ QString TabWidget::handleDCOP(int function, const QStringList& args)
int i = 0;
bool found = false;
while (i < cnt) {
- QString s = this->label(i);
+ TQString s = this->label(i);
if (s.remove("&") == args[0])
{
setCurrentPage(i);
@@ -173,12 +173,12 @@ QString TabWidget::handleDCOP(int function, const QStringList& args)
}
i++;
}
- return QString::number(found);
+ return TQString::number(found);
break;
}
case TAB_showTabBar:
{
- QTabBar *t = this->tabBar();
+ TQTabBar *t = this->tabBar();
if (args[0].toInt() == 1)
t->show();
else
@@ -188,7 +188,7 @@ QString TabWidget::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "tabwidget.moc"
diff --git a/kommander/widgets/tabwidget.h b/kommander/widgets/tabwidget.h
index 48f19232..87376279 100644
--- a/kommander/widgets/tabwidget.h
+++ b/kommander/widgets/tabwidget.h
@@ -19,31 +19,31 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <kommander_export.h>
class QShowEvent;
-class KOMMANDER_EXPORT TabWidget : public QTabWidget, public KommanderWidget
+class KOMMANDER_EXPORT TabWidget : public TQTabWidget, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- TabWidget(QWidget *, const char *, int=0);
+ TabWidget(TQWidget *, const char *, int=0);
~TabWidget();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
@@ -52,8 +52,8 @@ signals:
void widgetOpened();
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
private:
};
diff --git a/kommander/widgets/textbrowser.cpp b/kommander/widgets/textbrowser.cpp
index 324bc62c..a2f9e744 100644
--- a/kommander/widgets/textbrowser.cpp
+++ b/kommander/widgets/textbrowser.cpp
@@ -18,9 +18,9 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include "kommanderplugin.h"
@@ -34,21 +34,21 @@ enum Functions {
LastFunction
};
-TextBrowser::TextBrowser(QWidget * a_parent, const char *a_name)
- : KTextBrowser(a_parent, a_name), KommanderWidget((QObject *) this)
+TextBrowser::TextBrowser(TQWidget * a_parent, const char *a_name)
+ : KTextBrowser(a_parent, a_name), KommanderWidget((TQObject *) this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(TBR_setNotifyClick, "setNotifyClick(QString widget, bool Set)",i18n("Set notify click to intercept clicks and handle links"), 2, 2);
- KommanderPlugin::registerFunction(TBR_isNotifyClick, "isNotifyClick(QString widget)",i18n("Set notify click to intercept clicks and handle links"), 1);
+ KommanderPlugin::registerFunction(TBR_setNotifyClick, "setNotifyClick(TQString widget, bool Set)",i18n("Set notify click to intercept clicks and handle links"), 2, 2);
+ KommanderPlugin::registerFunction(TBR_isNotifyClick, "isNotifyClick(TQString widget)",i18n("Set notify click to intercept clicks and handle links"), 1);
}
-QString TextBrowser::currentState() const
+TQString TextBrowser::currentState() const
{
- return QString("default");
+ return TQString("default");
}
TextBrowser::~TextBrowser()
@@ -60,47 +60,47 @@ bool TextBrowser::isKommanderWidget() const
return true;
}
-QStringList TextBrowser::associatedText() const
+TQStringList TextBrowser::associatedText() const
{
return KommanderWidget::associatedText();
}
-void TextBrowser::setAssociatedText(const QStringList & a_at)
+void TextBrowser::setAssociatedText(const TQStringList & a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void TextBrowser::setPopulationText(const QString & a_text)
+void TextBrowser::setPopulationText(const TQString & a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString TextBrowser::populationText() const
+TQString TextBrowser::populationText() const
{
return KommanderWidget::populationText();
}
void TextBrowser::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void TextBrowser::setWidgetText(const QString & a_text)
+void TextBrowser::setWidgetText(const TQString & a_text)
{
setText(a_text);
}
-void TextBrowser::showEvent(QShowEvent * e)
+void TextBrowser::showEvent(TQShowEvent * e)
{
- QTextBrowser::showEvent(e);
+ TQTextBrowser::showEvent(e);
emit widgetOpened();
}
-void TextBrowser::contextMenuEvent( QContextMenuEvent * e )
+void TextBrowser::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -110,7 +110,7 @@ bool TextBrowser::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::clear || (f >= FirstFunction && f <= LastFunction);
}
-QString TextBrowser::handleDCOP(int function, const QStringList& args)
+TQString TextBrowser::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -124,7 +124,7 @@ QString TextBrowser::handleDCOP(int function, const QStringList& args)
KTextBrowser::setNotifyClick(args[0]);
break;
case TBR_isNotifyClick:
- return QString::number(KTextBrowser::isNotifyClick());
+ return TQString::number(KTextBrowser::isNotifyClick());
break;
case DCOP::clear:
clear();
@@ -132,7 +132,7 @@ QString TextBrowser::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/textbrowser.h b/kommander/widgets/textbrowser.h
index f34e374e..e640bb3f 100644
--- a/kommander/widgets/textbrowser.h
+++ b/kommander/widgets/textbrowser.h
@@ -20,8 +20,8 @@
#include <ktextbrowser.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -30,25 +30,25 @@ class QShowEvent;
class KOMMANDER_EXPORT TextBrowser: public KTextBrowser, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- TextBrowser(QWidget*, const char*);
+ TextBrowser(TQWidget*, const char*);
virtual ~TextBrowser();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList &);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString &);
+ virtual void setAssociatedText(const TQStringList &);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString &);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void populate();
signals:
@@ -56,8 +56,8 @@ signals:
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent* e);
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent(TQShowEvent* e);
+ void contextMenuEvent( TQContextMenuEvent * e );
};
#endif
diff --git a/kommander/widgets/textedit.cpp b/kommander/widgets/textedit.cpp
index b59e0513..72f8c754 100644
--- a/kommander/widgets/textedit.cpp
+++ b/kommander/widgets/textedit.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
/* QT INCLUDES */
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -42,33 +42,33 @@ enum Functions {
LastFunction
};
-TextEdit::TextEdit(QWidget * a_parent, const char *a_name):KTextEdit(a_parent, a_name),
-KommanderWidget((QObject *) this)
+TextEdit::TextEdit(TQWidget * a_parent, const char *a_name):KTextEdit(a_parent, a_name),
+KommanderWidget((TQObject *) this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
- connect(this, SIGNAL(textChanged()), this, SLOT(setTextChanged()));
+ connect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(setTextChanged()));
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(TE_setModified, "setModified(QString widget, bool Modified)", i18n("Set widget modified status."), 1);
- KommanderPlugin::registerFunction(TE_selectText, "selectText(QString widget, int paraFrom, int indexFrom, int paraTo, int indexTo)", i18n("Select a block of text using the paragraph number and character index of the line. You can use the cursorPositionChanged(int, int) signal to get this data in real time into a script."), 5);
- KommanderPlugin::registerFunction(TE_findText, "findText(QString widget, QString Text, bool Case-Sensitive, bool Forward)", i18n("Search for text from the cursor or a specified position. You can specifiy case sensitive search and forward or backward."), 5);
-// KommanderPlugin::registerFunction(TE_findText, "findText(QString widget, QString Text, bool Case-Sensitive, bool Forward, int Paragraph, int Index)", i18n("Search for text from the cursor or a specified position. You can specifiy case sensitive search and forward or backward."), 5, 7);
- KommanderPlugin::registerFunction(TE_paragraphs, "paragraphs(QString widget)", i18n("Get the number of paragraphs in the widget."), 1);
- KommanderPlugin::registerFunction(TE_length, "length(QString widget)", i18n("Get the total length of all text."), 1);
-// KommanderPlugin::registerFunction(TE_getCursorPosition, "getCursorPosition(QString widget)", i18n("Get the cursor postion in the form of paragraph and postion integers."), 1);
- KommanderPlugin::registerFunction(TE_paragraphLength, "paragraphLength(QString widget, int Paragraph)", i18n("Get the length of the paragraph."), 2);
- KommanderPlugin::registerFunction(TE_linesOfParagraph, "linesOfParagraph(QString widget, int Paragraph)", i18n("Get the number of lines in the paragraph."), 2);
- KommanderPlugin::registerFunction(TE_VAsuperScript, "setSuperScript(QString widget)", i18n("Use to set superscript."), 1);
- KommanderPlugin::registerFunction(TE_VAnormalScript, "setNormalScript(QString widget)", i18n("Use to revert from superscript to normal script."), 1);
+ KommanderPlugin::registerFunction(TE_setModified, "setModified(TQString widget, bool Modified)", i18n("Set widget modified status."), 1);
+ KommanderPlugin::registerFunction(TE_selectText, "selectText(TQString widget, int paraFrom, int indexFrom, int paraTo, int indexTo)", i18n("Select a block of text using the paragraph number and character index of the line. You can use the cursorPositionChanged(int, int) signal to get this data in real time into a script."), 5);
+ KommanderPlugin::registerFunction(TE_findText, "findText(TQString widget, TQString Text, bool Case-Sensitive, bool Forward)", i18n("Search for text from the cursor or a specified position. You can specifiy case sensitive search and forward or backward."), 5);
+// KommanderPlugin::registerFunction(TE_findText, "findText(TQString widget, TQString Text, bool Case-Sensitive, bool Forward, int Paragraph, int Index)", i18n("Search for text from the cursor or a specified position. You can specifiy case sensitive search and forward or backward."), 5, 7);
+ KommanderPlugin::registerFunction(TE_paragraphs, "paragraphs(TQString widget)", i18n("Get the number of paragraphs in the widget."), 1);
+ KommanderPlugin::registerFunction(TE_length, "length(TQString widget)", i18n("Get the total length of all text."), 1);
+// KommanderPlugin::registerFunction(TE_getCursorPosition, "getCursorPosition(TQString widget)", i18n("Get the cursor postion in the form of paragraph and postion integers."), 1);
+ KommanderPlugin::registerFunction(TE_paragraphLength, "paragraphLength(TQString widget, int Paragraph)", i18n("Get the length of the paragraph."), 2);
+ KommanderPlugin::registerFunction(TE_linesOfParagraph, "linesOfParagraph(TQString widget, int Paragraph)", i18n("Get the number of lines in the paragraph."), 2);
+ KommanderPlugin::registerFunction(TE_VAsuperScript, "setSuperScript(TQString widget)", i18n("Use to set superscript."), 1);
+ KommanderPlugin::registerFunction(TE_VAnormalScript, "setNormalScript(TQString widget)", i18n("Use to revert from superscript to normal script."), 1);
}
-QString TextEdit::currentState() const
+TQString TextEdit::currentState() const
{
- return QString("default");
+ return TQString("default");
}
TextEdit::~TextEdit()
@@ -80,22 +80,22 @@ bool TextEdit::isKommanderWidget() const
return true;
}
-QStringList TextEdit::associatedText() const
+TQStringList TextEdit::associatedText() const
{
return KommanderWidget::associatedText();
}
-void TextEdit::setAssociatedText(const QStringList & a_at)
+void TextEdit::setAssociatedText(const TQStringList & a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void TextEdit::setPopulationText(const QString & a_text)
+void TextEdit::setPopulationText(const TQString & a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString TextEdit::populationText() const
+TQString TextEdit::populationText() const
{
return KommanderWidget::populationText();
}
@@ -105,7 +105,7 @@ void TextEdit::populate()
setWidgetText(KommanderWidget::evalAssociatedText(populationText()));
}
-void TextEdit::setWidgetText(const QString & a_text)
+void TextEdit::setWidgetText(const TQString & a_text)
{
setText(a_text);
emit widgetTextChanged(text());
@@ -116,28 +116,28 @@ void TextEdit::setTextChanged()
emit widgetTextChanged(text());
}
-void TextEdit::focusOutEvent( QFocusEvent * e)
+void TextEdit::focusOutEvent( TQFocusEvent * e)
{
- QTextEdit::focusOutEvent(e);
+ TQTextEdit::focusOutEvent(e);
emit lostFocus();
}
-void TextEdit::focusInEvent( QFocusEvent * e)
+void TextEdit::focusInEvent( TQFocusEvent * e)
{
- QTextEdit::focusInEvent(e);
+ TQTextEdit::focusInEvent(e);
emit gotFocus();
}
-void TextEdit::showEvent(QShowEvent * e)
+void TextEdit::showEvent(TQShowEvent * e)
{
- QTextEdit::showEvent(e);
+ TQTextEdit::showEvent(e);
emit widgetOpened();
}
-void TextEdit::contextMenuEvent( QContextMenuEvent * e )
+void TextEdit::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -146,7 +146,7 @@ bool TextEdit::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction);
}
-QString TextEdit::handleDCOP(int function, const QStringList& args)
+TQString TextEdit::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -160,7 +160,7 @@ QString TextEdit::handleDCOP(int function, const QStringList& args)
insert(args[0]);
break;
case DCOP::clear:
- setWidgetText(QString());
+ setWidgetText(TQString());
break;
case DCOP::setEditable:
setReadOnly(args[0] == "false" || args[0] == "0");
@@ -170,7 +170,7 @@ QString TextEdit::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -182,47 +182,47 @@ QString TextEdit::handleDCOP(int function, const QStringList& args)
this->setModified(args[0].toInt());
break;
case TE_selectText:
- QTextEdit::setSelection(args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
+ TQTextEdit::setSelection(args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt());
break;
case TE_length:
- return QString::number(QTextEdit::length() );
+ return TQString::number(TQTextEdit::length() );
break;
/*case TE_getCursorPosition:
- return QString::number(QTextEdit::getCursorPosition() );
+ return TQString::number(TQTextEdit::getCursorPosition() );
break;*/
case TE_paragraphLength:
- return QString::number(QTextEdit::paragraphLength(args[0].toInt() ) );
+ return TQString::number(TQTextEdit::paragraphLength(args[0].toInt() ) );
break;
case TE_linesOfParagraph:
- return QString::number(QTextEdit::linesOfParagraph(args[0].toInt() ) );
+ return TQString::number(TQTextEdit::linesOfParagraph(args[0].toInt() ) );
break;
case TE_findText:
{
// int para = args[3].toInt();
// int idx = args[4].toInt();
-// return QString::number(QTextEdit::find(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx ));
- return QString::number(QTextEdit::find(args[0], args[1].toUInt(), false ));
+// return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx ));
+ return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false ));
break;
}
case TE_VAsuperScript:
break;
- QTextEdit::setVerticalAlignment(AlignSuperScript);
+ TQTextEdit::setVerticalAlignment(AlignSuperScript);
case TE_VAnormalScript:
- QTextEdit::setVerticalAlignment(AlignNormal);
+ TQTextEdit::setVerticalAlignment(AlignNormal);
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/textedit.h b/kommander/widgets/textedit.h
index 7f842343..4f118ffd 100644
--- a/kommander/widgets/textedit.h
+++ b/kommander/widgets/textedit.h
@@ -21,8 +21,8 @@
#include <ktextedit.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -31,40 +31,40 @@
class QShowEvent;
class KOMMANDER_EXPORT TextEdit: public KTextEdit, public KommanderWidget
{
- Q_OBJECT Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_OBJECT Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- TextEdit(QWidget *, const char *);
+ TextEdit(TQWidget *, const char *);
virtual ~TextEdit();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList &);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString &);
+ virtual void setAssociatedText(const TQStringList &);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString &);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
virtual void setTextChanged();
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
void lostFocus();
void gotFocus();
protected:
- void showEvent(QShowEvent* e);
- void contextMenuEvent( QContextMenuEvent * e );
- void focusOutEvent( QFocusEvent* e);
- void focusInEvent( QFocusEvent* e);
+ void showEvent(TQShowEvent* e);
+ void contextMenuEvent( TQContextMenuEvent * e );
+ void focusOutEvent( TQFocusEvent* e);
+ void focusInEvent( TQFocusEvent* e);
};
#endif
diff --git a/kommander/widgets/timer.cpp b/kommander/widgets/timer.cpp
index 9aff1560..5a7251f1 100644
--- a/kommander/widgets/timer.cpp
+++ b/kommander/widgets/timer.cpp
@@ -13,9 +13,9 @@
* *
***************************************************************************/
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
/* KDE INCLUDES */
#include <kglobal.h>
@@ -37,30 +37,30 @@ enum Functions {
LastFunction
};
-Timer::Timer(QWidget *a_parent, const char *a_name)
- : QLabel(a_parent, a_name), KommanderWidget(this)
+Timer::Timer(TQWidget *a_parent, const char *a_name)
+ : TQLabel(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
if (KommanderWidget::inEditor)
{
setPixmap(KGlobal::iconLoader()->loadIcon("kalarm", KIcon::NoGroup, KIcon::SizeMedium));
- setFrameStyle(QFrame::Box | QFrame::Plain);
+ setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(1);
setFixedSize(pixmap()->size());
}
else
setHidden(true);
- mTimer = new QTimer(this);
+ mTimer = new TQTimer(this);
setInterval(5000);
setSingleShot(false);
- connect(mTimer, SIGNAL(timeout()), SLOT(timeout()));
+ connect(mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(SetInterval, "setInterval(QString widget, int interval)", i18n("Set the timer timeout interval in ms."), 2);
+ KommanderPlugin::registerFunction(SetInterval, "setInterval(TQString widget, int interval)", i18n("Set the timer timeout interval in ms."), 2);
}
Timer::~Timer()
@@ -91,9 +91,9 @@ void Timer::setSingleShot(bool a_shot)
mSingleShot = a_shot;
}
-QString Timer::currentState() const
+TQString Timer::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool Timer::isKommanderWidget() const
@@ -101,27 +101,27 @@ bool Timer::isKommanderWidget() const
return true;
}
-QStringList Timer::associatedText() const
+TQStringList Timer::associatedText() const
{
return KommanderWidget::associatedText();
}
-void Timer::setAssociatedText(const QStringList& a_at)
+void Timer::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void Timer::setWidgetText(const QString& a_text)
+void Timer::setWidgetText(const TQString& a_text)
{
KommanderWidget::setAssociatedText(a_text);
}
-void Timer::setPopulationText(const QString& a_text)
+void Timer::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString Timer::populationText() const
+TQString Timer::populationText() const
{
return KommanderWidget::populationText();
}
@@ -148,7 +148,7 @@ void Timer::timeout()
void Timer::execute()
{
if (mSingleShot)
- QTimer::singleShot(mInterval, this, SLOT(timeout()));
+ TQTimer::singleShot(mInterval, this, TQT_SLOT(timeout()));
else
mTimer->start(mInterval);
}
@@ -165,7 +165,7 @@ bool Timer::isFunctionSupported(int f)
return f == DCOP::setText || f == DCOP::execute || f == DCOP::cancel || (f > FirstFunction && f < LastFunction);
}
-QString Timer::handleDCOP(int function, const QStringList& args)
+TQString Timer::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setText:
@@ -183,7 +183,7 @@ QString Timer::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "timer.moc"
diff --git a/kommander/widgets/timer.h b/kommander/widgets/timer.h
index 856ceeb3..8d200f2f 100644
--- a/kommander/widgets/timer.h
+++ b/kommander/widgets/timer.h
@@ -18,40 +18,40 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qlabel.h>
+#include <tqlabel.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
class QTimer;
-class KOMMANDER_EXPORT Timer : public QLabel, public KommanderWidget
+class KOMMANDER_EXPORT Timer : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
Q_PROPERTY(int interval READ interval WRITE setInterval)
Q_PROPERTY(bool singleShot READ singleShot WRITE setSingleShot)
public:
- Timer(QWidget *a_parent, const char *a_name);
+ Timer(TQWidget *a_parent, const char *a_name);
~Timer();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
virtual int interval() const;
virtual void setInterval(int a_interval);
virtual bool singleShot() const;
virtual void setSingleShot(bool a_shot);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void populate();
virtual void execute();
virtual void cancel();
@@ -62,7 +62,7 @@ class KOMMANDER_EXPORT Timer : public QLabel, public KommanderWidget
protected:
virtual void executeProcess(bool blocking);
- QTimer* mTimer;
+ TQTimer* mTimer;
int mInterval;
bool mSingleShot;
diff --git a/kommander/widgets/toolbox.cpp b/kommander/widgets/toolbox.cpp
index 90a31e46..a6340098 100644
--- a/kommander/widgets/toolbox.cpp
+++ b/kommander/widgets/toolbox.cpp
@@ -27,27 +27,27 @@
#define FIRST_FUNCTION ADDWIDGET
#define LAST_FUNCTION INDEXOF
-ToolBox::ToolBox(QWidget *parent, const char *name)
- : QToolBox(parent, name), KommanderWidget(this)
+ToolBox::ToolBox(TQWidget *parent, const char *name)
+ : TQToolBox(parent, name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(ADDWIDGET, "addWidget(QString widget, QString widgetName, QString Label)",
+ KommanderPlugin::registerFunction(ADDWIDGET, "addWidget(TQString widget, TQString widgetName, TQString Label)",
i18n("Adds a widget to the toolbox. Returns the index of the widget."), 3);
- KommanderPlugin::registerFunction(CURRENTWIDGET, "currentWidget(QString widget)",
+ KommanderPlugin::registerFunction(CURRENTWIDGET, "currentWidget(TQString widget)",
i18n("Returns the name of the active widget."), 1);
- KommanderPlugin::registerFunction(REMOVEWIDGET, "removeWidget(QString widget, QString widgetName)", i18n("Remove the selected widget, returns the index of the removed widget or -1 if no such widget was found."), 2);
- KommanderPlugin::registerFunction(REMOVEWIDGETAT, "removeWidgetAt(QString widget, int index)", i18n("Remove the widget from the index position, returns the index of the removed widget or -1 if no widget was found."), 2);
- KommanderPlugin::registerFunction(SETCURRENTWIDGET, "setCurrentWidget(QString widget, QString widgetName)",
+ KommanderPlugin::registerFunction(REMOVEWIDGET, "removeWidget(TQString widget, TQString widgetName)", i18n("Remove the selected widget, returns the index of the removed widget or -1 if no such widget was found."), 2);
+ KommanderPlugin::registerFunction(REMOVEWIDGETAT, "removeWidgetAt(TQString widget, int index)", i18n("Remove the widget from the index position, returns the index of the removed widget or -1 if no widget was found."), 2);
+ KommanderPlugin::registerFunction(SETCURRENTWIDGET, "setCurrentWidget(TQString widget, TQString widgetName)",
i18n("Activates the selected widget."), 2);
- KommanderPlugin::registerFunction(CURRENTINDEX, "currentIndex(QString widget)",
+ KommanderPlugin::registerFunction(CURRENTINDEX, "currentIndex(TQString widget)",
i18n("Returns the index of the active widget."), 1);
- KommanderPlugin::registerFunction(WIDGETAT, "widgetAt(QString widget, int index)",
+ KommanderPlugin::registerFunction(WIDGETAT, "widgetAt(TQString widget, int index)",
i18n("Returns the widget having the supplied index."), 2);
- KommanderPlugin::registerFunction(INDEXOF, "indexOf(QString widget, QString widgetName)",
+ KommanderPlugin::registerFunction(INDEXOF, "indexOf(TQString widget, TQString widgetName)",
i18n("Returns the index of the widget, -1 if the widget is not part of the toolbox."), 2);
}
@@ -57,9 +57,9 @@ ToolBox::~ToolBox()
{
}
-QString ToolBox::currentState() const
+TQString ToolBox::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ToolBox::isKommanderWidget() const
@@ -72,50 +72,50 @@ void ToolBox::populate()
setAssociatedText(KommanderWidget::evalAssociatedText( populationText()));
}
-QStringList ToolBox::associatedText() const
+TQStringList ToolBox::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ToolBox::setAssociatedText(const QStringList& a_at)
+void ToolBox::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ToolBox::setPopulationText(const QString& a_text)
+void ToolBox::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ToolBox::populationText() const
+TQString ToolBox::populationText() const
{
return KommanderWidget::populationText();
}
-QString ToolBox::addWidget(const QString& widgetName, const QString &label)
+TQString ToolBox::addWidget(const TQString& widgetName, const TQString &label)
{
KommanderWidget *w = widgetByName(widgetName);
if (w)
{
- int idx = addItem(dynamic_cast<QWidget*>(w), label);
+ int idx = addItem(dynamic_cast<TQWidget*>(w), label);
adjustSize();
- return QString::number(idx);
+ return TQString::number(idx);
} else
- return QString("-1");
+ return TQString("-1");
}
-void ToolBox::showEvent(QShowEvent* e)
+void ToolBox::showEvent(TQShowEvent* e)
{
- QToolBox::showEvent(e);
+ TQToolBox::showEvent(e);
emit widgetOpened();
}
-void ToolBox::contextMenuEvent( QContextMenuEvent * e )
+void ToolBox::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -124,7 +124,7 @@ bool ToolBox::isFunctionSupported(int f)
return f == DCOP::count || f == DCOP::geometry || (f >= FIRST_FUNCTION && f <= LAST_FUNCTION) ;
}
-QString ToolBox::handleDCOP(int function, const QStringList& args)
+TQString ToolBox::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case ADDWIDGET:
@@ -132,59 +132,59 @@ QString ToolBox::handleDCOP(int function, const QStringList& args)
break;
case CURRENTWIDGET:
{
- QWidget *w = currentItem();
+ TQWidget *w = currentItem();
if (w)
return w->name();
else
- return QString();
+ return TQString();
break;
}
case SETCURRENTWIDGET:
{
KommanderWidget *w = widgetByName(args[0]);
- setCurrentItem(dynamic_cast<QWidget*>(w));
- return QString();
+ setCurrentItem(dynamic_cast<TQWidget*>(w));
+ return TQString();
}
case REMOVEWIDGET:
{
KommanderWidget *w = widgetByName(args[0]);
- return QString::number(removeItem(dynamic_cast<QWidget*>(w)));
+ return TQString::number(removeItem(dynamic_cast<TQWidget*>(w)));
}
case REMOVEWIDGETAT:
{
- QWidget *w = item(args[0].toInt());
- return QString::number(removeItem(w));
+ TQWidget *w = item(args[0].toInt());
+ return TQString::number(removeItem(w));
}
case CURRENTINDEX:
{
- return QString::number(currentIndex());
+ return TQString::number(currentIndex());
break;
}
case WIDGETAT:
{
- QWidget *w = item(args[0].toInt());
+ TQWidget *w = item(args[0].toInt());
if (w)
return w->name();
else
- return QString();
+ return TQString();
break;
}
case INDEXOF:
{
KommanderWidget *w = widgetByName(args[0]);
- return QString::number(indexOf(dynamic_cast<QWidget*>(w)));
+ return TQString::number(indexOf(dynamic_cast<TQWidget*>(w)));
}
case DCOP::count:
- return QString::number(count());
+ return TQString::number(count());
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "toolbox.moc"
diff --git a/kommander/widgets/toolbox.h b/kommander/widgets/toolbox.h
index 9171aa32..12761df0 100644
--- a/kommander/widgets/toolbox.h
+++ b/kommander/widgets/toolbox.h
@@ -12,31 +12,31 @@
#ifndef TOOLBOX_H
#define TOOLBOX_H
-#include <qtoolbox.h>
+#include <tqtoolbox.h>
#include <kommanderwidget.h>
/**
@author Andras Mantia <amantia@kdewebdev.org>
*/
-class ToolBox : public QToolBox, public KommanderWidget
+class ToolBox : public TQToolBox, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- ToolBox(QWidget *parent = 0, const char *name = 0);
+ ToolBox(TQWidget *parent = 0, const char *name = 0);
~ToolBox();
virtual bool isKommanderWidget() const;
- virtual QString currentState() const;
+ virtual TQString currentState() const;
virtual bool isFunctionSupported(int function);
- virtual QString handleDCOP(int function, const QStringList& args);
- virtual QStringList associatedText() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
+ virtual TQStringList associatedText() const;
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
public slots:
virtual void populate();
@@ -45,9 +45,9 @@ signals:
void widgetOpened();
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
- QString addWidget(const QString& widgetName, const QString &label);
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
+ TQString addWidget(const TQString& widgetName, const TQString &label);
};
diff --git a/kommander/widgets/treewidget.cpp b/kommander/widgets/treewidget.cpp
index 578384c5..ef3b7e65 100644
--- a/kommander/widgets/treewidget.cpp
+++ b/kommander/widgets/treewidget.cpp
@@ -23,11 +23,11 @@
#include <klistview.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qlistview.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqlistview.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -54,52 +54,52 @@ enum Functions {
LastFunction
};
-TreeWidget::TreeWidget(QWidget *a_parent, const char *a_name)
+TreeWidget::TreeWidget(TQWidget *a_parent, const char *a_name)
: KListView(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
setPathSeparator("/");
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(SelectedIndexes, "selectedIndexes(QString widget)", "", 1);
- KommanderPlugin::registerFunction(addColumnTree, "addColumn(QString widget, const QString & label, int width = -1 )", i18n("Add column at end with column header"), 2, 3);
- KommanderPlugin::registerFunction(setSortCol, "setSortColumn(QString widget, int column, bool ascending=true)", i18n("Set sorting for a column"), 2, 3);
- //KommanderPlugin::registerFunction(setAltBackground, "setAltBackground(QString widget, const QColor & c)", i18n("Alternate colors in list view"), 2);
-// KommanderPlugin::registerFunction(colCount, "colCount(QString widget)", i18n("Get the column count"), 1);
- KommanderPlugin::registerFunction(colCaption, "columnCaption(QString widget, int column)", i18n("Get the column caption for column index"), 2);
- KommanderPlugin::registerFunction(setColWidth, "setColWidth(QString widget, int column, int width)", i18n("Set the pixel width for column index - use 0 to hide"), 3);
- KommanderPlugin::registerFunction(setColAlignment, "setColumnAlignment(QString widget, int column, QString Alignment)", i18n("Set to <i>left</i>, <i>right</i> or <i>center</i>, case insensitive "), 3);
- KommanderPlugin::registerFunction(TW_childCount, "childCount(QString widget)", i18n("Get the count of top level items."), 1);
- KommanderPlugin::registerFunction(TW_setOpen, "setOpen(QString widget, int Index, bool Open)", i18n("Expand or collapse a node."), 3);
- KommanderPlugin::registerFunction(TW_isOpen, "isOpen(QString widget, int Index)", i18n("See if node is open or closed."), 2);
+ KommanderPlugin::registerFunction(SelectedIndexes, "selectedIndexes(TQString widget)", "", 1);
+ KommanderPlugin::registerFunction(addColumnTree, "addColumn(TQString widget, const TQString & label, int width = -1 )", i18n("Add column at end with column header"), 2, 3);
+ KommanderPlugin::registerFunction(setSortCol, "setSortColumn(TQString widget, int column, bool ascending=true)", i18n("Set sorting for a column"), 2, 3);
+ //KommanderPlugin::registerFunction(setAltBackground, "setAltBackground(TQString widget, const TQColor & c)", i18n("Alternate colors in list view"), 2);
+// KommanderPlugin::registerFunction(colCount, "colCount(TQString widget)", i18n("Get the column count"), 1);
+ KommanderPlugin::registerFunction(colCaption, "columnCaption(TQString widget, int column)", i18n("Get the column caption for column index"), 2);
+ KommanderPlugin::registerFunction(setColWidth, "setColWidth(TQString widget, int column, int width)", i18n("Set the pixel width for column index - use 0 to hide"), 3);
+ KommanderPlugin::registerFunction(setColAlignment, "setColumnAlignment(TQString widget, int column, TQString Alignment)", i18n("Set to <i>left</i>, <i>right</i> or <i>center</i>, case insensitive "), 3);
+ KommanderPlugin::registerFunction(TW_childCount, "childCount(TQString widget)", i18n("Get the count of top level items."), 1);
+ KommanderPlugin::registerFunction(TW_setOpen, "setOpen(TQString widget, int Index, bool Open)", i18n("Expand or collapse a node."), 3);
+ KommanderPlugin::registerFunction(TW_isOpen, "isOpen(TQString widget, int Index)", i18n("See if node is open or closed."), 2);
}
TreeWidget::~TreeWidget()
{
}
-QString TreeWidget::pathSeparator() const
+TQString TreeWidget::pathSeparator() const
{
return m_pathSeparator;
}
-void TreeWidget::setPathSeparator(const QString& a_pathSep)
+void TreeWidget::setPathSeparator(const TQString& a_pathSep)
{
m_pathSeparator = a_pathSep;
}
-void TreeWidget::addItemFromString(const QString& s)
+void TreeWidget::addItemFromString(const TQString& s)
{
- QStringList elements = QStringList::split(m_pathSeparator, s, true);
+ TQStringList elements = TQStringList::split(m_pathSeparator, s, true);
if (elements.count() > 1)
setRootIsDecorated(true);
- QListViewItem* parent = 0;
+ TQListViewItem* parent = 0;
if (m_lastPath.size() < elements.count())
m_lastPath.resize(elements.count());
uint i = 0;
- for (QStringList::ConstIterator it = elements.begin(); it != elements.end(); ++it)
+ for (TQStringList::ConstIterator it = elements.begin(); it != elements.end(); ++it)
{
if (m_lastPath[i] && m_lastPath[i]->text(0) == elements[i])
{
@@ -109,7 +109,7 @@ void TreeWidget::addItemFromString(const QString& s)
}
else
{
- QListViewItem* item = (i>0) ? parent->firstChild() : firstChild();
+ TQListViewItem* item = (i>0) ? parent->firstChild() : firstChild();
while (item)
{
if (item->text(0) == *it)
@@ -126,32 +126,32 @@ void TreeWidget::addItemFromString(const QString& s)
}
}
-QListViewItem* TreeWidget::itemFromString(QListViewItem* parent, const QString& s)
+TQListViewItem* TreeWidget::itemFromString(TQListViewItem* parent, const TQString& s)
{
- QStringList elements;
+ TQStringList elements;
if (s.contains("\t"))
- elements = QStringList::split("\t", s, true);
+ elements = TQStringList::split("\t", s, true);
else
- elements = QStringList::split("\\t", s, true);
+ elements = TQStringList::split("\\t", s, true);
int cols = elements.count();
if (cols >= columns())
cols = columns();
- QListViewItem* item;
+ TQListViewItem* item;
if (parent)
- item = new QListViewItem(parent);
+ item = new TQListViewItem(parent);
else
- item = new QListViewItem(this);
+ item = new TQListViewItem(this);
int i = 0;
- for (QStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it)
+ for (TQStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it)
item->setText(i++, *it);
return item;
}
-int TreeWidget::itemToIndex(QListViewItem* item)
+int TreeWidget::itemToIndex(TQListViewItem* item)
{
// if (!item->isSelected())
// return -1;
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
int index = 0;
while (it.current()) {
if (it.current() == item)
@@ -162,9 +162,9 @@ int TreeWidget::itemToIndex(QListViewItem* item)
return -1;
}
-int TreeWidget::itemToIndexSafe(QListViewItem* item)
+int TreeWidget::itemToIndexSafe(TQListViewItem* item)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
int index = 0;
while (it.current()) {
if (it.current() == item)
@@ -175,9 +175,9 @@ int TreeWidget::itemToIndexSafe(QListViewItem* item)
return -1;
}
-QListViewItem* TreeWidget::indexToItem(int item)
+TQListViewItem* TreeWidget::indexToItem(int item)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
int index = 0;
while (it.current()) {
if (index == item)
@@ -188,41 +188,41 @@ QListViewItem* TreeWidget::indexToItem(int item)
return 0;
}
-QString TreeWidget::itemText(QListViewItem* item) const
+TQString TreeWidget::itemText(TQListViewItem* item) const
{
if (!item)
- return QString();
- QStringList items;
+ return TQString();
+ TQStringList items;
for (int i=0; i<columns(); i++)
items.append(item->text(i));
return items.join("\t");
}
-QString TreeWidget::itemsText()
+TQString TreeWidget::itemsText()
{
- QStringList items;
- QListViewItemIterator it(this);
+ TQStringList items;
+ TQListViewItemIterator it(this);
while (it.current())
{
- QString path = itemPath(it.current());
+ TQString path = itemPath(it.current());
if (path.isEmpty())
items.append(itemText(it.current()));
else
- items.append(QString("%1%2%3").arg(path).arg(m_pathSeparator)
+ items.append(TQString("%1%2%3").arg(path).arg(m_pathSeparator)
.arg(itemText(it.current())));
++it;
}
return items.join("\n");
}
-QString TreeWidget::itemPath(QListViewItem* item) const
+TQString TreeWidget::itemPath(TQListViewItem* item) const
{
if (!item)
- return QString();
+ return TQString();
item = item->parent();
if (!item)
- return QString();
- QStringList path;
+ return TQString();
+ TQStringList path;
while (item)
{
path.prepend(item->text(0));
@@ -231,9 +231,9 @@ QString TreeWidget::itemPath(QListViewItem* item) const
return path.join(m_pathSeparator);
}
-QString TreeWidget::currentState() const
+TQString TreeWidget::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool TreeWidget::isKommanderWidget() const
@@ -241,29 +241,29 @@ bool TreeWidget::isKommanderWidget() const
return true;
}
-void TreeWidget::setCurrentItem(QListViewItem* item)
+void TreeWidget::setCurrentItem(TQListViewItem* item)
{
KListView::setCurrentItem(item);
setSelected(item, true);
ensureItemVisible(item);
}
-QStringList TreeWidget::associatedText() const
+TQStringList TreeWidget::associatedText() const
{
return KommanderWidget::associatedText();
}
-void TreeWidget::setAssociatedText(const QStringList& a_at)
+void TreeWidget::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void TreeWidget::setPopulationText(const QString& a_text)
+void TreeWidget::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText( a_text );
}
-QString TreeWidget::populationText() const
+TQString TreeWidget::populationText() const
{
return KommanderWidget::populationText();
}
@@ -273,26 +273,26 @@ void TreeWidget::populate()
setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
}
-void TreeWidget::setWidgetText(const QString &a_text)
+void TreeWidget::setWidgetText(const TQString &a_text)
{
handleDCOP(DCOP::setText, a_text);
emit widgetTextChanged(a_text);
}
-void TreeWidget::showEvent(QShowEvent* e)
+void TreeWidget::showEvent(TQShowEvent* e)
{
- QListView::showEvent( e );
+ TQListView::showEvent( e );
emit widgetOpened();
}
-void TreeWidget::contextMenuEvent( QContextMenuEvent * e )
+void TreeWidget::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
-void TreeWidget::setColAlign(int column, const QString& align)
+void TreeWidget::setColAlign(int column, const TQString& align)
{
if (align.lower() == "left")
setColumnAlignment (column, Qt::AlignLeft);
@@ -310,7 +310,7 @@ bool TreeWidget::isFunctionSupported(int f)
f == DCOP::itemPath || f == DCOP::itemDepth || f == DCOP::setPixmap || f == DCOP::setColumnCaption || f == DCOP::removeColumn || f == DCOP::columnCount || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f > FirstFunction && f < LastFunction) || (f >= TW_FUNCTION && f <= TW_LAST_FUNCTION);
}
-QString TreeWidget::handleDCOP(int function, const QStringList& args)
+TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::insertItem:
@@ -323,8 +323,8 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args)
m_lastPath.clear();
case DCOP::insertItems:
{
- QStringList items(QStringList::split("\n", args[0], true));
- for (QStringList::ConstIterator it = items.constBegin(); it != items.constEnd(); ++it)
+ TQStringList items(TQStringList::split("\n", args[0], true));
+ for (TQStringList::ConstIterator it = items.constBegin(); it != items.constEnd(); ++it)
addItemFromString(*it);
break;
}
@@ -332,17 +332,17 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args)
setOpen(indexToItem(args[0].toInt()), args[1].toInt());
break;
case TW_isOpen:
- return QString::number(isOpen(indexToItem(args[0].toInt())));
+ return TQString::number(isOpen(indexToItem(args[0].toInt())));
break;
case SelectedIndexes:
{
- QString selection = "";
- QListViewItemIterator it(this);
+ TQString selection = "";
+ TQListViewItemIterator it(this);
while (it.current())
{
if (it.current()->isSelected())
{
- selection.append(QString("%1\n").arg(itemToIndexSafe(it.current())));
+ selection.append(TQString("%1\n").arg(itemToIndexSafe(it.current())));
}
++it;
}
@@ -353,8 +353,8 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args)
}
case DCOP::selection:
{
- QString selection = "";
- QListViewItemIterator it(this);
+ TQString selection = "";
+ TQListViewItemIterator it(this);
while (it.current())
{
if (it.current()->isSelected())
@@ -372,10 +372,10 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args)
else
{
clearSelection();
- QStringList items(QStringList::split("\n", args[0]));
- for (QStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
+ TQStringList items(TQStringList::split("\n", args[0]));
+ for (TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
{
- QListViewItem* item = findItem(*it, 0);
+ TQListViewItem* item = findItem(*it, 0);
if (item)
{
item->setSelected(true);
@@ -398,24 +398,24 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args)
break;
}
case DCOP::currentItem:
- return QString::number(itemToIndexSafe(currentItem()));
+ return TQString::number(itemToIndexSafe(currentItem()));
break;
case DCOP::setCurrentItem:
setCurrentItem(indexToItem(args[0].toInt()));
break;
case DCOP::findItem:
if (!args[1])
- return QString::number(itemToIndexSafe(findItem(args[0], 0)));
+ return TQString::number(itemToIndexSafe(findItem(args[0], 0)));
else
{
if (args[2].toUInt() && args[3].toUInt())
- return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt())));
+ return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt())));
else if (args[2].toUInt())
- return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::CaseSensitive | Qt::Contains)));
+ return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::CaseSensitive | Qt::Contains)));
else if (args[3].toUInt())
- return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::ExactMatch)));
+ return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::ExactMatch)));
else
- return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::Contains)));
+ return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::Contains)));
}
break;
case DCOP::item:
@@ -426,18 +426,18 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args)
break;
case DCOP::itemDepth:
{
- QListViewItem* item = indexToItem(args[0].toInt());
- return (item) ? QString::number(item->depth()) : QString::number(-1);
+ TQListViewItem* item = indexToItem(args[0].toInt());
+ return (item) ? TQString::number(item->depth()) : TQString::number(-1);
}
case DCOP::setPixmap:
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small);
if (args[1].toInt() == -1)
- for (QListViewItemIterator it(this); it.current(); ++it)
+ for (TQListViewItemIterator it(this); it.current(); ++it)
it.current()->setPixmap(0, pixmap);
else
{
- QListViewItem* item = indexToItem(args[1].toInt());
+ TQListViewItem* item = indexToItem(args[1].toInt());
if (item)
item->setPixmap(0, pixmap);
}
@@ -452,31 +452,31 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
}
case addColumnTree:
- return QString::number(KListView::addColumn(args[0], args[1].toInt()));
+ return TQString::number(KListView::addColumn(args[0], args[1].toInt()));
break;
case setSortCol:
KListView::setSorting(args[0].toInt(), args[1].toInt());
break;
case DCOP::columnCount:
- return QString::number(QListView::columns() );
+ return TQString::number(TQListView::columns() );
break;
case colCaption:
- return QListView::columnText(args[0].toInt()) ;
+ return TQListView::columnText(args[0].toInt()) ;
break;
case setColWidth:
- QListView::setColumnWidth(args[0].toInt(), args[1].toInt());
+ TQListView::setColumnWidth(args[0].toInt(), args[1].toInt());
break;
case setColAlignment:
setColAlign(args[0].toInt(), args[1]);
break;
case setAltBackground:
- KListView::setAlternateBackground(QColor(args[0]));
+ KListView::setAlternateBackground(TQColor(args[0]));
break;
case DCOP::removeColumn:
{
@@ -492,21 +492,21 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args)
break;
}
case TW_childCount:
- return QString::number(childCount());
+ return TQString::number(childCount());
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "treewidget.moc"
diff --git a/kommander/widgets/treewidget.h b/kommander/widgets/treewidget.h
index 29d0a747..28da108e 100644
--- a/kommander/widgets/treewidget.h
+++ b/kommander/widgets/treewidget.h
@@ -21,9 +21,9 @@
#include <klistview.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrvector.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrvector.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -36,52 +36,52 @@ class KOMMANDER_EXPORT TreeWidget : public KListView, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(QString pathSeparator READ pathSeparator WRITE setPathSeparator)
+ Q_PROPERTY(TQString pathSeparator READ pathSeparator WRITE setPathSeparator)
public:
- TreeWidget(QWidget *a_parent, const char *a_name);
+ TreeWidget(TQWidget *a_parent, const char *a_name);
~TreeWidget();
- virtual void setCurrentItem(QListViewItem* item);
- QString pathSeparator() const;
- void setPathSeparator(const QString& a_pathSep);
+ virtual void setCurrentItem(TQListViewItem* item);
+ TQString pathSeparator() const;
+ void setPathSeparator(const TQString& a_pathSep);
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
public slots:
- virtual void setWidgetText(const QString&);
+ virtual void setWidgetText(const TQString&);
virtual void populate();
signals:
void widgetOpened();
- void widgetTextChanged(const QString&);
+ void widgetTextChanged(const TQString&);
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent(QShowEvent *e);
- void contextMenuEvent( QContextMenuEvent * e );
- int itemToIndex(QListViewItem* item);
- int itemToIndexSafe(QListViewItem* item);
- QString itemText(QListViewItem* item) const;
- QString itemsText();
- QListViewItem* indexToItem(int index);
- QString itemPath(QListViewItem* item) const;
+ void showEvent(TQShowEvent *e);
+ void contextMenuEvent( TQContextMenuEvent * e );
+ int itemToIndex(TQListViewItem* item);
+ int itemToIndexSafe(TQListViewItem* item);
+ TQString itemText(TQListViewItem* item) const;
+ TQString itemsText();
+ TQListViewItem* indexToItem(int index);
+ TQString itemPath(TQListViewItem* item) const;
private:
- void addItemFromString(const QString& s);
- QListViewItem* itemFromString(QListViewItem* parent, const QString& s);
- QPtrVector<QListViewItem> m_lastPath;
- QString m_pathSeparator;
- int addColumnTree(const QString & label, int width = -1 );
+ void addItemFromString(const TQString& s);
+ TQListViewItem* itemFromString(TQListViewItem* parent, const TQString& s);
+ TQPtrVector<TQListViewItem> m_lastPath;
+ TQString m_pathSeparator;
+ int addColumnTree(const TQString & label, int width = -1 );
void setSortCol(int column, bool ascending=true);
- void setAltBackground(const QColor & c);
- void setColAlign(int column, const QString& align);
+ void setAltBackground(const TQColor & c);
+ void setColAlign(int column, const TQString& align);
};
#endif
diff --git a/kommander/widgets/wizard.cpp b/kommander/widgets/wizard.cpp
index 7e6a07b4..8cc16933 100644
--- a/kommander/widgets/wizard.cpp
+++ b/kommander/widgets/wizard.cpp
@@ -17,12 +17,12 @@
#include <kprocess.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qwizard.h>
-#include <qdialog.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqwizard.h>
+#include <tqdialog.h>
/* OTHER INCLUDES */
#include <myprocess.h>
@@ -31,17 +31,17 @@
#include "wizard.h"
-Wizard::Wizard(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
- : QWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(this)
+Wizard::Wizard(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
+ : TQWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
states << "initialization";
states << "destroy";
setStates(states);
setDisplayStates(states);
- connect(this, SIGNAL(helpClicked()), SLOT(runHelp()));
+ connect(this, TQT_SIGNAL(helpClicked()), TQT_SLOT(runHelp()));
}
Wizard::~Wizard()
@@ -50,9 +50,9 @@ Wizard::~Wizard()
destroy();
}
-QString Wizard::currentState() const
+TQString Wizard::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool Wizard::isKommanderWidget() const
@@ -60,33 +60,33 @@ bool Wizard::isKommanderWidget() const
return true;
}
-QStringList Wizard::associatedText() const
+TQStringList Wizard::associatedText() const
{
return KommanderWidget::associatedText();
}
-void Wizard::setAssociatedText(const QStringList& a_at)
+void Wizard::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void Wizard::setPopulationText(const QString& a_text)
+void Wizard::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString Wizard::populationText() const
+TQString Wizard::populationText() const
{
return KommanderWidget::populationText();
}
void Wizard::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
//FIXME: implement me
}
-void Wizard::setWidgetText(const QString &a_text)
+void Wizard::setWidgetText(const TQString &a_text)
{
setCaption(a_text);
emit widgetTextChanged(a_text);
@@ -95,7 +95,7 @@ void Wizard::setWidgetText(const QString &a_text)
void Wizard::initialize()
{
setFinishEnabled(page(pageCount() - 1), true);
- const QStringList assoc = associatedText();
+ const TQStringList assoc = associatedText();
if (assoc.count() > 1 && !assoc[1].isEmpty())
{
MyProcess proc(this);
@@ -105,7 +105,7 @@ void Wizard::initialize()
void Wizard::destroy()
{
- const QStringList assoc = associatedText();
+ const TQStringList assoc = associatedText();
if (assoc.count() > 2 && !assoc[2].isEmpty())
{
MyProcess proc(this);
@@ -115,13 +115,13 @@ void Wizard::destroy()
void Wizard::exec()
{
- QWizard::exec();
+ TQWizard::exec();
emit finished();
}
void Wizard::show()
{
- QWizard::show();
+ TQWizard::show();
if (!inEditor)
initialize();
}
@@ -137,7 +137,7 @@ void Wizard::runHelp()
else if (helpAction() == Dialog)
{
KommanderFactory::loadPlugins();
- QDialog *dialog = (QDialog *)KommanderFactory::create(helpActionText());
+ TQDialog *dialog = (TQDialog *)KommanderFactory::create(helpActionText());
dialog->exec();
delete dialog;
}
@@ -153,31 +153,31 @@ void Wizard::setHelpAction(HelpAction a_helpAction)
m_helpAction = a_helpAction;
}
-QString Wizard::helpActionText() const
+TQString Wizard::helpActionText() const
{
return m_helpActionText;
}
-void Wizard::setHelpActionText(const QString& a_helpActionText)
+void Wizard::setHelpActionText(const TQString& a_helpActionText)
{
m_helpActionText = a_helpActionText;
}
-void Wizard::showEvent(QShowEvent *e)
+void Wizard::showEvent(TQShowEvent *e)
{
- QWizard::showEvent(e);
+ TQWizard::showEvent(e);
emit widgetOpened();
}
-void Wizard::contextMenuEvent( QContextMenuEvent * e )
+void Wizard::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
-QString Wizard::handleDCOP(int function, const QStringList& args)
+TQString Wizard::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setEnabled:
@@ -186,7 +186,7 @@ QString Wizard::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
diff --git a/kommander/widgets/wizard.h b/kommander/widgets/wizard.h
index 868a14bc..131c6dd6 100644
--- a/kommander/widgets/wizard.h
+++ b/kommander/widgets/wizard.h
@@ -19,7 +19,7 @@
/* KDE INCLUDES */
/* QT INCLUDES */
-#include <qwizard.h>
+#include <tqwizard.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -27,37 +27,37 @@
#include <myprocess.h>
class QShowEvent;
-class KOMMANDER_EXPORT Wizard : public QWizard, public KommanderWidget
+class KOMMANDER_EXPORT Wizard : public TQWizard, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
Q_PROPERTY(HelpAction helpAction READ helpAction WRITE setHelpAction)
Q_ENUMS(HelpAction)
- Q_PROPERTY(QString helpActionText READ helpActionText WRITE setHelpActionText)
+ Q_PROPERTY(TQString helpActionText READ helpActionText WRITE setHelpActionText)
public:
- Wizard(QWidget *, const char *, bool = true, int = 0);
+ Wizard(TQWidget *, const char *, bool = true, int = 0);
~Wizard();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
enum HelpAction { None, Command, Dialog };
HelpAction helpAction() const;
void setHelpAction(HelpAction);
- QString helpActionText() const;
- void setHelpActionText(const QString&);
+ TQString helpActionText() const;
+ void setHelpActionText(const TQString&);
public slots:
- virtual void setWidgetText(const QString &);
+ virtual void setWidgetText(const TQString &);
virtual void exec();
virtual void show();
virtual void runHelp();
@@ -68,15 +68,15 @@ protected slots:
signals:
void widgetOpened();
- void widgetTextChanged(const QString &);
+ void widgetTextChanged(const TQString &);
void finished();
void contextMenuRequested(int xpos, int ypos);
protected:
- void showEvent( QShowEvent *e );
- void contextMenuEvent( QContextMenuEvent * e );
+ void showEvent( TQShowEvent *e );
+ void contextMenuEvent( TQContextMenuEvent * e );
HelpAction m_helpAction;
- QString m_helpActionText;
+ TQString m_helpActionText;
};
#endif
diff --git a/kommander/working/plugintemplate/plugin.cpp b/kommander/working/plugintemplate/plugin.cpp
index e6b506cc..b6e1a0a0 100644
--- a/kommander/working/plugintemplate/plugin.cpp
+++ b/kommander/working/plugintemplate/plugin.cpp
@@ -11,15 +11,15 @@ class %{APPNAME}Plugin : public KommanderPlugin
{
public:
%{APPNAME}Plugin();
- virtual QWidget *create( const QString &className, QWidget *parent = 0, const char *name = 0);
+ virtual TQWidget *create( const TQString &className, TQWidget *parent = 0, const char *name = 0);
};
%{APPNAME}Plugin::%{APPNAME}Plugin()
{
- addWidget( "%{APPNAME}", "Custom", i18n("Kommander %{APPNAME} plugin."), new QIconSet(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium)) );
+ addWidget( "%{APPNAME}", "Custom", i18n("Kommander %{APPNAME} plugin."), new TQIconSet(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium)) );
}
-QWidget *%{APPNAME}Plugin::create( const QString &className, QWidget *parent, const char *name)
+TQWidget *%{APPNAME}Plugin::create( const TQString &className, TQWidget *parent, const char *name)
{
if (className == "%{APPNAME}")
return new %{APPNAME}(parent, name);
diff --git a/kommander/working/plugintemplate/widget.cpp b/kommander/working/plugintemplate/widget.cpp
index 73ec0278..2378e87a 100644
--- a/kommander/working/plugintemplate/widget.cpp
+++ b/kommander/working/plugintemplate/widget.cpp
@@ -16,10 +16,10 @@ enum Functions {
LastFunction
};
-%{APPNAME}::%{APPNAME}(QWidget *parent, const char *name)
- : QWidget(parent, name), KommanderWidget(this)
+%{APPNAME}::%{APPNAME}(TQWidget *parent, const char *name)
+ : TQWidget(parent, name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -29,7 +29,7 @@ enum Functions {
if (KommanderWidget::inEditor)
{
setPixmap(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium));
- setFrameStyle(QFrame::Box | QFrame::Plain);
+ setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(1);
setAlignment(Qt::AlignCenter);
}
@@ -40,8 +40,8 @@ enum Functions {
KommanderPlugin::setDefaultGroup(Group::DCOP);
//CHANGE THE BELOW LINES TO MATCH YOUR FUNCTIONS NAMES AND SIGNATURE
- KommanderPlugin::registerFunction(Function1, "function1(QString widget, QString arg1, int arg2)", i18n("Call function1 with two arguments, second is optional."), 2, 3);
- KommanderPlugin::registerFunction(Function2, "function2(QString widget)", i18n("Get a QString as a result of function2."), 1);
+ KommanderPlugin::registerFunction(Function1, "function1(TQString widget, TQString arg1, int arg2)", i18n("Call function1 with two arguments, second is optional."), 2, 3);
+ KommanderPlugin::registerFunction(Function2, "function2(TQString widget)", i18n("Get a TQString as a result of function2."), 1);
}
@@ -49,9 +49,9 @@ enum Functions {
{
}
-QString %{APPNAME}::currentState() const
+TQString %{APPNAME}::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool %{APPNAME}::isKommanderWidget() const
@@ -59,22 +59,22 @@ bool %{APPNAME}::isKommanderWidget() const
return true;
}
-QStringList %{APPNAME}::associatedText() const
+TQStringList %{APPNAME}::associatedText() const
{
return KommanderWidget::associatedText();
}
-void %{APPNAME}::setAssociatedText(const QStringList& a_atext)
+void %{APPNAME}::setAssociatedText(const TQStringList& a_atext)
{
KommanderWidget::setAssociatedText(a_atext);
}
-void %{APPNAME}::setPopulationText(const QString& a_text)
+void %{APPNAME}::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString %{APPNAME}::populationText() const
+TQString %{APPNAME}::populationText() const
{
return KommanderWidget::populationText();
}
@@ -84,10 +84,10 @@ void %{APPNAME}::populate()
KommanderWidget::evalAssociatedText(populationText());
}
-void %{APPNAME}::contextMenuEvent( QContextMenuEvent * e )
+void %{APPNAME}::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -97,7 +97,7 @@ bool %{APPNAME}::isFunctionSupported(int f)
return (f >= FirstFunction && f <= LastFunction); //see specials.h for other DCOP functions you might want to support
}
-QString %{APPNAME}::handleDCOP(int function, const QStringList& args)
+TQString %{APPNAME}::handleDCOP(int function, const TQStringList& args)
{
switch (function)
{
@@ -110,7 +110,7 @@ QString %{APPNAME}::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString::null;
+ return TQString::null;
}
#include "%{APPNAMELC}.moc"
diff --git a/kommander/working/plugintemplate/widget.h b/kommander/working/plugintemplate/widget.h
index 56e87f91..1ec87a5e 100644
--- a/kommander/working/plugintemplate/widget.h
+++ b/kommander/working/plugintemplate/widget.h
@@ -2,8 +2,8 @@
#ifndef %{APPNAMEUC}_WIDGET_H
#define %{APPNAMEUC}_WIDGET_H
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kparts/part.h>
@@ -11,35 +11,35 @@
class QStringList;
-//replace QWidget with the widget you want to derive from
-class %{APPNAME}: public QWidget, public KommanderWidget
+//replace TQWidget with the widget you want to derive from
+class %{APPNAME}: public TQWidget, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- %{APPNAME}(QWidget *parent, const char* name);
+ %{APPNAME}(TQWidget *parent, const char* name);
~%{APPNAME}();
virtual bool isKommanderWidget() const;
- virtual void setAssociatedText(const QStringList&);
- virtual QStringList associatedText() const;
- virtual QString currentState() const;
- virtual QString populationText() const;
- virtual void setPopulationText(const QString&);
+ virtual void setAssociatedText(const TQStringList&);
+ virtual TQStringList associatedText() const;
+ virtual TQString currentState() const;
+ virtual TQString populationText() const;
+ virtual void setPopulationText(const TQString&);
virtual void populate();
- virtual QString handleDCOP(int function, const QStringList& args);
+ virtual TQString handleDCOP(int function, const TQStringList& args);
virtual bool isFunctionSupported(int function);
signals:
void contextMenuRequested(int xpos, int ypos);
protected:
- void contextMenuEvent( QContextMenuEvent * e );
+ void contextMenuEvent( TQContextMenuEvent * e );
};