From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khtml/rendering/render_form.cpp | 242 ++++++++++++++++++++-------------------- 1 file changed, 121 insertions(+), 121 deletions(-) (limited to 'khtml/rendering/render_form.cpp') diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp index 58a9a8d33..ca556ecb5 100644 --- a/khtml/rendering/render_form.cpp +++ b/khtml/rendering/render_form.cpp @@ -81,7 +81,7 @@ void RenderFormElement::updateFromElement() RenderWidget::updateFromElement(); } -void RenderFormElement::layout() +void RenderFormElement::tqlayout() { KHTMLAssert( needsLayout() ); KHTMLAssert( minMaxKnown() ); @@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQCheckBox *cb = static_cast( m_widget ); - TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ), - cb->style().pixelMetric( TQStyle::PM_IndicatorHeight ) ); + TQSize s( cb->style().tqpixelMetric( TQStyle::PM_IndicatorWidth ), + cb->style().tqpixelMetric( TQStyle::PM_IndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -207,8 +207,8 @@ void RenderRadioButton::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQRadioButton *rb = static_cast( m_widget ); - TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), - rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); + TQSize s( rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), + rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -260,17 +260,17 @@ void RenderSubmitButton::calcMinMaxWidth() bool empty = raw.isEmpty(); if ( empty ) - raw = TQString::fromLatin1("X"); + raw = TQString::tqfromLatin1("X"); TQFontMetrics fm = pb->fontMetrics(); TQSize ts = fm.size( ShowPrefix, raw); TQSize s(pb->style().sizeFromContents( TQStyle::CT_PushButton, pb, ts ) .expandedTo(TQApplication::globalStrut())); - int margin = pb->style().pixelMetric( TQStyle::PM_ButtonMargin, pb) + - pb->style().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; + int margin = pb->style().tqpixelMetric( TQStyle::PM_ButtonMargin, pb) + + pb->style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; int w = ts.width() + margin; int h = s.height(); if (pb->isDefault() || pb->autoDefault()) { - int dbw = pb->style().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; + int dbw = pb->style().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; w += dbw; } @@ -491,7 +491,7 @@ void RenderLineEdit::setStyle(RenderStyle* _style) { RenderFormElement::setStyle( _style ); - widget()->setAlignment(textAlignment()); + widget()->tqsetAlignment(textAlignment()); } void RenderLineEdit::highLightWord( unsigned int length, unsigned int pos ) @@ -642,13 +642,13 @@ RenderFieldset::RenderFieldset(HTMLGenericFormElementImpl *element) { } -RenderObject* RenderFieldset::layoutLegend(bool relayoutChildren) +RenderObject* RenderFieldset::tqlayoutLegend(bool retqlayoutChildren) { - RenderObject* legend = findLegend(); + RenderObject* legend = tqfindLegend(); if (legend) { - if (relayoutChildren) + if (retqlayoutChildren) legend->setNeedsLayout(true); - legend->layoutIfNeeded(); + legend->tqlayoutIfNeeded(); int xPos = borderLeft() + paddingLeft() + legend->marginLeft(); if (style()->direction() == RTL) @@ -661,7 +661,7 @@ RenderObject* RenderFieldset::layoutLegend(bool relayoutChildren) return legend; } -RenderObject* RenderFieldset::findLegend() +RenderObject* RenderFieldset::tqfindLegend() { for (RenderObject* legend = firstChild(); legend; legend = legend->nextSibling()) { if (!legend->isFloatingOrPositioned() && legend->element() && @@ -675,7 +675,7 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& pI, int _tx, int _ty) { //kdDebug( 6040 ) << renderName() << "::paintDecorations()" << endl; - RenderObject* legend = findLegend(); + RenderObject* legend = tqfindLegend(); if (!legend) return RenderBlock::paintBoxDecorations(pI, _tx, _ty); @@ -768,8 +768,8 @@ void RenderFieldset::setStyle(RenderStyle* _style) RenderBlock::setStyle(_style); // WinIE renders fieldsets with display:inline like they're inline-blocks. For us, - // an inline-block is just a block element with replaced set to true and inline set - // to true. Ensure that if we ended up being inline that we set our replaced flag + // an inline-block is just a block element with tqreplaced set to true and inline set + // to true. Ensure that if we ended up being inline that we set our tqreplaced flag // so that we're treated like an inline-block. if (isInline()) setReplaced(true); @@ -809,7 +809,7 @@ void RenderFileButton::calcMinMaxWidth() edit, TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth())) .expandedTo(TQApplication::globalStrut()); - TQSize bs = static_cast( m_widget )->minimumSizeHint() - edit->minimumSizeHint(); + TQSize bs = static_cast( m_widget )->tqminimumSizeHint() - edit->tqminimumSizeHint(); setIntrinsicWidth( s.width() + bs.width() ); setIntrinsicHeight( kMax(s.height(), bs.height()) ); @@ -1018,7 +1018,7 @@ void RenderSelect::updateFromElement() DOMString label = optElem->getAttribute(ATTR_LABEL); if (!label.isEmpty()) text = label.string(); - text = TQString::fromLatin1(" ")+text; + text = TQString::tqfromLatin1(" ")+text; } if(m_useListBox) { @@ -1065,14 +1065,14 @@ void RenderSelect::calcMinMaxWidth() // ### ugly HACK FIXME!!! setMinMaxKnown(); - layoutIfNeeded(); + tqlayoutIfNeeded(); setNeedsLayoutAndMinMaxRecalc(); // ### end FIXME RenderFormElement::calcMinMaxWidth(); } -void RenderSelect::layout( ) +void RenderSelect::tqlayout( ) { KHTMLAssert(needsLayout()); KHTMLAssert(minMaxKnown()); @@ -1107,21 +1107,21 @@ void RenderSelect::layout( ) if(size < 1) size = kMin(static_cast(m_widget)->count(), 10u); - width += 2*w->frameWidth() + w->verticalScrollBar()->sizeHint().width(); + width += 2*w->frameWidth() + w->verticalScrollBar()->tqsizeHint().width(); height = size*height + 2*w->frameWidth(); setIntrinsicWidth( width ); setIntrinsicHeight( height ); } else { - TQSize s(m_widget->sizeHint()); + TQSize s(m_widget->tqsizeHint()); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); } /// uuh, ignore the following line.. setNeedsLayout(true); - RenderFormElement::layout(); + RenderFormElement::tqlayout(); // and now disable the widget in case there is no