diff options
| author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 | 
|---|---|---|
| committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 | 
| commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
| tree | d109539636691d7b03036ca1c0ed29dbae6577cf /kdevdesigner/designer/widgetfactory.cpp | |
| parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
| download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip | |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/widgetfactory.cpp')
| -rw-r--r-- | kdevdesigner/designer/widgetfactory.cpp | 960 | 
1 files changed, 480 insertions, 480 deletions
| diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 191fbb1f..410dab23 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -24,7 +24,7 @@  **  **********************************************************************/ -#include <qvariant.h> // HP-UX compiler need this here +#include <tqvariant.h> // HP-UX compiler need this here  #include "widgetfactory.h"  #include <widgetdatabase.h>  #include "metadatabase.h" @@ -49,60 +49,60 @@  #include <kiconloader.h> -#include <qfeatures.h> +#include <tqfeatures.h> -#include <qpixmap.h> -#include <qgroupbox.h> -#include <qiconview.h> +#include <tqpixmap.h> +#include <tqgroupbox.h> +#include <tqiconview.h>  #ifndef QT_NO_TABLE -#include <qtable.h> +#include <tqtable.h>  #endif  #ifndef QT_NO_SQL -#include <qdatatable.h> +#include <tqdatatable.h>  #endif -#include <qdatetimeedit.h> -#include <qlineedit.h> -#include <qspinbox.h> -#include <qmultilineedit.h> -#include <qtextedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwidgetstack.h> -#include <qcombobox.h> -#include <qtabbar.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qobjectlist.h> -#include <qlcdnumber.h> -#include <qslider.h> -#include <qdial.h> -#include <qprogressbar.h> -#include <qtextview.h> -#include <qtextbrowser.h> -#include <qframe.h> -#include <qmetaobject.h> -#include <qwidgetstack.h> -#include <qwizard.h> -#include <qvaluelist.h> -#include <qtimer.h> -#include <qscrollbar.h> -#include <qmainwindow.h> -#include <qmenubar.h> -#include <qapplication.h> -#include <qsplitter.h> -#include <qtoolbox.h> -#include <qsizegrip.h> +#include <tqdatetimeedit.h> +#include <tqlineedit.h> +#include <tqspinbox.h> +#include <tqmultilineedit.h> +#include <tqtextedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> +#include <tqcombobox.h> +#include <tqtabbar.h> +#include <tqlistbox.h> +#include <tqlistview.h> +#include <tqobjectlist.h> +#include <tqlcdnumber.h> +#include <tqslider.h> +#include <tqdial.h> +#include <tqprogressbar.h> +#include <tqtextview.h> +#include <tqtextbrowser.h> +#include <tqframe.h> +#include <tqmetaobject.h> +#include <tqwidgetstack.h> +#include <tqwizard.h> +#include <tqvaluelist.h> +#include <tqtimer.h> +#include <tqscrollbar.h> +#include <tqmainwindow.h> +#include <tqmenubar.h> +#include <tqapplication.h> +#include <tqsplitter.h> +#include <tqtoolbox.h> +#include <tqsizegrip.h>  #ifndef QT_NO_SQL  #include "database.h"  #endif  #define NO_STATIC_COLORS  #include <globaldefs.h> -#include <qobject.h> +#include <tqobject.h>  #include <klocale.h> -FormWindow *find_formwindow( QWidget *w ) +FormWindow *find_formwindow( TQWidget *w )  {      if ( !w )  	return 0; @@ -115,16 +115,16 @@ FormWindow *find_formwindow( QWidget *w )      }  } -void QLayoutWidget::paintEvent( QPaintEvent* ) +void QLayoutWidget::paintEvent( TQPaintEvent* )  { -    QPainter p ( this ); +    TQPainter p ( this );      p.setPen( red );      p.drawRect( rect() );  } -QDesignerTabWidget::QDesignerTabWidget( QWidget *parent, const char *name ) -    : QTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE ) +QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name ) +    : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE )  {      tabBar()->setAcceptDrops( TRUE );      tabBar()->installEventFilter( this ); @@ -140,27 +140,27 @@ void QDesignerTabWidget::setCurrentPage( int i )      tabBar()->setCurrentTab( i );  } -QString QDesignerTabWidget::pageTitle() const +TQString QDesignerTabWidget::pageTitle() const  { -    return ((QTabWidget*)this)->tabLabel( QTabWidget::currentPage() ); +    return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() );  } -void QDesignerTabWidget::setPageTitle( const QString& title ) +void QDesignerTabWidget::setPageTitle( const TQString& title )  { -    changeTab( QTabWidget::currentPage(), title ); +    changeTab( TQTabWidget::currentPage(), title );  } -void QDesignerTabWidget::setPageName( const QCString& name ) +void QDesignerTabWidget::setPageName( const TQCString& name )  { -    if ( QTabWidget::currentPage() ) -	QTabWidget::currentPage()->setName( name ); +    if ( TQTabWidget::currentPage() ) +	TQTabWidget::currentPage()->setName( name );  } -QCString QDesignerTabWidget::pageName() const +TQCString QDesignerTabWidget::pageName() const  { -    if ( !QTabWidget::currentPage() ) +    if ( !TQTabWidget::currentPage() )  	return 0; -    return QTabWidget::currentPage()->name(); +    return TQTabWidget::currentPage()->name();  }  int QDesignerTabWidget::count() const @@ -168,24 +168,24 @@ int QDesignerTabWidget::count() const      return tabBar()->count();  } -bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e ) +bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )  {      if ( o != tabBar() ) return FALSE;      switch ( e->type() ) { -    case QEvent::MouseButtonPress: { +    case TQEvent::MouseButtonPress: {  	mousePressed = TRUE; -	QMouseEvent *me = (QMouseEvent*)e; +	TQMouseEvent *me = (TQMouseEvent*)e;  	pressPoint = me->pos();      }      break; -    case QEvent::MouseMove: { -	QMouseEvent *me = (QMouseEvent*)e; -	if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > QApplication::startDragDistance() ) { -	    QTextDrag *drg = new QTextDrag( QString::number( (long) this ) , this ); +    case TQEvent::MouseMove: { +	TQMouseEvent *me = (TQMouseEvent*)e; +	if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) { +	    TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this );  	    mousePressed = FALSE; -	    dragPage = QTabWidget::currentPage(); -	    dragLabel = QTabWidget::tabLabel( dragPage ); +	    dragPage = TQTabWidget::currentPage(); +	    dragLabel = TQTabWidget::tabLabel( dragPage );  	    int index = indexOf( dragPage ); @@ -199,24 +199,24 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )  	}      }      break; -    case QEvent::DragLeave:	{ +    case TQEvent::DragLeave:	{  	if ( dropIndicator )  	    dropIndicator->hide();      }      break; -    case QEvent::DragMove: { -	QDragEnterEvent *de = (QDragEnterEvent*) e; -	if ( QTextDrag::canDecode( de ) ) { -	    QString text; -	    QTextDrag::decode( de, text ); -	    if ( text == QString::number( (long)this ) ) +    case TQEvent::DragMove: { +	TQDragEnterEvent *de = (TQDragEnterEvent*) e; +	if ( TQTextDrag::canDecode( de ) ) { +	    TQString text; +	    TQTextDrag::decode( de, text ); +	    if ( text == TQString::number( (long)this ) )  		de->accept();  	    else  		return FALSE;  	}  	int index = 0; -	QRect rect; +	TQRect rect;  	for ( ; index < tabBar()->count(); index++ ) {  	    if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {  		rect = tabBar()->tabAt( index )->rect(); @@ -225,33 +225,33 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )  	}  	if ( index == tabBar()->count() -1 ) { -	    QRect rect2 = rect; +	    TQRect rect2 = rect;  	    rect2.setLeft( rect2.left() + rect2.width() / 2 );  	    if ( rect2.contains( de->pos() ) )  		index++;  	}  	if ( ! dropIndicator ) { -	    dropIndicator = new QWidget( this ); +	    dropIndicator = new TQWidget( this );  	    dropIndicator->setBackgroundColor( red );  	} -	QPoint pos; +	TQPoint pos;  	if ( index == tabBar()->count() ) -	    pos = tabBar()->mapToParent( QPoint( rect.x() + rect.width(), rect.y() ) ); +	    pos = tabBar()->mapToParent( TQPoint( rect.x() + rect.width(), rect.y() ) );  	else -	    pos = tabBar()->mapToParent( QPoint( rect.x(), rect.y() ) ); +	    pos = tabBar()->mapToParent( TQPoint( rect.x(), rect.y() ) );  	dropIndicator->setGeometry( pos.x(), pos.y() , 3, rect.height() );  	dropIndicator->show();      }      break; -    case QEvent::Drop: { -	QDragEnterEvent *de = (QDragEnterEvent*) e; -	if ( QTextDrag::canDecode( de ) ) { -	    QString text; -	    QTextDrag::decode( de, text ); -	    if ( text == QString::number( (long)this ) ) { +    case TQEvent::Drop: { +	TQDragEnterEvent *de = (TQDragEnterEvent*) e; +	if ( TQTextDrag::canDecode( de ) ) { +	    TQString text; +	    TQTextDrag::decode( de, text ); +	    if ( text == TQString::number( (long)this ) ) {  		int newIndex = 0;  		for ( ; newIndex < tabBar()->count(); newIndex++ ) { @@ -260,7 +260,7 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )  		}  		if ( newIndex == tabBar()->count() -1 ) { -		    QRect rect2 = tabBar()->tabAt( newIndex )->rect(); +		    TQRect rect2 = tabBar()->tabAt( newIndex )->rect();  		    rect2.setLeft( rect2.left() + rect2.width() / 2 );  		    if ( rect2.contains( de->pos() ) )  			newIndex++; @@ -290,19 +290,19 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e )  } -QDesignerWidgetStack::QDesignerWidgetStack( QWidget *parent, const char *name ) -    : QWidgetStack( parent, name ) +QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name ) +    : TQWidgetStack( parent, name )  { -    prev = new QToolButton( Qt::LeftArrow, this, "designer_wizardstack_button" ); +    prev = new TQToolButton( Qt::LeftArrow, this, "designer_wizardstack_button" );      prev->setAutoRaise( TRUE );      prev->setAutoRepeat( TRUE ); -    prev->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ) ); -    next = new QToolButton( Qt::RightArrow, this, "designer_wizardstack_button" ); +    prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); +    next = new TQToolButton( Qt::RightArrow, this, "designer_wizardstack_button" );      next->setAutoRaise( TRUE );      next->setAutoRepeat( TRUE ); -    next->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ) ); -    connect( prev, SIGNAL( clicked() ), this, SLOT( prevPage() ) ); -    connect( next, SIGNAL( clicked() ), this, SLOT( nextPage() ) ); +    next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); +    connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) ); +    connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) );      updateButtons();  } @@ -346,14 +346,14 @@ void QDesignerWidgetStack::setCurrentPage( int i )      updateButtons();  } -QCString QDesignerWidgetStack::pageName() const +TQCString QDesignerWidgetStack::pageName() const  {      if ( !visibleWidget() )  	return 0;      return visibleWidget()->name();  } -void QDesignerWidgetStack::setPageName( const QCString& name ) +void QDesignerWidgetStack::setPageName( const TQCString& name )  {      if ( visibleWidget() )  	visibleWidget()->setName( name ); @@ -364,7 +364,7 @@ int QDesignerWidgetStack::count() const      return pages.count();  } -QWidget* QDesignerWidgetStack::page( int i ) const +TQWidget* QDesignerWidgetStack::page( int i ) const  {      if ( i < 0 || i >= count() )  	return 0; @@ -373,7 +373,7 @@ QWidget* QDesignerWidgetStack::page( int i ) const  } -int QDesignerWidgetStack::insertPage( QWidget *p, int i ) +int QDesignerWidgetStack::insertPage( TQWidget *p, int i )  {      if ( i < 0 )  	pages.append( p ); @@ -382,12 +382,12 @@ int QDesignerWidgetStack::insertPage( QWidget *p, int i )      addWidget( p );      p->show();      raiseWidget( p ); -    QApplication::sendPostedEvents(); +    TQApplication::sendPostedEvents();      updateButtons();      return pages.find( p );  } -int QDesignerWidgetStack::removePage( QWidget *p ) +int QDesignerWidgetStack::removePage( TQWidget *p )  {      int i = pages.find( p );      pages.remove( p ); @@ -429,30 +429,30 @@ void QDesignerWizard::setCurrentPage( int i )      }  } -QString QDesignerWizard::pageTitle() const +TQString QDesignerWizard::pageTitle() const  {      return title( currentPage() );  } -void QDesignerWizard::setPageTitle( const QString& title ) +void QDesignerWizard::setPageTitle( const TQString& title )  {      setTitle( currentPage(), title );  } -void QDesignerWizard::setPageName( const QCString& name ) +void QDesignerWizard::setPageName( const TQCString& name )  { -    if ( QWizard::currentPage() ) -	QWizard::currentPage()->setName( name ); +    if ( TQWizard::currentPage() ) +	TQWizard::currentPage()->setName( name );  } -QCString QDesignerWizard::pageName() const +TQCString QDesignerWizard::pageName() const  { -    if ( !QWizard::currentPage() ) +    if ( !TQWizard::currentPage() )  	return 0; -    return QWizard::currentPage()->name(); +    return TQWizard::currentPage()->name();  } -int QDesignerWizard::pageNum( QWidget *p ) +int QDesignerWizard::pageNum( TQWidget *p )  {      for ( int i = 0; i < pageCount(); ++i ) {  	if ( page( i ) == p ) @@ -461,28 +461,28 @@ int QDesignerWizard::pageNum( QWidget *p )      return -1;  } -void QDesignerWizard::addPage( QWidget *p, const QString &t ) +void QDesignerWizard::addPage( TQWidget *p, const TQString &t )  { -    QWizard::addPage( p, t ); +    TQWizard::addPage( p, t );      if ( removedPages.find( p ) )  	removedPages.remove( p );  } -void QDesignerWizard::removePage( QWidget *p ) +void QDesignerWizard::removePage( TQWidget *p )  { -    QWizard::removePage( p ); +    TQWizard::removePage( p );      removedPages.insert( p, p );  } -void QDesignerWizard::insertPage( QWidget *p, const QString &t, int index ) +void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )  { -    QWizard::insertPage( p, t, index ); +    TQWizard::insertPage( p, t, index );      if ( removedPages.find( p ) )  	removedPages.remove( p );  } -QMap< int, QMap< QString, QVariant> > *defaultProperties = 0; -QMap< int, QStringList > *changedProperties = 0; +TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = 0; +TQMap< int, TQStringList > *changedProperties = 0;  /*!    \class WidgetFactory widgetfactory.h @@ -495,24 +495,24 @@ QMap< int, QStringList > *changedProperties = 0;  */ -void WidgetFactory::saveDefaultProperties( QObject *w, int id ) +void WidgetFactory::saveDefaultProperties( TQObject *w, int id )  { -    QMap< QString, QVariant> propMap; -    QStrList lst = w->metaObject()->propertyNames( TRUE ); +    TQMap< TQString, TQVariant> propMap; +    TQStrList lst = w->metaObject()->propertyNames( TRUE );      for ( uint i = 0; i < lst.count(); ++i ) { -	QVariant var = w->property( lst.at( i ) ); +	TQVariant var = w->property( lst.at( i ) );  	if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 ) -	    var = QVariant( QPixmap() ); +	    var = TQVariant( TQPixmap() );  	else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 ) -	    var = QVariant( QIconSet() ); +	    var = TQVariant( TQIconSet() );  	propMap.replace( lst.at( i ), var );      }      defaultProperties->replace( id, propMap );  } -void WidgetFactory::saveChangedProperties( QObject *w, int id ) +void WidgetFactory::saveChangedProperties( TQObject *w, int id )  { -    QStringList l = MetaDataBase::changedProperties( w ); +    TQStringList l = MetaDataBase::changedProperties( w );      changedProperties->insert( id, l );  } @@ -522,23 +522,23 @@ void WidgetFactory::saveChangedProperties( QObject *w, int id )    created.  */ -QWidget *WidgetFactory::create( int id, QWidget *parent, const char *name, bool init, const QRect *r, Qt::Orientation orient ) +TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient )  { -    QString n = WidgetDatabase::className( id ); +    TQString n = WidgetDatabase::className( id );      if ( n.isEmpty() )  	return 0;      if ( !defaultProperties ) { -	defaultProperties = new QMap< int, QMap< QString, QVariant> >(); -	changedProperties = new QMap< int, QStringList >(); +	defaultProperties = new TQMap< int, TQMap< TQString, TQVariant> >(); +	changedProperties = new TQMap< int, TQStringList >();      } -    QWidget *w = 0; -    QString str = WidgetDatabase::createWidgetName( id ); +    TQWidget *w = 0; +    TQString str = WidgetDatabase::createWidgetName( id );      const char *s = str.latin1();      w = createWidget( n, parent, name ? name : s, init, r, orient ); -    if ( ::qt_cast<QScrollView*>(w) ) -	( (QScrollView*)w )->disableSizeHintCaching(); +    if ( ::qt_cast<TQScrollView*>(w) ) +	( (TQScrollView*)w )->disableSizeHintCaching();      if ( !w && WidgetDatabase::isCustomWidget( id ) )  	w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) );      if ( !w ) @@ -557,7 +557,7 @@ QWidget *WidgetFactory::create( int id, QWidget *parent, const char *name, bool    which can be \c HBox, \c VBox or \c Grid.  */ -QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutType type ) +TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type )  {      int spacing = MainWindow::self->currentLayoutDefaultSpacing();      int margin = 0; @@ -570,37 +570,37 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy  	   widget && ::qt_cast<FormWindow*>(widget->parentWidget()) ) )  	margin = MainWindow::self->currentLayoutDefaultMargin(); -    if ( !layout && ::qt_cast<QTabWidget*>(widget) ) -	widget = ((QTabWidget*)widget)->currentPage(); +    if ( !layout && ::qt_cast<TQTabWidget*>(widget) ) +	widget = ((TQTabWidget*)widget)->currentPage(); -    if ( !layout && ::qt_cast<QWizard*>(widget) ) -	widget = ((QWizard*)widget)->currentPage(); +    if ( !layout && ::qt_cast<TQWizard*>(widget) ) +	widget = ((TQWizard*)widget)->currentPage(); -    if ( !layout && ::qt_cast<QMainWindow*>(widget) ) -	widget = ((QMainWindow*)widget)->centralWidget(); +    if ( !layout && ::qt_cast<TQMainWindow*>(widget) ) +	widget = ((TQMainWindow*)widget)->centralWidget(); -    if ( !layout && ::qt_cast<QWidgetStack*>(widget) ) -	widget = ((QWidgetStack*)widget)->visibleWidget(); +    if ( !layout && ::qt_cast<TQWidgetStack*>(widget) ) +	widget = ((TQWidgetStack*)widget)->visibleWidget(); -    if ( !layout && ::qt_cast<QToolBox*>(widget) ) -	widget = ((QToolBox*)widget)->currentItem(); +    if ( !layout && ::qt_cast<TQToolBox*>(widget) ) +	widget = ((TQToolBox*)widget)->currentItem();      MetaDataBase::addEntry( widget ); -    QLayout *l = 0; +    TQLayout *l = 0;      int align = 0; -    if ( !layout && ::qt_cast<QGroupBox*>(widget) ) { -	QGroupBox *gb = (QGroupBox*)widget; +    if ( !layout && ::qt_cast<TQGroupBox*>(widget) ) { +	TQGroupBox *gb = (TQGroupBox*)widget;  	gb->setColumnLayout( 0, Qt::Vertical );  	layout = gb->layout();  	layout->setMargin( 0 );  	layout->setSpacing( 0 );  	switch ( type ) {  	case HBox: -	    l = new QHBoxLayout( layout ); +	    l = new TQHBoxLayout( layout );  	    break;  	case VBox: -	    l = new QVBoxLayout( layout ); +	    l = new TQVBoxLayout( layout );  	    break;  	case Grid:  	    l = new QDesignerGridLayout( layout ); @@ -615,10 +615,10 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy  	if ( layout ) {  	    switch ( type ) {  	    case HBox: -		l = new QHBoxLayout( layout ); +		l = new TQHBoxLayout( layout );  		break;  	    case VBox: -		l = new QVBoxLayout( layout ); +		l = new TQVBoxLayout( layout );  		break;  	    case Grid:  		l = new QDesignerGridLayout( layout ); @@ -632,10 +632,10 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy  	} else {  	    switch ( type ) {  	    case HBox: -		l = new QHBoxLayout( widget ); +		l = new TQHBoxLayout( widget );  		break;  	    case VBox: -		l = new QVBoxLayout( widget ); +		l = new TQVBoxLayout( widget );  		break;  	    case Grid:  		l = new QDesignerGridLayout( widget ); @@ -658,21 +658,21 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy      return l;  } -void WidgetFactory::deleteLayout( QWidget *widget ) +void WidgetFactory::deleteLayout( TQWidget *widget )  {      if ( !widget )  	return; -    if ( ::qt_cast<QTabWidget*>(widget) ) -	widget = ((QTabWidget*)widget)->currentPage(); -    if ( ::qt_cast<QWizard*>(widget) ) -	widget = ((QWizard*)widget)->currentPage(); -    if ( ::qt_cast<QMainWindow*>(widget) ) -	widget = ((QMainWindow*)widget)->centralWidget(); -    if ( ::qt_cast<QWidgetStack*>(widget) ) -	widget = ((QWidgetStack*)widget)->visibleWidget(); -    if ( ::qt_cast<QToolBox*>(widget) ) -	widget = ((QToolBox*)widget)->currentItem(); +    if ( ::qt_cast<TQTabWidget*>(widget) ) +	widget = ((TQTabWidget*)widget)->currentPage(); +    if ( ::qt_cast<TQWizard*>(widget) ) +	widget = ((TQWizard*)widget)->currentPage(); +    if ( ::qt_cast<TQMainWindow*>(widget) ) +	widget = ((TQMainWindow*)widget)->centralWidget(); +    if ( ::qt_cast<TQWidgetStack*>(widget) ) +	widget = ((TQWidgetStack*)widget)->visibleWidget(); +    if ( ::qt_cast<TQToolBox*>(widget) ) +	widget = ((TQToolBox*)widget)->currentItem();      delete widget->layout();  } @@ -683,76 +683,76 @@ void WidgetFactory::deleteLayout( QWidget *widget )    has to be in sync with the initChangedProperties() function!  */ -QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, const char *name, bool init, -				      const QRect *r, Qt::Orientation orient ) +TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, +				      const TQRect *r, Qt::Orientation orient )  { -    if ( className == "QPushButton" ) { -	QPushButton *b = 0; +    if ( className == "TQPushButton" ) { +	TQPushButton *b = 0;  	if ( init ) {  	    b = new QDesignerPushButton( parent, name ); -	    b->setText( QString::fromLatin1( name ) ); +	    b->setText( TQString::fromLatin1( name ) );  	} else {  	    b = new QDesignerPushButton( parent, name );  	} -	QWidget *w = find_formwindow( b ); -	b->setAutoDefault( w && ::qt_cast<QDialog*>(((FormWindow*)w)->mainContainer()) ); +	TQWidget *w = find_formwindow( b ); +	b->setAutoDefault( w && ::qt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) );  	return b; -    } else if ( className == "QToolButton" ) { +    } else if ( className == "TQToolButton" ) {  	if ( init ) {  	    QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); -	    if ( ::qt_cast<QToolBox*>(widgetOfContainer(parent))) { +	    if ( ::qt_cast<TQToolBox*>(widgetOfContainer(parent))) {  		tb->setUsesTextLabel(TRUE);  		tb->setTextLabel("...");  		tb->setAutoRaise(TRUE); -		tb->setTextPosition(QToolButton::BesideIcon); +		tb->setTextPosition(TQToolButton::BesideIcon);  	    } else {  		tb->setText( "..." );  	    }  	    return tb;  	}  	return new QDesignerToolButton( parent, name ); -    } else if ( className == "QCheckBox" ) { +    } else if ( className == "TQCheckBox" ) {  	if ( init ) {  	    QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); -	    cb->setText( QString::fromLatin1( name ) ); +	    cb->setText( TQString::fromLatin1( name ) );  	    return cb;  	}  	return new QDesignerCheckBox( parent, name ); -    } else if ( className == "QRadioButton" ) { +    } else if ( className == "TQRadioButton" ) {  	if ( init ) {  	    QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); -	    rb->setText( QString::fromLatin1( name ) ); +	    rb->setText( TQString::fromLatin1( name ) );  	    return rb;  	}  	return new QDesignerRadioButton( parent, name ); -    } else if ( className == "QGroupBox" ) { +    } else if ( className == "TQGroupBox" ) {  	if ( init ) -	    return new QGroupBox( QString::fromLatin1( name ), parent, name ); -	return new QGroupBox( parent, name ); -    } else if ( className == "QButtonGroup" ) { +	    return new TQGroupBox( TQString::fromLatin1( name ), parent, name ); +	return new TQGroupBox( parent, name ); +    } else if ( className == "TQButtonGroup" ) {  	if ( init ) -	    return new QButtonGroup( QString::fromLatin1( name ), parent, name ); -	return new QButtonGroup( parent, name ); -    } else if ( className == "QIconView" ) { +	    return new TQButtonGroup( TQString::fromLatin1( name ), parent, name ); +	return new TQButtonGroup( parent, name ); +    } else if ( className == "TQIconView" ) {  #if !defined(QT_NO_ICONVIEW) -	QIconView* iv = new QIconView( parent, name ); +	TQIconView* iv = new TQIconView( parent, name );  	if ( init ) -	    (void) new QIconViewItem( iv, i18n( "New Item" ) ); +	    (void) new TQIconViewItem( iv, i18n( "New Item" ) );  	return iv;  #else  	return 0;  #endif -    } else if ( className == "QTable" ) { +    } else if ( className == "TQTable" ) {  #if !defined(QT_NO_TABLE)  	if ( init ) -	    return new QTable( 3, 3, parent, name ); -	return new QTable( parent, name ); +	    return new TQTable( 3, 3, parent, name ); +	return new TQTable( parent, name );  #else  	return 0;  #endif  #ifndef QT_NO_SQL -    } else if ( className == "QDataTable" ) { -	return new QDataTable( parent, name ); +    } else if ( className == "TQDataTable" ) { +	return new TQDataTable( parent, name );  #endif //QT_NO_SQL      } else if ( className == "QDateEdit" ) {  	return new QDateEdit( parent, name ); @@ -761,35 +761,35 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,      } else if ( className == "QDateTimeEdit" ) {  	return new QDateTimeEdit( parent, name );      } -    else if ( className == "QListBox" ) { -	QListBox* lb = new QListBox( parent, name ); +    else if ( className == "TQListBox" ) { +	TQListBox* lb = new TQListBox( parent, name );  	if ( init ) {  	    lb->insertItem( i18n( "New Item" ) );  	    lb->setCurrentItem( 0 );  	}  	return lb; -    } else if ( className == "QListView" ) { -	QListView *lv = new QListView( parent, name ); +    } else if ( className == "TQListView" ) { +	TQListView *lv = new TQListView( parent, name );  	lv->setSorting( -1 );  	if ( init ) {  	    lv->addColumn( i18n( "Column 1" ) ); -	    lv->setCurrentItem( new QListViewItem( lv, i18n( "New Item" ) ) ); +	    lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) );  	}  	return lv; -    } else if ( className == "QLineEdit" ) -	return new QLineEdit( parent, name ); -    else if ( className == "QSpinBox" ) -	return new QSpinBox( parent, name ); -    else if ( className == "QSplitter" ) -	return new QSplitter( parent, name ); -    else if ( className == "QMultiLineEdit" ) -	return new QMultiLineEdit( parent, name ); -    else if ( className == "QTextEdit" ) -	return new QTextEdit( parent, name ); -    else if ( className == "QLabel"  || className == "TextLabel" ) { +    } else if ( className == "TQLineEdit" ) +	return new TQLineEdit( parent, name ); +    else if ( className == "TQSpinBox" ) +	return new TQSpinBox( parent, name ); +    else if ( className == "TQSplitter" ) +	return new TQSplitter( parent, name ); +    else if ( className == "TQMultiLineEdit" ) +	return new TQMultiLineEdit( parent, name ); +    else if ( className == "TQTextEdit" ) +	return new TQTextEdit( parent, name ); +    else if ( className == "TQLabel"  || className == "TextLabel" ) {  	QDesignerLabel *l = new QDesignerLabel( parent, name );  	if ( init ) { -	    l->setText( QString::fromLatin1( name ) ); +	    l->setText( TQString::fromLatin1( name ) );  	    MetaDataBase::addEntry( l );  	    MetaDataBase::setPropertyChanged( l, "text", TRUE );  	} @@ -806,39 +806,39 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,  	return l;      } else if ( className == "QLayoutWidget" )  	return new QLayoutWidget( parent, name ); -    else if ( className == "QTabWidget" ) { -	QTabWidget *tw = new QDesignerTabWidget( parent, name ); +    else if ( className == "TQTabWidget" ) { +	TQTabWidget *tw = new QDesignerTabWidget( parent, name );  	if ( init ) {  	    FormWindow *fw = find_formwindow( parent ); -	    QWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new QWidget( tw, "tab" ); +	    TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" );  	    tw->addTab( w, i18n("Tab 1") );  	    MetaDataBase::addEntry( w ); -	    w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new QWidget( tw, "tab" ); +	    w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" );  	    tw->addTab( w, i18n("Tab 2") );  	    MetaDataBase::addEntry( tw );  	    MetaDataBase::addEntry( w );  	}  	return tw; -    } else if ( className == "QWidgetStack" ) { +    } else if ( className == "TQWidgetStack" ) {  	QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name );  	if ( init ) {  	    FormWindow *fw = find_formwindow( parent ); -	    QWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new QWidget( ws, "WStackPage" ); +	    TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" );  	    ws->insertPage( w );  	    MetaDataBase::addEntry( w );  	    MetaDataBase::addEntry( ws );  	}  	return ws; -    } else if ( className == "QComboBox" ) { -	return new QComboBox( FALSE, parent, name ); -    } else if ( className == "QWidget" ) { +    } else if ( className == "TQComboBox" ) { +	return new TQComboBox( FALSE, parent, name ); +    } else if ( className == "TQWidget" ) {  	if ( parent &&  	     ( ::qt_cast<FormWindow*>(parent) || -	       ::qt_cast<QWizard*>(parent) || -	       ::qt_cast<QTabWidget*>(parent) || -	       ::qt_cast<QWidgetStack*>(parent) || -	       ::qt_cast<QToolBox*>(parent) || -	       ::qt_cast<QMainWindow*>(parent) ) ) { +	       ::qt_cast<TQWizard*>(parent) || +	       ::qt_cast<TQTabWidget*>(parent) || +	       ::qt_cast<TQWidgetStack*>(parent) || +	       ::qt_cast<TQToolBox*>(parent) || +	       ::qt_cast<TQMainWindow*>(parent) ) ) {  	    FormWindow *fw = find_formwindow( parent );  	    if ( fw ) {  		QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); @@ -846,33 +846,33 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,  		return dw;  	    }  	} -	return new QWidget( parent, name ); -    } else if ( className == "QDialog" ) { -	QDialog *dia = 0; +	return new TQWidget( parent, name ); +    } else if ( className == "TQDialog" ) { +	TQDialog *dia = 0;  	if ( ::qt_cast<FormWindow*>(parent) )  	    dia = new QDesignerDialog( (FormWindow*)parent, parent, name );  	else -	    dia = new QDialog( parent, name ); +	    dia = new TQDialog( parent, name );  #if defined(QT_NON_COMMERCIAL)  	if ( ::qt_cast<MainWindow*>(parent) )  #else  	if ( parent )  #endif -	    dia->reparent( parent, QPoint( 0, 0 ), TRUE ); +	    dia->reparent( parent, TQPoint( 0, 0 ), TRUE );  	return dia; -    } else if ( className == "QWizard" ) { -	QWizard *wiz = new QDesignerWizard( parent, name ); +    } else if ( className == "TQWizard" ) { +	TQWizard *wiz = new QDesignerWizard( parent, name );  #if defined(QT_NON_COMMERCIAL)  	if ( ::qt_cast<MainWindow*>(parent) )  #else  	if ( parent )  #endif -	    wiz->reparent( parent, QPoint( 0, 0 ), TRUE ); +	    wiz->reparent( parent, TQPoint( 0, 0 ), TRUE );  	if ( init && ::qt_cast<FormWindow*>(parent) ) {  	    QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" );  	    MetaDataBase::addEntry( dw );  	    wiz->addPage( dw, i18n( "Page" ) ); -	    QTimer::singleShot( 0, wiz, SLOT( next() ) ); +	    TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) );  	}  	return wiz;      } else if ( className == "Spacer" ) { @@ -889,18 +889,18 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,  	else  	    s->setOrientation( Qt::Horizontal );  	return s; -    } else if ( className == "QLCDNumber" ) -	return new QLCDNumber( parent, name ); -    else if ( className == "QProgressBar" ) -	return new QProgressBar( parent, name ); -    else if ( className == "QTextView" ) -	return new QTextView( parent, name ); -    else if ( className == "QTextBrowser" ) -	return new QTextBrowser( parent, name ); -    else if ( className == "QDial" ) -	return new QDial( parent, name ); -    else if ( className == "QSlider" ) { -	QSlider *s = new QSlider( parent, name ); +    } else if ( className == "TQLCDNumber" ) +	return new TQLCDNumber( parent, name ); +    else if ( className == "TQProgressBar" ) +	return new TQProgressBar( parent, name ); +    else if ( className == "TQTextView" ) +	return new TQTextView( parent, name ); +    else if ( className == "TQTextBrowser" ) +	return new TQTextBrowser( parent, name ); +    else if ( className == "TQDial" ) +	return new TQDial( parent, name ); +    else if ( className == "TQSlider" ) { +	TQSlider *s = new TQSlider( parent, name );  	if ( !r )  	    return s;  	if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) @@ -910,8 +910,8 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,  	MetaDataBase::addEntry( s );  	MetaDataBase::setPropertyChanged( s, "orientation", TRUE );  	return s; -    } else if ( className == "QScrollBar" ) { -	QScrollBar *s = new QScrollBar( parent, name ); +    } else if ( className == "TQScrollBar" ) { +	TQScrollBar *s = new TQScrollBar( parent, name );  	if ( !r )  	    return s;  	if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) @@ -921,11 +921,11 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,  	MetaDataBase::addEntry( s );  	MetaDataBase::setPropertyChanged( s, "orientation", TRUE );  	return s; -    } else if ( className == "QFrame" ) { +    } else if ( className == "TQFrame" ) {  	if ( !init ) -	    return new QFrame( parent, name ); -	QFrame *f = new QFrame( parent, name ); -	f->setFrameStyle( QFrame::StyledPanel | QFrame::Raised ); +	    return new TQFrame( parent, name ); +	TQFrame *f = new TQFrame( parent, name ); +	f->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised );  	return f;      } else if ( className == "Line" ) {  	Line *l = new Line( parent, name ); @@ -940,8 +940,8 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,  	else if ( r->width() < r->height() )  	    l->setOrientation( Qt::Vertical );  	return l; -    } else if ( className == "QMainWindow" ) { -	QMainWindow *mw = new QMainWindow( parent, name, 0 ); +    } else if ( className == "TQMainWindow" ) { +	TQMainWindow *mw = new TQMainWindow( parent, name, 0 );  	mw->setDockEnabled( Qt::DockMinimized, FALSE );  	QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" );  	mw->setDockMenuEnabled( FALSE ); @@ -950,31 +950,31 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,  	(void)mw->statusBar();  	dw->show();  	return mw; -    } else if ( className == "QToolBox" ) { +    } else if ( className == "TQToolBox" ) {  	if ( !init )  	    return new QDesignerToolBox( parent, name ); -	QToolBox *tb = new QDesignerToolBox( parent, name ); +	TQToolBox *tb = new QDesignerToolBox( parent, name );  	FormWindow *fw = find_formwindow( parent ); -	QWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : -		     new QWidget( tb, "page1" ); +	TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : +		     new TQWidget( tb, "page1" );  	tb->addItem( w, i18n("Page 1") );  	MetaDataBase::addEntry( w ); -	w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new QWidget( tb, "page2" ); +	w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" );  	tb->addItem( w, i18n("Page 2") );  	MetaDataBase::addEntry( tb );  	MetaDataBase::addEntry( w );  	return tb;      }  #ifndef QT_NO_SQL -    else if ( className == "QDataBrowser" ) { -	QWidget *w = new QDesignerDataBrowser( parent, name ); +    else if ( className == "TQDataBrowser" ) { +	TQWidget *w = new QDesignerDataBrowser( parent, name );  	if ( parent ) -	    w->reparent( parent, QPoint( 0, 0 ), TRUE ); +	    w->reparent( parent, TQPoint( 0, 0 ), TRUE );  	return w; -    } else if ( className == "QDataView" ) { -	QWidget *w = new QDesignerDataView( parent, name ); +    } else if ( className == "TQDataView" ) { +	TQWidget *w = new QDesignerDataView( parent, name );  	if ( parent ) -	    w->reparent( parent, QPoint( 0, 0 ), TRUE ); +	    w->reparent( parent, TQPoint( 0, 0 ), TRUE );  	return w;      }  #endif @@ -984,7 +984,7 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,      if ( !iface )  	return 0; -    QWidget *w = iface->create( className, parent, name ); +    TQWidget *w = iface->create( className, parent, name );  #ifdef QT_CONTAINER_CUSTOM_WIDGETS      if ( init && WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( className ) ) ) {  	QWidgetContainerInterfacePrivate *iface2 = 0; @@ -1003,44 +1003,44 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent,  /*!  Find out which type the layout of the widget is. Returns \c HBox,    \c VBox, \c Grid or \c NoLayout.  \a layout points to this -  QWidget::layout() of \a w or to 0 after the function call. +  TQWidget::layout() of \a w or to 0 after the function call.  */ -WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w, QLayout *&layout ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout )  {      layout = 0; -    if ( ::qt_cast<QTabWidget*>(w) ) -	w = ((QTabWidget*)w)->currentPage(); -    if ( ::qt_cast<QWizard*>(w) ) -	w = ((QWizard*)w)->currentPage(); -    if ( ::qt_cast<QMainWindow*>(w) ) -	w = ((QMainWindow*)w)->centralWidget(); -    if ( ::qt_cast<QWidgetStack*>(w) ) -	w = ((QWidgetStack*)w)->visibleWidget(); -    if ( ::qt_cast<QToolBox*>(w) ) -	w = ((QToolBox*)w)->currentItem(); +    if ( ::qt_cast<TQTabWidget*>(w) ) +	w = ((TQTabWidget*)w)->currentPage(); +    if ( ::qt_cast<TQWizard*>(w) ) +	w = ((TQWizard*)w)->currentPage(); +    if ( ::qt_cast<TQMainWindow*>(w) ) +	w = ((TQMainWindow*)w)->centralWidget(); +    if ( ::qt_cast<TQWidgetStack*>(w) ) +	w = ((TQWidgetStack*)w)->visibleWidget(); +    if ( ::qt_cast<TQToolBox*>(w) ) +	w = ((TQToolBox*)w)->currentItem(); -    if ( ::qt_cast<QSplitter*>(w) ) -	return ( (QSplitter*)w )->orientation() == Horizontal ? HBox : VBox; +    if ( ::qt_cast<TQSplitter*>(w) ) +	return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox;      if ( !w || !w->layout() )  	return NoLayout; -    QLayout *lay = w->layout(); +    TQLayout *lay = w->layout(); -    if ( ::qt_cast<QGroupBox*>(w) ) { -	QObjectList *l = lay->queryList( "QLayout" ); +    if ( ::qt_cast<TQGroupBox*>(w) ) { +	TQObjectList *l = lay->queryList( "TQLayout" );  	if ( l && l->first() ) -	    lay = (QLayout*)l->first(); +	    lay = (TQLayout*)l->first();  	delete l;      }      layout = lay; -    if ( ::qt_cast<QHBoxLayout*>(lay) ) +    if ( ::qt_cast<TQHBoxLayout*>(lay) )  	return HBox; -    else if ( ::qt_cast<QVBoxLayout*>(lay) ) +    else if ( ::qt_cast<TQVBoxLayout*>(lay) )  	return VBox; -    else if ( ::qt_cast<QGridLayout*>(lay) ) +    else if ( ::qt_cast<TQGridLayout*>(lay) )  	return Grid;      return NoLayout;  } @@ -1048,13 +1048,13 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w, QLayout *&layou  /*!    \overload  */ -WidgetFactory::LayoutType WidgetFactory::layoutType( QLayout *layout ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )  { -    if ( ::qt_cast<QHBoxLayout*>(layout) ) +    if ( ::qt_cast<TQHBoxLayout*>(layout) )  	return HBox; -    else if ( ::qt_cast<QVBoxLayout*>(layout) ) +    else if ( ::qt_cast<TQVBoxLayout*>(layout) )  	return VBox; -    else if ( ::qt_cast<QGridLayout*>(layout) ) +    else if ( ::qt_cast<TQGridLayout*>(layout) )  	return Grid;      return NoLayout;  } @@ -1062,19 +1062,19 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( QLayout *layout )  /*!    \overload  */ -WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w )  { -    QLayout *l = 0; +    TQLayout *l = 0;      return layoutType( w, l );  } -QWidget *WidgetFactory::layoutParent( QLayout *layout ) +TQWidget *WidgetFactory::layoutParent( TQLayout *layout )  { -    QObject *o = layout; +    TQObject *o = layout;      while ( o ) {  	if ( o->isWidgetType() ) -	    return (QWidget*)o; +	    return (TQWidget*)o;  	o = o->parent();      }      return 0; @@ -1089,20 +1089,20 @@ QWidget *WidgetFactory::layoutParent( QLayout *layout )    tabwidget. So in this case this function returns the current page of    the tabwidget.)   */ -QWidget* WidgetFactory::containerOfWidget( QWidget *w ) +TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )  {      if ( !w )  	return w; -    if ( ::qt_cast<QTabWidget*>(w) ) -	return ((QTabWidget*)w)->currentPage(); -    if ( ::qt_cast<QWizard*>(w) ) -	return ((QWizard*)w)->currentPage(); -    if ( ::qt_cast<QWidgetStack*>(w) ) -	return ((QWidgetStack*)w)->visibleWidget(); -    if ( ::qt_cast<QToolBox*>(w) ) -	return ((QToolBox*)w)->currentItem(); -    if ( ::qt_cast<QMainWindow*>(w) ) -	return ((QMainWindow*)w)->centralWidget(); +    if ( ::qt_cast<TQTabWidget*>(w) ) +	return ((TQTabWidget*)w)->currentPage(); +    if ( ::qt_cast<TQWizard*>(w) ) +	return ((TQWizard*)w)->currentPage(); +    if ( ::qt_cast<TQWidgetStack*>(w) ) +	return ((TQWidgetStack*)w)->visibleWidget(); +    if ( ::qt_cast<TQToolBox*>(w) ) +	return ((TQToolBox*)w)->currentItem(); +    if ( ::qt_cast<TQMainWindow*>(w) ) +	return ((TQMainWindow*)w)->centralWidget();  #ifdef QT_CONTAINER_CUSTOM_WIDGETS      if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) )  	return w; @@ -1114,7 +1114,7 @@ QWidget* WidgetFactory::containerOfWidget( QWidget *w )      iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 );      if ( !iface2 )  	return w; -    QWidget *c = iface2->containerOfWidget( w->className(), w ); +    TQWidget *c = iface2->containerOfWidget( w->className(), w );      iface2->release();      iface->release();      if ( c ) @@ -1131,13 +1131,13 @@ QWidget* WidgetFactory::containerOfWidget( QWidget *w )    function returns the tabwidget then.)  */ -QWidget* WidgetFactory::widgetOfContainer( QWidget *w ) +TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )  { -    if ( w && ::qt_cast<QWidgetStack*>(w->parentWidget()) ) +    if ( w && ::qt_cast<TQWidgetStack*>(w->parentWidget()) )  	w = w->parentWidget();      if ( w->parentWidget() && w->parentWidget()->parentWidget() &&  	 w->parentWidget()->parentWidget()->parentWidget() && -	 ::qt_cast<QToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) ) +	 ::qt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) )  	return w->parentWidget()->parentWidget()->parentWidget();      while ( w ) {  	int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ); @@ -1154,27 +1154,27 @@ QWidget* WidgetFactory::widgetOfContainer( QWidget *w )   */  bool WidgetFactory::lastWasAPassiveInteractor = FALSE; -QGuardedPtr<QObject> *WidgetFactory::lastPassiveInteractor = new QGuardedPtr<QObject>(); +TQGuardedPtr<TQObject> *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr<TQObject>(); -bool WidgetFactory::isPassiveInteractor( QObject* o ) +bool WidgetFactory::isPassiveInteractor( TQObject* o )  { -    if ( lastPassiveInteractor && *lastPassiveInteractor && (QObject*)(*lastPassiveInteractor) == o ) +    if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o )  	return lastWasAPassiveInteractor;      lastWasAPassiveInteractor = FALSE;      (*lastPassiveInteractor) = o; -    if ( QApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things +    if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things  	return ( lastWasAPassiveInteractor = TRUE ); -    if ( ::qt_cast<QTabBar*>(o) ) +    if ( ::qt_cast<TQTabBar*>(o) )  	return ( lastWasAPassiveInteractor = TRUE ); -    else if ( ::qt_cast<QSizeGrip*>(o) ) +    else if ( ::qt_cast<TQSizeGrip*>(o) )  	return ( lastWasAPassiveInteractor = TRUE ); -    else if ( ::qt_cast<QButton*>(o) && -	      ( ::qt_cast<QTabBar*>(o->parent()) || ::qt_cast<QToolBox*>(o->parent()) ) ) +    else if ( ::qt_cast<TQButton*>(o) && +	      ( ::qt_cast<TQTabBar*>(o->parent()) || ::qt_cast<TQToolBox*>(o->parent()) ) )  	return ( lastWasAPassiveInteractor = TRUE ); -    else if ( ::qt_cast<QPushButton*>(o) && ::qt_cast<QWizard*>(o->parent()) ) +    else if ( ::qt_cast<TQPushButton*>(o) && ::qt_cast<TQWizard*>(o->parent()) )  	return ( lastWasAPassiveInteractor = TRUE ); -    else if ( ::qt_cast<QMenuBar*>(o) && ::qt_cast<QMainWindow*>(o->parent()) ) +    else if ( ::qt_cast<TQMenuBar*>(o) && ::qt_cast<TQMainWindow*>(o->parent()) )  	return ( lastWasAPassiveInteractor = TRUE );  //    else if ( ::qt_cast<QDockWindowHandle*>(o) )      else if ( o->inherits( "QDockWindowHandle" ) ) @@ -1188,7 +1188,7 @@ bool WidgetFactory::isPassiveInteractor( QObject* o )      if ( !o->isWidgetType() )  	return ( lastWasAPassiveInteractor = FALSE );      WidgetInterface *iface = 0; -    QWidget *w = (QWidget*)o; +    TQWidget *w = (TQWidget*)o;      while ( !iface && w && !::qt_cast<FormWindow*>(w) ) {  	widgetManager()->queryInterface( classNameOf( w ), &iface );  	w = w->parentWidget(); @@ -1199,13 +1199,13 @@ bool WidgetFactory::isPassiveInteractor( QObject* o )      iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 );      if ( !iface2 )  	return ( lastWasAPassiveInteractor = FALSE ); -    QWidget *fw = MainWindow::self->isAFormWindowChild( (QWidget*)o ); +    TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o );      if ( !fw )  	return ( lastWasAPassiveInteractor = FALSE ); -    QWidget *dw = ( (FormWindow*)fw )->designerWidget( (QWidget*)o ); +    TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o );      if ( !dw )  	return ( lastWasAPassiveInteractor = FALSE ); -    lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (QWidget*)o ); +    lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o );      iface2->release();      iface->release();  #endif // QT_CONTAINER_CUSTOM_WIDGETS @@ -1216,84 +1216,84 @@ bool WidgetFactory::isPassiveInteractor( QObject* o )  /*!    Returns the class name of object \a o that should be used for externally (i.e. for saving)   */ -const char* WidgetFactory::classNameOf( QObject* o ) +const char* WidgetFactory::classNameOf( TQObject* o )  {      if ( o->isA( "PropertyObject" ) )  	return o->className();      if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className())))          return o->className();      else if ( ::qt_cast<QDesignerTabWidget*>(o) ) -	return "QTabWidget"; +	return "TQTabWidget";      else if ( ::qt_cast<QDesignerWidgetStack*>(o) ) -	return "QWidgetStack"; -    else if ( ::qt_cast<QWidgetStack*>(o) ) +	return "TQWidgetStack"; +    else if ( ::qt_cast<TQWidgetStack*>(o) )  	return "QWeDoNotWantToBreakTabWidget";      else if ( ::qt_cast<QDesignerDialog*>(o) ) -	return "QDialog"; +	return "TQDialog";      else if ( ::qt_cast<QDesignerWidget*>(o) ) -	return "QWidget"; +	return "TQWidget";      else if ( o->inherits( "CustomWidget" ) )  	return ( (CustomWidget*)o )->realClassName().latin1();      else if ( ::qt_cast<QDesignerLabel*>(o) ) -	return "QLabel"; +	return "TQLabel";      else if ( ::qt_cast<QDesignerWizard*>(o) ) -	return "QWizard"; +	return "TQWizard";      else if ( ::qt_cast<QDesignerPushButton*>(o) ) -	return "QPushButton"; +	return "TQPushButton";      else if ( ::qt_cast<QDesignerToolButton*>(o) ) -	return "QToolButton"; +	return "TQToolButton";      else if ( ::qt_cast<QDesignerRadioButton*>(o) ) -	return "QRadioButton"; +	return "TQRadioButton";      else if ( ::qt_cast<QDesignerCheckBox*>(o) ) -	return "QCheckBox"; +	return "TQCheckBox";      else if ( ::qt_cast<MenuBarEditor*>(o) ) -	return "QMenuBar"; +	return "TQMenuBar";      else if ( ::qt_cast<QDesignerToolBar*>(o) ) -	return "QToolBar"; +	return "TQToolBar";      else if ( ::qt_cast<QDesignerAction*>(o) ) -	return "QAction"; +	return "TQAction";      else if ( ::qt_cast<QDesignerActionGroup*>(o) ) -	return "QActionGroup"; +	return "TQActionGroup";      else if ( ::qt_cast<PopupMenuEditor*>(o) ) -	return "QPopupMenu"; +	return "TQPopupMenu";      else if ( ::qt_cast<QDesignerToolBox*>(o) ) -	return "QToolBox"; +	return "TQToolBox";  #ifndef QT_NO_SQL      else if ( ::qt_cast<QDesignerDataBrowser*>(o) ) -	return "QDataBrowser"; +	return "TQDataBrowser";      else if ( ::qt_cast<QDesignerDataView*>(o) ) -	return "QDataView"; +	return "TQDataView";  #endif      return o->className();  } -QString WidgetFactory::defaultSignal( QObject *w ) +TQString WidgetFactory::defaultSignal( TQObject *w )  { -    if ( ::qt_cast<QRadioButton*>(w) || ::qt_cast<QCheckBox*>(w) ) +    if ( ::qt_cast<TQRadioButton*>(w) || ::qt_cast<TQCheckBox*>(w) )  	return "toggled"; -    else if ( ::qt_cast<QButton*>(w) || ::qt_cast<QButtonGroup*>(w) ) +    else if ( ::qt_cast<TQButton*>(w) || ::qt_cast<TQButtonGroup*>(w) )  	return "clicked"; -    else if ( ::qt_cast<QTextBrowser*>(w) ) +    else if ( ::qt_cast<TQTextBrowser*>(w) )  	return "linkClicked"; -    else if ( ::qt_cast<QLineEdit*>(w) || ::qt_cast<QTextEdit*>(w) ) +    else if ( ::qt_cast<TQLineEdit*>(w) || ::qt_cast<TQTextEdit*>(w) )  	return "textChanged"; -    else if ( ::qt_cast<QListView*>(w) || ::qt_cast<QIconView*>(w) || -	      ::qt_cast<QListBox*>(w) || ::qt_cast<QTable*>(w) ) +    else if ( ::qt_cast<TQListView*>(w) || ::qt_cast<TQIconView*>(w) || +	      ::qt_cast<TQListBox*>(w) || ::qt_cast<TQTable*>(w) )  	return "selectionChanged"; -    else if ( ::qt_cast<QTabWidget*>(w) ) +    else if ( ::qt_cast<TQTabWidget*>(w) )  	return "selected"; -    else if ( ::qt_cast<QToolBox*>(w) ) +    else if ( ::qt_cast<TQToolBox*>(w) )  	return "currentChanged"; -    else if ( ::qt_cast<QWidgetStack*>(w) ) +    else if ( ::qt_cast<TQWidgetStack*>(w) )  	return "aboutToShow"; -    else if ( ::qt_cast<QSpinBox*>(w) || ::qt_cast<QSlider*>(w) || -	      ::qt_cast<QScrollBar*>(w) || ::qt_cast<QDateEdit*>(w) || +    else if ( ::qt_cast<TQSpinBox*>(w) || ::qt_cast<TQSlider*>(w) || +	      ::qt_cast<TQScrollBar*>(w) || ::qt_cast<QDateEdit*>(w) ||  	      ::qt_cast<QTimeEdit*>(w) || ::qt_cast<QDateTimeEdit*>(w) || -	      ::qt_cast<QDial*>(w) ) +	      ::qt_cast<TQDial*>(w) )  	return "valueChanged"; -    else if ( ::qt_cast<QComboBox*>(w) ) +    else if ( ::qt_cast<TQComboBox*>(w) )  	return "activated"; -    return QString::null; +    return TQString::null;  }  /*!  As some properties are set by default when creating a widget this @@ -1301,7 +1301,7 @@ QString WidgetFactory::defaultSignal( QObject *w )    createWidget()!  */ -void WidgetFactory::initChangedProperties( QObject *o ) +void WidgetFactory::initChangedProperties( TQObject *o )  {      if ( MainWindow::self && MainWindow::self->currProject() &&  	 MainWindow::self->currProject()->fakeFormFileFor( o ) ) @@ -1310,11 +1310,11 @@ void WidgetFactory::initChangedProperties( QObject *o )      if ( !::qt_cast<QDesignerToolBar*>(o) && !::qt_cast<MenuBarEditor*>(o) )  	MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); -    if ( ::qt_cast<QPushButton*>(o) || -	 ::qt_cast<QRadioButton*>(o) || -	 ::qt_cast<QCheckBox*>(o) || -	 ::qt_cast<QToolButton*>(o) ) { -	if (::qt_cast<QToolButton*>(o) && ::qt_cast<QToolBox*>(widgetOfContainer((QWidget*)o->parent()))) { +    if ( ::qt_cast<TQPushButton*>(o) || +	 ::qt_cast<TQRadioButton*>(o) || +	 ::qt_cast<TQCheckBox*>(o) || +	 ::qt_cast<TQToolButton*>(o) ) { +	if (::qt_cast<TQToolButton*>(o) && ::qt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {  	    MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );  	    MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );  	    MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); @@ -1323,19 +1323,19 @@ void WidgetFactory::initChangedProperties( QObject *o )  	    MetaDataBase::setPropertyChanged( o, "text", TRUE );  	}      } -    else if ( ::qt_cast<QGroupBox*>(o) ) +    else if ( ::qt_cast<TQGroupBox*>(o) )  	MetaDataBase::setPropertyChanged( o, "title", TRUE ); -    else if ( o->isA( "QFrame" ) ) { +    else if ( o->isA( "TQFrame" ) ) {  	MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE );  	MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); -    } else if ( ::qt_cast<QTabWidget*>(o) || ::qt_cast<QWizard*>(o) ) { +    } else if ( ::qt_cast<TQTabWidget*>(o) || ::qt_cast<TQWizard*>(o) ) {  	MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE );  	MetaDataBase::setPropertyChanged( o, "pageName", TRUE );  	MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); -    } else if ( ::qt_cast<QWidgetStack*>(o) ) { +    } else if ( ::qt_cast<TQWidgetStack*>(o) ) {  	MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );  	MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); -    } else if ( ::qt_cast<QToolBox*>(o) ) { +    } else if ( ::qt_cast<TQToolBox*>(o) ) {  	MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE );  	MetaDataBase::setPropertyChanged( o, "itemName", TRUE );  	MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); @@ -1343,21 +1343,21 @@ void WidgetFactory::initChangedProperties( QObject *o )  	MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE );  	MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE );  #ifndef QT_NO_TABLE -    } else if ( ::qt_cast<QTable*>(o) ) { +    } else if ( ::qt_cast<TQTable*>(o) ) {  #  ifndef QT_NO_SQL -        if (!::qt_cast<QDataTable*>(o) ) +        if (!::qt_cast<TQDataTable*>(o) )  #  endif          {              MetaDataBase::setPropertyChanged( o, "numRows", TRUE );              MetaDataBase::setPropertyChanged( o, "numCols", TRUE ); -            QTable *t = (QTable*)o; +            TQTable *t = (TQTable*)o;              for ( int i = 0; i < 3; ++i ) { -                t->horizontalHeader()->setLabel( i, QString::number( i + 1 ) ); -                t->verticalHeader()->setLabel( i, QString::number( i + 1 ) ); +                t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) ); +                t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) );              }          }  #endif -    } else if ( ::qt_cast<QSplitter*>(o)  ) { +    } else if ( ::qt_cast<TQSplitter*>(o)  ) {  	MetaDataBase::setPropertyChanged( o, "orientation", TRUE );      } else if ( ::qt_cast<QDesignerToolBar*>(o)  ) {  	MetaDataBase::setPropertyChanged( o, "label", TRUE ); @@ -1368,9 +1368,9 @@ void WidgetFactory::initChangedProperties( QObject *o )      }  } -bool WidgetFactory::hasSpecialEditor( int id, QObject *editorWidget ) +bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget )  { -    QString className = WidgetDatabase::className( id ); +    TQString className = WidgetDatabase::className( id );      if ( className.contains( "ListBox" ) )  	return TRUE; @@ -1380,32 +1380,32 @@ bool WidgetFactory::hasSpecialEditor( int id, QObject *editorWidget )  	return TRUE;      if ( className.contains( "IconView" ) )  	return TRUE; -    if ( className == "QTextEdit" || className == "QMultiLineEdit" ) +    if ( className == "TQTextEdit" || className == "TQMultiLineEdit" )  	return TRUE; -    if ( ::qt_cast<QTable*>(editorWidget) != 0 ) +    if ( ::qt_cast<TQTable*>(editorWidget) != 0 )  	return TRUE;      return FALSE;  } -bool WidgetFactory::hasItems( int id, QObject *editorWidget ) +bool WidgetFactory::hasItems( int id, TQObject *editorWidget )  { -    QString className = WidgetDatabase::className( id ); +    TQString className = WidgetDatabase::className( id );      if ( className.contains( "ListBox" ) || className.contains( "ListView" ) ||  	 className.contains( "IconView" )  || className.contains( "ComboBox" ) || -	 ::qt_cast<QTable*>(editorWidget) != 0 ) +	 ::qt_cast<TQTable*>(editorWidget) != 0 )  	return TRUE;      return FALSE;  } -void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw ) +void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw )  { -    QString className = WidgetDatabase::className( id ); +    TQString className = WidgetDatabase::className( id );      if ( className.contains( "ListBox" ) ) { -	if ( !::qt_cast<QListBox*>(editWidget) ) +	if ( !::qt_cast<TQListBox*>(editWidget) )  	    return;  	ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw );  	e->exec(); @@ -1414,9 +1414,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo      }      if ( className.contains( "ComboBox" ) ) { -	if ( !::qt_cast<QComboBox*>(editWidget) ) +	if ( !::qt_cast<TQComboBox*>(editWidget) )  	    return; -	QComboBox *cb = (QComboBox*)editWidget; +	TQComboBox *cb = (TQComboBox*)editWidget;  	ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw );  	e->exec();  	delete e; @@ -1425,9 +1425,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo      }      if ( className.contains( "ListView" ) ) { -	if ( !::qt_cast<QListView*>(editWidget) ) +	if ( !::qt_cast<TQListView*>(editWidget) )  	    return; -	QListView *lv = (QListView*)editWidget; +	TQListView *lv = (TQListView*)editWidget;  	ListViewEditor *e = new ListViewEditor( parent, lv, fw );  	e->exec();  	delete e; @@ -1435,7 +1435,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo      }      if ( className.contains( "IconView" ) ) { -	if ( !::qt_cast<QIconView*>(editWidget) ) +	if ( !::qt_cast<TQIconView*>(editWidget) )  	    return;  	IconViewEditor *e = new IconViewEditor( parent, editWidget, fw );  	e->exec(); @@ -1443,14 +1443,14 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo  	return;      } -    if ( className == "QMultiLineEdit" || className == "QTextEdit" ) { +    if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) {  	MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw );  	e->exec();  	delete e;  	return;      }  #ifndef QT_NO_TABLE -    if (::qt_cast<QTable*>(editWidget) != 0) { +    if (::qt_cast<TQTable*>(editWidget) != 0) {  	TableEditor *e = new TableEditor( parent, editWidget, fw );  	e->exec();  	delete e; @@ -1459,44 +1459,44 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo  #endif  } -bool WidgetFactory::canResetProperty( QObject *w, const QString &propName ) +bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )  {      if ( propName == "name" || propName == "geometry" )  	return FALSE; -    QStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); +    TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );      return l.findIndex( propName ) == -1;  } -bool WidgetFactory::resetProperty( QObject *w, const QString &propName ) +bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )  { -    const QMetaProperty *p = w->metaObject()->property( w->metaObject()-> +    const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->  							findProperty( propName, TRUE ), TRUE );      if (!p )  	return FALSE;      return p->reset( w );  } -QVariant WidgetFactory::defaultValue( QObject *w, const QString &propName ) +TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )  {      if ( propName == "wordwrap" ) {  	int v = defaultValue( w, "alignment" ).toInt(); -	return QVariant( ( v & WordBreak ) == WordBreak, 0 ); +	return TQVariant( ( v & WordBreak ) == WordBreak, 0 );      } else if ( propName == "toolTip" || propName == "whatsThis" ) { -	return QVariant( QString::fromLatin1( "" ) ); +	return TQVariant( TQString::fromLatin1( "" ) );      } else if ( w->inherits( "CustomWidget" ) ) { -	return QVariant(); +	return TQVariant();      } else if ( propName == "frameworkCode" ) { -	return QVariant( TRUE, 0 ); +	return TQVariant( TRUE, 0 );      } else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) { -	return QVariant( -1 ); +	return TQVariant( -1 );      }      return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName );  } -QString WidgetFactory::defaultCurrentItem( QObject *w, const QString &propName ) +TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName )  { -    const QMetaProperty *p = w->metaObject()-> +    const TQMetaProperty *p = w->metaObject()->  			     property( w->metaObject()->findProperty( propName, TRUE ), TRUE );      if ( !p ) {  	int v = defaultValue( w, "alignment" ).toInt(); @@ -1521,23 +1521,23 @@ QString WidgetFactory::defaultCurrentItem( QObject *w, const QString &propName )  	} else if ( propName == "resizeMode" ) {  	    return "Auto";  	} -	return QString::null; +	return TQString::null;      }      return p->valueToKey( defaultValue( w, propName ).toInt() );  } -QWidget *WidgetFactory::createCustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *w ) +TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w )  {      if ( !w )  	return 0;      return new CustomWidget( parent, name, w );  } -QVariant WidgetFactory::property( QObject *w, const char *name ) +TQVariant WidgetFactory::property( TQObject *w, const char *name )  {      int id = w->metaObject()->findProperty( name, TRUE ); -    const QMetaProperty* p = w->metaObject()->property( id, TRUE ); +    const TQMetaProperty* p = w->metaObject()->property( id, TRUE );      if ( !p || !p->isValid() )  	return MetaDataBase::fakeProperty( w, name );      return w->property( name ); @@ -1549,70 +1549,70 @@ void QDesignerLabel::updateBuddy()      if ( myBuddy.isEmpty() )  	return; -    QObjectList *l = topLevelWidget()->queryList( "QWidget", myBuddy, FALSE, TRUE ); +    TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, FALSE, TRUE );      if ( !l || !l->first() ) {  	delete l;  	return;      } -    QLabel::setBuddy( (QWidget*)l->first() ); +    TQLabel::setBuddy( (TQWidget*)l->first() );      delete l;  } -void QDesignerWidget::resizeEvent( QResizeEvent* e) +void QDesignerWidget::resizeEvent( TQResizeEvent* e)  {      if ( need_frame ) { -	QPainter p(this); +	TQPainter p(this);  	p.setPen( backgroundColor() ); -	p.drawRect( QRect( QPoint(0,0), e->oldSize() ) ); +	p.drawRect( TQRect( TQPoint(0,0), e->oldSize() ) );      }  } -void QDesignerWidget::paintEvent( QPaintEvent *e ) +void QDesignerWidget::paintEvent( TQPaintEvent *e )  {      if ( need_frame ) { -	QPainter p(this); +	TQPainter p(this);  	p.setPen( backgroundColor().dark() );  	p.drawRect( rect() );      }      formwindow->paintGrid( this, e );  } -void QDesignerDialog::paintEvent( QPaintEvent *e ) +void QDesignerDialog::paintEvent( TQPaintEvent *e )  {      formwindow->paintGrid( this, e );  } -QSizePolicy QLayoutWidget::sizePolicy() const +TQSizePolicy QLayoutWidget::sizePolicy() const  {      return sp;  } -bool QLayoutWidget::event( QEvent *e ) +bool QLayoutWidget::event( TQEvent *e )  { -    if ( e && ( e->type() == QEvent::ChildInserted || -		e->type() == QEvent::ChildRemoved || -		e->type() == QEvent::LayoutHint || -		e->type() == QEvent::Reparent ) ) +    if ( e && ( e->type() == TQEvent::ChildInserted || +		e->type() == TQEvent::ChildRemoved || +		e->type() == TQEvent::LayoutHint || +		e->type() == TQEvent::Reparent ) )  	updateSizePolicy(); -    return QWidget::event( e ); +    return TQWidget::event( e );  }  /*    This function must be called on QLayoutWidget creation and whenever    the QLayoutWidget's parent layout changes (e.g., from a QHBoxLayout -  to a QVBoxLayout), because of the (illogical) way layouting works. +  to a TQVBoxLayout), because of the (illogical) way layouting works.  */  void QLayoutWidget::updateSizePolicy()  {      if ( !children() || children()->count() == 0 ) { -	sp = QWidget::sizePolicy(); +	sp = TQWidget::sizePolicy();  	return;      }      /* -      QSizePolicy::MayShrink & friends are private. Here we assume the +      TQSizePolicy::MayShrink & friends are private. Here we assume the        following:  	  Fixed = 0 @@ -1621,111 +1621,111 @@ void QLayoutWidget::updateSizePolicy()  	  Preferred = MayShrink | MayGrow      */ -    int ht = (int) QSizePolicy::Preferred; -    int vt = (int) QSizePolicy::Preferred; +    int ht = (int) TQSizePolicy::Preferred; +    int vt = (int) TQSizePolicy::Preferred;      if ( layout() ) {  	/*  	  parentLayout is set to the parent layout if there is one and if it is  	  top level, in which case layouting is illogical.  	*/ -	QLayout *parentLayout = 0; +	TQLayout *parentLayout = 0;  	if ( parent() && parent()->isWidgetType() ) { -	    parentLayout = ((QWidget *)parent())->layout(); +	    parentLayout = ((TQWidget *)parent())->layout();  	    if ( parentLayout &&  		 ::qt_cast<QLayoutWidget*>(parentLayout->mainWidget()) )  		parentLayout = 0;  	} -	QObjectListIt it( *children() ); -	QObject *o; +	TQObjectListIt it( *children() ); +	TQObject *o; -	if ( ::qt_cast<QVBoxLayout*>(layout()) ) { -	    if ( ::qt_cast<QHBoxLayout*>(parentLayout) ) -		vt = QSizePolicy::Minimum; +	if ( ::qt_cast<TQVBoxLayout*>(layout()) ) { +	    if ( ::qt_cast<TQHBoxLayout*>(parentLayout) ) +		vt = TQSizePolicy::Minimum;  	    else -		vt = QSizePolicy::Fixed; +		vt = TQSizePolicy::Fixed;  	    while ( ( o = it.current() ) ) {  		++it; -		if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) ) +		if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) )  		    continue; -		QWidget *w = (QWidget*)o; +		TQWidget *w = (TQWidget*)o;  		if ( !w->sizePolicy().mayGrowHorizontally() ) -		    ht &= ~QSizePolicy::Minimum; +		    ht &= ~TQSizePolicy::Minimum;  		if ( !w->sizePolicy().mayShrinkHorizontally() ) -		    ht &= ~QSizePolicy::Maximum; +		    ht &= ~TQSizePolicy::Maximum;  		if ( w->sizePolicy().mayGrowVertically() ) -		    vt |= QSizePolicy::Minimum; +		    vt |= TQSizePolicy::Minimum;  		if ( w->sizePolicy().mayShrinkVertically() ) -		    vt |= QSizePolicy::Maximum; +		    vt |= TQSizePolicy::Maximum;  	    } -	} else if ( ::qt_cast<QHBoxLayout*>(layout()) ) { -	    if ( ::qt_cast<QVBoxLayout*>(parentLayout) ) -		ht = QSizePolicy::Minimum; +	} else if ( ::qt_cast<TQHBoxLayout*>(layout()) ) { +	    if ( ::qt_cast<TQVBoxLayout*>(parentLayout) ) +		ht = TQSizePolicy::Minimum;  	    else -		ht = QSizePolicy::Fixed; +		ht = TQSizePolicy::Fixed;  	    while ( ( o = it.current() ) ) {  		++it; -		if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) ) +		if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) )  		    continue; -		QWidget *w = (QWidget*)o; +		TQWidget *w = (TQWidget*)o;  		if ( w->sizePolicy().mayGrowHorizontally() ) -		    ht |= QSizePolicy::Minimum; +		    ht |= TQSizePolicy::Minimum;  		if ( w->sizePolicy().mayShrinkHorizontally() ) -		    ht |= QSizePolicy::Maximum; +		    ht |= TQSizePolicy::Maximum;  		if ( !w->sizePolicy().mayGrowVertically() ) -		    vt &= ~QSizePolicy::Minimum; +		    vt &= ~TQSizePolicy::Minimum;  		if ( !w->sizePolicy().mayShrinkVertically() ) -		    vt &= ~QSizePolicy::Maximum; +		    vt &= ~TQSizePolicy::Maximum;  	    } -	} else if ( ::qt_cast<QGridLayout*>(layout()) ) { -	    ht = QSizePolicy::Fixed; -	    vt = QSizePolicy::Fixed; +	} else if ( ::qt_cast<TQGridLayout*>(layout()) ) { +	    ht = TQSizePolicy::Fixed; +	    vt = TQSizePolicy::Fixed;  	    if ( parentLayout ) { -		if ( ::qt_cast<QVBoxLayout*>(parentLayout) ) -		    ht = QSizePolicy::Minimum; -		else if ( ::qt_cast<QHBoxLayout*>(parentLayout) ) -		    vt = QSizePolicy::Minimum; +		if ( ::qt_cast<TQVBoxLayout*>(parentLayout) ) +		    ht = TQSizePolicy::Minimum; +		else if ( ::qt_cast<TQHBoxLayout*>(parentLayout) ) +		    vt = TQSizePolicy::Minimum;  	    }  	    while ( ( o = it.current() ) ) {  		++it; -		if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) ) +		if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) )  		    continue; -		QWidget *w = (QWidget*)o; +		TQWidget *w = (TQWidget*)o;  		if ( w->sizePolicy().mayGrowHorizontally() ) -		    ht |= QSizePolicy::Minimum; +		    ht |= TQSizePolicy::Minimum;  		if ( w->sizePolicy().mayShrinkHorizontally() ) -		    ht |= QSizePolicy::Maximum; +		    ht |= TQSizePolicy::Maximum;  		if ( w->sizePolicy().mayGrowVertically() ) -		    vt |= QSizePolicy::Minimum; +		    vt |= TQSizePolicy::Minimum;  		if ( w->sizePolicy().mayShrinkVertically() ) -		    vt |= QSizePolicy::Maximum; +		    vt |= TQSizePolicy::Maximum;  	    }  	} -	if ( layout()->expanding() & QSizePolicy::Horizontally ) -	    ht = QSizePolicy::Expanding; -	if ( layout()->expanding() & QSizePolicy::Vertically ) -	    vt = QSizePolicy::Expanding; +	if ( layout()->expanding() & TQSizePolicy::Horizontally ) +	    ht = TQSizePolicy::Expanding; +	if ( layout()->expanding() & TQSizePolicy::Vertically ) +	    vt = TQSizePolicy::Expanding;  	layout()->invalidate();      } -    sp = QSizePolicy( (QSizePolicy::SizeType) ht, (QSizePolicy::SizeType) vt ); +    sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt );      updateGeometry();  } -void CustomWidget::paintEvent( QPaintEvent *e ) +void CustomWidget::paintEvent( TQPaintEvent *e )  {      if ( ::qt_cast<FormWindow*>(parentWidget()) ) {  	( (FormWindow*)parentWidget() )->paintGrid( this, e );      } else { -	QPainter p( this ); +	TQPainter p( this );  	p.fillRect( rect(), colorGroup().dark() );  	p.setPen( colorGroup().light() );  	p.drawText( 2, 2, width() - 4, height() - 4, Qt::AlignAuto | Qt::AlignTop, cusw->className ); @@ -1740,7 +1740,7 @@ CustomWidgetFactory::CustomWidgetFactory()  {  } -QWidget *CustomWidgetFactory::createWidget( const QString &className, QWidget *parent, const char *name ) const +TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name ) const  {      MetaDataBase::CustomWidget *w = MetaDataBase::customWidget( WidgetDatabase::idFromClassName( className ) );      if ( !w ) @@ -1749,27 +1749,27 @@ QWidget *CustomWidgetFactory::createWidget( const QString &className, QWidget *p  } -QDesignerToolBox::QDesignerToolBox( QWidget *parent, const char *name ) -    : QToolBox( parent, name ) +QDesignerToolBox::QDesignerToolBox( TQWidget *parent, const char *name ) +    : TQToolBox( parent, name )  {  } -QString QDesignerToolBox::itemLabel() const +TQString QDesignerToolBox::itemLabel() const  { -    return QToolBox::itemLabel( currentIndex() ); +    return TQToolBox::itemLabel( currentIndex() );  } -void QDesignerToolBox::setItemLabel( const QString &l ) +void QDesignerToolBox::setItemLabel( const TQString &l )  { -    QToolBox::setItemLabel( currentIndex(), l ); +    TQToolBox::setItemLabel( currentIndex(), l );  } -QCString QDesignerToolBox::itemName() const +TQCString QDesignerToolBox::itemName() const  {      return currentItem() ? currentItem()->name() : 0;  } -void QDesignerToolBox::setItemName( const QCString &n ) +void QDesignerToolBox::setItemName( const TQCString &n )  {      if (currentItem())  	currentItem()->setName( n ); @@ -1784,7 +1784,7 @@ Qt::BackgroundMode QDesignerToolBox::itemBackgroundMode() const  void QDesignerToolBox::setItemBackgroundMode( BackgroundMode bmode )  {      for (int i = 0; i < count(); ++i) { -	QWidget *w = item(i); +	TQWidget *w = item(i);  	w->setBackgroundMode( bmode );  	w->update();      } | 
