summaryrefslogtreecommitdiffstats
path: root/khtml/rendering
diff options
context:
space:
mode:
Diffstat (limited to 'khtml/rendering')
-rw-r--r--khtml/rendering/font.cpp2
-rw-r--r--khtml/rendering/render_box.cpp2
-rw-r--r--khtml/rendering/render_canvas.cpp10
-rw-r--r--khtml/rendering/render_form.cpp44
-rw-r--r--khtml/rendering/render_form.h2
-rw-r--r--khtml/rendering/render_frames.cpp4
-rw-r--r--khtml/rendering/render_frames.h4
-rw-r--r--khtml/rendering/render_generated.cpp2
-rw-r--r--khtml/rendering/render_image.cpp6
-rw-r--r--khtml/rendering/render_layer.cpp6
-rw-r--r--khtml/rendering/render_list.cpp18
-rw-r--r--khtml/rendering/render_object.cpp12
-rw-r--r--khtml/rendering/render_replaced.cpp84
-rw-r--r--khtml/rendering/render_table.cpp2
-rw-r--r--khtml/rendering/render_text.cpp12
-rw-r--r--khtml/rendering/render_text.h2
16 files changed, 106 insertions, 106 deletions
diff --git a/khtml/rendering/font.cpp b/khtml/rendering/font.cpp
index 64ede83e3..766c89840 100644
--- a/khtml/rendering/font.cpp
+++ b/khtml/rendering/font.cpp
@@ -407,7 +407,7 @@ bool Font::isFontScalable(TQFontDatabase& db, const TQFont& font)
/* Cache size info */
if (!scalSizesCache)
scalSizesCache = new TQMap<ScalKey, TQValueList<int> >;
- (*scalSizesCache)[key] = db.smoothSizes(font.family(), db.styleString(font));
+ (*scalSizesCache)[key] = db.tqsmoothSizes(font.family(), db.styleString(font));
}
}
diff --git a/khtml/rendering/render_box.cpp b/khtml/rendering/render_box.cpp
index 602b07d0a..e558352af 100644
--- a/khtml/rendering/render_box.cpp
+++ b/khtml/rendering/render_box.cpp
@@ -346,7 +346,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
}
if( !bgColor.isValid() && canvas()->view())
- bgColor = canvas()->view()->palette().active().color(TQColorGroup::Base);
+ bgColor = canvas()->view()->tqpalette().active().color(TQColorGroup::Base);
int w = width();
int h = height();
diff --git a/khtml/rendering/render_canvas.cpp b/khtml/rendering/render_canvas.cpp
index 2065d8b1a..c06f9f15d 100644
--- a/khtml/rendering/render_canvas.cpp
+++ b/khtml/rendering/render_canvas.cpp
@@ -329,7 +329,7 @@ void RenderCanvas::paintBoxDecorations(PaintInfo& paintInfo, int /*_tx*/, int /*
if ((firstChild() && firstChild()->style()->visibility() == VISIBLE) || !view())
return;
- paintInfo.p->fillRect(paintInfo.r, view()->palette().active().color(TQColorGroup::Base));
+ paintInfo.p->fillRect(paintInfo.r, view()->tqpalette().active().color(TQColorGroup::Base));
}
void RenderCanvas::tqrepaintRectangle(int x, int y, int w, int h, Priority p, bool f)
@@ -492,7 +492,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
no = no->nextSibling();
}
}
- if (os->selectionState() == SelectionInside && !oldSelectedInside.containsRef(os))
+ if (os->selectionState() == SelectionInside && !oldSelectedInside.tqcontainsRef(os))
oldSelectedInside.append(os);
os = no;
@@ -550,7 +550,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
if (no)
no = no->nextSibling();
}
- if (o->selectionState() == SelectionInside && !newSelectedInside.containsRef(o))
+ if (o->selectionState() == SelectionInside && !newSelectedInside.tqcontainsRef(o))
newSelectedInside.append(o);
o=no;
@@ -581,7 +581,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
TQPtrListIterator<RenderObject> oldIterator(oldSelectedInside);
bool firstRect = true;
for (; oldIterator.current(); ++oldIterator){
- if (!newSelectedInside.containsRef(oldIterator.current())){
+ if (!newSelectedInside.tqcontainsRef(oldIterator.current())){
if (firstRect){
updateRect = enclosingPositionedRect(oldIterator.current());
firstRect = false;
@@ -601,7 +601,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
TQPtrListIterator<RenderObject> newIterator(newSelectedInside);
firstRect = true;
for (; newIterator.current(); ++newIterator){
- if (!oldSelectedInside.containsRef(newIterator.current())){
+ if (!oldSelectedInside.tqcontainsRef(newIterator.current())){
if (firstRect){
updateRect = enclosingPositionedRect(newIterator.current());
firstRect = false;
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index f06dd4a62..272d402b4 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -104,20 +104,20 @@ TQ_Alignment RenderFormElement::textAlignment() const
switch (style()->textAlign()) {
case LEFT:
case KHTML_LEFT:
- return AlignLeft;
+ return Qt::AlignLeft;
case RIGHT:
case KHTML_RIGHT:
- return AlignRight;
+ return Qt::AlignRight;
case CENTER:
case KHTML_CENTER:
- return AlignHCenter;
+ return Qt::AlignHCenter;
case JUSTIFY:
// Just fall into the auto code for justify.
case TAAUTO:
- return style()->direction() == RTL ? AlignRight : AlignLeft;
+ return style()->direction() == RTL ? Qt::AlignRight : Qt::AlignLeft;
}
assert(false); // Should never be reached.
- return AlignLeft;
+ return Qt::AlignLeft;
}
// -------------------------------------------------------------------------
@@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() );
TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget );
- TQSize s( cb->style().tqpixelMetric( TQStyle::PM_IndicatorWidth ),
- cb->style().tqpixelMetric( TQStyle::PM_IndicatorHeight ) );
+ TQSize s( cb->tqstyle().tqpixelMetric( TQStyle::PM_IndicatorWidth ),
+ cb->tqstyle().tqpixelMetric( TQStyle::PM_IndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -207,8 +207,8 @@ void RenderRadioButton::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() );
TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget );
- TQSize s( rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
- rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
+ TQSize s( rb->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
+ rb->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -263,14 +263,14 @@ void RenderSubmitButton::calcMinMaxWidth()
raw = TQString::tqfromLatin1("X");
TQFontMetrics fm = pb->fontMetrics();
TQSize ts = fm.size( ShowPrefix, raw);
- TQSize s(pb->style().sizeFromContents( TQStyle::CT_PushButton, pb, ts )
+ TQSize s(pb->tqstyle().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts )
.expandedTo(TQApplication::globalStrut()));
- int margin = pb->style().tqpixelMetric( TQStyle::PM_ButtonMargin, pb) +
- pb->style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2;
+ int margin = pb->tqstyle().tqpixelMetric( TQStyle::PM_ButtonMargin, pb) +
+ pb->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2;
int w = ts.width() + margin;
int h = s.height();
if (pb->isDefault() || pb->autoDefault()) {
- int dbw = pb->style().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
+ int dbw = pb->tqstyle().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
w += dbw;
}
@@ -312,7 +312,7 @@ LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, KHTMLView* view
{
setMouseTracking(true);
KActionCollection *ac = new KActionCollection(this);
- m_spellAction = KStdAction::spelling( this, TQT_SLOT( slotCheckSpelling() ), ac );
+ m_spellAction = KStdAction::spelling( TQT_TQOBJECT(this), TQT_SLOT( slotCheckSpelling() ), ac );
}
LineEditWidget::~LineEditWidget()
@@ -328,7 +328,7 @@ void LineEditWidget::slotCheckSpelling()
}
delete m_spell;
- m_spell = new KSpell( this, i18n( "Spell Checking" ), this, TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
+ m_spell = new KSpell( this, i18n( "Spell Checking" ), TQT_TQOBJECT(this), TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
connect( m_spell, TQT_SIGNAL( death() ),this, TQT_SLOT( spellCheckerFinished() ) );
connect( m_spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ),this, TQT_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) );
@@ -805,7 +805,7 @@ void RenderFileButton::calcMinMaxWidth()
int h = fm.lineSpacing();
int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some"
KLineEdit* edit = static_cast<KURLRequester*>( m_widget )->lineEdit();
- TQSize s = edit->style().sizeFromContents(TQStyle::CT_LineEdit,
+ TQSize s = edit->tqstyle().tqsizeFromContents(TQStyle::CT_LineEdit,
edit,
TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth()))
.expandedTo(TQApplication::globalStrut());
@@ -890,7 +890,7 @@ bool ComboBoxWidget::event(TQEvent *e)
return true;
if (e->type()==TQEvent::KeyPress)
{
- TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
switch(ke->key())
{
case Key_Return:
@@ -907,9 +907,9 @@ bool ComboBoxWidget::event(TQEvent *e)
bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e)
{
- if (dest==listBox() && e->type()==TQEvent::KeyPress)
+ if (TQT_BASE_OBJECT(dest)==TQT_BASE_OBJECT(listBox()) && e->type()==TQEvent::KeyPress)
{
- TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
bool forward = false;
switch(ke->key())
{
@@ -1295,9 +1295,9 @@ TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent)
setMouseTracking(true);
KActionCollection *ac = new KActionCollection(this);
- m_findAction = KStdAction::find( this, TQT_SLOT( slotFind() ), ac );
- m_findNextAction = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac );
- m_replaceAction = KStdAction::replace( this, TQT_SLOT( slotReplace() ), ac );
+ m_findAction = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( slotFind() ), ac );
+ m_findNextAction = KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( slotFindNext() ), ac );
+ m_replaceAction = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( slotReplace() ), ac );
}
diff --git a/khtml/rendering/render_form.h b/khtml/rendering/render_form.h
index c414e079c..db5088d20 100644
--- a/khtml/rendering/render_form.h
+++ b/khtml/rendering/render_form.h
@@ -95,7 +95,7 @@ public:
protected:
virtual bool isRenderButton() const { return false; }
virtual bool isEditable() const { return false; }
- AlignmentFlags textAlignment() const;
+ TQ_Alignment textAlignment() const;
TQPoint m_mousePos;
int m_state;
diff --git a/khtml/rendering/render_frames.cpp b/khtml/rendering/render_frames.cpp
index b157df16d..08f26b8bd 100644
--- a/khtml/rendering/render_frames.cpp
+++ b/khtml/rendering/render_frames.cpp
@@ -550,7 +550,7 @@ bool RenderFrameSet::userResize( MouseEventImpl *evt )
TQPainter paint( view );
paint.setPen( Qt::gray );
paint.setBrush( Qt::gray );
- paint.setRasterOp( Qt::XorROP );
+ paint.setRasterOp( TQt::XorROP );
TQRect r(xPos(), yPos(), width(), height());
const int rBord = 3;
int sw = element()->border();
@@ -634,7 +634,7 @@ void RenderPart::setWidget( TQWidget *widget )
#endif
setQWidget( widget );
- widget->setFocusPolicy(TQWidget::WheelFocus);
+ widget->setFocusPolicy(TQ_WheelFocus);
if(widget->inherits("KHTMLView"))
connect( widget, TQT_SIGNAL( cleared() ), this, TQT_SLOT( slotViewCleared() ) );
diff --git a/khtml/rendering/render_frames.h b/khtml/rendering/render_frames.h
index c6e93cbe0..3dd7ed0d9 100644
--- a/khtml/rendering/render_frames.h
+++ b/khtml/rendering/render_frames.h
@@ -61,7 +61,7 @@ public:
bool canResize( int _x, int _y);
void setResizing(bool e);
- Qt::tqCursorShape cursorShape() const { return m_cursor; }
+ Qt::CursorShape cursorShape() const { return m_cursor; }
bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction hitTestAction, bool inside);
@@ -73,7 +73,7 @@ public:
#endif
private:
- Qt::tqCursorShape m_cursor;
+ Qt::CursorShape m_cursor;
int m_oldpos;
int m_gridLen[2];
int* m_gridDelta[2];
diff --git a/khtml/rendering/render_generated.cpp b/khtml/rendering/render_generated.cpp
index ba80a5aa1..f5fc70687 100644
--- a/khtml/rendering/render_generated.cpp
+++ b/khtml/rendering/render_generated.cpp
@@ -379,7 +379,7 @@ void RenderGlyph::paint(PaintInfo& paintInfo, int _tx, int _ty)
diamond[2] = TQPoint(x+s, y+2*s);
diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
- p->drawConvexPolygon( diamond, 0, 4 );
+ p->tqdrawConvexPolygon( diamond, 0, 4 );
return;
}
case LNONE:
diff --git a/khtml/rendering/render_image.cpp b/khtml/rendering/render_image.cpp
index 2db7e56bb..1cd79eb55 100644
--- a/khtml/rendering/render_image.cpp
+++ b/khtml/rendering/render_image.cpp
@@ -115,7 +115,7 @@ void RenderImage::setPixmap( const TQPixmap &p, const TQRect& r, CachedImage *o)
// we have an alt and the user meant it (its not a text we invented)
if ( element() && !alt.isEmpty() && !element()->getAttribute( ATTR_ALT ).isNull()) {
const TQFontMetrics &fm = style()->fontMetrics();
- TQRect br = fm.boundingRect ( 0, 0, 1024, 256, Qt::AlignAuto|Qt::WordBreak, alt.string() );
+ TQRect br = fm.boundingRect ( 0, 0, 1024, 256, TQt::AlignAuto|TQt::WordBreak, alt.string() );
if ( br.width() > iw )
iw = br.width();
if ( br.height() > ih )
@@ -266,7 +266,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
if ( !berrorPic ) {
//qDebug("qDrawShadePanel %d/%d/%d/%d", _tx + leftBorder, _ty + topBorder, cWidth, cHeight);
qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight,
- KApplication::palette().inactive(), true, 1 );
+ KApplication::tqpalette().inactive(), true, 1 );
}
TQPixmap const* pix = i ? &i->pixmap() : 0;
if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) )
@@ -283,7 +283,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
int ay = _ty + topBorder + topPad + 2;
const TQFontMetrics &fm = style()->fontMetrics();
if (cWidth>5 && cHeight>=fm.height())
- paintInfo.p->drawText(ax, ay+1, cWidth - 4, cHeight - 4, Qt::WordBreak, text );
+ paintInfo.p->drawText(ax, ay+1, cWidth - 4, cHeight - 4, TQt::WordBreak, text );
}
}
}
diff --git a/khtml/rendering/render_layer.cpp b/khtml/rendering/render_layer.cpp
index d1cdfa63e..fbb7a8dd6 100644
--- a/khtml/rendering/render_layer.cpp
+++ b/khtml/rendering/render_layer.cpp
@@ -637,7 +637,7 @@ int RenderLayer::verticalScrollbarWidth()
#ifdef APPLE_CHANGES
return m_vBar->width();
#else
- return m_vBar->style().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
+ return m_vBar->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
@@ -650,7 +650,7 @@ int RenderLayer::horizontalScrollbarHeight()
#ifdef APPLE_CHANGES
return m_hBar->height();
#else
- return m_hBar->style().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
+ return m_hBar->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
@@ -691,7 +691,7 @@ void RenderLayer::positionScrollbars(const TQRect& absBounds)
TQScrollBar *b = m_hBar;
if (!m_hBar)
b = m_vBar;
- int sw = b->style().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
+ int sw = b->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
if (m_vBar) {
TQRect vBarRect = TQRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1);
diff --git a/khtml/rendering/render_list.cpp b/khtml/rendering/render_list.cpp
index 45767a8bb..515283f8b 100644
--- a/khtml/rendering/render_list.cpp
+++ b/khtml/rendering/render_list.cpp
@@ -333,7 +333,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
diamond[2] = TQPoint(x+s, y+2*s);
diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
- p->drawConvexPolygon( diamond, 0, 4 );
+ p->tqdrawConvexPolygon( diamond, 0, 4 );
return;
}
case LNONE:
@@ -342,25 +342,25 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
if (!m_item.isEmpty()) {
if(listPositionInside()) {
if( style()->direction() == LTR) {
- p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
- p->drawText(_tx + fm.width(m_item), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip,
+ p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
+ p->drawText(_tx + fm.width(m_item), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip,
TQString::tqfromLatin1(". "));
}
else {
const TQString& punct(TQString::tqfromLatin1(" ."));
- p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, punct);
- p->drawText(_tx + fm.width(punct), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
+ p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, punct);
+ p->drawText(_tx + fm.width(punct), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
}
} else {
if (style()->direction() == LTR) {
const TQString& punct(TQString::tqfromLatin1(". "));
- p->drawText(_tx-offset/2, _ty, 0, 0, Qt::AlignRight|Qt::DontClip, punct);
- p->drawText(_tx-offset/2-fm.width(punct), _ty, 0, 0, Qt::AlignRight|Qt::DontClip, m_item);
+ p->drawText(_tx-offset/2, _ty, 0, 0, Qt::AlignRight|TQt::DontClip, punct);
+ p->drawText(_tx-offset/2-fm.width(punct), _ty, 0, 0, Qt::AlignRight|TQt::DontClip, m_item);
}
else {
const TQString& punct(TQString::tqfromLatin1(" ."));
- p->drawText(_tx+offset/2, _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, punct);
- p->drawText(_tx+offset/2+fm.width(punct), _ty, 0, 0, Qt::AlignLeft|Qt::DontClip, m_item);
+ p->drawText(_tx+offset/2, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, punct);
+ p->drawText(_tx+offset/2+fm.width(punct), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
}
}
}
diff --git a/khtml/rendering/render_object.cpp b/khtml/rendering/render_object.cpp
index 2efeae238..999bded25 100644
--- a/khtml/rendering/render_object.cpp
+++ b/khtml/rendering/render_object.cpp
@@ -748,7 +748,7 @@ void RenderObject::drawBorder(TQPainter *p, int x1, int y1, int x2, int y2,
if(!c.isValid()) {
if(invalidisInvert)
{
- p->setRasterOp(Qt::XorROP);
+ p->setRasterOp(TQt::XorROP);
c = Qt::white;
}
else {
@@ -766,8 +766,8 @@ void RenderObject::drawBorder(TQPainter *p, int x1, int y1, int x2, int y2,
case BNONE:
case BHIDDEN:
// should not happen
- if(invalidisInvert && p->rasterOp() == Qt::XorROP)
- p->setRasterOp(Qt::CopyROP);
+ if(invalidisInvert && p->rasterOp() == TQt::XorROP)
+ p->setRasterOp(TQt::CopyROP);
return;
case DOTTED:
@@ -964,8 +964,8 @@ void RenderObject::drawBorder(TQPainter *p, int x1, int y1, int x2, int y2,
break;
}
- if(invalidisInvert && p->rasterOp() == Qt::XorROP)
- p->setRasterOp(Qt::CopyROP);
+ if(invalidisInvert && p->rasterOp() == TQt::XorROP)
+ p->setRasterOp(TQt::CopyROP);
}
void RenderObject::paintBorder(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin, bool end)
@@ -2223,7 +2223,7 @@ CounterNode* RenderObject::lookupCounter(const TQString& counter) const
{
TQDict<khtml::CounterNode>* counters = document()->counters(this);
if (counters)
- return counters->find(counter);
+ return counters->tqfind(counter);
else
return 0;
}
diff --git a/khtml/rendering/render_replaced.cpp b/khtml/rendering/render_replaced.cpp
index 300328688..49c5097f6 100644
--- a/khtml/rendering/render_replaced.cpp
+++ b/khtml/rendering/render_replaced.cpp
@@ -139,11 +139,11 @@ RenderWidget::~RenderWidget()
}
}
-class QWidgetResizeEvent : public QEvent
+class TQWidgetResizeEvent : public TQEvent
{
public:
enum { Type = TQEvent::User + 0xbee };
- QWidgetResizeEvent( int _w, int _h ) :
+ TQWidgetResizeEvent( int _w, int _h ) :
TQEvent( ( TQEvent::Type ) Type ), w( _w ), h( _h ) {}
int w;
int h;
@@ -160,7 +160,7 @@ void RenderWidget::resizeWidget( int w, int h )
m_resizePending = isKHTMLWidget();
ref();
element()->ref();
- TQApplication::postEvent( this, new QWidgetResizeEvent( w, h ) );
+ TQApplication::postEvent( this, new TQWidgetResizeEvent( w, h ) );
element()->deref();
deref();
}
@@ -171,17 +171,17 @@ void RenderWidget::cancelPendingResize()
if (!m_widget)
return;
m_discardResizes = true;
- TQApplication::sendPostedEvents(this, QWidgetResizeEvent::Type);
+ TQApplication::sendPostedEvents(this, TQWidgetResizeEvent::Type);
m_discardResizes = false;
}
bool RenderWidget::event( TQEvent *e )
{
- if ( m_widget && (e->type() == (TQEvent::Type)QWidgetResizeEvent::Type) ) {
+ if ( m_widget && (e->type() == (TQEvent::Type)TQWidgetResizeEvent::Type) ) {
m_resizePending = false;
if (m_discardResizes)
return true;
- QWidgetResizeEvent *re = static_cast<QWidgetResizeEvent *>(e);
+ TQWidgetResizeEvent *re = static_cast<TQWidgetResizeEvent *>(e);
m_widget->resize( re->w, re->h );
tqrepaint();
}
@@ -193,7 +193,7 @@ bool RenderWidget::event( TQEvent *e )
void RenderWidget::flushWidgetResizes() //static
{
- TQApplication::sendPostedEvents( 0, QWidgetResizeEvent::Type );
+ TQApplication::sendPostedEvents( 0, TQWidgetResizeEvent::Type );
}
void RenderWidget::setQWidget(TQWidget *widget)
@@ -215,8 +215,8 @@ void RenderWidget::setQWidget(TQWidget *widget)
if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__khtml")) && !::tqqt_cast<TQFrame*>(m_widget))
m_widget->setBackgroundMode( TQWidget::NoBackground );
- if (m_widget->focusPolicy() > TQWidget::StrongFocus)
- m_widget->setFocusPolicy(TQWidget::StrongFocus);
+ if (m_widget->focusPolicy() > TQ_StrongFocus)
+ m_widget->setFocusPolicy(TQ_StrongFocus);
// if we've already received a layout, apply the calculated space to the
// widget immediately, but we have to have really been full constructed (with a non-null
// style pointer).
@@ -439,7 +439,7 @@ void RenderWidget::paint(PaintInfo& paintInfo, int _tx, int _ty)
paintWidget(paintInfo, m_widget, xPos, yPos);
}
-#include <private/qinternal_p.h>
+#include <tqinternal_p.h>
// The PaintBuffer class provides a shared buffer for widget painting.
//
@@ -449,7 +449,7 @@ void RenderWidget::paint(PaintInfo& paintInfo, int _tx, int _ty)
// is still needed. If not, it shrinks down to the biggest size < maxPixelBuffering
// that was requested during the overflow lapse.
-class PaintBuffer: public QObject
+class PaintBuffer: public TQObject
{
public:
static const int maxPixelBuffering = 320*200;
@@ -527,9 +527,9 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx,
TQValueVector<TQWidget*> cw;
TQValueVector<TQRect> cr;
- if (widget->children()) {
+ if (!widget->childrenListObject().isEmpty()) {
// build region
- TQObjectListIterator it = *widget->children();
+ TQObjectListIterator it = widget->childrenListObject();
for (; it.current(); ++it) {
TQWidget* const w = ::tqqt_cast<TQWidget *>(it.current());
if ( w && !w->isTopLevel() && !w->isHidden()) {
@@ -542,10 +542,10 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx,
}
}
}
- TQMemArray<TQRect> br = blit.rects();
+ TQMemArray<TQRect> br = blit.tqrects();
const int cnt = br.size();
- const bool external = p->device()->isExtDev();
+ const bool external = p->tqdevice()->isExtDev();
TQPixmap* const pm = PaintBuffer::grab( widget->size() );
if (!pm)
{
@@ -598,13 +598,13 @@ void RenderWidget::paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty)
TQPainter* const p = pI.p;
allowWidgetPaintEvents = true;
- const bool dsbld = QSharedDoubleBuffer::isDisabled();
- QSharedDoubleBuffer::setDisabled(true);
+ const bool dsbld = TQSharedDoubleBuffer::isDisabled();
+ TQSharedDoubleBuffer::setDisabled(true);
TQRect rr = pI.r;
rr.moveBy(-tx, -ty);
const TQRect r = widget->rect().intersect( rr );
copyWidget(r, p, widget, tx, ty);
- QSharedDoubleBuffer::setDisabled(dsbld);
+ TQSharedDoubleBuffer::setDisabled(dsbld);
allowWidgetPaintEvents = false;
}
@@ -641,7 +641,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// Don't count popup as a valid reason for losing the focus
// (example: opening the options of a select combobox shouldn't emit onblur)
- if ( TQFocusEvent::reason() != TQFocusEvent::Popup )
+ if ( TQT_TQFOCUSEVENT(e)->reason() != TQFocusEvent::Popup )
handleFocusOut();
break;
case TQEvent::FocusIn:
@@ -662,7 +662,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
case TQEvent::KeyRelease:
// TODO this seems wrong - Qt events are not correctly translated to DOM ones,
// like in KHTMLView::dispatchKeyEvent()
- if (element()->dispatchKeyEvent(static_cast<TQKeyEvent*>(e),false))
+ if (element()->dispatchKeyEvent(TQT_TQKEYEVENT(e),false))
filtered = true;
break;
@@ -672,8 +672,8 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// currently focused. this avoids accidentally changing a select box
// or something while wheeling a webpage.
if (tqApp->tqfocusWidget() != widget() &&
- widget()->focusPolicy() <= TQWidget::StrongFocus) {
- static_cast<TQWheelEvent*>(e)->ignore();
+ widget()->focusPolicy() <= TQ_StrongFocus) {
+ TQT_TQWHEELEVENT(e)->ignore();
TQApplication::sendEvent(view(), e);
filtered = true;
}
@@ -696,22 +696,22 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
case TQEvent::MouseButtonPress:
- mousePressEvent(static_cast<TQMouseEvent *>(e));
+ mousePressEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseButtonRelease:
- mouseReleaseEvent(static_cast<TQMouseEvent *>(e));
+ mouseReleaseEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
+ mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseMove:
- mouseMoveEvent(static_cast<TQMouseEvent *>(e));
+ mouseMoveEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::KeyPress:
- keyPressEvent(static_cast<TQKeyEvent *>(e));
+ keyPressEvent(TQT_TQKEYEVENT(e));
break;
case TQEvent::KeyRelease:
- keyReleaseEvent(static_cast<TQKeyEvent *>(e));
+ keyReleaseEvent(TQT_TQKEYEVENT(e));
break;
default:
break;
@@ -721,22 +721,22 @@ void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
void RenderWidget::ScrollViewEventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
case TQEvent::MouseButtonPress:
- viewportMousePressEvent(static_cast<TQMouseEvent *>(e));
+ viewportMousePressEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseButtonRelease:
- viewportMouseReleaseEvent(static_cast<TQMouseEvent *>(e));
+ viewportMouseReleaseEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseButtonDblClick:
- viewportMouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
+ viewportMouseDoubleClickEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::MouseMove:
- viewportMouseMoveEvent(static_cast<TQMouseEvent *>(e));
+ viewportMouseMoveEvent(TQT_TQMOUSEEVENT(e));
break;
case TQEvent::KeyPress:
- keyPressEvent(static_cast<TQKeyEvent *>(e));
+ keyPressEvent(TQT_TQKEYEVENT(e));
break;
case TQEvent::KeyRelease:
- keyReleaseEvent(static_cast<TQKeyEvent *>(e));
+ keyReleaseEvent(TQT_TQKEYEVENT(e));
break;
default:
break;
@@ -783,13 +783,13 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
}
switch (me.button()) {
case 0:
- button = LeftButton;
+ button = Qt::LeftButton;
break;
case 1:
- button = MidButton;
+ button = Qt::MidButton;
break;
case 2:
- button = RightButton;
+ button = Qt::RightButton;
break;
default:
break;
@@ -810,9 +810,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
TQMouseEvent e(type, p, button, state);
TQScrollView * sc = ::tqqt_cast<TQScrollView*>(m_widget);
if (sc && !::tqqt_cast<TQListBox*>(m_widget))
- static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(&e);
+ static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(TQT_TQEVENT(&e));
else
- static_cast<EventPropagator *>(m_widget)->sendEvent(&e);
+ static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&e));
ret = e.isAccepted();
break;
}
@@ -826,7 +826,7 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break;
TQKeyEvent* const ke = domKeyEv.qKeyEvent();
- static_cast<EventPropagator *>(m_widget)->sendEvent(ke);
+ static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(ke));
ret = ke->isAccepted();
break;
}
@@ -853,9 +853,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
if (ke->isAutoRepeat()) {
TQKeyEvent releaseEv( TQEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(),
ke->text(), ke->isAutoRepeat(), ke->count() );
- static_cast<EventPropagator *>(m_widget)->sendEvent(&releaseEv);
+ static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&releaseEv));
}
- static_cast<EventPropagator *>(m_widget)->sendEvent(ke);
+ static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(ke));
ret = ke->isAccepted();
break;
}
diff --git a/khtml/rendering/render_table.cpp b/khtml/rendering/render_table.cpp
index f1ce83155..8f5879f21 100644
--- a/khtml/rendering/render_table.cpp
+++ b/khtml/rendering/render_table.cpp
@@ -2800,7 +2800,7 @@ public:
static void addBorderStyle(TQValueList<CollapsedBorderValue>& borderStyles, CollapsedBorderValue borderValue)
{
- if (!borderValue.exists() || borderStyles.contains(borderValue))
+ if (!borderValue.exists() || borderStyles.tqcontains(borderValue))
return;
TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
diff --git a/khtml/rendering/render_text.cpp b/khtml/rendering/render_text.cpp
index 788110a6d..ffae3a624 100644
--- a/khtml/rendering/render_text.cpp
+++ b/khtml/rendering/render_text.cpp
@@ -318,10 +318,10 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty,
const int thickness = shadow->blur;
const int w = m_width+2*thickness;
const int h = m_height+2*thickness;
- const QRgb color = shadow->color.rgb();
+ const TQRgb color = shadow->color.rgb();
const int gray = tqGray(color);
const bool inverse = (gray < 100);
- const QRgb bgColor = (inverse) ? tqRgb(255,255,255) : tqRgb(0,0,0);
+ const TQRgb bgColor = (inverse) ? tqRgb(255,255,255) : tqRgb(0,0,0);
TQPixmap pixmap(w, h);
pixmap.fill(bgColor);
TQPainter p;
@@ -334,7 +334,7 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty,
m_reversed ? TQPainter::RTL : TQPainter::LTR);
p.end();
- TQImage img = pixmap.convertToImage().convertDepth(32);
+ TQImage img = TQT_TQIMAGE_OBJECT(pixmap.convertToImage()).convertDepth(32);
int md = thickness*thickness; // max-dist^2
@@ -363,7 +363,7 @@ void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty,
memset(amap, 0, h*w*(sizeof(float)));
for(int j=thickness; j<h-thickness; j++) {
for(int i=thickness; i<w-thickness; i++) {
- QRgb col= img.pixel(i,j);
+ TQRgb col= img.pixel(i,j);
if (col == bgColor) continue;
float g = tqGray(col);
if (inverse)
@@ -642,7 +642,7 @@ int InlineTextBoxArray::compareItems( Item d1, Item d2 )
return static_cast<InlineTextBox*>(d1)->m_y - static_cast<InlineTextBox*>(d2)->m_y;
}
-// remove this once QVector::bsearch is fixed
+// remove this once TQVector::bsearch is fixed
int InlineTextBoxArray::findFirstMatching(Item d) const
{
int len = count();
@@ -729,7 +729,7 @@ RenderText::~RenderText()
void RenderText::deleteInlineBoxes(RenderArena* arena)
{
- // this is a slight variant of QArray::clear().
+ // this is a slight variant of TQArray::clear().
// We don't delete the array itself here because its
// likely to be used in the same size later again, saves
// us resize() calls
diff --git a/khtml/rendering/render_text.h b/khtml/rendering/render_text.h
index 2e14b95cd..0923837b3 100644
--- a/khtml/rendering/render_text.h
+++ b/khtml/rendering/render_text.h
@@ -136,7 +136,7 @@ public:
bool m_reversed : 1;
unsigned m_toAdd : 14; // for justified text
private:
- // this is just for QVector::bsearch. Don't use it otherwise
+ // this is just for TQVector::bsearch. Don't use it otherwise
InlineTextBox(int _x, int _y)
:InlineBox(0)
{