diff options
Diffstat (limited to 'kommander/editor/widgetfactory.cpp')
-rw-r--r-- | kommander/editor/widgetfactory.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp index 9f619c79..585d720d 100644 --- a/kommander/editor/widgetfactory.cpp +++ b/kommander/editor/widgetfactory.cpp @@ -399,7 +399,7 @@ TQMap< int, TQStringList > *changedProperties = 0; void WidgetFactory::saveDefaultProperties( TQWidget *w, int id ) { TQMap< TQString, TQVariant> propMap; - TQStrList lst = w->tqmetaObject()->propertyNames( true ); + TQStrList lst = w->metaObject()->propertyNames( true ); for ( uint i = 0; i < lst.count(); ++i ) { TQVariant var = w->property( lst.at( i ) ); if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 ) @@ -710,21 +710,21 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay l = new TQHBoxLayout( gb->tqlayout() ); MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin ); MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing ); - l->tqsetAlignment( AlignTop ); + l->setAlignment( AlignTop ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case VBox: l = new TQVBoxLayout( gb->tqlayout(), spacing ); MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin ); MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing ); - l->tqsetAlignment( AlignTop ); + l->setAlignment( AlignTop ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: l = new QDesignerGridLayout( gb->tqlayout() ); MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin ); MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing ); - l->tqsetAlignment( AlignTop ); + l->setAlignment( AlignTop ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; default: @@ -838,7 +838,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare if (init) { b = new QDesignerPushButton(parent, name); - b->setText(TQString::tqfromLatin1(name)); + b->setText(TQString::fromLatin1(name)); } else { b = new QDesignerPushButton(parent, name); @@ -860,7 +860,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare if (init) { QDesignerCheckBox *cb = new QDesignerCheckBox(parent, name); - cb->setText(TQString::tqfromLatin1(name)); + cb->setText(TQString::fromLatin1(name)); return cb; } return new QDesignerCheckBox(parent, name); @@ -869,19 +869,19 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare if (init) { QDesignerRadioButton *rb = new QDesignerRadioButton(parent, name); - rb->setText(TQString::tqfromLatin1(name)); + rb->setText(TQString::fromLatin1(name)); return rb; } return new QDesignerRadioButton(parent, name); } else if (className == TQGROUPBOX_OBJECT_NAME_STRING) { if (init) - return new TQGroupBox(TQString::tqfromLatin1(name), parent, name); + return new TQGroupBox(TQString::fromLatin1(name), parent, name); return new TQGroupBox(parent, name); } else if (className == TQBUTTONGROUP_OBJECT_NAME_STRING) { if (init) - return new TQButtonGroup(TQString::tqfromLatin1(name), parent, name); + return new TQButtonGroup(TQString::fromLatin1(name), parent, name); return new TQButtonGroup(parent, name); } else if (className == TQICONVIEW_OBJECT_NAME_STRING) { @@ -950,7 +950,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare QDesignerLabel *l = new QDesignerLabel(parent, name); if (init) { - l->setText(TQString::tqfromLatin1(name)); + l->setText(TQString::fromLatin1(name)); MetaDataBase::addEntry(TQT_TQOBJECT(l)); MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "text", true); } @@ -1668,7 +1668,7 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) { - const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()-> + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()-> findProperty( propName, true ), true ); if (!p ) return false; @@ -1681,7 +1681,7 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) int v = defaultValue( w, "tqalignment" ).toInt(); return TQVariant( ( v & WordBreak ) == WordBreak, 0 ); } else if ( propName == "toolTip" || propName == "whatsThis" ) { - return TQVariant( TQString::tqfromLatin1( "" ) ); + return TQVariant( TQString::fromLatin1( "" ) ); } else if ( w->inherits( "CustomWidget" ) ) { return TQVariant(); } else if ( propName == "frameworkCode" ) { @@ -1701,8 +1701,8 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) { - const TQMetaProperty *p = w->tqmetaObject()-> - property( w->tqmetaObject()->findProperty( propName, true ), true ); + const TQMetaProperty *p = w->metaObject()-> + property( w->metaObject()->findProperty( propName, true ), true ); if ( !p ) { int v = defaultValue( w, "tqalignment" ).toInt(); if ( propName == "hAlign" ) { @@ -1751,7 +1751,7 @@ void QDesignerLabel::updateBuddy() if ( myBuddy.isEmpty() ) return; - TQObjectList *l = tqtopLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, false, true ); + TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, false, true ); if ( !l || !l->first() ) { delete l; return; @@ -1800,7 +1800,7 @@ void TQLayoutWidget::updateSizePolicy() { TQObjectList clo = childrenListObject(); if ( clo.isEmpty() || clo.count() == 0 ) { - sp = TQWidget::tqsizePolicy(); + sp = TQWidget::sizePolicy(); return; } @@ -1844,13 +1844,13 @@ void TQLayoutWidget::updateSizePolicy() continue; TQWidget *w = (TQWidget*)o; - if ( !w->tqsizePolicy().mayGrowHorizontally() ) + if ( !w->sizePolicy().mayGrowHorizontally() ) ht &= ~TQSizePolicy::Minimum; - if ( !w->tqsizePolicy().mayShrinkHorizontally() ) + if ( !w->sizePolicy().mayShrinkHorizontally() ) ht &= ~TQSizePolicy::Maximum; - if ( w->tqsizePolicy().mayGrowVertically() ) + if ( w->sizePolicy().mayGrowVertically() ) vt |= TQSizePolicy::Minimum; - if ( w->tqsizePolicy().mayShrinkVertically() ) + if ( w->sizePolicy().mayShrinkVertically() ) vt |= TQSizePolicy::Maximum; } } else if ( tqlayout()->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) { @@ -1865,13 +1865,13 @@ void TQLayoutWidget::updateSizePolicy() continue; TQWidget *w = (TQWidget*)o; - if ( w->tqsizePolicy().mayGrowHorizontally() ) + if ( w->sizePolicy().mayGrowHorizontally() ) ht |= TQSizePolicy::Minimum; - if ( w->tqsizePolicy().mayShrinkHorizontally() ) + if ( w->sizePolicy().mayShrinkHorizontally() ) ht |= TQSizePolicy::Maximum; - if ( !w->tqsizePolicy().mayGrowVertically() ) + if ( !w->sizePolicy().mayGrowVertically() ) vt &= ~TQSizePolicy::Minimum; - if ( !w->tqsizePolicy().mayShrinkVertically() ) + if ( !w->sizePolicy().mayShrinkVertically() ) vt &= ~TQSizePolicy::Maximum; } } else if ( tqlayout()->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { @@ -1890,20 +1890,20 @@ void TQLayoutWidget::updateSizePolicy() continue; TQWidget *w = (TQWidget*)o; - if ( w->tqsizePolicy().mayGrowHorizontally() ) + if ( w->sizePolicy().mayGrowHorizontally() ) ht |= TQSizePolicy::Minimum; - if ( w->tqsizePolicy().mayShrinkHorizontally() ) + if ( w->sizePolicy().mayShrinkHorizontally() ) ht |= TQSizePolicy::Maximum; - if ( w->tqsizePolicy().mayGrowVertically() ) + if ( w->sizePolicy().mayGrowVertically() ) vt |= TQSizePolicy::Minimum; - if ( w->tqsizePolicy().mayShrinkVertically() ) + if ( w->sizePolicy().mayShrinkVertically() ) vt |= TQSizePolicy::Maximum; } } #ifdef USE_QT4 - if ( tqlayout()->expandingDirections() & TQSizePolicy::Horizontally ) + if ( tqlayout()->expanding() & TQSizePolicy::Horizontally ) ht = TQSizePolicy::Expanding; - if ( tqlayout()->expandingDirections() & TQSizePolicy::Vertically ) + if ( tqlayout()->expanding() & TQSizePolicy::Vertically ) vt = TQSizePolicy::Expanding; #else // USE_QT4 if ( tqlayout()->expanding() & TQSizePolicy::Horizontally ) @@ -1925,7 +1925,7 @@ void CustomWidget::paintEvent( TQPaintEvent *e ) ( (FormWindow*)parentWidget() )->paintGrid( this, e ); } else { TQPainter p( this ); - p.fillRect( rect(), tqcolorGroup().dark() ); + p.fillRect( rect(), colorGroup().dark() ); p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2, ( height() - cusw->pixmap->height() ) / 2, *cusw->pixmap ); |