From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 16 Jun 2011 19:02:47 +0000 Subject: TQt4 port kdewebdev This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kommander/editor/propertyeditor.cpp | 350 ++++++++++++++++++------------------ 1 file changed, 175 insertions(+), 175 deletions(-) (limited to 'kommander/editor/propertyeditor.cpp') diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp index aeeaecb1..b0c71147 100644 --- a/kommander/editor/propertyeditor.cpp +++ b/kommander/editor/propertyeditor.cpp @@ -1,7 +1,7 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** -** This file is part of Qt Designer. +** This file is part of TQt Designer. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -105,11 +105,11 @@ static TQStringList getFontList() fontDataBase = new TQFontDatabase; qAddPostRoutine( cleanupFontDatabase ); } - return fontDataBase->families(); + return fontDataBase->tqfamilies(); } -class PropertyWhatsThis : public QWhatsThis +class PropertyWhatsThis : public TQWhatsThis { public: PropertyWhatsThis( PropertyList *l ); @@ -155,7 +155,7 @@ bool PropertyWhatsThis::clicked( const TQString& href ) */ /*! If this item should be a child of another property item, specify - \a prop as the parent item. + \a prop as the tqparent item. */ PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) @@ -172,7 +172,7 @@ PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem * PropertyItem::~PropertyItem() { if ( resetButton ) - delete resetButton->parentWidget(); + delete resetButton->tqparentWidget(); resetButton = 0; } @@ -222,8 +222,8 @@ void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, { TQColorGroup g( cg ); g.setColor( TQColorGroup::Base, backgroundColor() ); - g.setColor( TQColorGroup::Foreground, Qt::black ); - g.setColor( TQColorGroup::Text, Qt::black ); + g.setColor( TQColorGroup::Foreground, TQt::black ); + g.setColor( TQColorGroup::Text, TQt::black ); int indent = 0; if ( column == 0 ) { indent = 20 + ( property ? 20 : 0 ); @@ -282,7 +282,7 @@ void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg, void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) { p->save(); - TQApplication::style().drawPrimitive(TQStyle::PE_Panel, p, r, cg, + TQApplication::tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg, TQStyle::Style_Sunken, TQStyleOption(1,1) ); p->restore(); } @@ -296,7 +296,7 @@ bool PropertyItem::hasSubItems() const return false; } -/*! Returns the parent property item here if this is a child or 0 +/*! Returns the tqparent property item here if this is a child or 0 otherwise. */ @@ -317,17 +317,17 @@ void PropertyItem::setOpen( bool b ) open = b; if ( !open ) { - children.setAutoDelete( true ); - children.clear(); - children.setAutoDelete( false ); - qApp->processEvents(); + tqchildren.setAutoDelete( true ); + tqchildren.clear(); + tqchildren.setAutoDelete( false ); + tqApp->processEvents(); listview->updateEditorSize(); return; } createChildren(); initChildren(); - qApp->processEvents(); + tqApp->processEvents(); listview->updateEditorSize(); } @@ -337,7 +337,7 @@ void PropertyItem::setOpen( bool b ) void PropertyItem::showEditor() { createResetButton(); - resetButton->parentWidget()->show(); + resetButton->tqparentWidget()->show(); } /*! Subclasses have to hide the editor of the item here @@ -346,7 +346,7 @@ void PropertyItem::showEditor() void PropertyItem::hideEditor() { createResetButton(); - resetButton->parentWidget()->hide(); + resetButton->tqparentWidget()->hide(); } /*! This is called to init the value of the item. Reimplement in @@ -375,7 +375,7 @@ void PropertyItem::setChanged( bool b, bool updateDb ) if ( changed == b ) return; changed = b; - repaint(); + tqrepaint(); if ( updateDb ) MetaDataBase::setPropertyChanged( listview->propertyEditor()->widget(), name(), changed ); updateResetButtonState(); @@ -389,7 +389,7 @@ TQString PropertyItem::name() const void PropertyItem::createResetButton() { if ( resetButton ) { - resetButton->parentWidget()->lower(); + resetButton->tqparentWidget()->lower(); return; } TQHBox *hbox = new TQHBox( listview->viewport() ); @@ -397,8 +397,8 @@ void PropertyItem::createResetButton() hbox->setLineWidth( 1 ); resetButton = new TQPushButton( hbox ); resetButton->setPixmap( PixmapChooser::loadPixmap( "resetproperty.xpm", PixmapChooser::Mini ) ); - resetButton->setFixedWidth( resetButton->sizeHint().width() ); - hbox->layout()->setAlignment( Qt::AlignRight ); + resetButton->setFixedWidth( resetButton->tqsizeHint().width() ); + hbox->tqlayout()->tqsetAlignment( TQt::AlignRight ); listview->addChild( hbox ); hbox->hide(); TQObject::connect( resetButton, TQT_SIGNAL( clicked() ), @@ -425,13 +425,13 @@ void PropertyItem::updateResetButtonState() void PropertyItem::placeEditor( TQWidget *w ) { createResetButton(); - TQRect r = listview->itemRect( this ); + TQRect r = listview->tqitemRect( this ); if ( !r.size().isValid() ) { listview->ensureItemVisible( this ); -#if defined(Q_WS_WIN) - listview->repaintContents( false ); +#if defined(TQ_WS_WIN) + listview->tqrepaintContents( false ); #endif - r = listview->itemRect( this ); + r = listview->tqitemRect( this ); } r.setX( listview->header()->sectionPos( 1 ) ); r.setWidth( listview->header()->sectionSize( 1 ) - 1 ); @@ -439,8 +439,8 @@ void PropertyItem::placeEditor( TQWidget *w ) r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() ); w->resize( r.size() ); listview->moveChild( w, r.x(), r.y() ); - resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() ); - listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() ); + resetButton->tqparentWidget()->resize( resetButton->tqsizeHint().width() + 10, r.height() ); + listview->moveChild( resetButton->tqparentWidget(), r.x() + r.width() - 8, r.y() ); resetButton->setFixedHeight( r.height() - 3 ); } @@ -475,18 +475,18 @@ void PropertyItem::childValueChanged( PropertyItem * ) void PropertyItem::addChild( PropertyItem *i ) { - children.append( i ); + tqchildren.append( i ); } int PropertyItem::childCount() const { - return children.count(); + return tqchildren.count(); } PropertyItem *PropertyItem::child( int i ) const { // ARRRRRRRRG - return ( (PropertyItem*)this )->children.at( i ); + return ( (PropertyItem*)this )->tqchildren.at( i ); } /*! If the contents of the item is not displayable with a text, but @@ -509,7 +509,7 @@ void PropertyItem::drawCustomContents( TQPainter *, const TQRect & ) TQString PropertyItem::currentItem() const { - return TQString::null; + return TQString(); } int PropertyItem::currentIntItem() const @@ -532,15 +532,15 @@ int PropertyItem::currentIntItemFromObject() const TQString PropertyItem::currentItemFromObject() const { - return TQString::null; + return TQString(); } void PropertyItem::setFocus( TQWidget *w ) { - if ( !qApp->focusWidget() || + if ( !tqApp->tqfocusWidget() || listview->propertyEditor()->formWindow() && - ( !MainWindow::self->isAFormWindowChild( qApp->focusWidget() ) && - !qApp->focusWidget()->inherits( "Editor" ) ) ) + ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->tqfocusWidget()) ) && + !tqApp->tqfocusWidget()->inherits( "Editor" ) ) ) w->setFocus(); } @@ -548,7 +548,7 @@ void PropertyItem::setText( int col, const TQString &t ) { TQString txt( t ); if ( col == 1 ) - txt = txt.replace( TQRegExp( "\n" ), " " ); + txt = txt.tqreplace( TQRegExp( "\n" ), " " ); TQListViewItem::setText( col, txt ); } @@ -582,13 +582,13 @@ TQLineEdit *PropertyTextItem::lined() if ( asciiOnly ) { if ( PropertyItem::name() == "name" ) - lin->setValidator( new AsciiValidator( lin, "ascii_validator" ) ); + lin->setValidator( new AsciiValidator( TQT_TQOBJECT(lin), "ascii_validator" ) ); else lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3" "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc" - "\xbd\xbe\xbf"), lin, "ascii_validator" ) ); + "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) ); } if ( !hasMultiLines ) { lin->hide(); } else { @@ -762,7 +762,7 @@ TQLineEdit *PropertyDoubleItem::lined() if ( lin ) return lin; lin = new TQLineEdit( listview->viewport() ); - lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) ); + lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) ); connect( lin, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( setValue() ) ); @@ -837,11 +837,11 @@ PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, Proper lin = 0; } -QDateEdit *PropertyDateItem::lined() +TQDateEdit *PropertyDateItem::lined() { if ( lin ) return lin; - lin = new QDateEdit( listview->viewport() ); + lin = new TQDateEdit( listview->viewport() ); TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); @@ -853,7 +853,7 @@ QDateEdit *PropertyDateItem::lined() PropertyDateItem::~PropertyDateItem() { - delete (QDateEdit*)lin; + delete (TQDateEdit*)lin; lin = 0; } @@ -912,11 +912,11 @@ PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, Proper lin = 0; } -QTimeEdit *PropertyTimeItem::lined() +TQTimeEdit *PropertyTimeItem::lined() { if ( lin ) return lin; - lin = new QTimeEdit( listview->viewport() ); + lin = new TQTimeEdit( listview->viewport() ); connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), this, TQT_SLOT( setValue() ) ); TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); @@ -928,7 +928,7 @@ QTimeEdit *PropertyTimeItem::lined() PropertyTimeItem::~PropertyTimeItem() { - delete (QTimeEdit*)lin; + delete (TQTimeEdit*)lin; lin = 0; } @@ -987,11 +987,11 @@ PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after lin = 0; } -QDateTimeEdit *PropertyDateTimeItem::lined() +TQDateTimeEdit *PropertyDateTimeItem::lined() { if ( lin ) return lin; - lin = new QDateTimeEdit( listview->viewport() ); + lin = new TQDateTimeEdit( listview->viewport() ); connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), this, TQT_SLOT( setValue() ) ); TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); @@ -1003,7 +1003,7 @@ QDateTimeEdit *PropertyDateTimeItem::lined() PropertyDateTimeItem::~PropertyDateTimeItem() { - delete (QDateTimeEdit*)lin; + delete (TQDateTimeEdit*)lin; lin = 0; } @@ -1540,8 +1540,8 @@ PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, Pr box = new TQHBox( listview->viewport() ); box->hide(); pixPrev = new TQLabel( box ); - pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); - pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) ); + pixPrev->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); + pixPrev->setBackgroundColor( pixPrev->tqcolorGroup().color( TQColorGroup::Base ) ); button = new TQPushButton( "...", box ); button->setFixedWidth( 20 ); box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); @@ -1580,7 +1580,7 @@ void PropertyPixmapItem::setValue( const TQVariant &v ) else pixPrev->setPixmap( v.toIconSet().pixmap() ); PropertyItem::setValue( v ); - repaint(); + tqrepaint(); } void PropertyPixmapItem::getPixmap() @@ -1605,8 +1605,8 @@ void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r ) TQPixmap pix( (!iconSet ? value().toPixmap() : value().toIconSet().pixmap()) ); if ( !pix.isNull() ) { p->save(); - p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), - (int)(p->worldMatrix().dy() + r.y()) ), + p->setClipRect( TQRect( TQPoint( (int)(p->tqworldMatrix().dx() + r.x()), + (int)(p->tqworldMatrix().dy() + r.y()) ), r.size() ) ); p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix ); p->restore(); @@ -1617,8 +1617,8 @@ void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r ) // -------------------------------------------------------------- PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool children ) - : PropertyItem( l, after, prop, propName ), withChildren( children ) + const TQString &propName, bool tqchildren ) + : PropertyItem( l, after, prop, propName ), withChildren( tqchildren ) { box = new TQHBox( listview->viewport() ); box->hide(); @@ -1834,7 +1834,7 @@ void PropertyFontItem::setValue( const TQVariant &v ) void PropertyFontItem::getFont() { bool ok = false; - TQFont f = QFontDialog::getFont( &ok, val.toFont(), listview ); + TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview ); if ( ok && f != val.toFont() ) { setValue( f ); notifyValueChange(); @@ -1901,7 +1901,7 @@ void PropertyDatabaseItem::createChildren() void PropertyDatabaseItem::initChildren() { -#ifndef QT_NO_SQL +#ifndef TQT_NO_SQL PropertyItem *item = 0; TQStringList lst = value().toStringList(); TQString conn, table; @@ -2003,7 +2003,7 @@ bool PropertyDatabaseItem::hasSubItems() const void PropertyDatabaseItem::childValueChanged( PropertyItem *c ) { -#ifndef QT_NO_SQL +#ifndef TQT_NO_SQL TQStringList lst; lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); @@ -2112,7 +2112,7 @@ void PropertySizePolicyItem::setValue( const TQVariant &v ) return; TQString s = TQString( "%1/%2/%2/%2" ); - s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ). + s = s.tqarg( size_type_to_string( v.toSizePolicy().horData() ) ). arg( size_type_to_string( v.toSizePolicy().verData() ) ). arg( v.toSizePolicy().horStretch() ). arg( v.toSizePolicy().verStretch() ); @@ -2185,7 +2185,7 @@ void PropertyPaletteItem::setValue( const TQVariant &v ) TQString s; palettePrev->setPalette( v.toPalette() ); PropertyItem::setValue( v ); - repaint(); + tqrepaint(); } void PropertyPaletteItem::getPalette() @@ -2197,8 +2197,8 @@ void PropertyPaletteItem::getPalette() if ( w->inherits( TQSCROLLVIEW_OBJECT_NAME_STRING ) ) w = ( (TQScrollView*)w )->viewport(); TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), -#if defined(QT_NON_COMMERCIAL) - w->backgroundMode(), listview->topLevelWidget(), +#if defined(TQT_NON_COMMERCIAL) + w->backgroundMode(), listview->tqtopLevelWidget(), #else w->backgroundMode(), listview, #endif @@ -2218,8 +2218,8 @@ void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r ) { TQPalette pal( value().toPalette() ); p->save(); - p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), - (int)(p->worldMatrix().dy() + r.y()) ), + p->setClipRect( TQRect( TQPoint( (int)(p->tqworldMatrix().dx() + r.x()), + (int)(p->tqworldMatrix().dy() + r.y()) ), r.size() ) ); TQRect r2( r ); r2.setX( r2.x() + 2 ); @@ -2271,11 +2271,11 @@ TQComboBox *PropertyCursorItem::combo() cur = TQBitmap(sizev_width, sizev_height, sizev_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Size Vertical"), TQObject::SizeVerCursor ); + comb->insertItem( cur, i18n("SizeQt::Vertical"), TQObject::SizeVerCursor ); cur = TQBitmap(sizeh_width, sizeh_height, sizeh_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Size Horizontal"), TQObject::SizeHorCursor ); + comb->insertItem( cur, i18n("SizeQt::Horizontal"), TQObject::SizeHorCursor ); cur = TQBitmap(sizef_width, sizef_height, sizef_bits, true); cur.setMask( cur ); @@ -2295,11 +2295,11 @@ TQComboBox *PropertyCursorItem::combo() cur = TQBitmap(vsplit_width, vsplit_height, vsplit_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Split Vertical"), TQObject::SplitVCursor ); + comb->insertItem( cur, i18n("SplitQt::Vertical"), TQObject::SplitVCursor ); cur = TQBitmap(hsplit_width, hsplit_height, hsplit_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Split Horizontal"), TQObject::SplitHCursor ); + comb->insertItem( cur, i18n("SplitQt::Horizontal"), TQObject::SplitHCursor ); cur = TQBitmap(hand_width, hand_height, hand_bits, true); cur.setMask( cur ); @@ -2325,7 +2325,7 @@ void PropertyCursorItem::showEditor() PropertyItem::showEditor(); if ( !comb ) { combo()->blockSignals( true ); - combo()->setCurrentItem( (int)value().toCursor().shape() ); + combo()->setCurrentItem( (int)value().toCursor().tqshape() ); combo()->blockSignals( false ); } placeEditor( combo() ); @@ -2348,7 +2348,7 @@ void PropertyCursorItem::setValue( const TQVariant &v ) return; combo()->blockSignals( true ); - combo()->setCurrentItem( (int)v.toCursor().shape() ); + combo()->setCurrentItem( (int)v.toCursor().tqshape() ); combo()->blockSignals( false ); setText( 1, combo()->currentText() ); PropertyItem::setValue( v ); @@ -2461,9 +2461,9 @@ static TQVariant::Type type_to_variant( const TQString &s ) if ( s == "Palette" ) return TQVariant::Palette; if ( s == "ColorGroup" ) - return TQVariant::ColorGroup; + return (QVariant::Type)TQVariant::ColorGroup; if ( s == "IconSet" ) - return TQVariant::IconSet; + return (QVariant::Type)TQVariant::IconSet; if ( s == "Point" ) return TQVariant::Point; if ( s == "Image" ) @@ -2477,11 +2477,11 @@ static TQVariant::Type type_to_variant( const TQString &s ) if ( s == "Double" ) return TQVariant::Double; if ( s == "CString" ) - return TQVariant::CString; + return (QVariant::Type)TQVariant::CString; if ( s == "PointArray" ) - return TQVariant::PointArray; + return (QVariant::Type)TQVariant::PointArray; if ( s == "Region" ) - return TQVariant::Region; + return (QVariant::Type)TQVariant::Region; if ( s == "Bitmap" ) return TQVariant::Bitmap; if ( s == "Cursor" ) @@ -2497,17 +2497,17 @@ static TQVariant::Type type_to_variant( const TQString &s ) return TQVariant::Invalid; } -#ifndef QT_NO_SQL -static bool parent_is_data_aware( TQObject *o ) +#ifndef TQT_NO_SQL +static bool tqparent_is_data_aware( TQObject *o ) { if ( !o->inherits( TQWIDGET_OBJECT_NAME_STRING ) ) return false; TQWidget *w = (TQWidget*)o; - TQWidget *p = w->parentWidget(); + TQWidget *p = w->tqparentWidget(); while ( p && !p->isTopLevel() ) { - if ( p->inherits( "QDesignerDataBrowser" ) || p->inherits( "QDesignerDataView" ) ) + if ( p->inherits( "TQDesignerDataBrowser" ) || p->inherits( "TQDesignerDataView" ) ) return true; - p = p->parentWidget(); + p = p->tqparentWidget(); } return false; } @@ -2522,24 +2522,24 @@ void PropertyList::setupProperties() if ( !editor->widget() ) return; bool allProperties = !editor->widget()->inherits( "Spacer" ); - TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); + TQStrList lst = editor->widget()->tqmetaObject()->propertyNames( allProperties ); PropertyItem *item = 0; TQMap unique; TQObject *w = editor->widget(); TQStringList valueSet; - bool parentHasLayout = + bool tqparentHasLayout = w->isWidgetType() && - !editor->formWindow()->isMainContainer( (TQWidget*)w ) && ( (TQWidget*)w )->parentWidget() && - WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; + !editor->formWindow()->isMainContainer( TQT_TQOBJECT((TQWidget*)w) ) && ( (TQWidget*)w )->tqparentWidget() && + WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout; for ( TQPtrListIterator it( lst ); it.current(); ++it ) { const TQMetaProperty* p = - editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties ); + editor->widget()->tqmetaObject()-> + property( editor->widget()->tqmetaObject()->tqfindProperty( it.current(), allProperties), allProperties ); if ( !p ) continue; - if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) + if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) ) continue; - if ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) { + if ( editor->widget()->inherits( "TQDesignerToolBar" ) || editor->widget()->inherits( "TQDesignerMenuBar" ) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) @@ -2552,14 +2552,14 @@ void PropertyList::setupProperties() continue; if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) continue; - if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) + if ( qstrcmp( p->name(), "tqminimumSize" ) == 0 ) continue; - if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) + if ( qstrcmp( p->name(), "tqmaximumSize" ) == 0 ) continue; } - unique.insert( TQString::fromLatin1( it.current() ), true ); + unique.insert( TQString::tqfromLatin1( it.current() ), true ); if ( editor->widget()->isWidgetType() && - editor->formWindow()->isMainContainer( (TQWidget*)editor->widget() ) ) { + editor->formWindow()->isMainContainer( TQT_TQOBJECT((TQWidget*)editor->widget()) ) ) { if ( qstrcmp( p->name(), "geometry" ) == 0 ) continue; } else { // hide some toplevel-only stuff @@ -2573,9 +2573,9 @@ void PropertyList::setupProperties() continue; if ( qstrcmp( p->name(), "baseSize" ) == 0 ) continue; - if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) + if ( tqparentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) continue; - if ( w->inherits( "QLayoutWidget" ) || w->inherits( "Spacer" ) ) { + if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) || w->inherits( "Spacer" ) ) { if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) @@ -2588,9 +2588,9 @@ void PropertyList::setupProperties() continue; if ( qstrcmp( p->name(), "geometry" ) == 0 ) continue; - if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) + if ( qstrcmp( p->name(), "tqminimumSize" ) == 0 ) continue; - if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) + if ( qstrcmp( p->name(), "tqmaximumSize" ) == 0 ) continue; if ( qstrcmp( p->name(), "enabled" ) == 0 ) continue; @@ -2632,17 +2632,17 @@ void PropertyList::setupProperties() continue; if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) continue; - if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in Q_PROPERTY can take a function (isInButtonGroup() in this case) + if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case) if ( !editor->widget()->isWidgetType() || - !editor->widget()->parent() || - !editor->widget()->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) + !editor->widget()->tqparent() || + !editor->widget()->tqparent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) continue; } if ( p->designable(w) ) { if ( p->isSetType() ) { - if ( TQString( p->name() ) == "alignment" ) { + if ( TQString( p->name() ) == "tqalignment" ) { TQStringList lst; lst << p->valueToKey( AlignAuto ) << p->valueToKey( AlignLeft ) @@ -2672,14 +2672,14 @@ void PropertyList::setupProperties() item->setChanged( true, false ); } } else { - qWarning( "Sets except 'alignment' not supported yet.... %s.", p->name() ); + qWarning( "Sets except 'tqalignment' not supported yet.... %s.", p->name() ); } } else if ( p->isEnumType() ) { TQStrList l = p->enumKeys(); TQStringList lst; for ( uint i = 0; i < l.count(); ++i ) { TQString k = l.at( i ); - // filter out enum-masks + // filter out enum-tqmasks if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase ) continue; lst << l.at( i ); @@ -2693,7 +2693,7 @@ void PropertyList::setupProperties() } } if ( item && !p->isSetType() ) { - if ( valueSet.findIndex( item->name() ) == -1 ) { + if ( valueSet.tqfindIndex( item->name() ) == -1 ) { setPropertyValue( item ); valueSet << item->name(); } @@ -2702,19 +2702,19 @@ void PropertyList::setupProperties() } } - if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) && - w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { - item = new PropertyIntItem( this, item, 0, "layoutSpacing", true ); + if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) && + w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { + item = new PropertyIntItem( this, item, 0, "tqlayoutSpacing", true ); setPropertyValue( item ); item->setChanged( true ); - item = new PropertyIntItem( this, item, 0, "layoutMargin", true ); + item = new PropertyIntItem( this, item, 0, "tqlayoutMargin", true ); setPropertyValue( item ); item->setChanged( true ); } - if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) && - !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) { + if ( !w->inherits( "Spacer" ) && !w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) && + !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) ) { item = new PropertyTextItem( this, item, 0, "toolTip", true, false ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) @@ -2725,9 +2725,9 @@ void PropertyList::setupProperties() item->setChanged( true, false ); } -#ifndef QT_NO_SQL +#ifndef TQT_NO_SQL if ( !editor->widget()->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !editor->widget()->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) && - !editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) && parent_is_data_aware( editor->widget() ) ) { + !editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) && tqparent_is_data_aware( editor->widget() ) ) { item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) @@ -2750,7 +2750,7 @@ void PropertyList::setupProperties() MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); if ( cw ) { for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( unique.contains( TQString( (*it).property ) ) ) + if ( unique.tqcontains( TQString( (*it).property ) ) ) continue; unique.insert( TQString( (*it).property ), true ); addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); @@ -2768,7 +2768,7 @@ void PropertyList::setupProperties() sort(); setSorting( -1 ); setCurrentItem( firstChild() ); - qApp->processEvents(); + tqApp->processEvents(); } updateEditorSize(); @@ -2785,7 +2785,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, case TQVariant::CString: item = new PropertyTextItem( this, item, 0, name, name == "name" && - editor->widget() == editor->formWindow()->mainContainer(), + TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()), false, true ); break; case TQVariant::Bool: @@ -2882,7 +2882,7 @@ void PropertyList::valueChanged( PropertyItem *i ) { if ( !editor->widget() ) return; - TQString pn( i18n("Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + TQString pn( i18n("Set '%1' of '%2'" ).tqarg( i->name() ).tqarg( editor->widget()->name() ) ); SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), editor->widget(), editor, i->name(), WidgetFactory::property( editor->widget(), i->name() ), @@ -2921,10 +2921,10 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) return true; PropertyItem *i = (PropertyItem*)currentItem(); - if ( o != this &&e->type() == TQEvent::KeyPress ) { + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) && - ( o != this || o != viewport() ) && + ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) && !( ke->state() & ControlButton ) ) { TQApplication::sendEvent( this, (TQKeyEvent*)e ); return true; @@ -2946,7 +2946,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) } } else if ( e->type() == TQEvent::FocusOut && o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) && editor->formWindow() ) { TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); - } else if ( o == viewport() ) { + } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) { TQMouseEvent *me; PropertyListItem* i; switch ( e->type() ) { @@ -2961,7 +2961,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::MouseMove: me = (TQMouseEvent*)e; - if ( me && me->state() & LeftButton && mousePressed) { + if ( me && me->state() & Qt::LeftButton && mousePressed) { i = (PropertyListItem*) itemAt( me->pos() ); if( i && i == pressItem ) { @@ -2996,7 +2996,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) default: break; } - } else if ( o == header() ) { + } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) { if ( e->type() == TQEvent::ContextMenu ) { ((TQContextMenuEvent *)e)->accept(); TQPopupMenu menu( 0 ); @@ -3048,9 +3048,9 @@ static void clearAlignList( TQStrList &l ) { if ( l.count() == 1 ) return; - if ( l.find( "AlignAuto" ) != -1 ) + if ( l.tqfind( "AlignAuto" ) != -1 ) l.remove( "AlignAuto" ); - if ( l.find( "WordBreak" ) != -1 ) + if ( l.tqfind( "WordBreak" ) != -1 ) l.remove( "WordBreak" ); } @@ -3061,33 +3061,33 @@ static void clearAlignList( TQStrList &l ) void PropertyList::setPropertyValue( PropertyItem *i ) { const TQMetaProperty *p = - editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( i->name(), true), true ); + editor->widget()->tqmetaObject()-> + property( editor->widget()->tqmetaObject()->tqfindProperty( i->name(), true), true ); if ( !p ) { if ( i->name() == "hAlign" ) { - int align = editor->widget()->property( "alignment" ).toInt(); - p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( "alignment", true ), true ); + int align = editor->widget()->property( "tqalignment" ).toInt(); + p = editor->widget()->tqmetaObject()-> + property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", true ), true ); align &= ~AlignVertical_Mask; TQStrList l = p->valueToKeys( align ); clearAlignList( l ); ( (PropertyListItem*)i )->setCurrentItem( l.last() ); } else if ( i->name() == "vAlign" ) { - int align = editor->widget()->property( "alignment" ).toInt(); - p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( "alignment", true ), true ); + int align = editor->widget()->property( "tqalignment" ).toInt(); + p = editor->widget()->tqmetaObject()-> + property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", true ), true ); align &= ~AlignHorizontal_Mask; ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() ); } else if ( i->name() == "wordwrap" ) { - int align = editor->widget()->property( "alignment" ).toInt(); + int align = editor->widget()->property( "tqalignment" ).toInt(); if ( align & WordBreak ) i->setValue( TQVariant( true, 0 ) ); else i->setValue( TQVariant( false, 0 ) ); - } else if ( i->name() == "layoutSpacing" ) { - ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) ); - } else if ( i->name() == "layoutMargin" ) { - ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) ); + } else if ( i->name() == "tqlayoutSpacing" ) { + ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) ); + } else if ( i->name() == "tqlayoutMargin" ) { + ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) ); } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) { i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); } else if ( editor->widget()->inherits( "CustomWidget" ) ) { @@ -3134,7 +3134,7 @@ void PropertyList::resetProperty() PropertyItem *i = (PropertyItem*)currentItem(); if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) ) return; - TQString pn( i18n("Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + TQString pn( i18n("Reset '%1' of '%2'" ).tqarg( i->name() ).tqarg( editor->widget()->name() ) ); SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), editor->widget(), editor, i->name(), i->value(), @@ -3224,24 +3224,24 @@ void PropertyList::showCurrentWhatsThis() TQString PropertyList::whatsThisText( TQListViewItem *i ) { if ( !i || !editor->widget() ) - return TQString::null; + return TQString(); readPropertyDocs(); if ( ( (PropertyItem*)i )->propertyParent() ) i = ( (PropertyItem*)i )->propertyParent(); - const TQMetaObject *mo = editor->widget()->metaObject(); + const TQMetaObject *mo = editor->widget()->tqmetaObject(); TQString prop = ( (PropertyItem*)i )->name(); while ( mo ) { TQString s; s = TQString( mo->className() ) + "::" + prop; TQMap::Iterator it; - if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) { + if ( ( it = propertyDocs.tqfind( s ) ) != propertyDocs.end() ) { return *it; } - mo = mo->superClass(); + mo = mo->tqsuperClass(); } - return i18n("

TQWidget::%1

There is no documentation available for this property.

" ).arg( prop ); + return i18n("

TQWidget::%1

There is no documentation available for this property.

" ).tqarg( prop ); } void PropertyList::readPropertyDocs() @@ -3278,8 +3278,8 @@ void PropertyList::readPropertyDocs() // ------------------------------------------------------------ #ifndef KOMMANDER -EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ) - : HierarchyList( parent, fw, true ), editor( e ) +EventList::EventList( TQWidget *tqparent, FormWindow *fw, PropertyEditor *e ) + : HierarchyList( tqparent, fw, true ), editor( e ) { header()->hide(); removeColumn( 1 ); @@ -3307,7 +3307,7 @@ void EventList::setup() return; for ( TQValueList::Iterator it = events.begin(); it != events.end(); ++it ) { HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (*it).name, - TQString::null, TQString::null ); + TQString(), TQString() ); eventItem->setOpen( true ); TQStringList funcs = MetaDataBase::eventFunctions( editor->widget(), (*it).name, @@ -3318,7 +3318,7 @@ void EventList::setup() #endif for ( TQStringList::Iterator fit = funcs.begin(); fit != funcs.end(); ++fit ) { HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, - *fit, TQString::null, TQString::null ); + *fit, TQString(), TQString() ); item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) ); } #if 0 // ### for conversation from old to new @@ -3327,12 +3327,12 @@ void EventList::setup() #endif } } else { - TQStrList sigs = editor->widget()->metaObject()->signalNames( true ); + TQStrList sigs = editor->widget()->tqmetaObject()->signalNames( true ); sigs.remove( "destroyed()" ); TQStrListIterator it( sigs ); while ( it.current() ) { HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, - it.current(), TQString::null, TQString::null ); + it.current(), TQString(), TQString() ); eventItem->setOpen( true ); TQValueList conns = MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() ); @@ -3341,7 +3341,7 @@ void EventList::setup() MetaDataBase::normalizeSlot( TQString( it.current() ) ) ) continue; HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, - (*cit).slot, TQString::null, TQString::null ); + (*cit).slot, TQString(), TQString() ); item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) ); } ++it; @@ -3354,7 +3354,7 @@ extern TQListViewItem *newItem; void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) { TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); - if ( !i || i->parent() ) + if ( !i || i->tqparent() ) return; TQString s; #ifndef KOMMANDER @@ -3363,7 +3363,7 @@ void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) if ( MetaDataBase::hasEvents( "C++" ) ) { #endif TQString s1 = i->text( 0 ); - int pt = s1.find( "(" ); + int pt = s1.tqfind( "(" ); if ( pt != -1 ) s1 = s1.left( pt ); s = TQString( editor->widget()->name() ) + "_" + s1; @@ -3380,7 +3380,7 @@ void EventList::setCurrent( TQWidget * ) void EventList::objectClicked( TQListViewItem *i ) { - if ( !i || !i->parent() ) + if ( !i || !i->tqparent() ) return; formWindow->mainWindow()->editFunction( i->text( 0 ) ); } @@ -3402,29 +3402,29 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) #else if ( MetaDataBase::hasEvents( "C++" ) ) { #endif - TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 ); - int pt = s1.find( "(" ); + TQString s1 = ( i->tqparent() ? i->tqparent() : i )->text( 0 ); + int pt = s1.tqfind( "(" ); if ( pt != -1 ) s1 = s1.left( pt ); s = TQString( editor->widget()->name() ) + "_" + s1; } else { - s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 ); + s = TQString( editor->widget()->name() ) + "_" + ( i->tqparent() ? i->tqparent() : i )->text( 0 ); } - insertEntry( i->parent() ? i->parent() : i, PixmapChooser::loadPixmap( "editslots.xpm" ), s ); - } else if ( res == DEL_ITEM && i->parent() ) { + insertEntry( i->tqparent() ? i->tqparent() : i, PixmapChooser::loadPixmap( "editslots.xpm" ), s ); + } else if ( res == DEL_ITEM && i->tqparent() ) { #ifndef KOMMANDER if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) { #else if ( MetaDataBase::hasEvents( "C++" ) ) { #endif - TQListViewItem *p = i->parent(); + TQListViewItem *p = i->tqparent(); delete i; save( p ); } else { MetaDataBase::Connection conn; conn.sender = editor->widget(); conn.receiver = formWindow->mainContainer(); - conn.signal = i->parent()->text( 0 ); + conn.signal = i->tqparent()->text( 0 ); conn.slot = i->text( 0 ); delete i; RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n("Remove Connection" ), @@ -3443,9 +3443,9 @@ void EventList::renamed( TQListViewItem *i ) { if ( newItem == i ) newItem = 0; - if ( !i->parent() ) + if ( !i->tqparent() ) return; - TQListViewItem *itm = i->parent()->firstChild(); + TQListViewItem *itm = i->tqparent()->firstChild(); bool del = false; while ( itm ) { if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) { @@ -3464,7 +3464,7 @@ void EventList::renamed( TQListViewItem *i ) if ( MetaDataBase::hasEvents( "C++" ) ) { #endif - save( i->parent() ); + save( i->tqparent() ); editor->formWindow()->mainWindow()-> #ifndef KOMMANDER editFunction( i->text( 0 ), editor->formWindow()->project()->language(), true ); @@ -3475,7 +3475,7 @@ void EventList::renamed( TQListViewItem *i ) MetaDataBase::Connection conn; conn.sender = editor->widget(); conn.receiver = formWindow->mainContainer(); - conn.signal = i->parent()->text( 0 ); + conn.signal = i->tqparent()->text( 0 ); conn.slot = i->text( 0 ); AddConnectionCommand *cmd = new AddConnectionCommand( i18n("Add Connection" ), formWindow, @@ -3491,7 +3491,7 @@ void EventList::renamed( TQListViewItem *i ) "C++", "void" ); #endif editor->formWindow()->mainWindow()-> - editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), + editFunction( i->text( 0 ).left( i->text( 0 ).tqfind( "(" ) ), #ifndef KOMMANDER editor->formWindow()->project()->language(), true ); #else @@ -3535,8 +3535,8 @@ void EventList::save( TQListViewItem *p ) listview for editing properties. */ -PropertyEditor::PropertyEditor( TQWidget *parent ) - : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | +PropertyEditor::PropertyEditor( TQWidget *tqparent ) + : TQTabWidget( tqparent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) { setCaption( i18n("Property Editor" ) ); @@ -3563,11 +3563,11 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) #endif if ( w && w == wid ) { bool ret = true; - if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { + if ( wid->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { TQListViewItemIterator it( listview ); ret = false; while ( it.current() ) { - if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) { + if ( it.current()->text( 0 ) == "tqlayoutSpacing" || it.current()->text( 0 ) == "tqlayoutMargin" ) { ret = true; break; } @@ -3588,7 +3588,7 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) wid = w; formwindow = fw; - setCaption( i18n("Property Editor (%1)" ).arg( formwindow->name() ) ); + setCaption( i18n("Property Editor (%1)" ).tqarg( formwindow->name() ) ); listview->viewport()->setUpdatesEnabled( false ); listview->setUpdatesEnabled( false ); clear(); @@ -3662,7 +3662,7 @@ FormWindow *PropertyEditor::formWindow() const TQString PropertyEditor::currentProperty() const { if ( !wid ) - return TQString::null; + return TQString(); if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() ) return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name(); return ( (PropertyItem*)listview->currentItem() )->name(); @@ -3671,24 +3671,24 @@ TQString PropertyEditor::currentProperty() const TQString PropertyEditor::classOfCurrentProperty() const { if ( !wid ) - return TQString::null; + return TQString(); TQObject *o = wid; TQString curr = currentProperty(); - TQMetaObject *mo = o->metaObject(); + TQMetaObject *mo = o->tqmetaObject(); while ( mo ) { TQStrList props = mo->propertyNames( false ); - if ( props.find( curr.latin1() ) != -1 ) + if ( props.tqfind( curr.latin1() ) != -1 ) return mo->className(); - mo = mo->superClass(); + mo = mo->tqsuperClass(); } - return TQString::null; + return TQString(); } -TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const +TQMetaObject* PropertyEditor::tqmetaObjectOfCurrentProperty() const { if ( !wid ) return 0; - return wid->metaObject(); + return wid->tqmetaObject(); } void PropertyEditor::resetFocus() -- cgit v1.2.1