summaryrefslogtreecommitdiffstats
path: root/kommander/editor/command.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/editor/command.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/command.cpp')
-rw-r--r--kommander/editor/command.cpp472
1 files changed, 236 insertions, 236 deletions
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 );