summaryrefslogtreecommitdiffstats
path: root/khtml/rendering
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /khtml/rendering
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/rendering')
-rw-r--r--khtml/rendering/bidi.cpp408
-rw-r--r--khtml/rendering/bidi.h18
-rw-r--r--khtml/rendering/break_lines.cpp14
-rw-r--r--khtml/rendering/break_lines.h22
-rw-r--r--khtml/rendering/enumerate.cpp186
-rw-r--r--khtml/rendering/enumerate.h46
-rw-r--r--khtml/rendering/font.cpp134
-rw-r--r--khtml/rendering/font.h36
-rw-r--r--khtml/rendering/render_applet.cpp22
-rw-r--r--khtml/rendering/render_applet.h8
-rw-r--r--khtml/rendering/render_block.cpp74
-rw-r--r--khtml/rendering/render_block.h8
-rw-r--r--khtml/rendering/render_body.cpp2
-rw-r--r--khtml/rendering/render_box.cpp40
-rw-r--r--khtml/rendering/render_box.h12
-rw-r--r--khtml/rendering/render_br.cpp2
-rw-r--r--khtml/rendering/render_canvas.cpp46
-rw-r--r--khtml/rendering/render_canvas.h6
-rw-r--r--khtml/rendering/render_flow.cpp4
-rw-r--r--khtml/rendering/render_form.cpp280
-rw-r--r--khtml/rendering/render_form.h58
-rw-r--r--khtml/rendering/render_frames.cpp106
-rw-r--r--khtml/rendering/render_frames.h8
-rw-r--r--khtml/rendering/render_generated.cpp38
-rw-r--r--khtml/rendering/render_generated.h4
-rw-r--r--khtml/rendering/render_image.cpp68
-rw-r--r--khtml/rendering/render_image.h10
-rw-r--r--khtml/rendering/render_inline.cpp88
-rw-r--r--khtml/rendering/render_inline.h4
-rw-r--r--khtml/rendering/render_layer.cpp158
-rw-r--r--khtml/rendering/render_layer.h60
-rw-r--r--khtml/rendering/render_line.cpp36
-rw-r--r--khtml/rendering/render_line.h4
-rw-r--r--khtml/rendering/render_list.cpp36
-rw-r--r--khtml/rendering/render_list.h4
-rw-r--r--khtml/rendering/render_object.cpp138
-rw-r--r--khtml/rendering/render_object.h58
-rw-r--r--khtml/rendering/render_replaced.cpp266
-rw-r--r--khtml/rendering/render_replaced.h28
-rw-r--r--khtml/rendering/render_style.cpp20
-rw-r--r--khtml/rendering/render_style.h72
-rw-r--r--khtml/rendering/render_table.cpp54
-rw-r--r--khtml/rendering/render_table.h28
-rw-r--r--khtml/rendering/render_text.cpp108
-rw-r--r--khtml/rendering/render_text.h18
-rw-r--r--khtml/rendering/table_layout.cpp2
-rw-r--r--khtml/rendering/table_layout.h8
47 files changed, 1425 insertions, 1425 deletions
diff --git a/khtml/rendering/bidi.cpp b/khtml/rendering/bidi.cpp
index a220641b2..19de828a0 100644
--- a/khtml/rendering/bidi.cpp
+++ b/khtml/rendering/bidi.cpp
@@ -31,8 +31,8 @@
#include "xml/dom_docimpl.h"
#include "kdebug.h"
-#include "qdatetime.h"
-#include "qfontmetrics.h"
+#include "tqdatetime.h"
+#include "tqfontmetrics.h"
#define BIDI_DEBUG 0
//#define DEBUG_LINEBREAKS
@@ -51,8 +51,8 @@ struct BidiIterator
bool atEnd() const;
- const QChar &current() const;
- QChar::Direction direction() const;
+ const TQChar &current() const;
+ TQChar::Direction direction() const;
RenderBlock *par;
RenderObject *obj;
@@ -61,11 +61,11 @@ struct BidiIterator
struct BidiStatus {
- BidiStatus() : eor(QChar::DirON), lastStrong(QChar::DirON), last(QChar::DirON) {}
+ BidiStatus() : eor(TQChar::DirON), lastStrong(TQChar::DirON), last(TQChar::DirON) {}
- QChar::Direction eor;
- QChar::Direction lastStrong;
- QChar::Direction last;
+ TQChar::Direction eor;
+ TQChar::Direction lastStrong;
+ TQChar::Direction last;
};
struct BidiState {
@@ -91,19 +91,19 @@ static bool sBuildingCompactRuns;
// Midpoint globals. The goal is not to do any allocation when dealing with
// these midpoints, so we just keep an array around and never clear it. We track
// the number of items and position using the two other variables.
-static QMemArray<BidiIterator> *smidpoints;
+static TQMemArray<BidiIterator> *smidpoints;
static uint sNumMidpoints;
static uint sCurrMidpoint;
static bool betweenMidpoints;
static bool isLineEmpty = true;
static bool previousLineBrokeAtBR = true;
-static QChar::Direction dir;
+static TQChar::Direction dir;
static bool adjustEmbedding;
static bool emptyRun = true;
static int numSpaces;
-static void embed( QChar::Direction d, BidiState &bidi );
+static void embed( TQChar::Direction d, BidiState &bidi );
static void appendRun( BidiState &bidi );
static int getBPMWidth(int childValue, Length cssUnit)
@@ -197,7 +197,7 @@ static void deleteBidiRuns(RenderArena* arena)
Each line of text caches the embedding level at the start of the line for faster
relayouting
*/
-BidiContext::BidiContext(unsigned char l, QChar::Direction e, BidiContext *p, bool o)
+BidiContext::BidiContext(unsigned char l, TQChar::Direction e, BidiContext *p, bool o)
: level(l) , override(o), dir(e)
{
parent = p;
@@ -255,8 +255,8 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
EUnicodeBidi ub = next->style()->unicodeBidi();
if ( ub != UBNormal && !emptyRun ) {
EDirection dir = next->style()->direction();
- QChar::Direction d = ( ub == Embed ? ( dir == RTL ? QChar::DirRLE : QChar::DirLRE )
- : ( dir == RTL ? QChar::DirRLO : QChar::DirLRO ) );
+ TQChar::Direction d = ( ub == Embed ? ( dir == RTL ? TQChar::DirRLE : TQChar::DirLRE )
+ : ( dir == RTL ? TQChar::DirRLO : TQChar::DirLRO ) );
embed( d, bidi );
}
}
@@ -266,7 +266,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
next = current->nextSibling();
if (next) break;
if ( adjustEmbedding && current->style()->unicodeBidi() != UBNormal && !emptyRun ) {
- embed( QChar::DirPDF, bidi );
+ embed( TQChar::DirPDF, bidi );
}
current = current->parent();
}
@@ -321,9 +321,9 @@ inline bool BidiIterator::atEnd() const
return false;
}
-const QChar &BidiIterator::current() const
+const TQChar &BidiIterator::current() const
{
- static QChar nonBreakingSpace(0xA0);
+ static TQChar nonBreakingSpace(0xA0);
if (!obj || !obj->isText())
return nonBreakingSpace;
@@ -335,13 +335,13 @@ const QChar &BidiIterator::current() const
return text->text()[pos];
}
-inline QChar::Direction BidiIterator::direction() const
+inline TQChar::Direction BidiIterator::direction() const
{
- if(!obj || !obj->isText() ) return QChar::DirON;
+ if(!obj || !obj->isText() ) return TQChar::DirON;
RenderText *renderTxt = static_cast<RenderText *>( obj );
if ( pos >= renderTxt->stringLength() )
- return QChar::DirON;
+ return TQChar::DirON;
return renderTxt->text()[pos].direction();
}
@@ -363,8 +363,8 @@ static void addRun(BidiRun* bidiRun)
RenderText* text = static_cast<RenderText*>(bidiRun->obj);
if (text->text()) {
for (int i = bidiRun->start; i < bidiRun->stop; i++) {
- const QChar c = text->text()[i];
- if (c.category() == QChar::Separator_Space || c == '\n')
+ const TQChar c = text->text()[i];
+ if (c.category() == TQChar::Separator_Space || c == '\n')
numSpaces++;
}
}
@@ -539,19 +539,19 @@ static void appendRun( BidiState &bidi )
bidi.eor.increment( bidi );
bidi.sor = bidi.eor;
- dir = QChar::DirON;
- bidi.status.eor = QChar::DirON;
+ dir = TQChar::DirON;
+ bidi.status.eor = TQChar::DirON;
adjustEmbedding = b;
}
-static void embed( QChar::Direction d, BidiState &bidi )
+static void embed( TQChar::Direction d, BidiState &bidi )
{
#if BIDI_DEBUG > 1
qDebug("*** embed dir=%d emptyrun=%d", d, emptyRun );
#endif
bool b = adjustEmbedding ;
adjustEmbedding = false;
- if ( d == QChar::DirPDF ) {
+ if ( d == TQChar::DirPDF ) {
BidiContext *c = bidi.context->parent;
if (c) {
if ( bidi.eor != bidi.last ) {
@@ -566,23 +566,23 @@ static void embed( QChar::Direction d, BidiState &bidi )
if(bidi.context->override)
dir = bidi.context->dir;
else
- dir = QChar::DirON;
+ dir = TQChar::DirON;
bidi.status.lastStrong = bidi.context->dir;
}
} else {
- QChar::Direction runDir;
- if( d == QChar::DirRLE || d == QChar::DirRLO )
- runDir = QChar::DirR;
+ TQChar::Direction runDir;
+ if( d == TQChar::DirRLE || d == TQChar::DirRLO )
+ runDir = TQChar::DirR;
else
- runDir = QChar::DirL;
+ runDir = TQChar::DirL;
bool override;
- if( d == QChar::DirLRO || d == QChar::DirRLO )
+ if( d == TQChar::DirLRO || d == TQChar::DirRLO )
override = true;
else
override = false;
unsigned char level = bidi.context->level;
- if ( runDir == QChar::DirR ) {
+ if ( runDir == TQChar::DirR ) {
if(level%2) // we have an odd level
level += 2;
else
@@ -728,7 +728,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi
case TAAUTO:
numSpaces = 0;
// for right to left fall through to right aligned
- if (bidi.context->basicDir == QChar::DirL)
+ if (bidi.context->basicDir == TQChar::DirL)
break;
case RIGHT:
case KHTML_RIGHT:
@@ -750,8 +750,8 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi
// get the number of spaces in the run
int spaces = 0;
for ( int i = r->start; i < r->stop; i++ ) {
- const QChar c = static_cast<RenderText *>(r->obj)->text()[i];
- if (c.category() == QChar::Separator_Space || c == '\n')
+ const TQChar c = static_cast<RenderText *>(r->obj)->text()[i];
+ if (c.category() == TQChar::Separator_Space || c == '\n')
spaces++;
}
@@ -904,7 +904,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
// context->ref();
- dir = QChar::DirON;
+ dir = TQChar::DirON;
emptyRun = true;
numSpaces = 0;
@@ -914,7 +914,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
bool atEnd = false;
while( 1 ) {
- QChar::Direction dirCurrent;
+ TQChar::Direction dirCurrent;
if (atEnd) {
//kdDebug(6041) << "atEnd" << endl;
BidiContext *c = bidi.context;
@@ -935,105 +935,105 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
switch(dirCurrent) {
// embedding and overrides (X1-X9 in the Bidi specs)
- case QChar::DirRLE:
- case QChar::DirLRE:
- case QChar::DirRLO:
- case QChar::DirLRO:
- case QChar::DirPDF:
+ case TQChar::DirRLE:
+ case TQChar::DirLRE:
+ case TQChar::DirRLO:
+ case TQChar::DirLRO:
+ case TQChar::DirPDF:
embed( dirCurrent, bidi );
break;
// strong types
- case QChar::DirL:
- if(dir == QChar::DirON)
- dir = QChar::DirL;
+ case TQChar::DirL:
+ if(dir == TQChar::DirON)
+ dir = TQChar::DirL;
switch(bidi.status.last)
{
- case QChar::DirL:
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirL; break;
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirEN:
- case QChar::DirAN:
+ case TQChar::DirL:
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirL; break;
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirEN:
+ case TQChar::DirAN:
appendRun( bidi );
break;
- case QChar::DirES:
- case QChar::DirET:
- case QChar::DirCS:
- case QChar::DirBN:
- case QChar::DirB:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
- if( bidi.status.eor != QChar::DirL ) {
+ case TQChar::DirES:
+ case TQChar::DirET:
+ case TQChar::DirCS:
+ case TQChar::DirBN:
+ case TQChar::DirB:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
+ if( bidi.status.eor != TQChar::DirL ) {
//last stuff takes embedding dir
- if(bidi.context->dir == QChar::DirL || bidi.status.lastStrong == QChar::DirL) {
- if ( bidi.status.eor != QChar::DirEN && bidi.status.eor != QChar::DirAN && bidi.status.eor != QChar::DirON )
+ if(bidi.context->dir == TQChar::DirL || bidi.status.lastStrong == TQChar::DirL) {
+ if ( bidi.status.eor != TQChar::DirEN && bidi.status.eor != TQChar::DirAN && bidi.status.eor != TQChar::DirON )
appendRun( bidi );
- dir = QChar::DirL;
+ dir = TQChar::DirL;
bidi.eor = bidi.current;
- bidi.status.eor = QChar::DirL;
+ bidi.status.eor = TQChar::DirL;
} else {
- if ( bidi.status.eor == QChar::DirEN || bidi.status.eor == QChar::DirAN )
+ if ( bidi.status.eor == TQChar::DirEN || bidi.status.eor == TQChar::DirAN )
{
dir = bidi.status.eor;
appendRun( bidi );
}
- dir = QChar::DirR;
+ dir = TQChar::DirR;
bidi.eor = bidi.last;
appendRun( bidi );
- dir = QChar::DirL;
- bidi.status.eor = QChar::DirL;
+ dir = TQChar::DirL;
+ bidi.status.eor = TQChar::DirL;
}
} else {
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirL;
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirL;
}
default:
break;
}
- bidi.status.lastStrong = QChar::DirL;
+ bidi.status.lastStrong = TQChar::DirL;
break;
- case QChar::DirAL:
- case QChar::DirR:
- if(dir == QChar::DirON) dir = QChar::DirR;
+ case TQChar::DirAL:
+ case TQChar::DirR:
+ if(dir == TQChar::DirON) dir = TQChar::DirR;
switch(bidi.status.last)
{
- case QChar::DirR:
- case QChar::DirAL:
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirR; break;
- case QChar::DirL:
- case QChar::DirEN:
- case QChar::DirAN:
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirR; break;
+ case TQChar::DirL:
+ case TQChar::DirEN:
+ case TQChar::DirAN:
appendRun( bidi );
- dir = QChar::DirR;
+ dir = TQChar::DirR;
bidi.eor = bidi.current;
- bidi.status.eor = QChar::DirR;
+ bidi.status.eor = TQChar::DirR;
break;
- case QChar::DirES:
- case QChar::DirET:
- case QChar::DirCS:
- case QChar::DirBN:
- case QChar::DirB:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
- if( !(bidi.status.eor == QChar::DirR) && !(bidi.status.eor == QChar::DirAL) ) {
+ case TQChar::DirES:
+ case TQChar::DirET:
+ case TQChar::DirCS:
+ case TQChar::DirBN:
+ case TQChar::DirB:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
+ if( !(bidi.status.eor == TQChar::DirR) && !(bidi.status.eor == TQChar::DirAL) ) {
//last stuff takes embedding dir
- if(bidi.context->dir == QChar::DirR || bidi.status.lastStrong == QChar::DirR
- || bidi.status.lastStrong == QChar::DirAL) {
+ if(bidi.context->dir == TQChar::DirR || bidi.status.lastStrong == TQChar::DirR
+ || bidi.status.lastStrong == TQChar::DirAL) {
appendRun( bidi );
- dir = QChar::DirR;
+ dir = TQChar::DirR;
bidi.eor = bidi.current;
- bidi.status.eor = QChar::DirR;
+ bidi.status.eor = TQChar::DirR;
} else {
- dir = QChar::DirL;
+ dir = TQChar::DirL;
bidi.eor = bidi.last;
appendRun( bidi );
- dir = QChar::DirR;
- bidi.status.eor = QChar::DirR;
+ dir = TQChar::DirR;
+ bidi.status.eor = TQChar::DirR;
}
} else {
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirR;
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirR;
}
default:
break;
@@ -1043,64 +1043,64 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
// weak types:
- case QChar::DirNSM:
+ case TQChar::DirNSM:
// ### if @sor, set dir to dirSor
break;
- case QChar::DirEN:
- if(!(bidi.status.lastStrong == QChar::DirAL)) {
+ case TQChar::DirEN:
+ if(!(bidi.status.lastStrong == TQChar::DirAL)) {
// if last strong was AL change EN to AN
- if(dir == QChar::DirON) {
- dir = QChar::DirL;
+ if(dir == TQChar::DirON) {
+ dir = TQChar::DirL;
}
switch(bidi.status.last)
{
- case QChar::DirET:
- if ( bidi.status.lastStrong == QChar::DirR || bidi.status.lastStrong == QChar::DirAL ) {
+ case TQChar::DirET:
+ if ( bidi.status.lastStrong == TQChar::DirR || bidi.status.lastStrong == TQChar::DirAL ) {
appendRun( bidi );
- dir = QChar::DirEN;
- bidi.status.eor = QChar::DirEN;
+ dir = TQChar::DirEN;
+ bidi.status.eor = TQChar::DirEN;
}
// fall through
- case QChar::DirEN:
- case QChar::DirL:
+ case TQChar::DirEN:
+ case TQChar::DirL:
bidi.eor = bidi.current;
bidi.status.eor = dirCurrent;
break;
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirAN:
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirAN:
appendRun( bidi );
- bidi.status.eor = QChar::DirEN;
- dir = QChar::DirEN; break;
- case QChar::DirES:
- case QChar::DirCS:
- if(bidi.status.eor == QChar::DirEN) {
+ bidi.status.eor = TQChar::DirEN;
+ dir = TQChar::DirEN; break;
+ case TQChar::DirES:
+ case TQChar::DirCS:
+ if(bidi.status.eor == TQChar::DirEN) {
bidi.eor = bidi.current; break;
}
- case QChar::DirBN:
- case QChar::DirB:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
- if(bidi.status.eor == QChar::DirR) {
+ case TQChar::DirBN:
+ case TQChar::DirB:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
+ if(bidi.status.eor == TQChar::DirR) {
// neutrals go to R
bidi.eor = bidi.last;
appendRun( bidi );
- dir = QChar::DirEN;
- bidi.status.eor = QChar::DirEN;
+ dir = TQChar::DirEN;
+ bidi.status.eor = TQChar::DirEN;
}
- else if( bidi.status.eor == QChar::DirL ||
- (bidi.status.eor == QChar::DirEN && bidi.status.lastStrong == QChar::DirL)) {
+ else if( bidi.status.eor == TQChar::DirL ||
+ (bidi.status.eor == TQChar::DirEN && bidi.status.lastStrong == TQChar::DirL)) {
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
} else {
// numbers on both sides, neutrals get right to left direction
- if(dir != QChar::DirL) {
+ if(dir != TQChar::DirL) {
appendRun( bidi );
bidi.eor = bidi.last;
- dir = QChar::DirR;
+ dir = TQChar::DirR;
appendRun( bidi );
- dir = QChar::DirEN;
- bidi.status.eor = QChar::DirEN;
+ dir = TQChar::DirEN;
+ bidi.status.eor = TQChar::DirEN;
} else {
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
}
@@ -1110,49 +1110,49 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
}
break;
}
- case QChar::DirAN:
- dirCurrent = QChar::DirAN;
- if(dir == QChar::DirON) dir = QChar::DirAN;
+ case TQChar::DirAN:
+ dirCurrent = TQChar::DirAN;
+ if(dir == TQChar::DirON) dir = TQChar::DirAN;
switch(bidi.status.last)
{
- case QChar::DirL:
- case QChar::DirAN:
- bidi.eor = bidi.current; bidi.status.eor = QChar::DirAN; break;
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirEN:
+ case TQChar::DirL:
+ case TQChar::DirAN:
+ bidi.eor = bidi.current; bidi.status.eor = TQChar::DirAN; break;
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirEN:
appendRun( bidi );
- dir = QChar::DirAN; bidi.status.eor = QChar::DirAN;
+ dir = TQChar::DirAN; bidi.status.eor = TQChar::DirAN;
break;
- case QChar::DirCS:
- if(bidi.status.eor == QChar::DirAN) {
+ case TQChar::DirCS:
+ if(bidi.status.eor == TQChar::DirAN) {
bidi.eor = bidi.current; break;
}
- case QChar::DirES:
- case QChar::DirET:
- case QChar::DirBN:
- case QChar::DirB:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
- if(bidi.status.eor == QChar::DirR) {
+ case TQChar::DirES:
+ case TQChar::DirET:
+ case TQChar::DirBN:
+ case TQChar::DirB:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
+ if(bidi.status.eor == TQChar::DirR) {
// neutrals go to R
bidi.eor = bidi.last;
appendRun( bidi );
- dir = QChar::DirAN;
- bidi.status.eor = QChar::DirAN;
- } else if( bidi.status.eor == QChar::DirL ||
- (bidi.status.eor == QChar::DirEN && bidi.status.lastStrong == QChar::DirL)) {
+ dir = TQChar::DirAN;
+ bidi.status.eor = TQChar::DirAN;
+ } else if( bidi.status.eor == TQChar::DirL ||
+ (bidi.status.eor == TQChar::DirEN && bidi.status.lastStrong == TQChar::DirL)) {
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
} else {
// numbers on both sides, neutrals get right to left direction
- if(dir != QChar::DirL) {
+ if(dir != TQChar::DirL) {
appendRun( bidi );
bidi.eor = bidi.last;
- dir = QChar::DirR;
+ dir = TQChar::DirR;
appendRun( bidi );
- dir = QChar::DirAN;
- bidi.status.eor = QChar::DirAN;
+ dir = TQChar::DirAN;
+ bidi.status.eor = TQChar::DirAN;
} else {
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
}
@@ -1161,30 +1161,30 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
break;
}
break;
- case QChar::DirES:
- case QChar::DirCS:
+ case TQChar::DirES:
+ case TQChar::DirCS:
break;
- case QChar::DirET:
- if(bidi.status.last == QChar::DirEN) {
- dirCurrent = QChar::DirEN;
+ case TQChar::DirET:
+ if(bidi.status.last == TQChar::DirEN) {
+ dirCurrent = TQChar::DirEN;
bidi.eor = bidi.current; bidi.status.eor = dirCurrent;
break;
}
break;
// boundary neutrals should be ignored
- case QChar::DirBN:
+ case TQChar::DirBN:
break;
// neutrals
- case QChar::DirB:
+ case TQChar::DirB:
// ### what do we do with newline and paragraph seperators that come to here?
break;
- case QChar::DirS:
+ case TQChar::DirS:
// ### implement rule L1
break;
- case QChar::DirWS:
+ case TQChar::DirWS:
break;
- case QChar::DirON:
+ case TQChar::DirON:
break;
default:
break;
@@ -1197,31 +1197,31 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
// set status.last as needed.
switch(dirCurrent)
{
- case QChar::DirET:
- case QChar::DirES:
- case QChar::DirCS:
- case QChar::DirS:
- case QChar::DirWS:
- case QChar::DirON:
+ case TQChar::DirET:
+ case TQChar::DirES:
+ case TQChar::DirCS:
+ case TQChar::DirS:
+ case TQChar::DirWS:
+ case TQChar::DirON:
switch(bidi.status.last)
{
- case QChar::DirL:
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirEN:
- case QChar::DirAN:
+ case TQChar::DirL:
+ case TQChar::DirR:
+ case TQChar::DirAL:
+ case TQChar::DirEN:
+ case TQChar::DirAN:
bidi.status.last = dirCurrent;
break;
default:
- bidi.status.last = QChar::DirON;
+ bidi.status.last = TQChar::DirON;
}
break;
- case QChar::DirNSM:
- case QChar::DirBN:
+ case TQChar::DirNSM:
+ case TQChar::DirBN:
// ignore these
break;
- case QChar::DirEN:
- if ( bidi.status.last == QChar::DirL ) {
+ case TQChar::DirEN:
+ if ( bidi.status.last == TQChar::DirL ) {
break;
}
// fall through
@@ -1285,7 +1285,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
#if BIDI_DEBUG > 0
kdDebug(6041) << "lineLow = " << (uint)levelLow << ", lineHigh = " << (uint)levelHigh << endl;
kdDebug(6041) << "logical order is:" << endl;
- QPtrListIterator<BidiRun> it2(runs);
+ TQPtrListIterator<BidiRun> it2(runs);
BidiRun *r2;
for ( ; (r2 = it2.current()); ++it2 )
kdDebug(6041) << " " << r2 << " start=" << r2->start << " stop=" << r2->stop << " level=" << (uint)r2->level << endl;
@@ -1369,7 +1369,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLin
invalidateVerticalPositions();
#ifdef DEBUG_LAYOUT
- QTime qt;
+ TQTime qt;
qt.start();
kdDebug( 6040 ) << renderName() << " layoutInlineChildren( " << this <<" )" << endl;
#endif
@@ -1423,16 +1423,16 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLin
BidiContext *startEmbed;
if( style()->direction() == LTR ) {
- startEmbed = new BidiContext( 0, QChar::DirL );
- bidi.status.eor = QChar::DirL;
+ startEmbed = new BidiContext( 0, TQChar::DirL );
+ bidi.status.eor = TQChar::DirL;
} else {
- startEmbed = new BidiContext( 1, QChar::DirR );
- bidi.status.eor = QChar::DirR;
+ startEmbed = new BidiContext( 1, TQChar::DirR );
+ bidi.status.eor = TQChar::DirR;
}
startEmbed->ref();
- bidi.status.lastStrong = QChar::DirON;
- bidi.status.last = QChar::DirON;
+ bidi.status.lastStrong = TQChar::DirON;
+ bidi.status.last = TQChar::DirON;
bidi.context = startEmbed;
adjustEmbedding = true;
@@ -1443,7 +1443,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLin
m_firstLine = true;
if (!smidpoints)
- smidpoints = new QMemArray<BidiIterator>;
+ smidpoints = new TQMemArray<BidiIterator>;
sNumMidpoints = 0;
sCurrMidpoint = 0;
@@ -1528,7 +1528,7 @@ redo_linebreak:
adjustEmbedding = true;
end.increment(bidi);
adjustEmbedding = false;
- } else if (end.obj && end.obj->style()->preserveLF() && end.current() == QChar('\n')) {
+ } else if (end.obj && end.obj->style()->preserveLF() && end.current() == TQChar('\n')) {
adjustEmbedding = true;
end.increment(bidi);
adjustEmbedding = false;
@@ -1836,7 +1836,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// item, then this is all moot. -dwh
RenderObject* next = Bidinext( start.par, o, bidi );
if (!style()->preserveWS() && next && next->isText() && static_cast<RenderText*>(next)->stringLength() > 0 &&
- (static_cast<RenderText*>(next)->text()[0].category() == QChar::Separator_Space ||
+ (static_cast<RenderText*>(next)->text()[0].category() == TQChar::Separator_Space ||
static_cast<RenderText*>(next)->text()[0] == '\n')) {
currentCharacterIsSpace = true;
ignoringSpaces = true;
@@ -1848,7 +1848,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
RenderText *t = static_cast<RenderText *>(o);
int strlen = t->stringLength();
int len = strlen - pos;
- QChar *str = t->text();
+ TQChar *str = t->text();
const Font *f = t->htmlFont( m_firstLine );
// proportional font, needs a bit more work.
@@ -1868,7 +1868,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
bool previousCharacterIsSpace = currentCharacterIsSpace;
bool isSoftBreakable = nextIsSoftBreakable;
nextIsSoftBreakable = false;
- const QChar c = str[pos];
+ const TQChar c = str[pos];
currentCharacterIsSpace = c == ' ';
if (preserveWS || !currentCharacterIsSpace)
@@ -1933,7 +1933,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
!t->containsOnlyWhitespace(pos+1, strlen-(pos+1)));
#endif
#ifdef DEBUG_LINEBREAKS
- kdDebug(6041) << "found space at " << pos << " in string '" << QString( str, strlen ).latin1() << "' adding " << tmpW << " new width = " << w << endl;
+ kdDebug(6041) << "found space at " << pos << " in string '" << TQString( str, strlen ).latin1() << "' adding " << tmpW << " new width = " << w << endl;
#endif
if ( autoWrap && w + tmpW > width && w == 0 ) {
int fb = nearestFloatBottom(m_height);
@@ -2039,7 +2039,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
checkForBreak = false;
RenderText* nextText = static_cast<RenderText*>(next);
if (nextText->stringLength() != 0) {
- QChar c = nextText->text()[0];
+ TQChar c = nextText->text()[0];
if (c == ' ' || c == '\t' || (c == '\n' && !next->style()->preserveLF())) {
// If the next item on the line is text, and if we did not end with
// a space, then the next text run continues our word (and so it needs to
@@ -2191,7 +2191,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
if (lBreak.obj && lBreak.pos >= 2 && lBreak.obj->isText()) {
// For soft hyphens on line breaks, we have to chop out the midpoints that made us
// ignore the hyphen so that it will render at the end of the line.
- QChar c = static_cast<RenderText*>(lBreak.obj)->text()[lBreak.pos-1];
+ TQChar c = static_cast<RenderText*>(lBreak.obj)->text()[lBreak.pos-1];
if (c.unicode() == SOFT_HYPHEN)
chopMidpointsAt(lBreak.obj, lBreak.pos-2);
}
@@ -2218,8 +2218,8 @@ void RenderBlock::deleteEllipsisLineBoxes()
void RenderBlock::checkLinesForTextOverflow()
{
// Determine the width of the ellipsis using the current font.
- QChar ellipsis = 0x2026; // FIXME: CSS3 says this is configurable, also need to use 0x002E (FULL STOP) if 0x2026 not renderable
- static QString ellipsisStr(ellipsis);
+ TQChar ellipsis = 0x2026; // FIXME: CSS3 says this is configurable, also need to use 0x002E (FULL STOP) if 0x2026 not renderable
+ static TQString ellipsisStr(ellipsis);
const Font& firstLineFont = style(true)->htmlFont();
const Font& font = style()->htmlFont();
int firstLineEllipsisWidth = firstLineFont.width(&ellipsis, 1, 0);
diff --git a/khtml/rendering/bidi.h b/khtml/rendering/bidi.h
index 4d6b6aaf1..15a9ab906 100644
--- a/khtml/rendering/bidi.h
+++ b/khtml/rendering/bidi.h
@@ -23,7 +23,7 @@
#ifndef BIDI_H
#define BIDI_H
-#include <qstring.h>
+#include <tqstring.h>
namespace khtml {
class RenderArena;
@@ -33,7 +33,7 @@ namespace khtml {
class BidiContext {
public:
- BidiContext(unsigned char level, QChar::Direction embedding, BidiContext *parent = 0, bool override = false);
+ BidiContext(unsigned char level, TQChar::Direction embedding, BidiContext *parent = 0, bool override = false);
~BidiContext();
void ref() const;
@@ -41,8 +41,8 @@ namespace khtml {
unsigned char level;
bool override : 1;
- QChar::Direction dir : 5;
- QChar::Direction basicDir : 5;
+ TQChar::Direction dir : 5;
+ TQChar::Direction basicDir : 5;
BidiContext *parent;
@@ -52,21 +52,21 @@ namespace khtml {
};
struct BidiRun {
- BidiRun(int _start, int _stop, RenderObject *_obj, BidiContext *context, QChar::Direction dir)
+ BidiRun(int _start, int _stop, RenderObject *_obj, BidiContext *context, TQChar::Direction dir)
: start( _start ), stop( _stop ), obj( _obj ), box(0), nextRun(0)
{
- if(dir == QChar::DirON) dir = context->dir;
+ if(dir == TQChar::DirON) dir = context->dir;
level = context->level;
// add level of run (cases I1 & I2)
if( level % 2 ) {
- if(dir == QChar::DirL || dir == QChar::DirAN || dir == QChar::DirEN)
+ if(dir == TQChar::DirL || dir == TQChar::DirAN || dir == TQChar::DirEN)
level++;
} else {
- if( dir == QChar::DirR )
+ if( dir == TQChar::DirR )
level++;
- else if( dir == QChar::DirAN || dir == QChar::DirEN)
+ else if( dir == TQChar::DirAN || dir == TQChar::DirEN)
level += 2;
}
}
diff --git a/khtml/rendering/break_lines.cpp b/khtml/rendering/break_lines.cpp
index 483455127..a0d314cee 100644
--- a/khtml/rendering/break_lines.cpp
+++ b/khtml/rendering/break_lines.cpp
@@ -1,8 +1,8 @@
#include <break_lines.h>
#include <klibloader.h>
-#include "qcstring.h"
-#include <qtextcodec.h>
-#include <qcleanuphandler.h>
+#include "tqcstring.h"
+#include <tqtextcodec.h>
+#include <tqcleanuphandler.h>
#include <config.h>
@@ -38,7 +38,7 @@ namespace khtml {
free(isbreakable);
if (library) library->unload();
}
- const QChar *string;
+ const TQChar *string;
int *wbrpos;
int *isbreakable;
int allocated;
@@ -56,9 +56,9 @@ namespace khtml {
#endif
}
- bool isBreakableThai( const QChar *string, const int pos, const int len)
+ bool isBreakableThai( const TQChar *string, const int pos, const int len)
{
- static QTextCodec *thaiCodec = QTextCodec::codecForMib(2259);
+ static TQTextCodec *thaiCodec = TQTextCodec::codecForMib(2259);
//printf("Entering isBreakableThai with pos = %d\n", pos);
#ifndef HAVE_LIBTHAI
@@ -96,7 +96,7 @@ namespace khtml {
// build up string of thai chars
if ( string != cache->string ) {
//fprintf(stderr,"new string found (not in cache), calling libthai\n");
- QCString cstr = thaiCodec->fromUnicode( QConstString(string,len).string());
+ TQCString cstr = thaiCodec->fromUnicode( TQConstString(string,len).string());
//printf("About to call libthai::th_brk with str: %s",cstr.data());
cache->numwbrpos = th_brk((const unsigned char*) cstr.data(), cache->wbrpos, cache->allocated);
diff --git a/khtml/rendering/break_lines.h b/khtml/rendering/break_lines.h
index e33fce247..5176e5fb0 100644
--- a/khtml/rendering/break_lines.h
+++ b/khtml/rendering/break_lines.h
@@ -1,7 +1,7 @@
#ifndef BREAK_LINES_H
#define BREAK_LINES_H
-#include <qstring.h>
+#include <tqstring.h>
namespace khtml {
@@ -12,8 +12,8 @@ namespace khtml {
Korean, Chinese ones should work as well
*/
/*
- dontbreakbefore[] contains characters not covered by QChar::Punctuation_Close that shouldn't be broken before.
- chars included in QChar::Punctuation_Close are listed below.(look at UAX #14)
+ dontbreakbefore[] contains characters not covered by TQChar::Punctuation_Close that shouldn't be broken before.
+ chars included in TQChar::Punctuation_Close are listed below.(look at UAX #14)
- 3001 ideographic comma
- 3002 ideographic full stop
- FE50 small comma
@@ -88,7 +88,7 @@ namespace khtml {
0xFF70 //halfwidth katakana-hiragana prolonged sound mark
};
- // characters that aren't covered by QChar::Punctuation_Open
+ // characters that aren't covered by TQChar::Punctuation_Open
const ushort dontbreakafter[] = {
0x3012, //postal mark
0xFF03, //full width pound mark
@@ -116,12 +116,12 @@ namespace khtml {
}
}
- bool isBreakableThai( const QChar *string, const int pos, const int len);
+ bool isBreakableThai( const TQChar *string, const int pos, const int len);
void cleanup_thaibreaks();
- inline bool isBreakable( const QChar *str, const int pos, int len )
+ inline bool isBreakable( const TQChar *str, const int pos, int len )
{
- const QChar *c = str+pos;
+ const TQChar *c = str+pos;
unsigned short ch = c->unicode();
if ( ch > 0xff ) {
// not latin1, need to do more sophisticated checks for asian fonts
@@ -140,10 +140,10 @@ namespace khtml {
return false; // never break before first character
// check for simple punctuation cases
- QChar::Category cat = c->category();
- if ( cat == QChar::Punctuation_Close ||
- cat == QChar::Punctuation_Other ||
- (str+(pos-1))->category() == QChar::Punctuation_Open )
+ TQChar::Category cat = c->category();
+ if ( cat == TQChar::Punctuation_Close ||
+ cat == TQChar::Punctuation_Other ||
+ (str+(pos-1))->category() == TQChar::Punctuation_Open )
return false;
// do binary search in dontbreak[]
diff --git a/khtml/rendering/enumerate.cpp b/khtml/rendering/enumerate.cpp
index 75af71465..9cfe149ad 100644
--- a/khtml/rendering/enumerate.cpp
+++ b/khtml/rendering/enumerate.cpp
@@ -25,20 +25,20 @@
#include "rendering/enumerate.h"
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace khtml {
namespace Enumerate {
-QString toRoman( int number, bool upper )
+TQString toRoman( int number, bool upper )
{
- if (number < 1 || number > 3999) return QString::number(number);
- QString roman;
- static const QChar ldigits[] = { 'i', 'v', 'x', 'l', 'c', 'd', 'm' };
- static const QChar udigits[] = { 'I', 'V', 'X', 'L', 'C', 'D', 'M' };
- const QChar *digits = upper ? udigits : ldigits;
+ if (number < 1 || number > 3999) return TQString::number(number);
+ TQString roman;
+ static const TQChar ldigits[] = { 'i', 'v', 'x', 'l', 'c', 'd', 'm' };
+ static const TQChar udigits[] = { 'I', 'V', 'X', 'L', 'C', 'D', 'M' };
+ const TQChar *digits = upper ? udigits : ldigits;
int i, d = 0;
do
@@ -66,20 +66,20 @@ QString toRoman( int number, bool upper )
return roman;
}
-QString toGeorgian( int number )
+TQString toGeorgian( int number )
{
- QString georgian;
- const QChar tenthousand = 0x10ef;
- static const QChar thousands[9] = {0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec,
+ TQString georgian;
+ const TQChar tenthousand = 0x10ef;
+ static const TQChar thousands[9] = {0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec,
0x10ed, 0x10ee, 0x10f4, 0x10f5 };
- static const QChar hundreds[9] = {0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10f3,
+ static const TQChar hundreds[9] = {0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10f3,
0x10e4, 0x10e5, 0x10e6, 0x10e7 };
- static const QChar tens[9] = {0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc,
+ static const TQChar tens[9] = {0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc,
0x10f2, 0x10dd, 0x10de, 0x10df };
- static const QChar units[9] = {0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4,
+ static const TQChar units[9] = {0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4,
0x10d5, 0x10d6, 0x10f1, 0x10d7 };
- if (number < 1 || number > 19999) return QString::number(number);
+ if (number < 1 || number > 19999) return TQString::number(number);
if (number >= 10000) {
georgian.append(tenthousand);
number = number - 10000;
@@ -103,54 +103,54 @@ QString toGeorgian( int number )
return georgian;
}
-QString toArmenian( int number )
+TQString toArmenian( int number )
{
- QString armenian;
+ TQString armenian;
int onethousand = 0x57c;
int hundreds = 0x572;
int tens = 0x569;
int units = 0x560;
// The standard defines values over 1999, but 7000 is very hard to render
- if (number < 1 || number > 1999) return QString::number(number);
+ if (number < 1 || number > 1999) return TQString::number(number);
if (number >= 1000) {
- armenian.append(QChar(onethousand));
+ armenian.append(TQChar(onethousand));
number = number - 1000;
}
if (number >= 100) {
- armenian.append(QChar(hundreds+number/100));
+ armenian.append(TQChar(hundreds+number/100));
number = number % 100;
}
if (number >= 10) {
- armenian.append(QChar(tens+number/10));
+ armenian.append(TQChar(tens+number/10));
number = number % 10;
}
if (number >= 1) {
- armenian.append(QChar(units+number));
+ armenian.append(TQChar(units+number));
}
return armenian;
}
-QString toHebrew( int number ) {
- static const QChar tenDigit[] = {1497, 1499, 1500, 1502, 1504, 1505, 1506, 1508, 1510};
+TQString toHebrew( int number ) {
+ static const TQChar tenDigit[] = {1497, 1499, 1500, 1502, 1504, 1505, 1506, 1508, 1510};
- QString letter;
- if (number < 1) return QString::number(number);
+ TQString letter;
+ if (number < 1) return TQString::number(number);
if (number>999) {
- letter = toHebrew(number/1000) + QString::fromLatin1("'");
+ letter = toHebrew(number/1000) + TQString::fromLatin1("'");
number = number%1000;
}
int hunderts = (number/400);
if (hunderts > 0) {
for(int i=0; i<hunderts; i++) {
- letter += QChar(1511 + 3);
+ letter += TQChar(1511 + 3);
}
}
number = number % 400;
if ((number / 100) != 0) {
- letter += QChar (1511 + (number / 100) -1);
+ letter += TQChar (1511 + (number / 100) -1);
}
number = number % 100;
int tens = number/10;
@@ -158,27 +158,27 @@ QString toHebrew( int number ) {
letter += tenDigit[tens-1];
}
if (number == 15 || number == 16) { // special because of religious
- letter += QChar(1487 + 9); // reasons
- letter += QChar(1487 + number - 9);
+ letter += TQChar(1487 + 9); // reasons
+ letter += TQChar(1487 + number - 9);
} else {
number = number % 10;
if (number != 0) {
- letter += QChar (1487 + number);
+ letter += TQChar (1487 + number);
}
}
return letter;
}
-static inline QString toLatin( int number, int base ) {
- if (number < 1) return QString::number(number);
- QValueList<QChar> letters;
+static inline TQString toLatin( int number, int base ) {
+ if (number < 1) return TQString::number(number);
+ TQValueList<TQChar> letters;
while(number > 0) {
number--; // number 0 is letter a
- QChar letter = (QChar) (base + (number % 26));
+ TQChar letter = (TQChar) (base + (number % 26));
letters.prepend(letter);
number /= 26;
}
- QString str;
+ TQString str;
str.setLength(letters.size());
int i=0;
while(!letters.isEmpty()) {
@@ -188,24 +188,24 @@ static inline QString toLatin( int number, int base ) {
return str;
}
-QString toLowerLatin( int number ) {
+TQString toLowerLatin( int number ) {
return toLatin( number, 'a' );
}
-QString toUpperLatin( int number ) {
+TQString toUpperLatin( int number ) {
return toLatin( number, 'A' );
}
-static inline QString toAlphabetic( int number, int base, const QChar alphabet[] ) {
- if (number < 1) return QString::number(number);
- QValueList<QChar> letters;
+static inline TQString toAlphabetic( int number, int base, const TQChar alphabet[] ) {
+ if (number < 1) return TQString::number(number);
+ TQValueList<TQChar> letters;
while(number > 0) {
number--; // number 0 is letter 1
- QChar letter = alphabet[number % base];
+ TQChar letter = alphabet[number % base];
letters.prepend(letter);
number /= base;
}
- QString str;
+ TQString str;
str.setLength(letters.size());
int i=0;
while(!letters.isEmpty()) {
@@ -215,8 +215,8 @@ static inline QString toAlphabetic( int number, int base, const QChar alphabet[]
return str;
}
-QString toHiragana( int number ) {
- static const QChar hiragana[48] = {0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D,
+TQString toHiragana( int number ) {
+ static const TQChar hiragana[48] = {0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D,
0x304F, 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305B, 0x305D,
0x305F, 0x3061, 0x3064, 0x3066, 0x3068, 0x306A, 0x306B,
0x306C, 0x306D, 0x306E, 0x306F, 0x3072, 0x3075, 0x3078,
@@ -226,8 +226,8 @@ QString toHiragana( int number ) {
return toAlphabetic( number, 48, hiragana );
}
-QString toHiraganaIroha( int number ) {
- static const QChar hiragana[47] = {0x3044, 0x308D, 0x306F, 0x306B, 0x307B, 0x3078, 0x3068,
+TQString toHiraganaIroha( int number ) {
+ static const TQChar hiragana[47] = {0x3044, 0x308D, 0x306F, 0x306B, 0x307B, 0x3078, 0x3068,
0x3061, 0x308A, 0x306C, 0x308B, 0x3092, 0x308F, 0x304B,
0x3088, 0x305F, 0x308C, 0x305D, 0x3064, 0x306D, 0x306A,
0x3089, 0x3080, 0x3046, 0x3090, 0x306E, 0x304A, 0x304F, 0x3084,
@@ -237,8 +237,8 @@ QString toHiraganaIroha( int number ) {
return toAlphabetic( number, 47, hiragana );
}
-QString toKatakana( int number ) {
- static const QChar katakana[48] = {0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD,
+TQString toKatakana( int number ) {
+ static const TQChar katakana[48] = {0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD,
0x30AF, 0x30B1, 0x30B3, 0x30B5, 0x30B7, 0x30B9, 0x30BB,
0x30BD, 0x30BF, 0x30C1, 0x30C4, 0x30C6, 0x30C8, 0x30CA,
0x30CB, 0x30CC, 0x30CD, 0x30CE, 0x30CF, 0x30D2, 0x30D5,
@@ -248,8 +248,8 @@ QString toKatakana( int number ) {
return toAlphabetic( number, 48, katakana );
}
-QString toKatakanaIroha( int number ) {
- static const QChar katakana[47] = {0x30A4, 0x30ED, 0x30CF, 0x30CB, 0x30DB, 0x30D8, 0x30C8,
+TQString toKatakanaIroha( int number ) {
+ static const TQChar katakana[47] = {0x30A4, 0x30ED, 0x30CF, 0x30CB, 0x30DB, 0x30D8, 0x30C8,
0x30C1, 0x30EA, 0x30CC, 0x30EB, 0x30F2, 0x30EF, 0x30AB,
0x30E8, 0x30BF, 0x30EC, 0x30ED, 0x30C4, 0x30CD, 0x30CA,
0x30E9, 0x30E0, 0x30A6, 0x30F0, 0x30CE, 0x30AA, 0x30AF,
@@ -259,8 +259,8 @@ QString toKatakanaIroha( int number ) {
return toAlphabetic( number, 47, katakana );
}
-QString toLowerGreek( int number ) {
- static const QChar greek[24] = { 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7,
+TQString toLowerGreek( int number ) {
+ static const TQChar greek[24] = { 0x3B1, 0x3B2, 0x3B3, 0x3B4, 0x3B5, 0x3B6, 0x3B7,
0x3B8, 0x3B9, 0x3BA, 0x3BB, 0x3BC, 0x3BD, 0x3BE,
0x3BF, 0x3C0, 0x3C1, 0x3C3, 0x3C4, 0x3C5, 0x3C6,
0x3C7, 0x3C8, 0x3C0};
@@ -268,52 +268,52 @@ QString toLowerGreek( int number ) {
return toAlphabetic( number, 24, greek );
}
-QString toUpperGreek( int number ) {
+TQString toUpperGreek( int number ) {
// The standard claims to be base 24, but only lists 19 letters.
- static const QChar greek[19] = { 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398,
+ static const TQChar greek[19] = { 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398,
0x399, 0x39A, 0x39B, 0x39C, 0x39D, 0x39E, 0x39F,
0x3A0, 0x3A1, 0x3A3, 0x3A9};
return toAlphabetic( number, 19, greek );
}
-static inline QString toNumeric( int number, int base ) {
- QString letter = QString::number(number);
+static inline TQString toNumeric( int number, int base ) {
+ TQString letter = TQString::number(number);
for(unsigned int i = 0; i < letter.length(); i++) {
if (letter[i].isDigit())
- letter[i] = QChar(letter[i].digitValue()+base);
+ letter[i] = TQChar(letter[i].digitValue()+base);
}
return letter;
}
-QString toArabicIndic( int number ) {
+TQString toArabicIndic( int number ) {
return toNumeric(number, 0x660);
}
-QString toPersianUrdu( int number ) {
+TQString toPersianUrdu( int number ) {
return toNumeric(number, 0x6F0);
}
-QString toLao( int number ) {
+TQString toLao( int number ) {
return toNumeric(number, 0xED0);
}
-QString toThai( int number ) {
+TQString toThai( int number ) {
return toNumeric(number, 0xE50);
}
-QString toTibetan( int number ) {
+TQString toTibetan( int number ) {
return toNumeric(number, 0xF20);
}
-static inline QString toIdeographic(int number, const QChar digits[], const QChar digitmarkers[]) {
- if (number < 0 || number > 9999) return QString::number(number);
+static inline TQString toIdeographic(int number, const TQChar digits[], const TQChar digitmarkers[]) {
+ if (number < 0 || number > 9999) return TQString::number(number);
- QString grp = QString::number(number);
+ TQString grp = TQString::number(number);
// ### Append group markers to handle numbers > 9999
- QString str;
+ TQString str;
// special case
if (number < 20 && number >= 10) {
@@ -342,10 +342,10 @@ static inline QString toIdeographic(int number, const QChar digits[], const QCha
return str;
}
-QString toTradChineseFormal( int number ) {
-// static const QChar groupMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
- static const QChar digitMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x4e00,
+TQString toTradChineseFormal( int number ) {
+// static const TQChar groupMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
+ static const TQChar digitMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x4e00,
0x4ebc, 0x4e09,
0x56db, 0x4e94,
0x516d, 0x4e03,
@@ -353,10 +353,10 @@ QString toTradChineseFormal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toTradChineseInformal( int number ) {
-// static const QChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x4e00,
+TQString toTradChineseInformal( int number ) {
+// static const TQChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x4e00,
0x4ebc, 0x4e09,
0x56db, 0x4e94,
0x516d, 0x4e03,
@@ -364,10 +364,10 @@ QString toTradChineseInformal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toSimpChineseFormal( int number ) {
-// static const QChar groupMarkers[3] = {0x4e07, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x58f9,
+TQString toSimpChineseFormal( int number ) {
+// static const TQChar groupMarkers[3] = {0x4e07, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x4e07, 0x4ebf, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x58f9,
0x8cb3, 0x53c3,
0x8086, 0x4f0d,
0x9678, 0x67d2,
@@ -375,10 +375,10 @@ QString toSimpChineseFormal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toSimpChineseInformal( int number ) {
-// static const QChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x58f9,
+TQString toSimpChineseInformal( int number ) {
+// static const TQChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x58f9,
0x8cb3, 0x53c3,
0x8086, 0x4f0d,
0x9678, 0x67d2,
@@ -386,10 +386,10 @@ QString toSimpChineseInformal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toJapaneseFormal( int number ) {
-// static const QChar groupMarkers[3] = {0x4e07, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x62fe, 0x4f70, 0x4edf};
- static const QChar digits[10] = {0x96f6, 0x58f9,
+TQString toJapaneseFormal( int number ) {
+// static const TQChar groupMarkers[3] = {0x4e07, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x62fe, 0x4f70, 0x4edf};
+ static const TQChar digits[10] = {0x96f6, 0x58f9,
0x8cb3, 0x53c3,
0x8086, 0x4f0d,
0x9678, 0x67d2,
@@ -397,10 +397,10 @@ QString toJapaneseFormal( int number ) {
return toIdeographic(number, digits, digitMarkers);
}
-QString toJapaneseInformal( int number ) {
-// static const QChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
- static const QChar digits[10] = {0x96f6, 0x58f9,
+TQString toJapaneseInformal( int number ) {
+// static const TQChar groupMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digitMarkers[3] = {0x842c, 0x5104, 0x5146};
+ static const TQChar digits[10] = {0x96f6, 0x58f9,
0x8d30, 0x53c1,
0x8086, 0x4f0d,
0x9646, 0x67d2,
diff --git a/khtml/rendering/enumerate.h b/khtml/rendering/enumerate.h
index 518a8e9d6..583a6171c 100644
--- a/khtml/rendering/enumerate.h
+++ b/khtml/rendering/enumerate.h
@@ -31,35 +31,35 @@ namespace khtml {
namespace Enumerate {
// Numeric
- QString toArabicIndic( int number );
- QString toLao( int number );
- QString toPersianUrdu( int number );
- QString toThai( int number );
- QString toTibetan( int number );
+ TQString toArabicIndic( int number );
+ TQString toLao( int number );
+ TQString toPersianUrdu( int number );
+ TQString toThai( int number );
+ TQString toTibetan( int number );
// Alphabetic
- QString toLowerLatin( int number );
- QString toUpperLatin( int number );
- QString toLowerGreek( int number );
- QString toUpperGreek( int number );
- QString toHiragana( int number );
- QString toHiraganaIroha( int number );
- QString toKatakana( int number );
- QString toKatakanaIroha( int number );
+ TQString toLowerLatin( int number );
+ TQString toUpperLatin( int number );
+ TQString toLowerGreek( int number );
+ TQString toUpperGreek( int number );
+ TQString toHiragana( int number );
+ TQString toHiraganaIroha( int number );
+ TQString toKatakana( int number );
+ TQString toKatakanaIroha( int number );
// Algorithmic
- QString toRoman( int number, bool upper );
- QString toHebrew( int number );
- QString toGeorgian( int number );
- QString toArmenian( int number );
+ TQString toRoman( int number, bool upper );
+ TQString toHebrew( int number );
+ TQString toGeorgian( int number );
+ TQString toArmenian( int number );
// Ideographic
- QString toJapaneseFormal ( int number );
- QString toJapaneseInformal ( int number );
- QString toSimpChineseFormal ( int number );
- QString toSimpChineseInformal ( int number );
- QString toTradChineseFormal ( int number );
- QString toTradChineseInformal ( int number );
+ TQString toJapaneseFormal ( int number );
+ TQString toJapaneseInformal ( int number );
+ TQString toSimpChineseFormal ( int number );
+ TQString toSimpChineseInformal ( int number );
+ TQString toTradChineseFormal ( int number );
+ TQString toTradChineseInformal ( int number );
}} // namespaces
diff --git a/khtml/rendering/font.cpp b/khtml/rendering/font.cpp
index cdd580596..a33f0e082 100644
--- a/khtml/rendering/font.cpp
+++ b/khtml/rendering/font.cpp
@@ -35,9 +35,9 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qpainter.h>
-#include <qfontdatabase.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqfontdatabase.h>
+#include <tqpaintdevicemetrics.h>
using namespace khtml;
@@ -51,12 +51,12 @@ using namespace khtml;
* @return the width in pixels. May be 0 if @p wordStart and @p wordEnd were
* equal.
*/
-inline int closeWordAndGetWidth(const QFontMetrics &fm, const QChar *str, int pos,
+inline int closeWordAndGetWidth(const TQFontMetrics &fm, const TQChar *str, int pos,
int wordStart, int wordEnd)
{
if (wordEnd <= wordStart) return 0;
- QConstString s(str + pos + wordStart, wordEnd - wordStart);
+ TQConstString s(str + pos + wordStart, wordEnd - wordStart);
return fm.width(s.string());
}
@@ -75,41 +75,41 @@ inline int closeWordAndGetWidth(const QFontMetrics &fm, const QChar *str, int po
* will be set to wordEnd after function
* @param wordEnd relative index pointing one position after the word ended
*/
-inline void closeAndDrawWord(QPainter *p, QPainter::TextDirection d,
- int &x, int y, const short widths[], const QChar *str, int pos,
+inline void closeAndDrawWord(TQPainter *p, TQPainter::TextDirection d,
+ int &x, int y, const short widths[], const TQChar *str, int pos,
int &wordStart, int wordEnd)
{
if (wordEnd <= wordStart) return;
int width = widths[wordStart];
- if (d == QPainter::RTL)
+ if (d == TQPainter::RTL)
x -= width;
- QConstString s(str + pos + wordStart, wordEnd - wordStart);
+ TQConstString s(str + pos + wordStart, wordEnd - wordStart);
p->drawText(x, y, s.string(), -1, d);
- if (d != QPainter::RTL)
+ if (d != TQPainter::RTL)
x += width;
wordStart = wordEnd;
}
-void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, int len,
- int toAdd, QPainter::TextDirection d, int from, int to, QColor bg, int uy, int h, int deco ) const
+void Font::drawText( TQPainter *p, int x, int y, TQChar *str, int slen, int pos, int len,
+ int toAdd, TQPainter::TextDirection d, int from, int to, TQColor bg, int uy, int h, int deco ) const
{
if (!str) return;
- QConstString cstr = QConstString(str, slen);
- QString qstr = cstr.string();
+ TQConstString cstr = TQConstString(str, slen);
+ TQString qstr = cstr.string();
// ### fixme for RTL
if ( !scFont && !letterSpacing && !wordSpacing && !toAdd && from==-1 ) {
// simply draw it
- // Due to some unfounded cause QPainter::drawText traverses the
+ // Due to some unfounded cause TQPainter::drawText traverses the
// *whole* string when painting, not only the specified
// [pos, pos + len) segment. This makes painting *extremely* slow for
// long render texts (in the order of several megabytes).
// Hence, only hand over the piece of text of the actual inline text box
- QConstString cstr = QConstString(str + pos, len);
+ TQConstString cstr = TQConstString(str + pos, len);
p->drawText( x, y, cstr.string(), 0, len, d );
} else {
if (from < 0) from = 0;
@@ -118,20 +118,20 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
int numSpaces = 0;
if ( toAdd ) {
for( int i = 0; i < len; ++i )
- if ( str[i+pos].category() == QChar::Separator_Space )
+ if ( str[i+pos].category() == TQChar::Separator_Space )
++numSpaces;
}
const int totWidth = width( str, slen, pos, len );
- if ( d == QPainter::RTL ) {
+ if ( d == TQPainter::RTL ) {
x += totWidth + toAdd;
}
- QString upper = qstr;
- QFontMetrics sc_fm = fm;
+ TQString upper = qstr;
+ TQFontMetrics sc_fm = fm;
if ( scFont ) {
// draw in small caps
upper = qstr.upper();
- sc_fm = QFontMetrics( *scFont );
+ sc_fm = TQFontMetrics( *scFont );
}
// ### sc could be optimized by only painting uppercase letters extra,
@@ -150,11 +150,11 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
if (mode == Whole) { // most likely variant is treated extra
if (to < 0) to = len;
- const QConstString cstr(str + pos, len);
- const QConstString segStr(str + pos + from, to - from);
+ const TQConstString cstr(str + pos, len);
+ const TQConstString segStr(str + pos + from, to - from);
const int preSegmentWidth = fm.width(cstr.string(), from);
const int segmentWidth = fm.width(segStr.string());
- const int eff_x = d == QPainter::RTL ? x - preSegmentWidth - segmentWidth
+ const int eff_x = d == TQPainter::RTL ? x - preSegmentWidth - segmentWidth
: x + preSegmentWidth;
// draw whole string segment, with optional background
@@ -194,9 +194,9 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
onSegment = true;
}
- const QChar ch = str[pos+i];
- bool lowercase = (ch.category() == QChar::Letter_Lowercase);
- bool is_space = (ch.category() == QChar::Separator_Space);
+ const TQChar ch = str[pos+i];
+ bool lowercase = (ch.category() == TQChar::Letter_Lowercase);
+ bool is_space = (ch.category() == TQChar::Separator_Space);
int chw = 0;
if ( letterSpacing )
chw += letterSpacing;
@@ -235,10 +235,10 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
widthList[lastWordBegin] = (short)width;
}
- if (d == QPainter::RTL) x -= preSegmentWidth;
+ if (d == TQPainter::RTL) x -= preSegmentWidth;
else x += preSegmentWidth;
- const int startx = d == QPainter::RTL ? x-segmentWidth : x;
+ const int startx = d == TQPainter::RTL ? x-segmentWidth : x;
// optionally draw background
if ( bg.isValid() )
@@ -247,9 +247,9 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
// second pass: do the actual drawing
lastWordBegin = from;
for( int i = from; i < to; ++i ) {
- const QChar ch = str[pos+i];
- bool lowercase = (ch.category() == QChar::Letter_Lowercase);
- bool is_space = ch.category() == QChar::Separator_Space;
+ const TQChar ch = str[pos+i];
+ bool lowercase = (ch.category() == TQChar::Letter_Lowercase);
+ bool is_space = ch.category() == TQChar::Separator_Space;
if ( is_space ) {
if (mode == WordWise) {
closeAndDrawWord(p, d, x, y, widthList, str, pos, lastWordBegin, i);
@@ -258,14 +258,14 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
}
if (is_space || mode == CharacterWise) {
const int chw = widthList[i];
- if (d == QPainter::RTL)
+ if (d == TQPainter::RTL)
x -= chw;
if ( scFont )
p->setFont( lowercase ? *scFont : f );
p->drawText( x, y, (lowercase ? upper : qstr), pos+i, 1, d );
- if (d != QPainter::RTL)
+ if (d != TQPainter::RTL)
x += chw;
}
@@ -285,18 +285,18 @@ void Font::drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, i
}
-int Font::width( QChar *chs, int, int pos, int len, int start, int end, int toAdd ) const
+int Font::width( TQChar *chs, int, int pos, int len, int start, int end, int toAdd ) const
{
- const QConstString cstr(chs+pos, len);
+ const TQConstString cstr(chs+pos, len);
int w = 0;
- const QString qstr = cstr.string();
+ const TQString qstr = cstr.string();
if ( scFont ) {
- const QString upper = qstr.upper();
- const QChar *uc = qstr.unicode();
- const QFontMetrics sc_fm( *scFont );
+ const TQString upper = qstr.upper();
+ const TQChar *uc = qstr.unicode();
+ const TQFontMetrics sc_fm( *scFont );
for ( int i = 0; i < len; ++i ) {
- if ( (uc+i)->category() == QChar::Letter_Lowercase )
+ if ( (uc+i)->category() == TQChar::Letter_Lowercase )
w += sc_fm.charWidth( upper, i );
else
w += fm.charWidth( qstr, i );
@@ -312,7 +312,7 @@ int Font::width( QChar *chs, int, int pos, int len, int start, int end, int toAd
if ( wordSpacing )
// add amount
for( int i = 0; i < len; ++i ) {
- if( chs[i+pos].category() == QChar::Separator_Space )
+ if( chs[i+pos].category() == TQChar::Separator_Space )
w += wordSpacing;
}
@@ -320,12 +320,12 @@ int Font::width( QChar *chs, int, int pos, int len, int start, int end, int toAd
// first gather count of spaces
int numSpaces = 0;
for( int i = start; i != end; ++i )
- if ( chs[i].category() == QChar::Separator_Space )
+ if ( chs[i].category() == TQChar::Separator_Space )
++numSpaces;
// distribute pixels evenly among spaces, but count only those within
// [pos, pos+len)
for ( int i = start; numSpaces && i != pos + len; i++ )
- if ( chs[i].category() == QChar::Separator_Space ) {
+ if ( chs[i].category() == TQChar::Separator_Space ) {
const int a = toAdd/numSpaces;
if ( i >= pos ) w += a;
toAdd -= a;
@@ -336,21 +336,21 @@ int Font::width( QChar *chs, int, int pos, int len, int start, int end, int toAd
return w;
}
-int Font::width( QChar *chs, int slen, int pos ) const
+int Font::width( TQChar *chs, int slen, int pos ) const
{
int w;
- if ( scFont && chs[pos].category() == QChar::Letter_Lowercase ) {
- QString str( chs, slen );
+ if ( scFont && chs[pos].category() == TQChar::Letter_Lowercase ) {
+ TQString str( chs, slen );
str[pos] = chs[pos].upper();
- w = QFontMetrics( *scFont ).charWidth( str, pos );
+ w = TQFontMetrics( *scFont ).charWidth( str, pos );
} else {
- const QConstString cstr( chs, slen );
+ const TQConstString cstr( chs, slen );
w = fm.charWidth( cstr.string(), pos );
}
if ( letterSpacing )
w += letterSpacing;
- if ( wordSpacing && (chs+pos)->category() == QChar::Separator_Space )
+ if ( wordSpacing && (chs+pos)->category() == TQChar::Separator_Space )
w += wordSpacing;
return w;
}
@@ -358,11 +358,11 @@ int Font::width( QChar *chs, int slen, int pos ) const
/** Querying QFontDB whether something is scalable is expensive, so we cache. */
struct Font::ScalKey
{
- QString family;
+ TQString family;
int weight;
int italic;
- ScalKey(const QFont& font) :
+ ScalKey(const TQFont& font) :
family(font.family()), weight(font.weight()), italic(font.italic())
{}
@@ -389,13 +389,13 @@ struct Font::ScalKey
}
};
-QMap<Font::ScalKey, Font::ScalInfo>* Font::scalCache;
-QMap<Font::ScalKey, QValueList<int> >* Font::scalSizesCache;
+TQMap<Font::ScalKey, Font::ScalInfo>* Font::scalCache;
+TQMap<Font::ScalKey, TQValueList<int> >* Font::scalSizesCache;
-bool Font::isFontScalable(QFontDatabase& db, const QFont& font)
+bool Font::isFontScalable(TQFontDatabase& db, const TQFont& font)
{
if (!scalCache)
- scalCache = new QMap<ScalKey, ScalInfo>;
+ scalCache = new TQMap<ScalKey, ScalInfo>;
ScalKey key(font);
@@ -406,7 +406,7 @@ bool Font::isFontScalable(QFontDatabase& db, const QFont& font)
if (s == No) {
/* Cache size info */
if (!scalSizesCache)
- scalSizesCache = new QMap<ScalKey, QValueList<int> >;
+ scalSizesCache = new TQMap<ScalKey, TQValueList<int> >;
(*scalSizesCache)[key] = db.smoothSizes(font.family(), db.styleString(font));
}
}
@@ -415,13 +415,13 @@ bool Font::isFontScalable(QFontDatabase& db, const QFont& font)
}
-void Font::update( QPaintDeviceMetrics* devMetrics ) const
+void Font::update( TQPaintDeviceMetrics* devMetrics ) const
{
f.setFamily( fontDef.family.isEmpty() ? KHTMLFactory::defaultHTMLSettings()->stdFontName() : fontDef.family );
f.setItalic( fontDef.italic );
f.setWeight( fontDef.weight );
- QFontDatabase db;
+ TQFontDatabase db;
int size = fontDef.size;
const int lDpiY = kMax(devMetrics->logicalDpiY(), 96);
@@ -430,7 +430,7 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
// all other font properties should be set before this one!!!!
if( !isFontScalable(db, f) )
{
- const QValueList<int>& pointSizes = (*scalSizesCache)[ScalKey(f)];
+ const TQValueList<int>& pointSizes = (*scalSizesCache)[ScalKey(f)];
// lets see if we find a nice looking font, which is not too far away
// from the requested one.
// kdDebug(6080) << "khtml::setFontSize family = " << f.family() << " size requested=" << size << endl;
@@ -439,8 +439,8 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
float diff = 1; // ### 100% deviation
float bestSize = 0;
- QValueList<int>::ConstIterator it = pointSizes.begin();
- const QValueList<int>::ConstIterator itEnd = pointSizes.end();
+ TQValueList<int>::ConstIterator it = pointSizes.begin();
+ const TQValueList<int>::ConstIterator itEnd = pointSizes.end();
for( ; it != itEnd; ++it )
{
@@ -459,7 +459,7 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
}
// make sure we don't bust up X11
- // Also, Qt does not support sizing a QFont to zero.
+ // Also, Qt does not support sizing a TQFont to zero.
size = kMax(1, kMin(255, size));
// qDebug("setting font to %s, italic=%d, weight=%d, size=%d", fontDef.family.latin1(), fontDef.italic,
@@ -468,24 +468,24 @@ void Font::update( QPaintDeviceMetrics* devMetrics ) const
f.setPixelSize( size );
- fm = QFontMetrics( f );
+ fm = TQFontMetrics( f );
// small caps
delete scFont;
scFont = 0;
if ( fontDef.smallCaps ) {
- scFont = new QFont( f );
+ scFont = new TQFont( f );
scFont->setPixelSize( kMax(1, f.pixelSize()*7/10) );
}
}
-void Font::drawDecoration(QPainter *pt, int _tx, int _ty, int baseline, int width, int height, int deco) const
+void Font::drawDecoration(TQPainter *pt, int _tx, int _ty, int baseline, int width, int height, int deco) const
{
Q_UNUSED(height);
// thick lines on small fonts look ugly
const int thickness = fm.height() > 20 ? fm.lineWidth() : 1;
- const QBrush brush = pt->pen().color();
+ const TQBrush brush = pt->pen().color();
if (deco & UNDERLINE) {
int underlineOffset = ( fm.height() + baseline ) / 2;
if (underlineOffset <= baseline) underlineOffset = baseline+1;
diff --git a/khtml/rendering/font.h b/khtml/rendering/font.h
index c35ab53aa..248c07d15 100644
--- a/khtml/rendering/font.h
+++ b/khtml/rendering/font.h
@@ -25,10 +25,10 @@
#ifndef KHTMLFONT_H
#define KHTMLFONT_H
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qmap.h>
-#include <qpainter.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqmap.h>
+#include <tqpainter.h>
class QFontDatabase;
class QPaintDeviceMetrics;
@@ -51,7 +51,7 @@ public:
weight == other.weight );
}
- QString family;
+ TQString family;
short int size;
bool italic : 1;
bool smallCaps : 1;
@@ -70,7 +70,7 @@ public:
: fontDef( fd ), f(), fm( f ), scFont( 0 ), letterSpacing( 0 ), wordSpacing( 0 )
{}
Font(const Font& o)
- : fontDef(o.fontDef), f(o.f), fm(o.fm), scFont(o.scFont), letterSpacing(o.letterSpacing), wordSpacing(o.wordSpacing) { if (o.scFont) scFont = new QFont(*o.scFont); }
+ : fontDef(o.fontDef), f(o.f), fm(o.fm), scFont(o.scFont), letterSpacing(o.letterSpacing), wordSpacing(o.wordSpacing) { if (o.scFont) scFont = new TQFont(*o.scFont); }
~Font() { delete scFont; }
bool operator == ( const Font &other ) const {
@@ -81,7 +81,7 @@ public:
const FontDef& getFontDef() const { return fontDef; }
- void update( QPaintDeviceMetrics *devMetrics ) const;
+ void update( TQPaintDeviceMetrics *devMetrics ) const;
/**
* Draws a piece from the given piece of text.
@@ -107,8 +107,8 @@ public:
* decoration painting
* @param deco combined text decoration (see Decoration)
*/
- void drawText( QPainter *p, int x, int y, QChar *str, int slen, int pos, int len, int width,
- QPainter::TextDirection d, int from=-1, int to=-1, QColor bg=QColor(),
+ void drawText( TQPainter *p, int x, int y, TQChar *str, int slen, int pos, int len, int width,
+ TQPainter::TextDirection d, int from=-1, int to=-1, TQColor bg=TQColor(),
int uy=-1, int h=-1, int deco=0 ) const;
/** returns the width of the given string chunk in pixels.
@@ -126,7 +126,7 @@ public:
* str. Note that toAdd applies to all spaces within str, but only those
* within [pos, pos+len) are counted towards the width.
*/
- int width( QChar *str, int slen, int pos, int len, int start = 0, int end = 0, int toAdd = 0 ) const;
+ int width( TQChar *str, int slen, int pos, int len, int start = 0, int end = 0, int toAdd = 0 ) const;
/** return the width of the given char in pixels.
*
* The method also considers various styles like text-align and font-variant
@@ -134,7 +134,7 @@ public:
* @param slen total length of string
* @param pos zero-based position of char in string
*/
- int width( QChar *str, int slen, int pos) const;
+ int width( TQChar *str, int slen, int pos) const;
/** Text decoration constants.
*
@@ -154,7 +154,7 @@ public:
* @param deco decoration to be drawn (see Decoration). The enumeration
* constants may be combined.
*/
- void drawDecoration(QPainter *p, int x, int y, int baseline, int width, int height, int deco) const;
+ void drawDecoration(TQPainter *p, int x, int y, int baseline, int width, int height, int deco) const;
/** returns letter spacing
*/
@@ -165,9 +165,9 @@ public:
private:
mutable FontDef fontDef;
- mutable QFont f;
- mutable QFontMetrics fm;
- mutable QFont *scFont;
+ mutable TQFont f;
+ mutable TQFontMetrics fm;
+ mutable TQFont *scFont;
short letterSpacing;
short wordSpacing;
@@ -178,9 +178,9 @@ private:
Yes
};
- static QMap<ScalKey, ScalInfo>* scalCache;
- static QMap<ScalKey, QValueList<int> >* scalSizesCache;
- static bool isFontScalable(QFontDatabase& db, const QFont& font);
+ static TQMap<ScalKey, ScalInfo>* scalCache;
+ static TQMap<ScalKey, TQValueList<int> >* scalSizesCache;
+ static bool isFontScalable(TQFontDatabase& db, const TQFont& font);
};
} // namespace
diff --git a/khtml/rendering/render_applet.cpp b/khtml/rendering/render_applet.cpp
index f6ce1ebab..fce22f7c8 100644
--- a/khtml/rendering/render_applet.cpp
+++ b/khtml/rendering/render_applet.cpp
@@ -30,7 +30,7 @@
#include "khtmlview.h"
#include "khtml_part.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#ifndef Q_WS_QWS // We don't have Java in Qt Embedded
@@ -41,7 +41,7 @@
using namespace khtml;
using namespace DOM;
-RenderApplet::RenderApplet(HTMLElementImpl *applet, const QMap<QString, QString> &args )
+RenderApplet::RenderApplet(HTMLElementImpl *applet, const TQMap<TQString, TQString> &args )
: RenderWidget(applet)
{
// init RenderObject attributes
@@ -55,7 +55,7 @@ RenderApplet::RenderApplet(HTMLElementImpl *applet, const QMap<QString, QString>
}
if ( context ) {
- //kdDebug(6100) << "RenderApplet::RenderApplet, setting QWidget" << endl;
+ //kdDebug(6100) << "RenderApplet::RenderApplet, setting TQWidget" << endl;
setQWidget( new KJavaAppletWidget(context, _view->viewport()) );
processArguments(args);
}
@@ -117,28 +117,28 @@ void RenderApplet::layout()
setNeedsLayout(false);
}
-void RenderApplet::processArguments(const QMap<QString, QString> &args)
+void RenderApplet::processArguments(const TQMap<TQString, TQString> &args)
{
KJavaAppletWidget *w = static_cast<KJavaAppletWidget*>(m_widget);
KJavaApplet* applet = w ? w->applet() : 0;
if ( applet ) {
- applet->setBaseURL( args[QString::fromLatin1("baseURL") ] );
- applet->setAppletClass( args[QString::fromLatin1("code") ] );
+ applet->setBaseURL( args[TQString::fromLatin1("baseURL") ] );
+ applet->setAppletClass( args[TQString::fromLatin1("code") ] );
- QString str = args[QString::fromLatin1("codeBase") ];
+ TQString str = args[TQString::fromLatin1("codeBase") ];
if( !str.isEmpty() )
applet->setCodeBase( str );
- str = args[QString::fromLatin1("name") ];
+ str = args[TQString::fromLatin1("name") ];
if( !str.isNull() )
applet->setAppletName( str );
else
- applet->setAppletName( args[QString::fromLatin1("code") ] );
+ applet->setAppletName( args[TQString::fromLatin1("code") ] );
- str = args[QString::fromLatin1("archive") ];
+ str = args[TQString::fromLatin1("archive") ];
if( !str.isEmpty() )
- applet->setArchives( args[QString::fromLatin1("archive") ] );
+ applet->setArchives( args[TQString::fromLatin1("archive") ] );
}
}
diff --git a/khtml/rendering/render_applet.h b/khtml/rendering/render_applet.h
index 54af6f280..184697a7c 100644
--- a/khtml/rendering/render_applet.h
+++ b/khtml/rendering/render_applet.h
@@ -25,8 +25,8 @@
#include "rendering/render_replaced.h"
#include "html/html_objectimpl.h"
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
class KHTMLView;
@@ -39,7 +39,7 @@ namespace khtml {
class RenderApplet : public RenderWidget
{
public:
- RenderApplet(DOM::HTMLElementImpl* node, const QMap<QString, QString> &args);
+ RenderApplet(DOM::HTMLElementImpl* node, const TQMap<TQString, TQString> &args);
virtual ~RenderApplet();
virtual const char *renderName() const { return "RenderApplet"; }
@@ -53,7 +53,7 @@ public:
{ return static_cast<DOM::HTMLElementImpl*>(RenderObject::element()); }
private:
- void processArguments( const QMap<QString, QString> &args );
+ void processArguments( const TQMap<TQString, TQString> &args );
};
}
diff --git a/khtml/rendering/render_block.cpp b/khtml/rendering/render_block.cpp
index ba9645a62..d036b9d09 100644
--- a/khtml/rendering/render_block.cpp
+++ b/khtml/rendering/render_block.cpp
@@ -494,7 +494,7 @@ void RenderBlock::makePageBreakAvoidBlocks()
// recurse into positioned block children as well.
if (m_positionedObjects) {
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; it.current(); ++it ) {
if (it.current()->isRenderBlock() && !it.current()->childrenInline()) {
static_cast<RenderBlock*>(it.current())->makePageBreakAvoidBlocks();
@@ -504,7 +504,7 @@ void RenderBlock::makePageBreakAvoidBlocks()
// recurse into floating block children.
if (m_floatingObjects) {
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; it.current(); ++it ) {
if (it.current()->node->isRenderBlock() && !it.current()->node->childrenInline()) {
static_cast<RenderBlock*>(it.current()->node)->makePageBreakAvoidBlocks();
@@ -618,7 +618,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
return;
}
// kdDebug( 6040 ) << renderName() << " " << this << "::layoutBlock() start" << endl;
- // QTime t;
+ // TQTime t;
// t.start();
KHTMLAssert( needsLayout() );
KHTMLAssert( minMaxKnown() );
@@ -1577,7 +1577,7 @@ void RenderBlock::layoutPositionedObjects(bool relayoutChildren)
if (m_positionedObjects) {
//kdDebug( 6040 ) << renderName() << " " << this << "::layoutPositionedObjects() start" << endl;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
//kdDebug(6040) << " have a positioned object" << endl;
if (r->markedForRepaint()) {
@@ -1678,7 +1678,7 @@ void RenderBlock::paintFloats(PaintInfo& pI, int _tx, int _ty, bool paintSelecti
return;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it) {
// Only paint the object if our noPaint flag isn't set.
if (r->node->isFloating() && !r->noPaint && !r->node->layer()) {
@@ -1719,12 +1719,12 @@ void RenderBlock::insertPositionedObject(RenderObject *o)
{
// Create the list of special objects if we don't aleady have one
if (!m_positionedObjects) {
- m_positionedObjects = new QPtrList<RenderObject>;
+ m_positionedObjects = new TQPtrList<RenderObject>;
m_positionedObjects->setAutoDelete(false);
}
else {
// Don't insert the object again if it's already in the list
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
RenderObject* f;
while ( (f = it.current()) ) {
if (f == o) return;
@@ -1740,7 +1740,7 @@ void RenderBlock::insertPositionedObject(RenderObject *o)
void RenderBlock::removePositionedObject(RenderObject *o)
{
if (m_positionedObjects) {
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
while (it.current()) {
if (it.current() == o)
m_positionedObjects->removeRef(it.current());
@@ -1757,12 +1757,12 @@ void RenderBlock::insertFloatingObject(RenderObject *o)
{
// Create the list of special objects if we don't aleady have one
if (!m_floatingObjects) {
- m_floatingObjects = new QPtrList<FloatingObject>;
+ m_floatingObjects = new TQPtrList<FloatingObject>;
m_floatingObjects->setAutoDelete(true);
}
else {
// Don't insert the object again if it's already in the list
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
FloatingObject* f;
while ( (f = it.current()) ) {
if (f->node == o) return;
@@ -1801,7 +1801,7 @@ void RenderBlock::insertFloatingObject(RenderObject *o)
void RenderBlock::removeFloatingObject(RenderObject *o)
{
if (m_floatingObjects) {
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
while (it.current()) {
if (it.current()->node == o)
m_floatingObjects->removeRef(it.current());
@@ -1986,7 +1986,7 @@ RenderBlock::leftRelOffset(int y, int fixedOffset, bool applyTextIndent, int *he
if (m_floatingObjects) {
if ( heightRemaining ) *heightRemaining = 1;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
{
//kdDebug( 6040 ) <<(void *)this << " left: sy, ey, x, w " << r->startY << "," << r->endY << "," << r->left << "," << r->width << " " << endl;
@@ -2029,7 +2029,7 @@ RenderBlock::rightRelOffset(int y, int fixedOffset, bool applyTextIndent, int *h
if (m_floatingObjects) {
if (heightRemaining) *heightRemaining = 1;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
{
//kdDebug( 6040 ) << "right: sy, ey, x, w " << r->startY << "," << r->endY << "," << r->left << "," << r->width << " " << endl;
@@ -2075,7 +2075,7 @@ RenderBlock::nearestFloatBottom(int height) const
if (!m_floatingObjects) return 0;
int bottom = 0;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->endY>height && (r->endY<bottom || bottom==0))
bottom=r->endY;
@@ -2087,7 +2087,7 @@ int RenderBlock::floatBottom() const
if (!m_floatingObjects) return 0;
int bottom=0;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->endY>bottom)
bottom=r->endY;
@@ -2104,7 +2104,7 @@ int RenderBlock::lowestPosition(bool includeOverflowInterior, bool includeSelf)
if (m_floatingObjects) {
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it ) {
if (!r->noPaint) {
int lp = r->startY + r->node->marginTop() + r->node->lowestPosition(false);
@@ -2131,7 +2131,7 @@ int RenderBlock::lowestAbsolutePosition() const
// part of the lowest position.
int bottom = 0;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
if (r->style()->position() == FIXED)
continue;
@@ -2151,7 +2151,7 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSel
if (m_floatingObjects) {
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it ) {
if (!r->noPaint) {
int rp = r->left + r->node->marginLeft() + r->node->rightmostPosition(false);
@@ -2177,7 +2177,7 @@ int RenderBlock::rightmostAbsolutePosition() const
return 0;
int right = 0;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
if (r->style()->position() == FIXED)
continue;
@@ -2198,7 +2198,7 @@ int RenderBlock::leftmostPosition(bool includeOverflowInterior, bool includeSelf
if (m_floatingObjects) {
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it ) {
if (!r->noPaint) {
int lp = r->left + r->node->marginLeft() + r->node->leftmostPosition(false);
@@ -2222,7 +2222,7 @@ int RenderBlock::leftmostAbsolutePosition() const
return 0;
int left = 0;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
if (r->style()->position() == FIXED)
continue;
@@ -2243,7 +2243,7 @@ int RenderBlock::highestPosition(bool includeOverflowInterior, bool includeSelf)
if (m_floatingObjects) {
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it ) {
if (!r->noPaint) {
int hp = r->startY + r->node->marginTop() + r->node->highestPosition(false);
@@ -2266,7 +2266,7 @@ int RenderBlock::highestAbsolutePosition() const
return 0;
int top = 0;
RenderObject* r;
- QPtrListIterator<RenderObject> it(*m_positionedObjects);
+ TQPtrListIterator<RenderObject> it(*m_positionedObjects);
for ( ; (r = it.current()); ++it ) {
if (r->style()->position() == FIXED)
continue;
@@ -2282,7 +2282,7 @@ RenderBlock::leftBottom()
if (!m_floatingObjects) return 0;
int bottom=0;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->endY>bottom && r->type == FloatingObject::FloatLeft)
bottom=r->endY;
@@ -2296,7 +2296,7 @@ RenderBlock::rightBottom()
if (!m_floatingObjects) return 0;
int bottom=0;
FloatingObject* r;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for ( ; (r = it.current()); ++it )
if (r->endY>bottom && r->type == FloatingObject::FloatRight)
bottom=r->endY;
@@ -2373,7 +2373,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
return;
}
- QPtrListIterator<FloatingObject> it(*flow->m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*flow->m_floatingObjects);
FloatingObject *r;
for ( ; (r = it.current()); ++it ) {
@@ -2396,7 +2396,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
FloatingObject* f = 0;
// don't insert it twice!
if (m_floatingObjects) {
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
while ( (f = it.current()) ) {
if (f->node == r->node) break;
++it;
@@ -2426,7 +2426,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
floatingObj->width = r->width;
floatingObj->node = r->node;
if (!m_floatingObjects) {
- m_floatingObjects = new QPtrList<FloatingObject>;
+ m_floatingObjects = new TQPtrList<FloatingObject>;
m_floatingObjects->setAutoDelete(true);
}
m_floatingObjects->append(floatingObj);
@@ -2441,7 +2441,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
bool RenderBlock::containsFloat(RenderObject* o) const
{
if (m_floatingObjects) {
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
while (it.current()) {
if (it.current()->node == o)
return true;
@@ -2514,7 +2514,7 @@ bool RenderBlock::isPointInScrollbar(int _x, int _y, int _tx, int _ty)
return false;
if (m_layer->verticalScrollbarWidth()) {
- QRect vertRect(_tx + width() - borderRight() - m_layer->verticalScrollbarWidth(),
+ TQRect vertRect(_tx + width() - borderRight() - m_layer->verticalScrollbarWidth(),
_ty + borderTop() - borderTopExtra(),
m_layer->verticalScrollbarWidth(),
height() + borderTopExtra() + borderBottomExtra()-borderTop()-borderBottom());
@@ -2527,7 +2527,7 @@ bool RenderBlock::isPointInScrollbar(int _x, int _y, int _tx, int _ty)
}
if (m_layer->horizontalScrollbarHeight()) {
- QRect horizRect(_tx + borderLeft(),
+ TQRect horizRect(_tx + borderLeft(),
_ty + height() + borderTop() + borderBottomExtra() - borderBottom() - m_layer->horizontalScrollbarHeight(),
width()-borderLeft()-borderRight(),
m_layer->horizontalScrollbarHeight());
@@ -2554,7 +2554,7 @@ bool RenderBlock::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
if (hasOverflowClip() && m_layer)
m_layer->subtractScrollOffset(stx, sty);
FloatingObject* o;
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
for (it.toLast(); (o = it.current()); --it)
if (!o->noPaint && !o->node->layer())
inBox |= o->node->nodeAtPoint(info, _x, _y,
@@ -2727,7 +2727,7 @@ static void stripTrailingSpace(bool preserveWS,
// Collapse away the trailing space at the end of a block.
RenderText* t = static_cast<RenderText *>(trailingSpaceChild);
const Font *f = t->htmlFont( false );
- QChar space[1]; space[0] = ' ';
+ TQChar space[1]; space[0] = ' ';
int spaceWidth = f->width(space, 1, 0);
inlineMax -= spaceWidth;
if (inlineMin > inlineMax)
@@ -3172,11 +3172,11 @@ void RenderBlock::printTree(int indent) const
if (m_floatingObjects)
{
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
FloatingObject *r;
for ( ; (r = it.current()); ++it )
{
- QString s;
+ TQString s;
s.fill(' ', indent);
kdDebug() << s << renderName() << ": " <<
(r->type == FloatingObject::FloatLeft ? "FloatLeft" : "FloatRight" ) <<
@@ -3186,7 +3186,7 @@ void RenderBlock::printTree(int indent) const
}
}
-void RenderBlock::dump(QTextStream &stream, const QString &ind) const
+void RenderBlock::dump(TQTextStream &stream, const TQString &ind) const
{
RenderFlow::dump(stream,ind);
@@ -3198,7 +3198,7 @@ void RenderBlock::dump(QTextStream &stream, const QString &ind) const
if (m_floatingObjects && !m_floatingObjects->isEmpty())
{
stream << " special(";
- QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+ TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
FloatingObject *r;
bool first = true;
for ( ; (r = it.current()); ++it )
diff --git a/khtml/rendering/render_block.h b/khtml/rendering/render_block.h
index 112d331ca..2b0e49398 100644
--- a/khtml/rendering/render_block.h
+++ b/khtml/rendering/render_block.h
@@ -26,7 +26,7 @@
#ifndef RENDER_BLOCK_H
#define RENDER_BLOCK_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "render_flow.h"
@@ -188,7 +188,7 @@ public:
#ifdef ENABLE_DUMP
virtual void printTree(int indent=0) const;
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
protected:
@@ -355,8 +355,8 @@ protected:
int m_overflowLeft;
private:
- QPtrList<FloatingObject>* m_floatingObjects;
- QPtrList<RenderObject>* m_positionedObjects;
+ TQPtrList<FloatingObject>* m_floatingObjects;
+ TQPtrList<RenderObject>* m_positionedObjects;
bool m_childrenInline : 1;
bool m_firstLine : 1; // used in inline layouting
diff --git a/khtml/rendering/render_body.cpp b/khtml/rendering/render_body.cpp
index e9da3c71c..930ec358c 100644
--- a/khtml/rendering/render_body.cpp
+++ b/khtml/rendering/render_body.cpp
@@ -56,7 +56,7 @@ void RenderBody::setStyle(RenderStyle* style)
void RenderBody::paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
{
//kdDebug( 6040 ) << renderName() << "::paintDecorations()" << endl;
- QColor bgColor;
+ TQColor bgColor;
const BackgroundLayer *bgLayer = 0;
if( parent()->style()->hasBackground() ) {
diff --git a/khtml/rendering/render_box.cpp b/khtml/rendering/render_box.cpp
index 56a3109d5..e6742d54e 100644
--- a/khtml/rendering/render_box.cpp
+++ b/khtml/rendering/render_box.cpp
@@ -28,7 +28,7 @@
//#define CLIP_DEBUG
-#include <qpainter.h>
+#include <tqpainter.h>
#include "misc/loader.h"
#include "rendering/render_replaced.h"
@@ -330,7 +330,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
{
//kdDebug( 6040 ) << renderName() << "::paintRootBoxDecorations()" << _tx << "/" << _ty << endl;
const BackgroundLayer* bgLayer = style()->backgroundLayers();
- QColor bgColor = style()->backgroundColor();
+ TQColor bgColor = style()->backgroundColor();
if (document()->isHTMLDocument() && !style()->hasBackground()) {
// Locate the <body> element using the DOM. This is easier than trying
// to crawl around a render tree with potential :before/:after content and
@@ -346,7 +346,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
}
if( !bgColor.isValid() && canvas()->view())
- bgColor = canvas()->view()->palette().active().color(QColorGroup::Base);
+ bgColor = canvas()->view()->palette().active().color(TQColorGroup::Base);
int w = width();
int h = height();
@@ -408,14 +408,14 @@ void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
}
}
-void RenderBox::paintBackgrounds(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
+void RenderBox::paintBackgrounds(TQPainter *p, const TQColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
{
if (!bgLayer) return;
paintBackgrounds(p, c, bgLayer->next(), clipy, cliph, _tx, _ty, w, height);
paintBackground(p, c, bgLayer, clipy, cliph, _tx, _ty, w, height);
}
-void RenderBox::paintBackground(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
+void RenderBox::paintBackground(TQPainter *p, const TQColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int height)
{
paintBackgroundExtended(p, c, bgLayer, clipy, cliph, _tx, _ty, w, height,
borderLeft(), borderRight(), paddingLeft(), paddingRight());
@@ -467,7 +467,7 @@ static void calculateBackgroundSize(const BackgroundLayer* bgLayer, int& scaledW
}
}
-void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const BackgroundLayer* bgLayer, int clipy, int cliph,
+void RenderBox::paintBackgroundExtended(TQPainter *p, const TQColor &c, const BackgroundLayer* bgLayer, int clipy, int cliph,
int _tx, int _ty, int w, int h,
int bleft, int bright, int pleft, int pright)
{
@@ -482,12 +482,12 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
int width = w - bleft - bright - (includePadding ? pleft + pright : 0);
int height = h - borderTop() - borderBottom() - (includePadding ? paddingTop() + paddingBottom() : 0);
p->save();
- p->setClipRect(QRect(x, y, width, height), QPainter::CoordPainter);
+ p->setClipRect(TQRect(x, y, width, height), TQPainter::CoordPainter);
}
CachedImage* bg = bgLayer->backgroundImage();
bool shouldPaintBackgroundImage = bg && bg->pixmap_size() == bg->valid_rect().size() && !bg->isTransparent() && !bg->isErrorImage();
- QColor bgColor = c;
+ TQColor bgColor = c;
// Paint the color first underneath all images.
if (!bgLayer->next() && bgColor.isValid() && qAlpha(bgColor.rgb()) > 0)
@@ -583,7 +583,7 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
else
{
//fixed
- QRect vr = viewRect();
+ TQRect vr = viewRect();
int pw = vr.width();
int ph = vr.height();
scaledImageWidth = pw;
@@ -613,9 +613,9 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
sy = scaledImageHeight - yPosition % scaledImageHeight;
}
- QRect fix(cx, cy, cw, ch);
- QRect ele(_tx, _ty, w, h);
- QRect b = fix.intersect(ele);
+ TQRect fix(cx, cy, cw, ch);
+ TQRect ele(_tx, _ty, w, h);
+ TQRect b = fix.intersect(ele);
//kdDebug() <<" ele is " << ele << " b is " << b << " fix is " << fix << endl;
sx+=b.x()-cx;
@@ -642,14 +642,14 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, const Back
}
-void RenderBox::outlineBox(QPainter *p, int _tx, int _ty, const char *color)
+void RenderBox::outlineBox(TQPainter *p, int _tx, int _ty, const char *color)
{
- p->setPen(QPen(QColor(color), 1, Qt::DotLine));
+ p->setPen(TQPen(TQColor(color), 1, Qt::DotLine));
p->setBrush( Qt::NoBrush );
p->drawRect(_tx, _ty, m_width, m_height);
}
-QRect RenderBox::getOverflowClipRect(int tx, int ty)
+TQRect RenderBox::getOverflowClipRect(int tx, int ty)
{
// XXX When overflow-clip (CSS3) is implemented, we'll obtain the property
// here.
@@ -665,10 +665,10 @@ QRect RenderBox::getOverflowClipRect(int tx, int ty)
cliph -= m_layer->horizontalScrollbarHeight();
}
- return QRect(clipx,clipy,clipw,cliph);
+ return TQRect(clipx,clipy,clipw,cliph);
}
-QRect RenderBox::getClipRect(int tx, int ty)
+TQRect RenderBox::getClipRect(int tx, int ty)
{
int bl=borderLeft(),bt=borderTop(),bb=borderBottom(),br=borderRight();
// ### what about paddings?
@@ -711,7 +711,7 @@ QRect RenderBox::getClipRect(int tx, int ty)
//kdDebug( 6040 ) << "setting clip("<<clipx<<","<<clipy<<","<<clipw<<","<<cliph<<")"<<endl;
- return QRect(clipx,clipy,clipw,cliph);
+ return TQRect(clipx,clipy,clipw,cliph);
}
void RenderBox::close()
@@ -2260,7 +2260,7 @@ void RenderBox::caretPos(int /*offset*/, int flags, int &_x, int &_y, int &width
? element()->parent()->renderer()->style()
: cb->style();
- const QFontMetrics &fm = s->fontMetrics();
+ const TQFontMetrics &fm = s->fontMetrics();
height = fm.height();
bool rtl = s->direction() == RTL;
@@ -2284,7 +2284,7 @@ void RenderBox::caretPos(int /*offset*/, int flags, int &_x, int &_y, int &width
// Place caret inside the element
} else {
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
height = fm.height();
RenderStyle *s = style();
diff --git a/khtml/rendering/render_box.h b/khtml/rendering/render_box.h
index ad0a5b9fb..c0c618d5c 100644
--- a/khtml/rendering/render_box.h
+++ b/khtml/rendering/render_box.h
@@ -142,14 +142,14 @@ protected:
virtual void paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty);
void paintRootBoxDecorations( PaintInfo& paintInfo, int _tx, int _ty);
- void paintBackgrounds(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
- void paintBackground(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
+ void paintBackgrounds(TQPainter *p, const TQColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
+ void paintBackground(TQPainter *p, const TQColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
- virtual void paintBackgroundExtended(QPainter* /*p*/, const QColor& /*c*/, const BackgroundLayer* /*bgLayer*/,
+ virtual void paintBackgroundExtended(TQPainter* /*p*/, const TQColor& /*c*/, const BackgroundLayer* /*bgLayer*/,
int /*clipy*/, int /*cliph*/, int /*_tx*/, int /*_ty*/,
int /*w*/, int /*height*/, int /*bleft*/, int /*bright*/, int /*pleft*/, int /*pright*/ );
- void outlineBox(QPainter *p, int _tx, int _ty, const char *color = "red");
+ void outlineBox(TQPainter *p, int _tx, int _ty, const char *color = "red");
void calcAbsoluteHorizontal();
void calcAbsoluteVertical();
@@ -165,8 +165,8 @@ protected:
void calcAbsoluteVerticalReplaced();
void calcAbsoluteHorizontalReplaced();
- QRect getOverflowClipRect(int tx, int ty);
- QRect getClipRect(int tx, int ty);
+ TQRect getOverflowClipRect(int tx, int ty);
+ TQRect getClipRect(int tx, int ty);
void restructureParentFlow();
diff --git a/khtml/rendering/render_br.cpp b/khtml/rendering/render_br.cpp
index 42709839a..69984b760 100644
--- a/khtml/rendering/render_br.cpp
+++ b/khtml/rendering/render_br.cpp
@@ -25,7 +25,7 @@ using namespace khtml;
RenderBR::RenderBR(DOM::NodeImpl* node)
- : RenderText(node, new DOM::DOMStringImpl(QChar('\n')))
+ : RenderText(node, new DOM::DOMStringImpl(TQChar('\n')))
{
m_hasReturn = true;
}
diff --git a/khtml/rendering/render_canvas.cpp b/khtml/rendering/render_canvas.cpp
index 50cad914a..e8540eba6 100644
--- a/khtml/rendering/render_canvas.cpp
+++ b/khtml/rendering/render_canvas.cpp
@@ -166,7 +166,7 @@ void RenderCanvas::layout()
}
#ifdef SPEED_DEBUG
- QTime qt;
+ TQTime qt;
qt.start();
#endif
@@ -212,7 +212,7 @@ void RenderCanvas::updateDocumentSize()
bool vss = m_view->verticalScrollBar()->isShown();
bool hss = m_view->horizontalScrollBar()->isShown();
- QSize s = m_view->viewportSize(m_cachedDocWidth, m_cachedDocHeight);
+ TQSize s = m_view->viewportSize(m_cachedDocWidth, m_cachedDocHeight);
// if we are about to show a scrollbar, and the document is sized to the viewport w or h,
// then reserve the scrollbar space so that it doesn't trigger the _other_ scrollbar
@@ -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(QColorGroup::Base));
+ paintInfo.p->fillRect(paintInfo.r, view()->palette().active().color(TQColorGroup::Base));
}
void RenderCanvas::repaintRectangle(int x, int y, int w, int h, Priority p, bool f)
@@ -345,8 +345,8 @@ void RenderCanvas::repaintRectangle(int x, int y, int w, int h, Priority p, bool
y += m_view->contentsY();
}
- QRect vr = viewRect();
- QRect ur(x, y, w, h);
+ TQRect vr = viewRect();
+ TQRect ur(x, y, w, h);
if (m_view && ur.intersects(vr)) {
@@ -370,7 +370,7 @@ void RenderCanvas::deferredRepaint( RenderObject* o )
void RenderCanvas::scheduleDeferredRepaints()
{
if (!needsFullRepaint()) {
- QValueList<RenderObject*>::const_iterator it;
+ TQValueList<RenderObject*>::const_iterator it;
for ( it = m_dirtyChildren.begin(); it != m_dirtyChildren.end(); ++it )
(*it)->repaint();
}
@@ -401,10 +401,10 @@ void RenderCanvas::repaint(Priority p)
}
}
-static QRect enclosingPositionedRect (RenderObject *n)
+static TQRect enclosingPositionedRect (RenderObject *n)
{
RenderObject *enclosingParent = n->containingBlock();
- QRect rect(0,0,0,0);
+ TQRect rect(0,0,0,0);
if (enclosingParent) {
int ox, oy;
enclosingParent->absolutePosition(ox, oy);
@@ -421,13 +421,13 @@ static QRect enclosingPositionedRect (RenderObject *n)
return rect;
}
-QRect RenderCanvas::selectionRect() const
+TQRect RenderCanvas::selectionRect() const
{
RenderObject *r = m_selectionStart;
if (!r)
- return QRect();
+ return TQRect();
- QRect selectionRect = enclosingPositionedRect(r);
+ TQRect selectionRect = enclosingPositionedRect(r);
while (r && r != m_selectionEnd)
{
@@ -475,8 +475,8 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
int oldStartPos = m_selectionStartPos;
RenderObject *oldEnd = m_selectionEnd;
int oldEndPos = m_selectionEndPos;
- QPtrList<RenderObject> oldSelectedInside;
- QPtrList<RenderObject> newSelectedInside;
+ TQPtrList<RenderObject> oldSelectedInside;
+ TQPtrList<RenderObject> newSelectedInside;
RenderObject *os = oldStart;
while (os && os != oldEnd)
@@ -565,7 +565,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
newSelectedInside.removeRef(s);
newSelectedInside.removeRef(e);
- QRect updateRect;
+ TQRect updateRect;
// Don't use repaint() because it will cause all rects to
// be united (see khtmlview::scheduleRepaint()). Instead
@@ -578,7 +578,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
// If so we have to draw them.
// Could be faster by building list of non-intersecting rectangles rather
// than unioning rectangles.
- QPtrListIterator<RenderObject> oldIterator(oldSelectedInside);
+ TQPtrListIterator<RenderObject> oldIterator(oldSelectedInside);
bool firstRect = true;
for (; oldIterator.current(); ++oldIterator){
if (!newSelectedInside.containsRef(oldIterator.current())){
@@ -598,7 +598,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep
// If so we have to draw them.
// Could be faster by building list of non-intersecting rectangles rather
// than unioning rectangles.
- QPtrListIterator<RenderObject> newIterator(newSelectedInside);
+ TQPtrListIterator<RenderObject> newIterator(newSelectedInside);
firstRect = true;
for (; newIterator.current(); ++newIterator){
if (!oldSelectedInside.containsRef(newIterator.current())){
@@ -690,24 +690,24 @@ void RenderCanvas::selectionStartEnd(int& spos, int& epos)
epos = m_selectionEndPos;
}
-QRect RenderCanvas::viewRect() const
+TQRect RenderCanvas::viewRect() const
{
if (m_pagedMode)
if (m_pageTop == m_pageBottom) {
- kdDebug(6040) << "viewRect: " << QRect(0, m_pageTop, m_width, m_height) << endl;
- return QRect(0, m_pageTop, m_width, m_height);
+ kdDebug(6040) << "viewRect: " << TQRect(0, m_pageTop, m_width, m_height) << endl;
+ return TQRect(0, m_pageTop, m_width, m_height);
}
else {
- kdDebug(6040) << "viewRect: " << QRect(0, m_pageTop, m_width, m_pageBottom - m_pageTop) << endl;
- return QRect(0, m_pageTop, m_width, m_pageBottom - m_pageTop);
+ kdDebug(6040) << "viewRect: " << TQRect(0, m_pageTop, m_width, m_pageBottom - m_pageTop) << endl;
+ return TQRect(0, m_pageTop, m_width, m_pageBottom - m_pageTop);
}
else if (m_view)
- return QRect(m_view->contentsX(),
+ return TQRect(m_view->contentsX(),
m_view->contentsY(),
m_view->visibleWidth(),
m_view->visibleHeight());
else
- return QRect(0,0,m_rootWidth,m_rootHeight);
+ return TQRect(0,0,m_rootWidth,m_rootHeight);
}
int RenderCanvas::docHeight() const
diff --git a/khtml/rendering/render_canvas.h b/khtml/rendering/render_canvas.h
index 017bd02b2..76196bd24 100644
--- a/khtml/rendering/render_canvas.h
+++ b/khtml/rendering/render_canvas.h
@@ -123,7 +123,7 @@ public:
RenderPage* page();
- QRect selectionRect() const;
+ TQRect selectionRect() const;
void setMaximalOutlineSize(int o) { m_maximalOutlineSize = o; }
int maximalOutlineSize() const { return m_maximalOutlineSize; }
@@ -143,7 +143,7 @@ protected:
virtual void selectionStartEnd(int& spos, int& epos);
- virtual QRect viewRect() const;
+ virtual TQRect viewRect() const;
KHTMLView *m_view;
@@ -181,7 +181,7 @@ protected:
RenderPage* m_page;
int m_maximalOutlineSize; // Used to apply a fudge factor to dirty-rect checks on blocks/tables.
- QValueList<RenderObject*> m_dirtyChildren;
+ TQValueList<RenderObject*> m_dirtyChildren;
};
inline RenderCanvas* RenderObject::canvas() const
diff --git a/khtml/rendering/render_flow.cpp b/khtml/rendering/render_flow.cpp
index 88e06aab9..ae579bd46 100644
--- a/khtml/rendering/render_flow.cpp
+++ b/khtml/rendering/render_flow.cpp
@@ -25,7 +25,7 @@
#include <kdebug.h>
#include <assert.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include "rendering/render_flow.h"
@@ -222,7 +222,7 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
}
if (i.phase == PaintActionOutline && i.outlineObjects) {
- QValueList<RenderFlow *>::iterator it;;
+ TQValueList<RenderFlow *>::iterator it;;
for( it = (*i.outlineObjects).begin(); it != (*i.outlineObjects).end(); ++it )
if ((*it)->isRenderInline())
static_cast<RenderInline*>(*it)->paintOutlines(i.p, _tx, _ty);
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index f8daba1e3..403295a8f 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -38,7 +38,7 @@
#include <kurlcompletion.h>
#include <kwin.h>
-#include <qstyle.h>
+#include <tqstyle.h>
#include "misc/helper.h"
#include "xml/dom2_eventsimpl.h"
@@ -52,8 +52,8 @@
#include "khtml_ext.h"
#include "xml/dom_docimpl.h"
-#include <qpopupmenu.h>
-#include <qbitmap.h>
+#include <tqpopupmenu.h>
+#include <tqbitmap.h>
using namespace khtml;
@@ -138,7 +138,7 @@ short RenderButton::baselinePosition( bool f ) const
RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element)
: RenderButton(element)
{
- QCheckBox* b = new QCheckBox(view()->viewport(), "__khtml");
+ TQCheckBox* b = new TQCheckBox(view()->viewport(), "__khtml");
b->setAutoMask(true);
b->setMouseTracking(true);
setQWidget(b);
@@ -146,7 +146,7 @@ RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element)
// prevent firing toggled() signals on initialization
b->setChecked(element->checked());
- connect(b,SIGNAL(stateChanged(int)),this,SLOT(slotStateChanged(int)));
+ connect(b,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(slotStateChanged(int)));
}
@@ -154,9 +154,9 @@ void RenderCheckBox::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- QCheckBox *cb = static_cast<QCheckBox *>( m_widget );
- QSize s( cb->style().pixelMetric( QStyle::PM_IndicatorWidth ),
- cb->style().pixelMetric( QStyle::PM_IndicatorHeight ) );
+ TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget );
+ TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ),
+ cb->style().pixelMetric( TQStyle::PM_IndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -172,8 +172,8 @@ void RenderCheckBox::updateFromElement()
void RenderCheckBox::slotStateChanged(int state)
{
- element()->setChecked(state == QButton::On);
- element()->setIndeterminate(state == QButton::NoChange);
+ element()->setChecked(state == TQButton::On);
+ element()->setIndeterminate(state == TQButton::NoChange);
ref();
element()->onChange();
@@ -185,14 +185,14 @@ void RenderCheckBox::slotStateChanged(int state)
RenderRadioButton::RenderRadioButton(HTMLInputElementImpl *element)
: RenderButton(element)
{
- QRadioButton* b = new QRadioButton(view()->viewport(), "__khtml");
+ TQRadioButton* b = new TQRadioButton(view()->viewport(), "__khtml");
b->setMouseTracking(true);
setQWidget(b);
// prevent firing toggled() signals on initialization
b->setChecked(element->checked());
- connect(b,SIGNAL(toggled(bool)),this,SLOT(slotToggled(bool)));
+ connect(b,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool)));
}
void RenderRadioButton::updateFromElement()
@@ -206,9 +206,9 @@ void RenderRadioButton::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- QRadioButton *rb = static_cast<QRadioButton *>( m_widget );
- QSize s( rb->style().pixelMetric( QStyle::PM_ExclusiveIndicatorWidth ),
- rb->style().pixelMetric( QStyle::PM_ExclusiveIndicatorHeight ) );
+ TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget );
+ TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
+ rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -230,17 +230,17 @@ void RenderRadioButton::slotToggled(bool activated)
RenderSubmitButton::RenderSubmitButton(HTMLInputElementImpl *element)
: RenderButton(element)
{
- QPushButton* p = new QPushButton(view()->viewport(), "__khtml");
+ TQPushButton* p = new TQPushButton(view()->viewport(), "__khtml");
setQWidget(p);
p->setAutoMask(true);
p->setMouseTracking(true);
}
-QString RenderSubmitButton::rawText()
+TQString RenderSubmitButton::rawText()
{
- QString value = element()->valueWithDefault().string();
+ TQString value = element()->valueWithDefault().string();
value = value.stripWhiteSpace();
- QString raw;
+ TQString raw;
for(unsigned int i = 0; i < value.length(); i++) {
raw += value[i];
if(value[i] == '&')
@@ -253,29 +253,29 @@ void RenderSubmitButton::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- QString raw = rawText();
- QPushButton* pb = static_cast<QPushButton*>(m_widget);
+ TQString raw = rawText();
+ TQPushButton* pb = static_cast<TQPushButton*>(m_widget);
pb->setText(raw);
pb->setFont(style()->font());
bool empty = raw.isEmpty();
if ( empty )
- raw = QString::fromLatin1("X");
- QFontMetrics fm = pb->fontMetrics();
- QSize ts = fm.size( ShowPrefix, raw);
- QSize s(pb->style().sizeFromContents( QStyle::CT_PushButton, pb, ts )
- .expandedTo(QApplication::globalStrut()));
- int margin = pb->style().pixelMetric( QStyle::PM_ButtonMargin, pb) +
- pb->style().pixelMetric( QStyle::PM_DefaultFrameWidth, pb ) * 2;
+ raw = TQString::fromLatin1("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 w = ts.width() + margin;
int h = s.height();
if (pb->isDefault() || pb->autoDefault()) {
- int dbw = pb->style().pixelMetric( QStyle::PM_ButtonDefaultIndicator, pb ) * 2;
+ int dbw = pb->style().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
w += dbw;
}
// add 30% margins to the width (heuristics to make it look similar to IE)
- s = QSize( w*13/10, h ).expandedTo(QApplication::globalStrut());
+ s = TQSize( w*13/10, h ).expandedTo(TQApplication::globalStrut());
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -285,9 +285,9 @@ void RenderSubmitButton::calcMinMaxWidth()
void RenderSubmitButton::updateFromElement()
{
- QString oldText = static_cast<QPushButton*>(m_widget)->text();
- QString newText = rawText();
- static_cast<QPushButton*>(m_widget)->setText(newText);
+ TQString oldText = static_cast<TQPushButton*>(m_widget)->text();
+ TQString newText = rawText();
+ static_cast<TQPushButton*>(m_widget)->setText(newText);
if ( oldText != newText )
setNeedsLayoutAndMinMaxRecalc();
RenderFormElement::updateFromElement();
@@ -307,12 +307,12 @@ RenderResetButton::RenderResetButton(HTMLInputElementImpl *element)
// -------------------------------------------------------------------------------
-LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, KHTMLView* view, QWidget* parent)
+LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, KHTMLView* view, TQWidget* parent)
: KLineEdit(parent, "__khtml"), m_input(input), m_view(view), m_spell(0)
{
setMouseTracking(true);
KActionCollection *ac = new KActionCollection(this);
- m_spellAction = KStdAction::spelling( this, SLOT( slotCheckSpelling() ), ac );
+ m_spellAction = KStdAction::spelling( this, TQT_SLOT( slotCheckSpelling() ), ac );
}
LineEditWidget::~LineEditWidget()
@@ -328,14 +328,14 @@ void LineEditWidget::slotCheckSpelling()
}
delete m_spell;
- m_spell = new KSpell( this, i18n( "Spell Checking" ), this, SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
+ m_spell = new KSpell( this, i18n( "Spell Checking" ), this, TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
- connect( m_spell, SIGNAL( death() ),this, SLOT( spellCheckerFinished() ) );
- connect( m_spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int ) ),this, SLOT( spellCheckerMisspelling( const QString &, const QStringList &, unsigned int ) ) );
- connect( m_spell, SIGNAL( corrected( const QString &, const QString &, unsigned int ) ),this, SLOT( spellCheckerCorrected( const QString &, const QString &, unsigned int ) ) );
+ 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 ) ) );
+ connect( m_spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int ) ),this, TQT_SLOT( spellCheckerCorrected( const TQString &, const TQString &, unsigned int ) ) );
}
-void LineEditWidget::spellCheckerMisspelling( const QString &_text, const QStringList &, unsigned int pos)
+void LineEditWidget::spellCheckerMisspelling( const TQString &_text, const TQStringList &, unsigned int pos)
{
highLightWord( _text.length(),pos );
}
@@ -345,7 +345,7 @@ void LineEditWidget::highLightWord( unsigned int length, unsigned int pos )
setSelection ( pos, length );
}
-void LineEditWidget::spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos )
+void LineEditWidget::spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos )
{
if( old!= corr )
{
@@ -362,26 +362,26 @@ void LineEditWidget::spellCheckerFinished()
void LineEditWidget::slotSpellCheckReady( KSpell *s )
{
s->check( text() );
- connect( s, SIGNAL( done( const QString & ) ), this, SLOT( slotSpellCheckDone( const QString & ) ) );
+ connect( s, TQT_SIGNAL( done( const TQString & ) ), this, TQT_SLOT( slotSpellCheckDone( const TQString & ) ) );
}
-void LineEditWidget::slotSpellCheckDone( const QString &s )
+void LineEditWidget::slotSpellCheckDone( const TQString &s )
{
if( s != text() )
setText( s );
}
-QPopupMenu *LineEditWidget::createPopupMenu()
+TQPopupMenu *LineEditWidget::createPopupMenu()
{
- QPopupMenu *popup = KLineEdit::createPopupMenu();
+ TQPopupMenu *popup = KLineEdit::createPopupMenu();
if ( !popup ) {
return 0L;
}
- connect( popup, SIGNAL( activated( int ) ),
- this, SLOT( extendedMenuActivated( int ) ) );
+ connect( popup, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( extendedMenuActivated( int ) ) );
if (m_input->autoComplete()) {
popup->insertSeparator();
@@ -389,7 +389,7 @@ QPopupMenu *LineEditWidget::createPopupMenu()
popup->setItemEnabled( id, (compObj() && !compObj()->isEmpty()) );
}
- if (echoMode() == QLineEdit::Normal &&
+ if (echoMode() == TQLineEdit::Normal &&
!isReadOnly()) {
popup->insertSeparator();
@@ -414,13 +414,13 @@ void LineEditWidget::extendedMenuActivated( int id)
}
}
-bool LineEditWidget::event( QEvent *e )
+bool LineEditWidget::event( TQEvent *e )
{
if (KLineEdit::event(e))
return true;
- if ( e->type() == QEvent::AccelAvailable && isReadOnly() ) {
- QKeyEvent* ke = (QKeyEvent*) e;
+ if ( e->type() == TQEvent::AccelAvailable && isReadOnly() ) {
+ TQKeyEvent* ke = (TQKeyEvent*) e;
if ( ke->state() & ControlButton ) {
switch ( ke->key() ) {
case Key_Left:
@@ -438,7 +438,7 @@ bool LineEditWidget::event( QEvent *e )
return false;
}
-void LineEditWidget::mouseMoveEvent(QMouseEvent *e)
+void LineEditWidget::mouseMoveEvent(TQMouseEvent *e)
{
// hack to prevent Qt from calling setCursor on the widget
setDragEnabled(false);
@@ -453,14 +453,14 @@ RenderLineEdit::RenderLineEdit(HTMLInputElementImpl *element)
: RenderFormElement(element)
{
LineEditWidget *edit = new LineEditWidget(element, view(), view()->viewport());
- connect(edit,SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
- connect(edit,SIGNAL(textChanged(const QString &)),this,SLOT(slotTextChanged(const QString &)));
+ connect(edit,TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReturnPressed()));
+ connect(edit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(slotTextChanged(const TQString &)));
if(element->inputType() == HTMLInputElementImpl::PASSWORD)
- edit->setEchoMode( QLineEdit::Password );
+ edit->setEchoMode( TQLineEdit::Password );
if ( element->autoComplete() ) {
- QStringList completions = view()->formCompletionItems(element->name().string());
+ TQStringList completions = view()->formCompletionItems(element->name().string());
if (completions.count()) {
edit->completionObject()->setItems(completions);
edit->setContextMenuEnabled(true);
@@ -518,16 +518,16 @@ void RenderLineEdit::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- const QFontMetrics &fm = style()->fontMetrics();
- QSize s;
+ const TQFontMetrics &fm = style()->fontMetrics();
+ TQSize s;
int size = element()->size();
int h = fm.lineSpacing();
int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some"
- s = QSize(w + 2 + 2*widget()->frameWidth(),
+ s = TQSize(w + 2 + 2*widget()->frameWidth(),
kMax(h, 14) + 2 + 2*widget()->frameWidth())
- .expandedTo(QApplication::globalStrut());
+ .expandedTo(TQApplication::globalStrut());
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -560,7 +560,7 @@ void RenderLineEdit::updateFromElement()
RenderFormElement::updateFromElement();
}
-void RenderLineEdit::slotTextChanged(const QString &string)
+void RenderLineEdit::slotTextChanged(const TQString &string)
{
// don't use setValue here!
element()->m_value = string;
@@ -679,12 +679,12 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& pI, int _tx, int _ty)
paintBorderMinusLegend(pI.p, _tx, _ty, w, h, style(), legend->xPos(), legend->width());
}
-void RenderFieldset::paintBorderMinusLegend(QPainter *p, int _tx, int _ty, int w, int h,
+void RenderFieldset::paintBorderMinusLegend(TQPainter *p, int _tx, int _ty, int w, int h,
const RenderStyle* style, int lx, int lw)
{
- const QColor& tc = style->borderTopColor();
- const QColor& bc = style->borderBottomColor();
+ const TQColor& tc = style->borderTopColor();
+ const TQColor& bc = style->borderBottomColor();
EBorderStyle ts = style->borderTopStyle();
EBorderStyle bs = style->borderBottomStyle();
@@ -710,7 +710,7 @@ void RenderFieldset::paintBorderMinusLegend(QPainter *p, int _tx, int _ty, int w
if(render_l)
{
- const QColor& lc = style->borderLeftColor();
+ const TQColor& lc = style->borderLeftColor();
bool ignore_top =
(tc == lc) &&
@@ -729,7 +729,7 @@ void RenderFieldset::paintBorderMinusLegend(QPainter *p, int _tx, int _ty, int w
if(render_r)
{
- const QColor& rc = style->borderRightColor();
+ const TQColor& rc = style->borderRightColor();
bool ignore_top =
(tc == rc) &&
@@ -769,9 +769,9 @@ RenderFileButton::RenderFileButton(HTMLInputElementImpl *element)
w->setMode(KFile::File | KFile::ExistingOnly);
w->completionObject()->setDir(KGlobalSettings::documentPath());
- connect(w->lineEdit(), SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
- connect(w->lineEdit(), SIGNAL(textChanged(const QString &)),this,SLOT(slotTextChanged(const QString &)));
- connect(w, SIGNAL(urlSelected(const QString &)),this,SLOT(slotUrlSelected(const QString &)));
+ connect(w->lineEdit(), TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReturnPressed()));
+ connect(w->lineEdit(), TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(slotTextChanged(const TQString &)));
+ connect(w, TQT_SIGNAL(urlSelected(const TQString &)),this,TQT_SLOT(slotUrlSelected(const TQString &)));
setQWidget(w);
m_haveFocus = false;
@@ -783,17 +783,17 @@ void RenderFileButton::calcMinMaxWidth()
{
KHTMLAssert( !minMaxKnown() );
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
int size = element()->size();
int h = fm.lineSpacing();
int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some"
KLineEdit* edit = static_cast<KURLRequester*>( m_widget )->lineEdit();
- QSize s = edit->style().sizeFromContents(QStyle::CT_LineEdit,
+ TQSize s = edit->style().sizeFromContents(TQStyle::CT_LineEdit,
edit,
- QSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth()))
- .expandedTo(QApplication::globalStrut());
- QSize bs = static_cast<KURLRequester*>( m_widget )->minimumSizeHint() - edit->minimumSizeHint();
+ TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth()))
+ .expandedTo(TQApplication::globalStrut());
+ TQSize bs = static_cast<KURLRequester*>( m_widget )->minimumSizeHint() - edit->minimumSizeHint();
setIntrinsicWidth( s.width() + bs.width() );
setIntrinsicHeight( kMax(s.height(), bs.height()) );
@@ -828,12 +828,12 @@ void RenderFileButton::slotReturnPressed()
element()->form()->submitFromKeyboard();
}
-void RenderFileButton::slotTextChanged(const QString &/*string*/)
+void RenderFileButton::slotTextChanged(const TQString &/*string*/)
{
element()->m_value = KURL( widget()->url() ).prettyURL( 0, KURL::StripFileProtocol );
}
-void RenderFileButton::slotUrlSelected(const QString &)
+void RenderFileButton::slotUrlSelected(const TQString &)
{
element()->onChange();
}
@@ -860,7 +860,7 @@ RenderLegend::RenderLegend(HTMLGenericFormElementImpl *element)
// -------------------------------------------------------------------------------
-ComboBoxWidget::ComboBoxWidget(QWidget *parent)
+ComboBoxWidget::ComboBoxWidget(TQWidget *parent)
: KComboBox(false, parent, "__khtml")
{
setAutoMask(true);
@@ -868,13 +868,13 @@ ComboBoxWidget::ComboBoxWidget(QWidget *parent)
setMouseTracking(true);
}
-bool ComboBoxWidget::event(QEvent *e)
+bool ComboBoxWidget::event(TQEvent *e)
{
if (KComboBox::event(e))
return true;
- if (e->type()==QEvent::KeyPress)
+ if (e->type()==TQEvent::KeyPress)
{
- QKeyEvent *ke = static_cast<QKeyEvent *>(e);
+ TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
switch(ke->key())
{
case Key_Return:
@@ -889,21 +889,21 @@ bool ComboBoxWidget::event(QEvent *e)
return false;
}
-bool ComboBoxWidget::eventFilter(QObject *dest, QEvent *e)
+bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e)
{
- if (dest==listBox() && e->type()==QEvent::KeyPress)
+ if (dest==listBox() && e->type()==TQEvent::KeyPress)
{
- QKeyEvent *ke = static_cast<QKeyEvent *>(e);
+ TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
bool forward = false;
switch(ke->key())
{
case Key_Tab:
forward=true;
case Key_BackTab:
- // ugly hack. emulate popdownlistbox() (private in QComboBox)
+ // ugly hack. emulate popdownlistbox() (private in TQComboBox)
// we re-use ke here to store the reference to the generated event.
- ke = new QKeyEvent(QEvent::KeyPress, Key_Escape, 0, 0);
- QApplication::sendEvent(dest,ke);
+ ke = new TQKeyEvent(TQEvent::KeyPress, Key_Escape, 0, 0);
+ TQApplication::sendEvent(dest,ke);
focusNextPrevChild(forward);
delete ke;
return true;
@@ -955,7 +955,7 @@ void RenderSelect::updateFromElement()
}
if (m_useListBox && oldMultiple != m_multiple) {
- static_cast<KListBox*>(m_widget)->setSelectionMode(m_multiple ? QListBox::Extended : QListBox::Single);
+ static_cast<KListBox*>(m_widget)->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single);
}
m_selectionChanged = true;
m_optionsChanged = true;
@@ -965,7 +965,7 @@ void RenderSelect::updateFromElement()
if ( m_optionsChanged ) {
if (element()->m_recalcListItems)
element()->recalcListItems();
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
int listIndex;
if(m_useListBox) {
@@ -982,27 +982,27 @@ void RenderSelect::updateFromElement()
text = "";
if(m_useListBox) {
- QListBoxText *item = new QListBoxText(QString(text.implementation()->s, text.implementation()->l));
+ TQListBoxText *item = new TQListBoxText(TQString(text.implementation()->s, text.implementation()->l));
static_cast<KListBox*>(m_widget)
->insertItem(item, listIndex);
item->setSelectable(false);
}
else {
static_cast<KComboBox*>(m_widget)
- ->insertItem(QString(text.implementation()->s, text.implementation()->l), listIndex);
+ ->insertItem(TQString(text.implementation()->s, text.implementation()->l), listIndex);
static_cast<KComboBox*>(m_widget)->listBox()->item(listIndex)->setSelectable(false);
}
}
else if (listItems[listIndex]->id() == ID_OPTION) {
HTMLOptionElementImpl* optElem = static_cast<HTMLOptionElementImpl*>(listItems[listIndex]);
- QString text = optElem->text().string();
+ TQString text = optElem->text().string();
if (optElem->parentNode()->id() == ID_OPTGROUP)
{
// Prefer label if set
DOMString label = optElem->getAttribute(ATTR_LABEL);
if (!label.isEmpty())
text = label.string();
- text = QString::fromLatin1(" ")+text;
+ text = TQString::fromLatin1(" ")+text;
}
if(m_useListBox) {
@@ -1020,7 +1020,7 @@ void RenderSelect::updateFromElement()
m_selectionChanged = true;
}
- // QComboBox caches the size hint unless you call setFont (ref: TT docu)
+ // TQComboBox caches the size hint unless you call setFont (ref: TT docu)
if(!m_useListBox) {
KComboBox *that = static_cast<KComboBox*>(m_widget);
that->setFont( that->font() );
@@ -1069,7 +1069,7 @@ void RenderSelect::layout( )
if(m_useListBox) {
KListBox* w = static_cast<KListBox*>(m_widget);
- QListBoxItem* p = w->firstItem();
+ TQListBoxItem* p = w->firstItem();
int width = 0;
int height = 0;
while(p) {
@@ -1098,7 +1098,7 @@ void RenderSelect::layout( )
setIntrinsicHeight( height );
}
else {
- QSize s(m_widget->sizeHint());
+ TQSize s(m_widget->sizeHint());
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
}
@@ -1108,7 +1108,7 @@ void RenderSelect::layout( )
RenderFormElement::layout();
// and now disable the widget in case there is no <option> given
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
bool foundOption = false;
for (uint i = 0; i < listItems.size() && !foundOption; i++)
@@ -1123,7 +1123,7 @@ void RenderSelect::slotSelected(int index) // emitted by the combobox only
KHTMLAssert( !m_useListBox );
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
if(index >= 0 && index < int(listItems.size()))
{
bool found = ( listItems[index]->id() == ID_OPTION );
@@ -1186,7 +1186,7 @@ void RenderSelect::slotSelectionChanged() // emitted by the listbox only
// don't use listItems() here as we have to avoid recalculations - changing the
// option list will make use update options not in the way the user expects them
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->m_listItems;
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->m_listItems;
for ( unsigned i = 0; i < listItems.count(); i++ )
// don't use setSelected() here because it will cause us to be called
// again with updateSelection.
@@ -1207,11 +1207,11 @@ void RenderSelect::setOptionsChanged(bool _optionsChanged)
KListBox* RenderSelect::createListBox()
{
KListBox *lb = new KListBox(view()->viewport(), "__khtml");
- lb->setSelectionMode(m_multiple ? QListBox::Extended : QListBox::Single);
+ lb->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single);
// ### looks broken
//lb->setAutoMask(true);
- connect( lb, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
-// connect( lb, SIGNAL( clicked( QListBoxItem * ) ), this, SLOT( slotClicked() ) );
+ connect( lb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotSelectionChanged() ) );
+// connect( lb, TQT_SIGNAL( clicked( TQListBoxItem * ) ), this, TQT_SLOT( slotClicked() ) );
m_ignoreSelectEvents = false;
lb->setMouseTracking(true);
@@ -1221,13 +1221,13 @@ KListBox* RenderSelect::createListBox()
ComboBoxWidget *RenderSelect::createComboBox()
{
ComboBoxWidget *cb = new ComboBoxWidget(view()->viewport());
- connect(cb, SIGNAL(activated(int)), this, SLOT(slotSelected(int)));
+ connect(cb, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSelected(int)));
return cb;
}
void RenderSelect::updateSelection()
{
- QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
int i;
if (m_useListBox) {
// if multi-select, we select only the new selected index
@@ -1260,28 +1260,28 @@ void RenderSelect::updateSelection()
// -------------------------------------------------------------------------
-TextAreaWidget::TextAreaWidget(int wrap, QWidget* parent)
+TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent)
: KTextEdit(parent, "__khtml"), m_findDlg(0), m_find(0), m_repDlg(0), m_replace(0)
{
if(wrap != DOM::HTMLTextAreaElementImpl::ta_NoWrap) {
- setWordWrap(QTextEdit::WidgetWidth);
+ setWordWrap(TQTextEdit::WidgetWidth);
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
}
else {
- setWordWrap(QTextEdit::NoWrap);
+ setWordWrap(TQTextEdit::NoWrap);
setHScrollBarMode( Auto );
setVScrollBarMode( Auto );
}
KCursor::setAutoHideCursor(viewport(), true);
- setTextFormat(QTextEdit::PlainText);
+ setTextFormat(TQTextEdit::PlainText);
setAutoMask(true);
setMouseTracking(true);
KActionCollection *ac = new KActionCollection(this);
- m_findAction = KStdAction::find( this, SLOT( slotFind() ), ac );
- m_findNextAction = KStdAction::findNext( this, SLOT( slotFindNext() ), ac );
- m_replaceAction = KStdAction::replace( this, SLOT( slotReplace() ), ac );
+ 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 );
}
@@ -1298,9 +1298,9 @@ TextAreaWidget::~TextAreaWidget()
}
-QPopupMenu *TextAreaWidget::createPopupMenu(const QPoint& pos)
+TQPopupMenu *TextAreaWidget::createPopupMenu(const TQPoint& pos)
{
- QPopupMenu *popup = KTextEdit::createPopupMenu(pos);
+ TQPopupMenu *popup = KTextEdit::createPopupMenu(pos);
if ( !popup ) {
return 0L;
@@ -1323,7 +1323,7 @@ QPopupMenu *TextAreaWidget::createPopupMenu(const QPoint& pos)
}
-void TextAreaWidget::slotFindHighlight(const QString& text, int matchingIndex, int matchingLength)
+void TextAreaWidget::slotFindHighlight(const TQString& text, int matchingIndex, int matchingLength)
{
Q_UNUSED(text)
//kdDebug() << "Highlight: [" << text << "] mi:" << matchingIndex << " ml:" << matchingLength << endl;
@@ -1338,7 +1338,7 @@ void TextAreaWidget::slotFindHighlight(const QString& text, int matchingIndex, i
}
-void TextAreaWidget::slotReplaceText(const QString &text, int replacementIndex, int /*replacedLength*/, int matchedLength) {
+void TextAreaWidget::slotReplaceText(const TQString &text, int replacementIndex, int /*replacedLength*/, int matchedLength) {
Q_UNUSED(text)
//kdDebug() << "Replace: [" << text << "] ri:" << replacementIndex << " rl:" << replacedLength << " ml:" << matchedLength << endl;
setSelection(m_repPara, replacementIndex, m_repPara, replacementIndex + matchedLength);
@@ -1371,11 +1371,11 @@ void TextAreaWidget::slotDoReplace()
// Connect highlight signal to code which handles highlighting
// of found text.
- connect(m_replace, SIGNAL(highlight(const QString &, int, int)),
- this, SLOT(slotFindHighlight(const QString &, int, int)));
- connect(m_replace, SIGNAL(findNext()), this, SLOT(slotReplaceNext()));
- connect(m_replace, SIGNAL(replace(const QString &, int, int, int)),
- this, SLOT(slotReplaceText(const QString &, int, int, int)));
+ connect(m_replace, TQT_SIGNAL(highlight(const TQString &, int, int)),
+ this, TQT_SLOT(slotFindHighlight(const TQString &, int, int)));
+ connect(m_replace, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotReplaceNext()));
+ connect(m_replace, TQT_SIGNAL(replace(const TQString &, int, int, int)),
+ this, TQT_SLOT(slotReplaceText(const TQString &, int, int, int)));
m_repDlg->close();
slotReplaceNext();
@@ -1470,9 +1470,9 @@ void TextAreaWidget::slotDoFind()
// Connect highlight signal to code which handles highlighting
// of found text.
- connect(m_find, SIGNAL(highlight(const QString &, int, int)),
- this, SLOT(slotFindHighlight(const QString &, int, int)));
- connect(m_find, SIGNAL(findNext()), this, SLOT(slotFindNext()));
+ connect(m_find, TQT_SIGNAL(highlight(const TQString &, int, int)),
+ this, TQT_SLOT(slotFindHighlight(const TQString &, int, int)));
+ connect(m_find, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotFindNext()));
m_findDlg->close();
m_find->closeFindNextDialog();
@@ -1546,7 +1546,7 @@ void TextAreaWidget::slotFind()
KWin::activateWindow( m_findDlg->winId() );
} else {
m_findDlg = new KFindDialog(false, this, "KHTML Text Area Find Dialog");
- connect( m_findDlg, SIGNAL(okClicked()), this, SLOT(slotDoFind()) );
+ connect( m_findDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoFind()) );
}
m_findDlg->show();
}
@@ -1561,17 +1561,17 @@ void TextAreaWidget::slotReplace()
KWin::activateWindow( m_repDlg->winId() );
} else {
m_repDlg = new KReplaceDialog(this, "KHTMLText Area Replace Dialog", 0,
- QStringList(), QStringList(), false);
- connect( m_repDlg, SIGNAL(okClicked()), this, SLOT(slotDoReplace()) );
+ TQStringList(), TQStringList(), false);
+ connect( m_repDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoReplace()) );
}
m_repDlg->show();
}
-bool TextAreaWidget::event( QEvent *e )
+bool TextAreaWidget::event( TQEvent *e )
{
- if ( e->type() == QEvent::AccelAvailable && isReadOnly() ) {
- QKeyEvent* ke = (QKeyEvent*) e;
+ if ( e->type() == TQEvent::AccelAvailable && isReadOnly() ) {
+ TQKeyEvent* ke = (TQKeyEvent*) e;
if ( ke->state() & ControlButton ) {
switch ( ke->key() ) {
case Key_Left:
@@ -1602,7 +1602,7 @@ RenderTextArea::RenderTextArea(HTMLTextAreaElementImpl *element)
edit->setCheckSpellingEnabled( settings->autoSpellCheck() );
edit->setTabChangesFocus( ! settings->allowTabulation() );
- connect(edit,SIGNAL(textChanged()),this,SLOT(slotTextChanged()));
+ connect(edit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged()));
}
RenderTextArea::~RenderTextArea()
@@ -1632,12 +1632,12 @@ void RenderTextArea::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() );
TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget);
- const QFontMetrics &m = style()->fontMetrics();
+ const TQFontMetrics &m = style()->fontMetrics();
w->setTabStopWidth(8 * m.width(" "));
- QSize size( kMax(element()->cols(), 1L)*m.width('x') + w->frameWidth() +
+ TQSize size( kMax(element()->cols(), 1L)*m.width('x') + w->frameWidth() +
w->verticalScrollBar()->sizeHint().width(),
kMax(element()->rows(), 1L)*m.lineSpacing() + w->frameWidth()*4 +
- (w->wordWrap() == QTextEdit::NoWrap ?
+ (w->wordWrap() == TQTextEdit::NoWrap ?
w->horizontalScrollBar()->sizeHint().height() : 0)
);
@@ -1681,7 +1681,7 @@ void RenderTextArea::updateFromElement()
{
TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget);
w->setReadOnly(element()->readOnly());
- QString elementText = element()->value().string();
+ TQString elementText = element()->value().string();
if ( elementText != text() )
{
w->blockSignals(true);
@@ -1707,28 +1707,28 @@ void RenderTextArea::close( )
}
-QString RenderTextArea::text()
+TQString RenderTextArea::text()
{
- QString txt;
+ TQString txt;
TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget);
if(element()->wrap() == DOM::HTMLTextAreaElementImpl::ta_Physical) {
- // yeah, QTextEdit has no accessor for getting the visually wrapped text
+ // yeah, TQTextEdit has no accessor for getting the visually wrapped text
for (int p=0; p < w->paragraphs(); ++p) {
int ll = 0;
int lindex = w->lineOfChar(p, 0);
- QString paragraphText = w->text(p);
+ TQString paragraphText = w->text(p);
int pl = w->paragraphLength(p);
paragraphText = paragraphText.left(pl); //Snip invented space.
for (int l = 0; l < pl; ++l) {
if (lindex != w->lineOfChar(p, l)) {
- paragraphText.insert(l+ll++, QString::fromLatin1("\n"));
+ paragraphText.insert(l+ll++, TQString::fromLatin1("\n"));
lindex = w->lineOfChar(p, l);
}
}
txt += paragraphText;
if (p < w->paragraphs() - 1)
- txt += QString::fromLatin1("\n");
+ txt += TQString::fromLatin1("\n");
}
}
else
@@ -1745,7 +1745,7 @@ int RenderTextArea::queryParagraphInfo(int para, Mode m, int param) {
bool physWrap = element()->wrap() == DOM::HTMLTextAreaElementImpl::ta_Physical;
- QString paragraphText = w->text(para);
+ TQString paragraphText = w->text(para);
int pl = w->paragraphLength(para);
int physicalPL = pl;
if (m == ParaPortionLength)
diff --git a/khtml/rendering/render_form.h b/khtml/rendering/render_form.h
index f4d35b927..e8340c93f 100644
--- a/khtml/rendering/render_form.h
+++ b/khtml/rendering/render_form.h
@@ -37,10 +37,10 @@ class QListboxItem;
#include <ktextedit.h>
#include <kurlrequester.h>
#include <klineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
#include <klistbox.h>
#include <kcombobox.h>
#include "dom/dom_misc.h"
@@ -97,7 +97,7 @@ protected:
virtual bool isEditable() const { return false; }
AlignmentFlags textAlignment() const;
- QPoint m_mousePos;
+ TQPoint m_mousePos;
int m_state;
};
@@ -136,7 +136,7 @@ public:
virtual bool handleEvent(const DOM::EventImpl&) { return false; }
- QCheckBox *widget() const { return static_cast<QCheckBox*>(m_widget); }
+ TQCheckBox *widget() const { return static_cast<TQCheckBox*>(m_widget); }
public slots:
virtual void slotStateChanged(int state);
@@ -157,7 +157,7 @@ public:
virtual bool handleEvent(const DOM::EventImpl&) { return false; }
- QRadioButton *widget() const { return static_cast<QRadioButton*>(m_widget); }
+ TQRadioButton *widget() const { return static_cast<TQRadioButton*>(m_widget); }
public slots:
virtual void slotToggled(bool);
@@ -176,7 +176,7 @@ public:
virtual void updateFromElement();
virtual short baselinePosition( bool ) const;
private:
- QString rawText();
+ TQString rawText();
};
// -------------------------------------------------------------------------
@@ -240,7 +240,7 @@ public:
void setSelectionRange(long start, long end);
public slots:
void slotReturnPressed();
- void slotTextChanged(const QString &string);
+ void slotTextChanged(const TQString &string);
protected:
virtual void handleFocusOut();
@@ -256,21 +256,21 @@ class LineEditWidget : public KLineEdit
Q_OBJECT
public:
LineEditWidget(DOM::HTMLInputElementImpl* input,
- KHTMLView* view, QWidget* parent);
+ KHTMLView* view, TQWidget* parent);
~LineEditWidget();
void highLightWord( unsigned int length, unsigned int pos );
protected:
- virtual bool event( QEvent *e );
- virtual void mouseMoveEvent(QMouseEvent *e);
- virtual QPopupMenu *createPopupMenu();
+ virtual bool event( TQEvent *e );
+ virtual void mouseMoveEvent(TQMouseEvent *e);
+ virtual TQPopupMenu *createPopupMenu();
private slots:
void extendedMenuActivated( int id);
void slotCheckSpelling();
void slotSpellCheckReady( KSpell *s );
- void slotSpellCheckDone( const QString &s );
- void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos);
- void spellCheckerCorrected( const QString &, const QString &, unsigned int );
+ void slotSpellCheckDone( const TQString &s );
+ void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
+ void spellCheckerCorrected( const TQString &, const TQString &, unsigned int );
void spellCheckerFinished();
private:
@@ -296,7 +296,7 @@ public:
protected:
virtual void paintBoxDecorations(PaintInfo& pI, int _tx, int _ty);
- void paintBorderMinusLegend(QPainter *p, int _tx, int _ty, int w,
+ void paintBorderMinusLegend(TQPainter *p, int _tx, int _ty, int w,
int h, const RenderStyle *style, int lx, int lw);
RenderObject* findLegend();
};
@@ -321,8 +321,8 @@ public:
public slots:
void slotReturnPressed();
- void slotTextChanged(const QString &string);
- void slotUrlSelected(const QString &string);
+ void slotTextChanged(const TQString &string);
+ void slotUrlSelected(const TQString &string);
protected:
virtual void handleFocusOut();
@@ -365,11 +365,11 @@ public:
class ComboBoxWidget : public KComboBox
{
public:
- ComboBoxWidget(QWidget *parent);
+ ComboBoxWidget(TQWidget *parent);
protected:
- virtual bool event(QEvent *);
- virtual bool eventFilter(QObject *dest, QEvent *e);
+ virtual bool event(TQEvent *);
+ virtual bool eventFilter(TQObject *dest, TQEvent *e);
};
// -------------------------------------------------------------------------
@@ -417,13 +417,13 @@ class TextAreaWidget : public KTextEdit
{
Q_OBJECT
public:
- TextAreaWidget(int wrap, QWidget* parent);
+ TextAreaWidget(int wrap, TQWidget* parent);
virtual ~TextAreaWidget();
protected:
- virtual bool event (QEvent *e );
- virtual QPopupMenu *createPopupMenu(const QPoint& pos);
- virtual QPopupMenu* createPopupMenu() { return KTextEdit::createPopupMenu(); }
+ virtual bool event (TQEvent *e );
+ virtual TQPopupMenu *createPopupMenu(const TQPoint& pos);
+ virtual TQPopupMenu* createPopupMenu() { return KTextEdit::createPopupMenu(); }
private slots:
void slotFind();
void slotDoFind();
@@ -431,8 +431,8 @@ private slots:
void slotReplace();
void slotDoReplace();
void slotReplaceNext();
- void slotReplaceText(const QString&, int, int, int);
- void slotFindHighlight(const QString&, int, int);
+ void slotReplaceText(const TQString&, int, int, int);
+ void slotFindHighlight(const TQString&, int, int);
private:
KFindDialog *m_findDlg;
KFind *m_find;
@@ -468,7 +468,7 @@ public:
DOM::HTMLTextAreaElementImpl* element() const
{ return static_cast<DOM::HTMLTextAreaElementImpl*>(RenderObject::element()); }
- QString text();
+ TQString text();
void highLightWord( unsigned int length, unsigned int pos );
void select();
diff --git a/khtml/rendering/render_frames.cpp b/khtml/rendering/render_frames.cpp
index 4ee0f96bf..8f072dda6 100644
--- a/khtml/rendering/render_frames.cpp
+++ b/khtml/rendering/render_frames.cpp
@@ -43,9 +43,9 @@
#include <kmimetype.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <assert.h>
@@ -509,7 +509,7 @@ bool RenderFrameSet::userResize( MouseEventImpl *evt )
if(!m_resizing && evt->id() == EventImpl::MOUSEDOWN_EVENT)
{
setResizing(true);
- KApplication::setOverrideCursor(QCursor(m_cursor));
+ KApplication::setOverrideCursor(TQCursor(m_cursor));
m_vSplitPos = _x;
m_hSplitPos = _y;
m_oldpos = -1;
@@ -547,11 +547,11 @@ bool RenderFrameSet::userResize( MouseEventImpl *evt )
KHTMLView *view = canvas()->view();
if ((m_resizing || evt->id() == EventImpl::MOUSEUP_EVENT) && view) {
- QPainter paint( view );
+ TQPainter paint( view );
paint.setPen( Qt::gray );
paint.setBrush( Qt::gray );
paint.setRasterOp( Qt::XorROP );
- QRect r(xPos(), yPos(), width(), height());
+ TQRect r(xPos(), yPos(), width(), height());
const int rBord = 3;
int sw = element()->border();
int p = m_resizing ? (m_vSplit > -1 ? _x : _y) : -1;
@@ -601,7 +601,7 @@ bool RenderFrameSet::canResize( int _x, int _y )
}
#ifdef ENABLE_DUMP
-void RenderFrameSet::dump(QTextStream &stream, const QString &ind) const
+void RenderFrameSet::dump(TQTextStream &stream, const TQString &ind) const
{
RenderBox::dump(stream,ind);
stream << " totalrows=" << element()->totalRows();
@@ -627,16 +627,16 @@ RenderPart::RenderPart(DOM::HTMLElementImpl* node)
setInline(false);
}
-void RenderPart::setWidget( QWidget *widget )
+void RenderPart::setWidget( TQWidget *widget )
{
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "RenderPart::setWidget()" << endl;
#endif
setQWidget( widget );
- widget->setFocusPolicy(QWidget::WheelFocus);
+ widget->setFocusPolicy(TQWidget::WheelFocus);
if(widget->inherits("KHTMLView"))
- connect( widget, SIGNAL( cleared() ), this, SLOT( slotViewCleared() ) );
+ connect( widget, TQT_SIGNAL( cleared() ), this, TQT_SLOT( slotViewCleared() ) );
setNeedsLayoutAndMinMaxRecalc();
@@ -645,7 +645,7 @@ void RenderPart::setWidget( QWidget *widget )
slotViewCleared();
}
-bool RenderPart::partLoadingErrorNotify(khtml::ChildFrame *, const KURL& , const QString& )
+bool RenderPart::partLoadingErrorNotify(khtml::ChildFrame *, const KURL& , const TQString& )
{
return false;
}
@@ -674,13 +674,13 @@ RenderFrame::RenderFrame( DOM::HTMLFrameElementImpl *frame )
void RenderFrame::slotViewCleared()
{
- if(m_widget->inherits("QScrollView")) {
+ if(m_widget->inherits("TQScrollView")) {
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "frame is a scrollview!" << endl;
#endif
- QScrollView *view = static_cast<QScrollView *>(m_widget);
+ TQScrollView *view = static_cast<TQScrollView *>(m_widget);
if(!element()->frameBorder || !((static_cast<HTMLFrameSetElementImpl *>(element()->parentNode()))->frameBorder()))
- view->setFrameStyle(QFrame::NoFrame);
+ view->setFrameStyle(TQFrame::NoFrame);
view->setVScrollBarMode(element()->scrolling );
view->setHScrollBarMode(element()->scrolling );
if(view->inherits("KHTMLView")) {
@@ -705,7 +705,7 @@ RenderPartObject::RenderPartObject( DOM::HTMLElementImpl* element )
void RenderPartObject::updateWidget()
{
- QString url;
+ TQString url;
KHTMLPart *part = m_view->part();
setNeedsLayoutAndMinMaxRecalc();
@@ -715,11 +715,11 @@ void RenderPartObject::updateWidget()
HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(element());
url = o->url.string();
if (!o->getDocument()->isURLAllowed(url)) return;
- part->requestFrame( this, url, o->name.string(), QStringList(), true );
+ part->requestFrame( this, url, o->name.string(), TQStringList(), true );
// ### this should be constant true - move iframe to somewhere else
} else {
- QStringList params;
+ TQStringList params;
HTMLObjectBaseElementImpl * objbase = static_cast<HTMLObjectBaseElementImpl *>(element());
url = objbase->url;
@@ -727,17 +727,17 @@ void RenderPartObject::updateWidget()
if ( child->id() == ID_PARAM ) {
HTMLParamElementImpl *p = static_cast<HTMLParamElementImpl *>( child );
- QString aStr = p->name();
- aStr += QString::fromLatin1("=\"");
+ TQString aStr = p->name();
+ aStr += TQString::fromLatin1("=\"");
aStr += p->value();
- aStr += QString::fromLatin1("\"");
- QString name_lower = p->name().lower();
- if (name_lower == QString::fromLatin1("type") && objbase->id() != ID_APPLET) {
+ aStr += TQString::fromLatin1("\"");
+ TQString name_lower = p->name().lower();
+ if (name_lower == TQString::fromLatin1("type") && objbase->id() != ID_APPLET) {
objbase->setServiceType(p->value());
} else if (url.isEmpty() &&
- (name_lower == QString::fromLatin1("src") ||
- name_lower == QString::fromLatin1("movie") ||
- name_lower == QString::fromLatin1("code"))) {
+ (name_lower == TQString::fromLatin1("src") ||
+ name_lower == TQString::fromLatin1("movie") ||
+ name_lower == TQString::fromLatin1("code"))) {
url = p->value();
}
params.append(aStr);
@@ -754,12 +754,12 @@ void RenderPartObject::updateWidget()
}
}
}
- params.append( QString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") );
- params.append( QString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url()));
+ params.append( TQString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") );
+ params.append( TQString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url()));
HTMLEmbedElementImpl *embed = 0;
- QString classId;
- QString serviceType = objbase->serviceType;
+ TQString classId;
+ TQString serviceType = objbase->serviceType;
if ( element()->id() == ID_EMBED ) {
embed = static_cast<HTMLEmbedElementImpl *>( objbase );
@@ -775,18 +775,18 @@ void RenderPartObject::updateWidget()
}
classId = objbase->classId;
- params.append( QString::fromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) );
- params.append( QString::fromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) );
+ params.append( TQString::fromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) );
+ params.append( TQString::fromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) );
if (!objbase->getAttribute(ATTR_WIDTH).isEmpty())
- params.append( QString::fromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) );
+ params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) );
else if (embed && !embed->getAttribute(ATTR_WIDTH).isEmpty()) {
- params.append( QString::fromLatin1("WIDTH=\"%1\"").arg( embed->getAttribute(ATTR_WIDTH).string() ) );
+ params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( embed->getAttribute(ATTR_WIDTH).string() ) );
objbase->setAttribute(ATTR_WIDTH, embed->getAttribute(ATTR_WIDTH));
}
if (!objbase->getAttribute(ATTR_HEIGHT).isEmpty())
- params.append( QString::fromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) );
+ params.append( TQString::fromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) );
else if (embed && !embed->getAttribute(ATTR_HEIGHT).isEmpty()) {
- params.append( QString::fromLatin1("HEIGHT=\"%1\"").arg( embed->getAttribute(ATTR_HEIGHT).string() ) );
+ params.append( TQString::fromLatin1("HEIGHT=\"%1\"").arg( embed->getAttribute(ATTR_HEIGHT).string() ) );
objbase->setAttribute(ATTR_HEIGHT, embed->getAttribute(ATTR_HEIGHT));
}
@@ -808,7 +808,7 @@ void RenderPartObject::updateWidget()
serviceType = "application/x-activex-handler";
#endif
- if(classId.find(QString::fromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) {
+ if(classId.find(TQString::fromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) {
// It is ActiveX, but the nsplugin system handling
// should also work, that's why we don't override the
// serviceType with application/x-activex-handler
@@ -817,17 +817,17 @@ void RenderPartObject::updateWidget()
// with nspluginviewer (Niko)
serviceType = "application/x-shockwave-flash";
}
- else if(classId.find(QString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0)
+ else if(classId.find(TQString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0)
serviceType = "audio/x-pn-realaudio-plugin";
- else if(classId.find(QString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 ||
- objbase->classId.find(QString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0)
+ else if(classId.find(TQString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 ||
+ objbase->classId.find(TQString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0)
serviceType = "application/x-java-applet";
// http://www.apple.com/quicktime/tools_tips/tutorials/activex.html
- else if(classId.find(QString::fromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0)
+ else if(classId.find(TQString::fromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0)
serviceType = "video/quicktime";
// http://msdn.microsoft.com/library/en-us/dnwmt/html/adding_windows_media_to_web_pages__etse.asp?frame=true
- else if(objbase->classId.find(QString::fromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 ||
- classId.find(QString::fromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0)
+ else if(objbase->classId.find(TQString::fromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 ||
+ classId.find(TQString::fromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0)
serviceType = "video/x-msvideo";
else
@@ -855,7 +855,7 @@ void RenderPartObject::close()
}
-bool RenderPartObject::partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const QString& serviceType )
+bool RenderPartObject::partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const TQString& serviceType )
{
KHTMLPart *part = static_cast<KHTMLView *>(m_view)->part();
kdDebug(6031) << "RenderPartObject::partLoadingErrorNotify serviceType=" << serviceType << endl;
@@ -888,7 +888,7 @@ bool RenderPartObject::partLoadingErrorNotify( khtml::ChildFrame *childFrame, co
}
// Dissociate ourselves from the current event loop (to prevent crashes
// due to the message box staying up)
- QTimer::singleShot( 0, this, SLOT( slotPartLoadingErrorNotify() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPartLoadingErrorNotify() ) );
#if 0
Tokenizer *tokenizer = static_cast<DOM::DocumentImpl *>(part->document().handle())->tokenizer();
if (tokenizer) tokenizer->setOnHold( true );
@@ -902,7 +902,7 @@ void RenderPartObject::slotPartLoadingErrorNotify()
{
// First we need to find out the servicetype - again - this code is too duplicated !
HTMLEmbedElementImpl *embed = 0;
- QString serviceType;
+ TQString serviceType;
if( element()->id()==ID_OBJECT ) {
// check for embed child object
@@ -929,7 +929,7 @@ void RenderPartObject::slotPartLoadingErrorNotify()
KParts::BrowserExtension *ext = part->browserExtension();
if( embed && !embed->pluginPage.isEmpty() && ext ) {
// Prepare the mimetype to show in the question (comment if available, name as fallback)
- QString mimeName = serviceType;
+ TQString mimeName = serviceType;
KMimeType::Ptr mime = KMimeType::mimeType(serviceType);
if ( mime->name() != KMimeType::defaultMimeType() )
mimeName = mime->comment();
@@ -952,10 +952,10 @@ void RenderPartObject::slotPartLoadingErrorNotify()
if(!pluginAvailable) {
// Prepare the URL to show in the question (host only if http, to make it short)
KURL pluginPageURL( embed->pluginPage );
- QString shortURL = pluginPageURL.protocol() == "http" ? pluginPageURL.host() : pluginPageURL.prettyURL();
+ TQString shortURL = pluginPageURL.protocol() == "http" ? pluginPageURL.host() : pluginPageURL.prettyURL();
int res = KMessageBox::questionYesNo( m_view,
i18n("No plugin found for '%1'.\nDo you want to download one from %2?").arg(mimeName).arg(shortURL),
- i18n("Missing Plugin"), i18n("Download"), i18n("Do Not Download"), QString("plugin-")+serviceType);
+ i18n("Missing Plugin"), i18n("Download"), i18n("Do Not Download"), TQString("plugin-")+serviceType);
if ( res == KMessageBox::Yes )
{
// Display vendor download page
@@ -989,19 +989,19 @@ void RenderPartObject::layout( )
void RenderPartObject::slotViewCleared()
{
- if(m_widget->inherits("QScrollView") ) {
+ if(m_widget->inherits("TQScrollView") ) {
#ifdef DEBUG_LAYOUT
kdDebug(6031) << "iframe is a scrollview!" << endl;
#endif
- QScrollView *view = static_cast<QScrollView *>(m_widget);
- int frameStyle = QFrame::NoFrame;
- QScrollView::ScrollBarMode scroll = QScrollView::Auto;
+ TQScrollView *view = static_cast<TQScrollView *>(m_widget);
+ int frameStyle = TQFrame::NoFrame;
+ TQScrollView::ScrollBarMode scroll = TQScrollView::Auto;
int marginw = -1;
int marginh = -1;
if ( element()->id() == ID_IFRAME) {
HTMLIFrameElementImpl *frame = static_cast<HTMLIFrameElementImpl *>(element());
if(frame->frameBorder)
- frameStyle = QFrame::Box;
+ frameStyle = TQFrame::Box;
scroll = frame->scrolling;
marginw = frame->marginWidth;
marginh = frame->marginHeight;
diff --git a/khtml/rendering/render_frames.h b/khtml/rendering/render_frames.h
index c6e050525..3dd7ed0d9 100644
--- a/khtml/rendering/render_frames.h
+++ b/khtml/rendering/render_frames.h
@@ -69,7 +69,7 @@ public:
{ return static_cast<DOM::HTMLFrameSetElementImpl*>(RenderObject::element()); }
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
private:
@@ -99,7 +99,7 @@ public:
virtual const char *renderName() const { return "RenderPart"; }
- virtual void setWidget( QWidget *widget );
+ virtual void setWidget( TQWidget *widget );
/**
* Called by KHTMLPart to notify the frame object that loading the
@@ -112,7 +112,7 @@ public:
* Return false in the normal case, return true if a fallback was found
* and the url was successfully opened.
*/
- virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const QString& serviceType );
+ virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const TQString& serviceType );
virtual short intrinsicWidth() const;
virtual int intrinsicHeight() const;
@@ -159,7 +159,7 @@ public:
virtual bool canHaveBorder() const { return true; }
- virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const QString& serviceType );
+ virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const TQString& serviceType );
public slots:
void slotViewCleared();
diff --git a/khtml/rendering/render_generated.cpp b/khtml/rendering/render_generated.cpp
index aeab48630..17c65fc9c 100644
--- a/khtml/rendering/render_generated.cpp
+++ b/khtml/rendering/render_generated.cpp
@@ -72,28 +72,28 @@ RenderCounter::RenderCounter(DOM::NodeImpl* node, const DOM::CounterImpl* counte
{
}
-QString RenderCounter::toListStyleType(int value, int total, EListStyleType type)
+TQString RenderCounter::toListStyleType(int value, int total, EListStyleType type)
{
- QString item;
+ TQString item;
switch(type)
{
case LNONE:
break;
// Glyphs: (these values are not really used and instead handled by RenderGlyph)
case LDISC:
- item = QChar(0x2022);
+ item = TQChar(0x2022);
break;
case LCIRCLE:
- item = QChar(0x25e6);
+ item = TQChar(0x25e6);
break;
case LSQUARE:
- item = QChar(0x25a0);
+ item = TQChar(0x25a0);
break;
case LBOX:
- item = QChar(0x25a1);
+ item = TQChar(0x25a1);
break;
case LDIAMOND:
- item = QChar(0x25c6);
+ item = TQChar(0x25c6);
break;
// Numeric:
case LDECIMAL:
@@ -107,7 +107,7 @@ QString RenderCounter::toListStyleType(int value, int total, EListStyleType type
decimals++;
}
decimals = kMax(decimals, 2);
- QString num = QString::number(value);
+ TQString num = TQString::number(value);
item.fill('0',decimals-num.length());
item.append(num);
break;
@@ -273,7 +273,7 @@ void RenderQuote::generateContent()
case NO_OPEN_QUOTE:
case NO_CLOSE_QUOTE:
case NO_QUOTE:
- m_item = QString();
+ m_item = TQString();
}
}
@@ -290,8 +290,8 @@ void RenderGlyph::setStyle(RenderStyle *_style)
{
RenderBox::setStyle(_style);
- const QFontMetrics &fm = style()->fontMetrics();
- QRect xSize= fm.boundingRect('x');
+ const TQFontMetrics &fm = style()->fontMetrics();
+ TQRect xSize= fm.boundingRect('x');
m_height = xSize.height();
m_width = xSize.width();;
@@ -342,15 +342,15 @@ void RenderGlyph::paint(PaintInfo& paintInfo, int _tx, int _ty)
if((_ty > paintInfo.r.bottom()) || (_ty + m_height <= paintInfo.r.top()))
return;
- QPainter* p = paintInfo.p;
+ TQPainter* p = paintInfo.p;
- const QColor color( style()->color() );
+ const TQColor color( style()->color() );
p->setPen( color );
int xHeight = m_height;
int bulletWidth = (xHeight+1)/2;
int yoff = (xHeight - 1)/4;
- QRect marker(_tx, _ty + yoff, bulletWidth, bulletWidth);
+ TQRect marker(_tx, _ty + yoff, bulletWidth, bulletWidth);
switch(m_type) {
case LDISC:
@@ -370,14 +370,14 @@ void RenderGlyph::paint(PaintInfo& paintInfo, int _tx, int _ty)
p->drawRect( marker );
return;
case LDIAMOND: {
- static QPointArray diamond(4);
+ static TQPointArray diamond(4);
int x = marker.x();
int y = marker.y();
int s = bulletWidth/2;
- diamond[0] = QPoint(x+s, y);
- diamond[1] = QPoint(x+2*s, y+s);
- diamond[2] = QPoint(x+s, y+2*s);
- diamond[3] = QPoint(x, y+s);
+ diamond[0] = TQPoint(x+s, y);
+ diamond[1] = TQPoint(x+2*s, y+s);
+ diamond[2] = TQPoint(x+s, y+2*s);
+ diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
p->drawConvexPolygon( diamond, 0, 4 );
return;
diff --git a/khtml/rendering/render_generated.h b/khtml/rendering/render_generated.h
index 15b30b8c7..6fa20e7cd 100644
--- a/khtml/rendering/render_generated.h
+++ b/khtml/rendering/render_generated.h
@@ -49,7 +49,7 @@ public:
void updateContent();
protected:
- QString m_item;
+ TQString m_item;
CounterNode *m_counterNode; // Cache of the counternode
};
@@ -66,7 +66,7 @@ public:
virtual void generateContent();
protected:
- QString toListStyleType(int value, int total, EListStyleType type);
+ TQString toListStyleType(int value, int total, EListStyleType type);
const DOM::CounterImpl* m_counter;
};
diff --git a/khtml/rendering/render_image.cpp b/khtml/rendering/render_image.cpp
index 5d33da2ab..120e75361 100644
--- a/khtml/rendering/render_image.cpp
+++ b/khtml/rendering/render_image.cpp
@@ -27,8 +27,8 @@
#include "render_image.h"
#include "render_canvas.h"
-#include <qdrawutil.h>
-#include <qpainter.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -77,9 +77,9 @@ RenderImage::~RenderImage()
if(m_oldImage) m_oldImage->deref( this );
}
-QPixmap RenderImage::pixmap() const
+TQPixmap RenderImage::pixmap() const
{
- return m_cachedImage ? m_cachedImage->pixmap() : QPixmap();
+ return m_cachedImage ? m_cachedImage->pixmap() : TQPixmap();
}
void RenderImage::setStyle(RenderStyle* _style)
@@ -96,7 +96,7 @@ void RenderImage::setContentObject(CachedObject* co )
updateImage( static_cast<CachedImage*>( co ) );
}
-void RenderImage::setPixmap( const QPixmap &p, const QRect& r, CachedImage *o)
+void RenderImage::setPixmap( const TQPixmap &p, const TQRect& r, CachedImage *o)
{
if ( o == m_oldImage )
return;
@@ -114,8 +114,8 @@ void RenderImage::setPixmap( const QPixmap &p, const QRect& 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 QFontMetrics &fm = style()->fontMetrics();
- QRect br = fm.boundingRect ( 0, 0, 1024, 256, Qt::AlignAuto|Qt::WordBreak, alt.string() );
+ const TQFontMetrics &fm = style()->fontMetrics();
+ TQRect br = fm.boundingRect ( 0, 0, 1024, 256, Qt::AlignAuto|Qt::WordBreak, alt.string() );
if ( br.width() > iw )
iw = br.width();
if ( br.height() > ih )
@@ -193,7 +193,7 @@ void RenderImage::setPixmap( const QPixmap &p, const QRect& r, CachedImage *o)
(scaledHeight / (cHeight/5) == resizeCache.height() / (cHeight/5)))
return;
- resizeCache = QPixmap(); // for resized animations
+ resizeCache = TQPixmap(); // for resized animations
if(completeRepaint)
repaintRectangle(borderLeft()+paddingLeft(), borderTop()+paddingTop(), contentWidth(), contentHeight());
@@ -241,16 +241,16 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
// paint frame around image as long as it is not completely loaded from web.
if (bUnfinishedImageFrame && paintInfo.phase == PaintActionForeground && cWidth > 2 && cHeight > 2 && !complete()) {
- static QPixmap *loadingIcon;
- QColor bg = khtml::retrieveBackgroundColor(this);
- QColor fg = khtml::hasSufficientContrast(Qt::gray, bg) ? Qt::gray :
+ static TQPixmap *loadingIcon;
+ TQColor bg = khtml::retrieveBackgroundColor(this);
+ TQColor fg = khtml::hasSufficientContrast(Qt::gray, bg) ? Qt::gray :
(hasSufficientContrast(Qt::white, bg) ? Qt::white : Qt::black);
- paintInfo.p->setPen(QPen(fg, 1));
+ paintInfo.p->setPen(TQPen(fg, 1));
paintInfo.p->setBrush( Qt::NoBrush );
paintInfo.p->drawRect(_tx, _ty, m_width, m_height);
if (!(m_width <= 5 || m_height <= 5)) {
if (!loadingIcon) {
- loadingIcon = new QPixmap();
+ loadingIcon = new TQPixmap();
loadingIcon->loadFromData(loading_icon_data, loading_icon_len);
}
paintInfo.p->drawPixmap(_tx + 4, _ty + 4, *loadingIcon, 0, 0, m_width - 5, m_height - 5);
@@ -268,20 +268,20 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight,
KApplication::palette().inactive(), true, 1 );
}
- QPixmap const* pix = i ? &i->pixmap() : 0;
+ TQPixmap const* pix = i ? &i->pixmap() : 0;
if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) )
{
- QRect r(pix->rect());
- r = r.intersect(QRect(0, 0, cWidth-4, cHeight-4));
- paintInfo.p->drawPixmap( QPoint( _tx + leftBorder + leftPad+2, _ty + topBorder + topPad+2), *pix, r );
+ TQRect r(pix->rect());
+ r = r.intersect(TQRect(0, 0, cWidth-4, cHeight-4));
+ paintInfo.p->drawPixmap( TQPoint( _tx + leftBorder + leftPad+2, _ty + topBorder + topPad+2), *pix, r );
}
if(!alt.isEmpty()) {
- QString text = alt.string();
+ TQString text = alt.string();
paintInfo.p->setFont(style()->font());
paintInfo.p->setPen( style()->color() );
int ax = _tx + leftBorder + leftPad + 2;
int ay = _ty + topBorder + topPad + 2;
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
if (cWidth>5 && cHeight>=fm.height())
paintInfo.p->drawText(ax, ay+1, cWidth - 4, cHeight - 4, Qt::WordBreak, text );
}
@@ -290,18 +290,18 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
else if (i && !i->isTransparent())
{
paintInfo.p->setPen( Qt::black ); // used for bitmaps
- const QPixmap& pix = i->pixmap();
+ const TQPixmap& pix = i->pixmap();
if ( (cWidth != intrinsicWidth() || cHeight != intrinsicHeight()) &&
pix.width() > 0 && pix.height() > 0 && i->valid_rect().isValid())
{
if (resizeCache.isNull() && cWidth && cHeight && intrinsicWidth() && intrinsicHeight())
{
- QRect scaledrect(i->valid_rect());
+ TQRect scaledrect(i->valid_rect());
// kdDebug(6040) << "time elapsed: " << dt->elapsed() << endl;
// kdDebug( 6040 ) << "have to scale: " << endl;
// qDebug("cw=%d ch=%d pw=%d ph=%d rcw=%d, rch=%d",
// cWidth, cHeight, intrinsicWidth(), intrinsicHeight(), resizeCache.width(), resizeCache.height());
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.scale( (float)(cWidth)/intrinsicWidth(),
(float)(cHeight)/intrinsicHeight() );
resizeCache = pix.xForm( matrix );
@@ -315,35 +315,35 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
// sometimes scaledrect.width/height are off by one because
// of rounding errors. if the i is fully loaded, we
// make sure that we don't do unnecessary resizes during painting
- QSize s(scaledrect.size());
- if(i->valid_rect().size() == QSize( intrinsicWidth(), intrinsicHeight() )) // fully loaded
- s = QSize(cWidth, cHeight);
+ TQSize s(scaledrect.size());
+ if(i->valid_rect().size() == TQSize( intrinsicWidth(), intrinsicHeight() )) // fully loaded
+ s = TQSize(cWidth, cHeight);
if(kAbs(s.width() - cWidth) < 2) // rounding errors
s.setWidth(cWidth);
if(resizeCache.size() != s)
resizeCache.resize(s);
- paintInfo.p->drawPixmap( QPoint( _tx + leftBorder + leftPad, _ty + topBorder + topPad),
+ paintInfo.p->drawPixmap( TQPoint( _tx + leftBorder + leftPad, _ty + topBorder + topPad),
resizeCache, scaledrect );
}
else
- paintInfo.p->drawPixmap( QPoint( _tx + leftBorder + leftPad, _ty + topBorder + topPad), resizeCache );
+ paintInfo.p->drawPixmap( TQPoint( _tx + leftBorder + leftPad, _ty + topBorder + topPad), resizeCache );
}
else
{
// we might be just about switching images
- QRect rect(i->valid_rect().isValid() ? i->valid_rect()
- : QRect(0, 0, intrinsicWidth(), intrinsicHeight()));
+ TQRect rect(i->valid_rect().isValid() ? i->valid_rect()
+ : TQRect(0, 0, intrinsicWidth(), intrinsicHeight()));
- QPoint offs( _tx + leftBorder + leftPad, _ty + topBorder + topPad);
+ TQPoint offs( _tx + leftBorder + leftPad, _ty + topBorder + topPad);
// qDebug("normal paint rect %d/%d/%d/%d", rect.x(), rect.y(), rect.width(), rect.height());
-// rect = rect & QRect( 0 , y - offs.y() - 10, w, 10 + y + h - offs.y());
+// rect = rect & TQRect( 0 , y - offs.y() - 10, w, 10 + y + h - offs.y());
// qDebug("normal paint rect after %d/%d/%d/%d", rect.x(), rect.y(), rect.width(), rect.height());
// qDebug("normal paint: offs.y(): %d, y: %d, diff: %d", offs.y(), y, y - offs.y());
// qDebug("");
-// p->setClipRect(QRect(x,y,w,h));
+// p->setClipRect(TQRect(x,y,w,h));
// p->drawPixmap( offs.x(), y, pix, rect.x(), rect.y(), rect.width(), rect.height() );
@@ -370,7 +370,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
// don't touch it unless you know what you're doing
paintInfo.p->setBrushOrigin(_tx, _ty - paintInfo.r.y());
paintInfo.p->fillRect(_tx, _ty, width(), height(),
- QBrush(style()->palette().active().highlight(),
+ TQBrush(style()->palette().active().highlight(),
Qt::Dense4Pattern));
}
}
@@ -406,7 +406,7 @@ void RenderImage::layout()
}
if ( m_width != oldwidth || m_height != oldheight )
- resizeCache = QPixmap();
+ resizeCache = TQPixmap();
setNeedsLayout(false);
}
diff --git a/khtml/rendering/render_image.h b/khtml/rendering/render_image.h
index bd887ddf5..8c8bb9bef 100644
--- a/khtml/rendering/render_image.h
+++ b/khtml/rendering/render_image.h
@@ -28,8 +28,8 @@
#include "rendering/render_replaced.h"
#include "dom/dom_string.h"
-#include <qmap.h>
-#include <qpixmap.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
namespace khtml {
@@ -47,10 +47,10 @@ public:
virtual void layout();
- virtual void setPixmap( const QPixmap &, const QRect&, CachedImage *);
+ virtual void setPixmap( const TQPixmap &, const TQRect&, CachedImage *);
// don't even think about making these methods virtual!
- QPixmap pixmap() const;
+ TQPixmap pixmap() const;
DOM::HTMLElementImpl* element() const
{ return static_cast<DOM::HTMLElementImpl*>(RenderObject::element()); }
@@ -86,7 +86,7 @@ private:
/*
* Cache for images that need resizing
*/
- QPixmap resizeCache;
+ TQPixmap resizeCache;
// text to display as long as the image isn't available
DOM::DOMString alt;
diff --git a/khtml/rendering/render_inline.cpp b/khtml/rendering/render_inline.cpp
index 5848db47a..c3eb08d4b 100644
--- a/khtml/rendering/render_inline.cpp
+++ b/khtml/rendering/render_inline.cpp
@@ -30,7 +30,7 @@
#include "rendering/render_block.h"
#include "xml/dom_docimpl.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
using namespace khtml;
@@ -260,7 +260,7 @@ void RenderInline::paint(PaintInfo& i, int _tx, int _ty)
* @param pnt point to append
* @return \c true if \c pnt has actually been appended
*/
-inline static bool appendIfNew(QValueVector<QPoint> &pointArray, const QPoint &pnt)
+inline static bool appendIfNew(TQValueVector<TQPoint> &pointArray, const TQPoint &pnt)
{
// if (!pointArray.isEmpty()) kdDebug(6040) << "appifnew: " << pointArray.back() << " == " << pnt << ": " << (pointArray.back() == pnt) << endl;
// else kdDebug(6040) << "appifnew: " << pnt << " (unconditional)" << endl;
@@ -297,13 +297,13 @@ inline static bool appendIfNew(QValueVector<QPoint> &pointArray, const QPoint &p
* If no spike is found, the point-array is left unchanged.
* @return \c true if an actual reduction was done
*/
-inline static bool reduceSpike(QValueVector<QPoint> &pointArray)
+inline static bool reduceSpike(TQValueVector<TQPoint> &pointArray)
{
if (pointArray.size() < 3) return false;
- QValueVector<QPoint>::Iterator it = pointArray.end();
- QPoint p0 = *--it;
- QPoint p1 = *--it;
- QPoint p2 = *--it;
+ TQValueVector<TQPoint>::Iterator it = pointArray.end();
+ TQPoint p0 = *--it;
+ TQPoint p1 = *--it;
+ TQPoint p2 = *--it;
bool elide = false;
@@ -363,13 +363,13 @@ inline static bool reduceSpike(QValueVector<QPoint> &pointArray)
* left unchanged.
* @return \c true if a segment separator was actually reduced.
*/
-inline static bool reduceSegmentSeparator(QValueVector<QPoint> &pointArray)
+inline static bool reduceSegmentSeparator(TQValueVector<TQPoint> &pointArray)
{
if (pointArray.size() < 3) return false;
- QValueVector<QPoint>::Iterator it = pointArray.end();
- QPoint p0 = *--it;
- QPoint p1 = *--it;
- QPoint p2 = *--it;
+ TQValueVector<TQPoint>::Iterator it = pointArray.end();
+ TQPoint p0 = *--it;
+ TQPoint p1 = *--it;
+ TQPoint p2 = *--it;
// kdDebug(6040) << "checking p2: " << p2 << " p1: " << p1 << " p0: " << p0 << endl;
if (p0.x() == p1.x() && p1.x() == p2.x()
@@ -391,7 +391,7 @@ inline static bool reduceSegmentSeparator(QValueVector<QPoint> &pointArray)
* Appends the given point to the point-array, doing necessary reductions to
* produce a path without spikes and segment separators.
*/
-static void appendPoint(QValueVector<QPoint> &pointArray, QPoint &pnt)
+static void appendPoint(TQValueVector<TQPoint> &pointArray, TQPoint &pnt)
{
if (!appendIfNew(pointArray, pnt)) return;
// kdDebug(6040) << "appendPoint: appended " << pnt << endl;
@@ -411,7 +411,7 @@ static void appendPoint(QValueVector<QPoint> &pointArray, QPoint &pnt)
* the lowest for !\c bottom.
*/
static void collectHorizontalBoxCoordinates(InlineBox *box,
- QValueVector<QPoint> &pointArray,
+ TQValueVector<TQPoint> &pointArray,
bool bottom, int offset, int limit = -500000)
{
// kdDebug(6000) << "collectHorizontalBoxCoordinates: " << endl;
@@ -420,11 +420,11 @@ static void collectHorizontalBoxCoordinates(InlineBox *box,
if (limit != -500000 && (bottom ? y < limit : y > limit))
y = limit;
int x = box->xPos() + bottom*box->width() + offset;
- QPoint newPnt(x, y);
+ TQPoint newPnt(x, y);
// Add intersection point if point-array not empty.
if (!pointArray.isEmpty()) {
- QPoint lastPnt = pointArray.back();
- QPoint insPnt(newPnt.x(), lastPnt.y());
+ TQPoint lastPnt = pointArray.back();
+ TQPoint insPnt(newPnt.x(), lastPnt.y());
if (offset && ((bottom && lastPnt.y() > y) || (!bottom && lastPnt.y() < y))) {
insPnt.rx() = lastPnt.x();
insPnt.ry() = y;
@@ -453,8 +453,8 @@ static void collectHorizontalBoxCoordinates(InlineBox *box,
// Add intersection point if flow box contained any children
if (flowBox->firstChild()) {
- QPoint lastPnt = pointArray.back();
- QPoint insPnt(lastPnt.x(), newPnt.y());
+ TQPoint lastPnt = pointArray.back();
+ TQPoint insPnt(lastPnt.x(), newPnt.y());
// kdDebug(6040) << "right: " << lastPnt << " == " << insPnt << ": " << (insPnt == lastPnt) << endl;
appendPoint(pointArray, insPnt);
}
@@ -491,7 +491,7 @@ inline static bool lineBoxesDisjoint(InlineRunBox *line, int offset, bool toBegi
* @param lastline if not 0, returns the pointer to the last line box traversed
*/
static void collectVerticalBoxCoordinates(InlineRunBox *line,
- QValueVector<QPoint> &pointArray,
+ TQValueVector<TQPoint> &pointArray,
bool left, int offset, InlineRunBox **lastline = 0)
{
InlineRunBox *last = 0;
@@ -504,15 +504,15 @@ static void collectVerticalBoxCoordinates(InlineRunBox *line,
if (root != line && !isLast)
while (root->parent()) root = root->parent();
- QPoint newPnt(curr->xPos() + !left*curr->width() + offset,
+ TQPoint newPnt(curr->xPos() + !left*curr->width() + offset,
(left ? root->topOverflow() : root->bottomOverflow()) + offset);
if (!pointArray.isEmpty()) {
- QPoint lastPnt = pointArray.back();
+ TQPoint lastPnt = pointArray.back();
if (newPnt.x()>lastPnt.x() && !left)
pointArray.back().setY( kMin(lastPnt.y(), root->topOverflow()-offset) );
else if (newPnt.x()<lastPnt.x() && left)
pointArray.back().setY( kMax(lastPnt.y(), root->bottomOverflow()+offset) );
- QPoint insPnt(newPnt.x(), pointArray.back().y());
+ TQPoint insPnt(newPnt.x(), pointArray.back().y());
// kdDebug(6040) << "left: " << lastPnt << " == " << insPnt << ": " << (insPnt == lastPnt) << endl;
appendPoint(pointArray, insPnt);
}
@@ -532,23 +532,23 @@ static void collectVerticalBoxCoordinates(InlineRunBox *line,
* @param pointArray point-array
* @return actual begin of point array
*/
-static QPoint *linkEndToBegin(QValueVector<QPoint> &pointArray)
+static TQPoint *linkEndToBegin(TQValueVector<TQPoint> &pointArray)
{
uint index = 0;
assert(pointArray.size() >= 3);
// if first and last points match, ignore the last one.
- bool linkup = false; QPoint linkupPnt;
+ bool linkup = false; TQPoint linkupPnt;
if (pointArray.front() == pointArray.back()) {
linkupPnt = pointArray.back();
pointArray.pop_back();
linkup = true;
}
- const QPoint *it = pointArray.begin() + index;
- QPoint pfirst = *it;
- QPoint pnext = *++it;
- QPoint plast = pointArray.back();
+ const TQPoint *it = pointArray.begin() + index;
+ TQPoint pfirst = *it;
+ TQPoint pnext = *++it;
+ TQPoint plast = pointArray.back();
// kdDebug(6040) << "linkcheck plast: " << plast << " pfirst: " << pfirst << " pnext: " << pnext << endl;
if (plast.x() == pfirst.x() && pfirst.x() == pnext.x()
@@ -562,7 +562,7 @@ static QPoint *linkEndToBegin(QValueVector<QPoint> &pointArray)
return pointArray.begin() + index;
}
-void RenderInline::paintOutlines(QPainter *p, int _tx, int _ty)
+void RenderInline::paintOutlines(TQPainter *p, int _tx, int _ty)
{
if (style()->outlineWidth() == 0 || style()->outlineStyle() <= BHIDDEN)
return;
@@ -571,7 +571,7 @@ void RenderInline::paintOutlines(QPainter *p, int _tx, int _ty)
// We may have to draw more than one outline path as they may be
// disjoint.
for (InlineRunBox *curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
- QValueVector<QPoint> path;
+ TQValueVector<TQPoint> path;
// collect topmost outline
collectHorizontalBoxCoordinates(curr, path, false, offset);
@@ -584,7 +584,7 @@ void RenderInline::paintOutlines(QPainter *p, int _tx, int _ty)
if (path.size() < 3) continue;
- const QPoint *begin = linkEndToBegin(path);
+ const TQPoint *begin = linkEndToBegin(path);
// paint the outline
paintOutlinePath(p, _tx, _ty, begin, path.end(), BSLeft, -1, BSTop);
@@ -623,7 +623,7 @@ inline BSOrientation bsOrientation(RenderObject::BorderSide bs)
* The relative direction specifies whether the old border side meets with the
* straight given by the coordinates from below (negative), or above (positive).
*/
-inline RenderObject::BorderSide newBorderSide(RenderObject::BorderSide oldBS, int direction, const QPoint &last, const QPoint &cur)
+inline RenderObject::BorderSide newBorderSide(RenderObject::BorderSide oldBS, int direction, const TQPoint &last, const TQPoint &cur)
{
bool below = direction < 0;
if (last.x() == cur.x()) { // new segment is vertical
@@ -654,15 +654,15 @@ inline RenderObject::BorderSide newBorderSide(RenderObject::BorderSide oldBS, in
* @param curBS border side of this segment
* @param nextBS border side of next segment
*/
-static void paintOutlineSegment(RenderObject *o, QPainter *p, int tx, int ty,
- const QPoint &p1, const QPoint &p2,
+static void paintOutlineSegment(RenderObject *o, TQPainter *p, int tx, int ty,
+ const TQPoint &p1, const TQPoint &p2,
RenderObject::BorderSide prevBS,
RenderObject::BorderSide curBS,
RenderObject::BorderSide nextBS)
{
int ow = o->style()->outlineWidth();
EBorderStyle os = o->style()->outlineStyle();
- QColor oc = o->style()->outlineColor();
+ TQColor oc = o->style()->outlineColor();
int x1 = tx + p1.x();
int y1 = ty + p1.y();
@@ -683,7 +683,7 @@ static void paintOutlineSegment(RenderObject *o, QPainter *p, int tx, int ty,
switch (curBS) {
case RenderObject::BSLeft:
case RenderObject::BSRight:
-/* p->setPen(QColor("#ffe4dd"));
+/* p->setPen(TQColor("#ffe4dd"));
p->drawLine(
x1 - (curBS == RenderObject::BSLeft ? ow : 0),
y1 - (prevBS == RenderObject::BSTop ? ow : 0),
@@ -720,13 +720,13 @@ static void paintOutlineSegment(RenderObject *o, QPainter *p, int tx, int ty,
}
}
-void RenderInline::paintOutlinePath(QPainter *p, int tx, int ty, const QPoint *begin, const QPoint *end, BorderSide bs, int direction, BorderSide endingBS)
+void RenderInline::paintOutlinePath(TQPainter *p, int tx, int ty, const TQPoint *begin, const TQPoint *end, BorderSide bs, int direction, BorderSide endingBS)
{
int ow = style()->outlineWidth();
if (ow == 0 || m_isContinuation) // Continuations get painted by the original inline.
return;
- QPoint last = *begin;
+ TQPoint last = *begin;
BorderSide lastBS = bs;
Q_ASSERT(begin != end);
++begin;
@@ -736,12 +736,12 @@ void RenderInline::paintOutlinePath(QPainter *p, int tx, int ty, const QPoint *b
bs = newBorderSide(bs, direction, last, *begin);
// kdDebug(6040) << "newBorderSide: " << lastBS << " " << direction << "d " << last << " - " << *begin << " => " << bs << endl;
- for (const QPoint *it = begin; it != end; ++it) {
- QPoint cur = *it;
+ for (const TQPoint *it = begin; it != end; ++it) {
+ TQPoint cur = *it;
// kdDebug(6040) << "cur: " << cur << endl;
BorderSide nextBS;
if (it + 1 != end) {
- QPoint diff = cur - last;
+ TQPoint diff = cur - last;
direction = diff.x() + diff.y();
nextBS = newBorderSide(bs, direction, cur, *(it + 1));
// kdDebug(6040) << "newBorderSide*: " << bs << " " << direction << "d " << cur << " - " << *(it + 1) << " => " << nextBS << endl;
@@ -886,7 +886,7 @@ void RenderInline::caretPos(int offset, int flags, int &_x, int &_y, int &width,
&& element()->parent()->renderer()
? element()->parent()->renderer()->style()
: style();
- const QFontMetrics &fm = s->fontMetrics();
+ const TQFontMetrics &fm = s->fontMetrics();
_y = line->yPos() + line->baseline() - fm.ascent();
height = fm.height();
@@ -897,7 +897,7 @@ void RenderInline::caretPos(int offset, int flags, int &_x, int &_y, int &width,
}
} else {
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
_y = line->yPos() + line->baseline() - fm.ascent();
height = fm.height();
}
diff --git a/khtml/rendering/render_inline.h b/khtml/rendering/render_inline.h
index b87e53037..5f4bf7b29 100644
--- a/khtml/rendering/render_inline.h
+++ b/khtml/rendering/render_inline.h
@@ -77,11 +77,11 @@ public:
virtual int offsetTop() const;
virtual void caretPos(int offset, int flags, int &_x, int &_y, int &width, int &height);
- void paintOutlines(QPainter *p, int tx, int ty);
+ void paintOutlines(TQPainter *p, int tx, int ty);
protected:
static RenderInline* cloneInline(RenderFlow* src);
- void paintOutlinePath(QPainter *p, int tx, int ty, const QPoint *begin, const QPoint *end, BorderSide startingBS, int initialDirection, BorderSide endingBS);
+ void paintOutlinePath(TQPainter *p, int tx, int ty, const TQPoint *begin, const TQPoint *end, BorderSide startingBS, int initialDirection, BorderSide endingBS);
private:
bool m_isContinuation : 1; // Whether or not we're a continuation of an inline.
diff --git a/khtml/rendering/render_layer.cpp b/khtml/rendering/render_layer.cpp
index b4af3536c..2b7e93f1f 100644
--- a/khtml/rendering/render_layer.cpp
+++ b/khtml/rendering/render_layer.cpp
@@ -58,15 +58,15 @@
#include "html/html_blockimpl.h"
#include "xml/dom_restyler.h"
-#include <qscrollbar.h>
-#include <qptrvector.h>
-#include <qstyle.h>
+#include <tqscrollbar.h>
+#include <tqptrvector.h>
+#include <tqstyle.h>
using namespace DOM;
using namespace khtml;
#ifdef APPLE_CHANGES
-QScrollBar* RenderLayer::gScrollBar = 0;
+TQScrollBar* RenderLayer::gScrollBar = 0;
#endif
#ifndef NDEBUG
@@ -161,10 +161,10 @@ void RenderLayer::updateLayerPosition()
setPos(x,y);
}
-QRegion RenderLayer::paintedRegion(RenderLayer* rootLayer)
+TQRegion RenderLayer::paintedRegion(RenderLayer* rootLayer)
{
updateZOrderLists();
- QRegion r;
+ TQRegion r;
if (m_negZOrderList) {
uint count = m_negZOrderList->count();
for (uint i = 0; i < count; i++) {
@@ -176,7 +176,7 @@ QRegion RenderLayer::paintedRegion(RenderLayer* rootLayer)
if (s->visibility() == VISIBLE) {
int x = 0; int y = 0;
convertToLayerCoords(rootLayer,x,y);
- QRect cr(x,y,width(),height());
+ TQRect cr(x,y,width(),height());
if ( s->backgroundImage() || s->backgroundColor().isValid() || s->hasBorder() ||
renderer()->scrollsOverflow() || renderer()->isReplaced() ) {
r += cr;
@@ -201,7 +201,7 @@ void RenderLayer::repaint( Priority p, bool markForRepaint )
return;
for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
child->repaint( p, markForRepaint );
- QRect layerBounds, damageRect, fgrect;
+ TQRect layerBounds, damageRect, fgrect;
calculateRects(renderer()->canvas()->layer(), renderer()->viewRect(), layerBounds, damageRect, fgrect);
m_visibleRect = damageRect.intersect( layerBounds );
if (m_visibleRect.isValid())
@@ -226,7 +226,7 @@ void RenderLayer::updateLayerPositions(RenderLayer* rootLayer, bool doFullRepain
int x = 0;
int y = 0;
convertToLayerCoords(rootLayer, x, y);
- QRect layerBounds = QRect(x,y,width(),height());
+ TQRect layerBounds = TQRect(x,y,width(),height());
positionScrollbars(layerBounds);
}
@@ -236,9 +236,9 @@ void RenderLayer::updateLayerPositions(RenderLayer* rootLayer, bool doFullRepain
m_object->repaintAfterLayoutIfNeeded(m_repaintRect, m_fullRepaintRect);
#else
if (checkForRepaint && m_markedForRepaint) {
- QRect layerBounds, damageRect, fgrect;
+ TQRect layerBounds, damageRect, fgrect;
calculateRects(rootLayer, renderer()->viewRect(), layerBounds, damageRect, fgrect);
- QRect vr = damageRect.intersect( layerBounds );
+ TQRect vr = damageRect.intersect( layerBounds );
if (vr != m_visibleRect && vr.isValid()) {
renderer()->canvas()->repaintViewRectangle( vr.x(), vr.y(), vr.width(), vr.height() );
m_visibleRect = vr;
@@ -262,8 +262,8 @@ void RenderLayer::updateWidgetMasks(RenderLayer* rootLayer)
uint count = m_posZOrderList ? m_posZOrderList->count() : 0;
bool needUpdate = (count || !m_region.isNull());
if (count) {
- QScrollView* sv = m_object->document()->view();
- m_region = QRect(0,0,sv->contentsWidth(),sv->contentsHeight());
+ TQScrollView* sv = m_object->document()->view();
+ m_region = TQRect(0,0,sv->contentsWidth(),sv->contentsHeight());
for (uint i = 0; i < count; i++) {
RenderLayer* child = m_posZOrderList->at(i);
@@ -272,7 +272,7 @@ void RenderLayer::updateWidgetMasks(RenderLayer* rootLayer)
m_region -= child->paintedRegion(rootLayer);
}
} else {
- m_region = QRegion();
+ m_region = TQRegion();
}
if (needUpdate)
renderer()->updateWidgetMasks();
@@ -606,17 +606,17 @@ void RenderLayer::updateScrollPositionFromScrollbars()
void
RenderLayer::showScrollbar(Qt::Orientation o, bool show)
{
- QScrollBar *sb = (o == Qt::Horizontal) ? m_hBar : m_vBar;
+ TQScrollBar *sb = (o == Qt::Horizontal) ? m_hBar : m_vBar;
if (show && !sb) {
- QScrollView* scrollView = m_object->document()->view();
- sb = new QScrollBar(o, scrollView, "__khtml");
+ TQScrollView* scrollView = m_object->document()->view();
+ sb = new TQScrollBar(o, scrollView, "__khtml");
scrollView->addChild(sb, 0, -50000);
- sb->setBackgroundMode(QWidget::NoBackground);
+ sb->setBackgroundMode(TQWidget::NoBackground);
sb->show();
if (!m_scrollMediator)
m_scrollMediator = new RenderScrollMediator(this);
- m_scrollMediator->connect(sb, SIGNAL(valueChanged(int)), SLOT(slotValueChanged()));
+ m_scrollMediator->connect(sb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged()));
}
else if (!show && sb) {
delete sb;
@@ -637,7 +637,7 @@ int RenderLayer::verticalScrollbarWidth()
#ifdef APPLE_CHANGES
return m_vBar->width();
#else
- return m_vBar->style().pixelMetric(QStyle::PM_ScrollBarExtent);
+ return m_vBar->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
@@ -650,12 +650,12 @@ int RenderLayer::horizontalScrollbarHeight()
#ifdef APPLE_CHANGES
return m_hBar->height();
#else
- return m_hBar->style().pixelMetric(QStyle::PM_ScrollBarExtent);
+ return m_hBar->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
-void RenderLayer::positionScrollbars(const QRect& absBounds)
+void RenderLayer::positionScrollbars(const TQRect& absBounds)
{
#ifdef APPLE_CHANGES
if (m_vBar) {
@@ -683,24 +683,24 @@ void RenderLayer::positionScrollbars(const QRect& absBounds)
if (w <= 0 || h <= 0 || (!m_vBar && !m_hBar))
return;
- QScrollView* scrollView = m_object->document()->view();
+ TQScrollView* scrollView = m_object->document()->view();
tx += bl;
ty += bt;
- QScrollBar *b = m_hBar;
+ TQScrollBar *b = m_hBar;
if (!m_hBar)
b = m_vBar;
- int sw = b->style().pixelMetric(QStyle::PM_ScrollBarExtent);
+ int sw = b->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
if (m_vBar) {
- QRect vBarRect = QRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1);
+ TQRect vBarRect = TQRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1);
m_vBar->resize(vBarRect.width(), vBarRect.height());
scrollView->addChild(m_vBar, vBarRect.x(), vBarRect.y());
}
if (m_hBar) {
- QRect hBarRect = QRect(tx, ty + h - sw + 1, w - (m_vBar ? sw : 0) + 1, sw);
+ TQRect hBarRect = TQRect(tx, ty + h - sw + 1, w - (m_vBar ? sw : 0) + 1, sw);
m_hBar->resize(hBarRect.width(), hBarRect.height());
scrollView->addChild(m_hBar, hBarRect.x(), hBarRect.y());
}
@@ -801,7 +801,7 @@ void RenderLayer::paintScrollbars(RenderObject::PaintInfo& pI)
if (!m_object->element())
return;
- QScrollView* scrollView = m_object->document()->view();
+ TQScrollView* scrollView = m_object->document()->view();
if (m_hBar) {
int x = m_hBar->x();
int y = m_hBar->y();
@@ -817,12 +817,12 @@ void RenderLayer::paintScrollbars(RenderObject::PaintInfo& pI)
#endif
}
-void RenderLayer::paint(QPainter *p, const QRect& damageRect, bool selectionOnly)
+void RenderLayer::paint(TQPainter *p, const TQRect& damageRect, bool selectionOnly)
{
paintLayer(this, p, damageRect, selectionOnly);
}
-static void setClip(QPainter* p, const QRect& paintDirtyRect, const QRect& clipRect)
+static void setClip(TQPainter* p, const TQRect& paintDirtyRect, const TQRect& clipRect)
{
if (paintDirtyRect == clipRect)
return;
@@ -832,9 +832,9 @@ static void setClip(QPainter* p, const QRect& paintDirtyRect, const QRect& clipR
p->addClip(clipRect);
#else
- QRect clippedRect = p->xForm(clipRect);
- QRegion creg(clippedRect);
- QRegion old = p->clipRegion();
+ TQRect clippedRect = p->xForm(clipRect);
+ TQRegion creg(clippedRect);
+ TQRegion old = p->clipRegion();
if (!old.isNull())
creg = old.intersect(creg);
p->setClipRegion(creg);
@@ -842,18 +842,18 @@ static void setClip(QPainter* p, const QRect& paintDirtyRect, const QRect& clipR
}
-static void restoreClip(QPainter* p, const QRect& paintDirtyRect, const QRect& clipRect)
+static void restoreClip(TQPainter* p, const TQRect& paintDirtyRect, const TQRect& clipRect)
{
if (paintDirtyRect == clipRect)
return;
p->restore();
}
-void RenderLayer::paintLayer(RenderLayer* rootLayer, QPainter *p,
- const QRect& paintDirtyRect, bool selectionOnly)
+void RenderLayer::paintLayer(RenderLayer* rootLayer, TQPainter *p,
+ const TQRect& paintDirtyRect, bool selectionOnly)
{
// Calculate the clip rects we should use.
- QRect layerBounds, damageRect, clipRectToApply;
+ TQRect layerBounds, damageRect, clipRectToApply;
calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRectToApply);
int x = layerBounds.x();
int y = layerBounds.y();
@@ -939,7 +939,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, QPainter *p,
// Paint any child layers that have overflow.
if (m_overflowList)
- for (QValueList<RenderLayer*>::iterator it = m_overflowList->begin(); it != m_overflowList->end(); ++it)
+ for (TQValueList<RenderLayer*>::iterator it = m_overflowList->begin(); it != m_overflowList->end(); ++it)
(*it)->paintLayer(rootLayer, p, paintDirtyRect, selectionOnly);
// Now walk the sorted list of children with positive z-indices.
@@ -956,7 +956,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, QPainter *p,
int ax=0;
int ay=0;
renderer()->absolutePosition( ax, ay );
- p->setPen(QPen(QColor("yellow"), 1, Qt::DotLine));
+ p->setPen(TQPen(TQColor("yellow"), 1, Qt::DotLine));
p->setBrush( Qt::NoBrush );
p->drawRect(ax, ay, width(), height());
}
@@ -987,7 +987,7 @@ bool RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
sty += static_cast<RenderCanvas*>(renderer())->view()->contentsY();
}
- QRect damageRect(stx,sty, width(), height());
+ TQRect damageRect(stx,sty, width(), height());
RenderLayer* insideLayer = nodeAtPointForLayer(this, info, x, y, damageRect);
// Now determine if the result is inside an anchor.
@@ -1007,10 +1007,10 @@ bool RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
}
RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObject::NodeInfo& info,
- int xMousePos, int yMousePos, const QRect& hitTestRect)
+ int xMousePos, int yMousePos, const TQRect& hitTestRect)
{
// Calculate the clip rects we should use.
- QRect layerBounds, bgRect, fgRect;
+ TQRect layerBounds, bgRect, fgRect;
calculateRects(rootLayer, hitTestRect, layerBounds, bgRect, fgRect);
// Ensure our lists are up-to-date.
@@ -1035,7 +1035,7 @@ RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObje
// Now check our overflow objects.
if (m_overflowList) {
- QValueList<RenderLayer*>::iterator it = m_overflowList->end();
+ TQValueList<RenderLayer*>::iterator it = m_overflowList->end();
for (--it; it != m_overflowList->end(); --it) {
insideLayer = (*it)->nodeAtPointForLayer(rootLayer, info, xMousePos, yMousePos, hitTestRect);
if (insideLayer)
@@ -1076,8 +1076,8 @@ RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObje
return 0;
}
-void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, QRect& overflowClipRect,
- QRect& posClipRect, QRect& fixedClipRect)
+void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, TQRect& overflowClipRect,
+ TQRect& posClipRect, TQRect& fixedClipRect)
{
if (parent())
parent()->calculateClipRects(rootLayer, overflowClipRect, posClipRect, fixedClipRect);
@@ -1107,13 +1107,13 @@ void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, QRect& overfl
convertToLayerCoords(rootLayer, x, y);
if (m_object->hasOverflowClip()) {
- QRect newOverflowClip = m_object->getOverflowClipRect(x,y);
+ TQRect newOverflowClip = m_object->getOverflowClipRect(x,y);
overflowClipRect = newOverflowClip.intersect(overflowClipRect);
if (m_object->isPositioned() || m_object->isRelPositioned())
posClipRect = newOverflowClip.intersect(posClipRect);
}
if (m_object->hasClip()) {
- QRect newPosClip = m_object->getClipRect(x,y);
+ TQRect newPosClip = m_object->getClipRect(x,y);
posClipRect = posClipRect.intersect(newPosClip);
overflowClipRect = overflowClipRect.intersect(newPosClip);
fixedClipRect = fixedClipRect.intersect(newPosClip);
@@ -1121,19 +1121,19 @@ void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, QRect& overfl
}
}
-void RenderLayer::calculateRects(const RenderLayer* rootLayer, const QRect& paintDirtyRect, QRect& layerBounds,
- QRect& backgroundRect, QRect& foregroundRect)
+void RenderLayer::calculateRects(const RenderLayer* rootLayer, const TQRect& paintDirtyRect, TQRect& layerBounds,
+ TQRect& backgroundRect, TQRect& foregroundRect)
{
- QRect overflowClipRect = paintDirtyRect;
- QRect posClipRect = paintDirtyRect;
- QRect fixedClipRect = paintDirtyRect;
+ TQRect overflowClipRect = paintDirtyRect;
+ TQRect posClipRect = paintDirtyRect;
+ TQRect fixedClipRect = paintDirtyRect;
if (parent())
parent()->calculateClipRects(rootLayer, overflowClipRect, posClipRect, fixedClipRect);
int x = 0;
int y = 0;
convertToLayerCoords(rootLayer, x, y);
- layerBounds = QRect(x,y,width(),height());
+ layerBounds = TQRect(x,y,width(),height());
backgroundRect = m_object->style()->position() == FIXED ? fixedClipRect :
(m_object->isPositioned() ? posClipRect : overflowClipRect);
@@ -1147,7 +1147,7 @@ void RenderLayer::calculateRects(const RenderLayer* rootLayer, const QRect& pain
if (m_object->hasClip()) {
// Clip applies to *us* as well, so go ahead and update the damageRect.
- QRect newPosClip = m_object->getClipRect(x,y);
+ TQRect newPosClip = m_object->getClipRect(x,y);
backgroundRect = backgroundRect.intersect(newPosClip);
foregroundRect = foregroundRect.intersect(newPosClip);
}
@@ -1158,7 +1158,7 @@ void RenderLayer::calculateRects(const RenderLayer* rootLayer, const QRect& pain
}
}
-bool RenderLayer::intersectsDamageRect(const QRect& layerBounds, const QRect& damageRect) const
+bool RenderLayer::intersectsDamageRect(const TQRect& layerBounds, const TQRect& damageRect) const
{
return (renderer()->isCanvas() || renderer()->isRoot() || renderer()->isBody() ||
(renderer()->hasOverhangingFloats() && !renderer()->hasOverflowClip()) ||
@@ -1166,7 +1166,7 @@ bool RenderLayer::intersectsDamageRect(const QRect& layerBounds, const QRect& da
layerBounds.intersects(damageRect));
}
-bool RenderLayer::containsPoint(int x, int y, const QRect& damageRect) const
+bool RenderLayer::containsPoint(int x, int y, const TQRect& damageRect) const
{
return (renderer()->isCanvas() || renderer()->isRoot() || renderer()->isBody() ||
renderer()->hasOverhangingFloats() ||
@@ -1249,8 +1249,8 @@ void RenderLayer::updateHoverActiveState(RenderObject::NodeInfo& info)
// Sort the buffer from lowest z-index to highest. The common scenario will have
// most z-indices equal, so we optimize for that case (i.e., the list will be mostly
// sorted already).
-static void sortByZOrder(QPtrVector<RenderLayer>* buffer,
- QPtrVector<RenderLayer>* mergeBuffer,
+static void sortByZOrder(TQPtrVector<RenderLayer>* buffer,
+ TQPtrVector<RenderLayer>* mergeBuffer,
uint start, uint end)
{
if (start >= end)
@@ -1344,11 +1344,11 @@ void RenderLayer::updateZOrderLists()
// Sort the two lists.
if (m_posZOrderList) {
- QPtrVector<RenderLayer> mergeBuffer;
+ TQPtrVector<RenderLayer> mergeBuffer;
sortByZOrder(m_posZOrderList, &mergeBuffer, 0, m_posZOrderList->count());
}
if (m_negZOrderList) {
- QPtrVector<RenderLayer> mergeBuffer;
+ TQPtrVector<RenderLayer> mergeBuffer;
sortByZOrder(m_negZOrderList, &mergeBuffer, 0, m_negZOrderList->count());
}
@@ -1363,7 +1363,7 @@ void RenderLayer::updateOverflowList()
for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
if (child->isOverflowOnly()) {
if (!m_overflowList)
- m_overflowList = new QValueList<RenderLayer*>;
+ m_overflowList = new TQValueList<RenderLayer*>;
m_overflowList->append(child);
}
}
@@ -1371,7 +1371,7 @@ void RenderLayer::updateOverflowList()
m_overflowListDirty = false;
}
-void RenderLayer::collectLayers(QPtrVector<RenderLayer>*& posBuffer, QPtrVector<RenderLayer>*& negBuffer)
+void RenderLayer::collectLayers(TQPtrVector<RenderLayer>*& posBuffer, TQPtrVector<RenderLayer>*& negBuffer)
{
// FIXME: A child render object or layer could override visibility. Don't remove this
// optimization though until RenderObject's nodeAtPoint is patched to understand what to do
@@ -1383,11 +1383,11 @@ void RenderLayer::collectLayers(QPtrVector<RenderLayer>*& posBuffer, QPtrVector<
if (!isOverflowOnly()) {
// Determine which buffer the child should be in.
- QPtrVector<RenderLayer>*& buffer = (zIndex() >= 0) ? posBuffer : negBuffer;
+ TQPtrVector<RenderLayer>*& buffer = (zIndex() >= 0) ? posBuffer : negBuffer;
// Create the buffer if it doesn't exist yet.
if (!buffer)
- buffer = new QPtrVector<RenderLayer>();
+ buffer = new TQPtrVector<RenderLayer>();
// Resize by a power of 2 when our buffer fills up.
if (buffer->count() == buffer->size())
@@ -1407,13 +1407,13 @@ void RenderLayer::collectLayers(QPtrVector<RenderLayer>*& posBuffer, QPtrVector<
#ifdef ENABLE_DUMP
#ifndef KDE_USE_FINAL
-static QTextStream &operator<<(QTextStream &ts, const QRect &r)
+static TQTextStream &operator<<(TQTextStream &ts, const TQRect &r)
{
return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height();
}
#endif
-static void write(QTextStream &ts, RenderObject& o, const QString& indent )
+static void write(TQTextStream &ts, RenderObject& o, const TQString& indent )
{
o.dump(ts, indent);
@@ -1423,9 +1423,9 @@ static void write(QTextStream &ts, RenderObject& o, const QString& indent )
}
}
-static void write(QTextStream &ts, const RenderLayer &l,
- const QRect& layerBounds, const QRect& backgroundClipRect, const QRect& clipRect,
- int layerType = 0, const QString& indent = QString::null)
+static void write(TQTextStream &ts, const RenderLayer &l,
+ const TQRect& layerBounds, const TQRect& backgroundClipRect, const TQRect& clipRect,
+ int layerType = 0, const TQString& indent = TQString::null)
{
ts << indent << "layer";
@@ -1452,11 +1452,11 @@ static void write(QTextStream &ts, const RenderLayer &l,
ts << "\n";
}
-static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLayer* l,
- const QRect& paintDirtyRect, const QString& indent)
+static void writeLayers(TQTextStream &ts, const RenderLayer* rootLayer, RenderLayer* l,
+ const TQRect& paintDirtyRect, const TQString& indent)
{
// Calculate the clip rects we should use.
- QRect layerBounds, damageRect, clipRectToApply;
+ TQRect layerBounds, damageRect, clipRectToApply;
l->calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRectToApply);
// Ensure our lists are up-to-date.
@@ -1464,8 +1464,8 @@ static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLay
l->updateOverflowList();
bool shouldPaint = l->intersectsDamageRect(layerBounds, damageRect);
- QPtrVector<RenderLayer>* negList = l->negZOrderList();
- QValueList<RenderLayer*>* ovfList = l->overflowList();
+ TQPtrVector<RenderLayer>* negList = l->negZOrderList();
+ TQValueList<RenderLayer*>* ovfList = l->overflowList();
if (shouldPaint && negList && negList->count() > 0)
write(ts, *l, layerBounds, damageRect, clipRectToApply, -1, indent);
@@ -1478,11 +1478,11 @@ static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLay
write(ts, *l, layerBounds, damageRect, clipRectToApply, negList && negList->count() > 0, indent);
if (ovfList) {
- for (QValueList<RenderLayer*>::iterator it = ovfList->begin(); it != ovfList->end(); ++it)
+ for (TQValueList<RenderLayer*>::iterator it = ovfList->begin(); it != ovfList->end(); ++it)
writeLayers(ts, rootLayer, *it, paintDirtyRect, indent);
}
- QPtrVector<RenderLayer>* posList = l->posZOrderList();
+ TQPtrVector<RenderLayer>* posList = l->posZOrderList();
if (posList) {
for (unsigned i = 0; i != posList->count(); ++i)
writeLayers(ts, rootLayer, posList->at(i), paintDirtyRect, indent);
@@ -1490,11 +1490,11 @@ static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLay
}
-void RenderLayer::dump(QTextStream &ts, const QString &ind)
+void RenderLayer::dump(TQTextStream &ts, const TQString &ind)
{
assert( renderer()->isCanvas() );
- writeLayers(ts, this, this, QRect(xPos(), yPos(), width(), height()), ind);
+ writeLayers(ts, this, this, TQRect(xPos(), yPos(), width(), height()), ind);
}
@@ -1757,7 +1757,7 @@ void Marquee::updateMarqueeStyle()
}
}
-void Marquee::timerEvent(QTimerEvent* /*evt*/)
+void Marquee::timerEvent(TQTimerEvent* /*evt*/)
{
if (m_layer->renderer()->needsLayout())
return;
diff --git a/khtml/rendering/render_layer.h b/khtml/rendering/render_layer.h
index c7587ae39..1f94ac95c 100644
--- a/khtml/rendering/render_layer.h
+++ b/khtml/rendering/render_layer.h
@@ -44,8 +44,8 @@
#ifndef render_layer_h
#define render_layer_h
-#include <qcolor.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqrect.h>
#include <assert.h>
#include "render_object.h"
@@ -85,7 +85,7 @@ class Marquee: public QObject
public:
Marquee(RenderLayer* l);
- void timerEvent(QTimerEvent*);
+ void timerEvent(TQTimerEvent*);
int speed() const { return m_speed; }
int marqueeSpeed() const;
@@ -128,7 +128,7 @@ class RenderLayer
{
public:
#ifdef APPLE_CHANGES
- static QScrollBar* gScrollBar;
+ static TQScrollBar* gScrollBar;
#endif
RenderLayer(RenderObject* object);
@@ -194,11 +194,11 @@ public:
void scrollToXOffset(int x) { scrollToOffset(x, m_scrollY); }
void scrollToYOffset(int y) { scrollToOffset(m_scrollX, y); }
void showScrollbar(Qt::Orientation, bool);
- QScrollBar* horizontalScrollbar() { return m_hBar; }
- QScrollBar* verticalScrollbar() { return m_vBar; }
+ TQScrollBar* horizontalScrollbar() { return m_hBar; }
+ TQScrollBar* verticalScrollbar() { return m_vBar; }
int verticalScrollbarWidth();
int horizontalScrollbarHeight();
- void positionScrollbars(const QRect &damageRect);
+ void positionScrollbars(const TQRect &damageRect);
void paintScrollbars(RenderObject::PaintInfo& pI);
void checkScrollbarsAfterLayout();
void slotValueChanged(int);
@@ -215,17 +215,17 @@ public:
void dirtyZOrderLists();
void updateZOrderLists();
- QPtrVector<RenderLayer>* posZOrderList() const { return m_posZOrderList; }
- QPtrVector<RenderLayer>* negZOrderList() const { return m_negZOrderList; }
+ TQPtrVector<RenderLayer>* posZOrderList() const { return m_posZOrderList; }
+ TQPtrVector<RenderLayer>* negZOrderList() const { return m_negZOrderList; }
void dirtyOverflowList();
void updateOverflowList();
- QValueList<RenderLayer*>* overflowList() const { return m_overflowList; }
+ TQValueList<RenderLayer*>* overflowList() const { return m_overflowList; }
void setHasOverlaidWidgets(bool b=true) { m_hasOverlaidWidgets = b; }
bool hasOverlaidWidgets() const { return m_hasOverlaidWidgets; }
- QRegion getMask() const { return m_region; }
- QRegion paintedRegion(RenderLayer* rootLayer);
+ TQRegion getMask() const { return m_region; }
+ TQRegion paintedRegion(RenderLayer* rootLayer);
void updateWidgetMasks(RenderLayer* rootLayer);
// Gets the nearest enclosing positioned ancestor layer (also includes
@@ -241,26 +241,26 @@ public:
// paints the layers that intersect the damage rect from back to
// front. The nodeAtPoint method looks for mouse events by walking
// layers that intersect the point from front to back.
- KDE_EXPORT void paint(QPainter *p, const QRect& damageRect, bool selectionOnly=false);
+ KDE_EXPORT void paint(TQPainter *p, const TQRect& damageRect, bool selectionOnly=false);
bool nodeAtPoint(RenderObject::NodeInfo& info, int x, int y);
// This method figures out our layerBounds in coordinates relative to
// |rootLayer}. It also computes our background and foreground clip rects
// for painting/event handling.
- void calculateRects(const RenderLayer* rootLayer, const QRect& paintDirtyRect, QRect& layerBounds,
- QRect& backgroundRect, QRect& foregroundRect);
- void calculateClipRects(const RenderLayer* rootLayer, QRect& overflowClipRect,
- QRect& posClipRect, QRect& fixedClipRect);
+ void calculateRects(const RenderLayer* rootLayer, const TQRect& paintDirtyRect, TQRect& layerBounds,
+ TQRect& backgroundRect, TQRect& foregroundRect);
+ void calculateClipRects(const RenderLayer* rootLayer, TQRect& overflowClipRect,
+ TQRect& posClipRect, TQRect& fixedClipRect);
- bool intersectsDamageRect(const QRect& layerBounds, const QRect& damageRect) const;
- bool containsPoint(int x, int y, const QRect& damageRect) const;
+ bool intersectsDamageRect(const TQRect& layerBounds, const TQRect& damageRect) const;
+ bool containsPoint(int x, int y, const TQRect& damageRect) const;
void updateHoverActiveState(RenderObject::NodeInfo& info);
void detach(RenderArena* renderArena);
#ifdef ENABLE_DUMP
- KDE_EXPORT void dump(QTextStream &stream, const QString &ind = QString::null);
+ KDE_EXPORT void dump(TQTextStream &stream, const TQString &ind = TQString::null);
#endif
// Overloaded new operator. Derived classes must override operator new
@@ -281,11 +281,11 @@ private:
void setFirstChild(RenderLayer* first) { m_first = first; }
void setLastChild(RenderLayer* last) { m_last = last; }
- void collectLayers(QPtrVector<RenderLayer>*&, QPtrVector<RenderLayer>*&);
+ void collectLayers(TQPtrVector<RenderLayer>*&, TQPtrVector<RenderLayer>*&);
- KDE_EXPORT void paintLayer(RenderLayer* rootLayer, QPainter *p, const QRect& paintDirtyRect, bool selectionOnly=false);
+ KDE_EXPORT void paintLayer(RenderLayer* rootLayer, TQPainter *p, const TQRect& paintDirtyRect, bool selectionOnly=false);
RenderLayer* nodeAtPointForLayer(RenderLayer* rootLayer, RenderObject::NodeInfo& info,
- int x, int y, const QRect& hitTestRect);
+ int x, int y, const TQRect& hitTestRect);
bool shouldBeOverflowOnly() const;
protected:
@@ -311,19 +311,19 @@ protected:
int m_scrollHeight;
// For layers with overflow, we have a pair of scrollbars.
- QScrollBar* m_hBar;
- QScrollBar* m_vBar;
+ TQScrollBar* m_hBar;
+ TQScrollBar* m_vBar;
RenderScrollMediator* m_scrollMediator;
// For layers that establish stacking contexts, m_posZOrderList holds a sorted list of all the
// descendant layers within the stacking context that have z-indices of 0 or greater
// (auto will count as 0). m_negZOrderList holds descendants within our stacking context with negative
// z-indices.
- QPtrVector<RenderLayer>* m_posZOrderList;
- QPtrVector<RenderLayer>* m_negZOrderList;
+ TQPtrVector<RenderLayer>* m_posZOrderList;
+ TQPtrVector<RenderLayer>* m_negZOrderList;
// This list contains our overflow child layers.
- QValueList<RenderLayer*>* m_overflowList;
+ TQValueList<RenderLayer*>* m_overflowList;
bool m_zOrderListsDirty: 1;
bool m_overflowListDirty: 1;
@@ -331,9 +331,9 @@ protected:
bool m_markedForRepaint: 1;
bool m_hasOverlaidWidgets: 1;
- QRect m_visibleRect;
+ TQRect m_visibleRect;
- QRegion m_region; // used by overlaid (non z-order aware) widgets
+ TQRegion m_region; // used by overlaid (non z-order aware) widgets
Marquee* m_marquee; // Used by layers with overflow:marquee
};
diff --git a/khtml/rendering/render_line.cpp b/khtml/rendering/render_line.cpp
index 18a5f5101..f3b769e9c 100644
--- a/khtml/rendering/render_line.cpp
+++ b/khtml/rendering/render_line.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
#include <assert.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include "rendering/render_flow.h"
@@ -102,7 +102,7 @@ void InlineBox::operator delete(void* ptr, size_t sz)
static bool needsOutlinePhaseRepaint(RenderObject* o, RenderObject::PaintInfo& i, int tx, int ty) {
if (o->style()->outlineWidth() <= 0)
return false;
- QRect r(tx+o->xPos(),ty+o->yPos(),o->width(),o->height());
+ TQRect r(tx+o->xPos(),ty+o->yPos(),o->width(),o->height());
if (r.intersects(i.r))
return false;
r.addCoords(-o->style()->outlineSize(),
@@ -184,8 +184,8 @@ bool InlineBox::canAccommodateEllipsisBox(bool ltr, int blockEdge, int ellipsisW
if (!m_object || !m_object->isReplaced())
return true;
- QRect boxRect(m_x, 0, m_width, 10);
- QRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0, ellipsisWidth, 10);
+ TQRect boxRect(m_x, 0, m_width, 10);
+ TQRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0, ellipsisWidth, 10);
return !(boxRect.intersects(ellipsisRect));
}
@@ -539,7 +539,7 @@ void InlineFlowBox::placeBoxesVertically(int y, int maxHeight, int maxAscent, bo
int overflowTop = 0;
int overflowBottom = 0;
if (curr->isInlineTextBox() || curr->isInlineFlowBox()) {
- const QFontMetrics &fm = curr->object()->fontMetrics( m_firstLine );
+ const TQFontMetrics &fm = curr->object()->fontMetrics( m_firstLine );
#ifdef APPLE_CHANGES
newBaseline = fm.ascent();
newY += curr->baseline() - newBaseline;
@@ -580,7 +580,7 @@ void InlineFlowBox::placeBoxesVertically(int y, int maxHeight, int maxAscent, bo
}
if (isRootInlineBox()) {
- const QFontMetrics &fm = object()->fontMetrics( m_firstLine );
+ const TQFontMetrics &fm = object()->fontMetrics( m_firstLine );
#ifdef APPLE_CHANGES
setHeight(fm.ascent()+fm.descent());
setYPos(yPos() + baseline() - fm.ascent());
@@ -635,7 +635,7 @@ bool InlineFlowBox::nodeAtPoint(RenderObject::NodeInfo& i, int x, int y, int tx,
}
// Now check ourselves.
- QRect rect(tx + m_x, ty + m_y, m_width, m_height);
+ TQRect rect(tx + m_x, ty + m_y, m_width, m_height);
if (object()->style()->visibility() == VISIBLE && rect.contains(x, y)) {
object()->setInnerNode(i);
return true;
@@ -660,7 +660,7 @@ void InlineFlowBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
if (object()->style()->visibility() == VISIBLE && object()->style()->outlineWidth() > 0 &&
!object()->isInlineContinuation() && !isRootInlineBox()) {
if (!i.outlineObjects)
- i.outlineObjects = new QValueList<RenderFlow*>;
+ i.outlineObjects = new TQValueList<RenderFlow*>;
i.outlineObjects->append(static_cast<RenderFlow*>(object()));
}
}
@@ -685,7 +685,7 @@ void InlineFlowBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
}
-void InlineFlowBox::paintBackgrounds(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
+void InlineFlowBox::paintBackgrounds(TQPainter* p, const TQColor& c, const BackgroundLayer* bgLayer,
int my, int mh, int _tx, int _ty, int w, int h)
{
if (!bgLayer)
@@ -694,7 +694,7 @@ void InlineFlowBox::paintBackgrounds(QPainter* p, const QColor& c, const Backgro
paintBackground(p, c, bgLayer, my, mh, _tx, _ty, w, h);
}
-void InlineFlowBox::paintBackground(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
+void InlineFlowBox::paintBackground(TQPainter* p, const TQColor& c, const BackgroundLayer* bgLayer,
int my, int mh, int _tx, int _ty, int w, int h)
{
CachedImage* bg = bgLayer->backgroundImage();
@@ -719,7 +719,7 @@ void InlineFlowBox::paintBackground(QPainter* p, const QColor& c, const Backgrou
for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
totalWidth += curr->width();
p->save();
- p->setClipRect(QRect(_tx, _ty, width(), height()), QPainter::CoordPainter);
+ p->setClipRect(TQRect(_tx, _ty, width(), height()), TQPainter::CoordPainter);
object()->paintBackgroundExtended(p, c, bgLayer, my, mh, startX, _ty,
totalWidth, h, borderLeft(), borderRight(), paddingLeft(), paddingRight());
p->restore();
@@ -750,7 +750,7 @@ void InlineFlowBox::paintBackgroundAndBorder(RenderObject::PaintInfo& pI, int _t
RenderStyle* styleToUse = object()->style(m_firstLine);
if ((!parent() && m_firstLine && styleToUse != object()->style()) ||
(parent() && object()->shouldPaintBackgroundOrBorder())) {
- QColor c = styleToUse->backgroundColor();
+ TQColor c = styleToUse->backgroundColor();
paintBackgrounds(pI.p, c, styleToUse->backgroundLayers(), my, mh, _tx, _ty, w, h);
// :first-line cannot be used to put borders on a line. Always paint borders with our
@@ -797,10 +797,10 @@ void InlineFlowBox::paintDecorations(RenderObject::PaintInfo& pI, int _tx, int _
int w = m_width - (borderLeft() + paddingLeft() + borderRight() + paddingRight());
if ( !w )
return;
- const QFontMetrics &fm = object()->fontMetrics( m_firstLine );
+ const TQFontMetrics &fm = object()->fontMetrics( m_firstLine );
// thick lines on small fonts look ugly
int thickness = fm.height() > 20 ? fm.lineWidth() : 1;
- QColor underline, overline, linethrough;
+ TQColor underline, overline, linethrough;
underline = overline = linethrough = styleToUse->color();
if (!parent())
object()->getTextDecorationColors(deco, underline, overline, linethrough);
@@ -851,13 +851,13 @@ void InlineFlowBox::clearTruncation()
void EllipsisBox::paint(RenderObject::PaintInfo& i, int _tx, int _ty)
{
- QPainter* p = i.p;
+ TQPainter* p = i.p;
RenderStyle* _style = m_firstLine ? m_object->style(true) : m_object->style();
if (_style->font() != p->font())
p->setFont(_style->font());
const Font* font = &_style->htmlFont();
- QColor textColor = _style->color();
+ TQColor textColor = _style->color();
if (textColor != p->pen().color())
p->setPen(textColor);
/*
@@ -874,7 +874,7 @@ void EllipsisBox::paint(RenderObject::PaintInfo& i, int _tx, int _ty)
(str.implementation())->s,
str.length(), 0, str.length(),
0,
- QPainter::LTR, _style->visuallyOrdered());
+ TQPainter::LTR, _style->visuallyOrdered());
/*
if (setShadow)
@@ -901,7 +901,7 @@ bool EllipsisBox::nodeAtPoint(RenderObject::NodeInfo& info, int _x, int _y, int
}
}
- QRect rect(_tx + m_x, _ty + m_y, m_width, m_height);
+ TQRect rect(_tx + m_x, _ty + m_y, m_width, m_height);
if (object()->style()->visibility() == VISIBLE && rect.contains(_x, _y)) {
object()->setInnerNode(info);
return true;
diff --git a/khtml/rendering/render_line.h b/khtml/rendering/render_line.h
index 43603d362..d42f2acb8 100644
--- a/khtml/rendering/render_line.h
+++ b/khtml/rendering/render_line.h
@@ -205,9 +205,9 @@ public:
void removeFromLine(InlineBox* child);
virtual void paintBackgroundAndBorder(RenderObject::PaintInfo&, int _tx, int _ty);
- void paintBackgrounds(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
+ void paintBackgrounds(TQPainter* p, const TQColor& c, const BackgroundLayer* bgLayer,
int my, int mh, int _tx, int _ty, int w, int h);
- void paintBackground(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer,
+ void paintBackground(TQPainter* p, const TQColor& c, const BackgroundLayer* bgLayer,
int my, int mh, int _tx, int _ty, int w, int h);
virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
virtual void paintDecorations(RenderObject::PaintInfo&, int _tx, int _ty, bool paintedChildren = false);
diff --git a/khtml/rendering/render_list.cpp b/khtml/rendering/render_list.cpp
index 139201e03..b08ec6eb9 100644
--- a/khtml/rendering/render_list.cpp
+++ b/khtml/rendering/render_list.cpp
@@ -36,7 +36,7 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
//#define BOX_DEBUG
@@ -238,12 +238,12 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
if(shouldPaintBackgroundOrBorder())
paintBoxDecorations(paintInfo, _tx, _ty);
- QPainter* p = paintInfo.p;
+ TQPainter* p = paintInfo.p;
#ifdef DEBUG_LAYOUT
kdDebug( 6040 ) << nodeName().string() << "(ListMarker)::paintObject(" << _tx << ", " << _ty << ")" << endl;
#endif
p->setFont(style()->font());
- const QFontMetrics fm = p->fontMetrics();
+ const TQFontMetrics fm = p->fontMetrics();
// The marker needs to adjust its tx, for the case where it's an outside marker.
@@ -294,7 +294,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
xoff += haveImage ? cMarkerPadding : (m_width - bulletWidth);
if ( m_listImage && !m_listImage->isErrorImage()) {
- p->drawPixmap( QPoint( _tx + xoff, _ty ), m_listImage->pixmap());
+ p->drawPixmap( TQPoint( _tx + xoff, _ty ), m_listImage->pixmap());
return;
}
@@ -303,7 +303,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
p->drawRect( _tx + xoff, _ty + yoff, offset, offset );
#endif
- const QColor color( style()->color() );
+ const TQColor color( style()->color() );
p->setPen( color );
switch(style()->listStyleType()) {
@@ -324,14 +324,14 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
p->drawRect( _tx + xoff, _ty + (3 * yoff)/2, (offset>>1)+1, (offset>>1)+1 );
return;
case LDIAMOND: {
- static QPointArray diamond(4);
+ static TQPointArray diamond(4);
int x = _tx + xoff;
int y = _ty + (3 * yoff)/2 - 1;
int s = (offset>>2)+1;
- diamond[0] = QPoint(x+s, y);
- diamond[1] = QPoint(x+2*s, y+s);
- diamond[2] = QPoint(x+s, y+2*s);
- diamond[3] = QPoint(x, y+s);
+ diamond[0] = TQPoint(x+s, y);
+ diamond[1] = TQPoint(x+2*s, y+s);
+ diamond[2] = TQPoint(x+s, y+2*s);
+ diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
p->drawConvexPolygon( diamond, 0, 4 );
return;
@@ -344,21 +344,21 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
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,
- QString::fromLatin1(". "));
+ TQString::fromLatin1(". "));
}
else {
- const QString& punct(QString::fromLatin1(" ."));
+ const TQString& punct(TQString::fromLatin1(" ."));
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);
}
} else {
if (style()->direction() == LTR) {
- const QString& punct(QString::fromLatin1(". "));
+ const TQString& punct(TQString::fromLatin1(". "));
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);
}
else {
- const QString& punct(QString::fromLatin1(" ."));
+ const TQString& punct(TQString::fromLatin1(" ."));
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);
}
@@ -377,7 +377,7 @@ void RenderListMarker::layout()
setNeedsLayout(false);
}
-void RenderListMarker::setPixmap( const QPixmap &p, const QRect& r, CachedImage *o)
+void RenderListMarker::setPixmap( const TQPixmap &p, const TQRect& r, CachedImage *o)
{
if(o != m_listImage) {
RenderBox::setPixmap(p, r, o);
@@ -406,7 +406,7 @@ void RenderListMarker::calcMinMaxWidth()
return;
}
- const QFontMetrics &fm = style()->fontMetrics();
+ const TQFontMetrics &fm = style()->fontMetrics();
m_height = fm.ascent();
// Skip uncounted elements
@@ -452,7 +452,7 @@ void RenderListMarker::calcMinMaxWidth()
decimals++;
}
decimals = kMax(decimals, 2);
- QString num = QString::number(value);
+ TQString num = TQString::number(value);
m_item.fill('0',decimals-num.length());
m_item.append(num);
break;
@@ -543,7 +543,7 @@ void RenderListMarker::calcMinMaxWidth()
default:
KHTMLAssert(false);
}
- m_markerWidth = fm.width(m_item) + fm.width(QString::fromLatin1(". "));
+ m_markerWidth = fm.width(m_item) + fm.width(TQString::fromLatin1(". "));
}
end:
diff --git a/khtml/rendering/render_list.h b/khtml/rendering/render_list.h
index ff4e24842..b70132671 100644
--- a/khtml/rendering/render_list.h
+++ b/khtml/rendering/render_list.h
@@ -99,7 +99,7 @@ public:
virtual short lineHeight( bool firstLine ) const;
virtual short baselinePosition( bool firstLine ) const;
- virtual void setPixmap( const QPixmap &, const QRect&, CachedImage *);
+ virtual void setPixmap( const TQPixmap &, const TQRect&, CachedImage *);
virtual void calcWidth();
@@ -116,7 +116,7 @@ public:
protected:
friend class RenderListItem;
- QString m_item;
+ TQString m_item;
CachedImage *m_listImage;
short m_markerWidth;
RenderListItem* m_listItem;
diff --git a/khtml/rendering/render_object.cpp b/khtml/rendering/render_object.cpp
index dfb2e06df..c1f7fd754 100644
--- a/khtml/rendering/render_object.cpp
+++ b/khtml/rendering/render_object.cpp
@@ -46,7 +46,7 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include "khtmlview.h"
#include <khtml_part.h>
@@ -528,7 +528,7 @@ bool RenderObject::hasStaticY() const
return (style()->top().isVariable() && style()->bottom().isVariable());
}
-void RenderObject::setPixmap(const QPixmap&, const QRect& /*r*/, CachedImage* image)
+void RenderObject::setPixmap(const TQPixmap&, const TQRect& /*r*/, CachedImage* image)
{
//repaint bg when it finished loading
if(image && parent() && style() && style()->backgroundLayers()->containsImage(image)) {
@@ -688,7 +688,7 @@ static int brightness(int red, int green, int blue)
(luminosity * LUMINOSITY_FACTOR)) / 100;
}
-static void calc3DColor(QColor &color, bool darken)
+static void calc3DColor(TQColor &color, bool darken)
{
int rb = color.red();
int gb = color.green();
@@ -731,8 +731,8 @@ static void calc3DColor(QColor &color, bool darken)
}
}
-void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
- BorderSide s, QColor c, const QColor& textcolor, EBorderStyle style,
+void RenderObject::drawBorder(TQPainter *p, int x1, int y1, int x2, int y2,
+ BorderSide s, TQColor c, const TQColor& textcolor, EBorderStyle style,
int adjbw1, int adjbw2, bool invalidisInvert)
{
int width = (s==BSTop||s==BSBottom?y2-y1:x2-x1);
@@ -768,7 +768,7 @@ void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
case DOTTED:
if ( width == 1 ) {
// workaround Qt brokenness
- p->setPen(QPen(c, width, Qt::SolidLine));
+ p->setPen(TQPen(c, width, Qt::SolidLine));
switch(s) {
case BSBottom:
case BSTop:
@@ -783,11 +783,11 @@ void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
break;
}
- p->setPen(QPen(c, width, Qt::DotLine));
+ p->setPen(TQPen(c, width, Qt::DotLine));
/* nobreak; */
case DASHED:
if(style == DASHED)
- p->setPen(QPen(c, width == 1 ? 0 : width, width == 1 ? Qt::DotLine : Qt::DashLine));
+ p->setPen(TQPen(c, width == 1 ? 0 : width, width == 1 ? Qt::DotLine : Qt::DashLine));
if (width > 0)
switch(s) {
@@ -924,7 +924,7 @@ void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
p->drawRect(x1,y1,x2-x1,y2-y1);
return;
}
- QPointArray quad(4);
+ TQPointArray quad(4);
switch(s) {
case BSTop:
quad.setPoints(4,
@@ -963,12 +963,12 @@ void RenderObject::drawBorder(QPainter *p, int x1, int y1, int x2, int y2,
p->setRasterOp(Qt::CopyROP);
}
-void RenderObject::paintBorder(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin, bool end)
+void RenderObject::paintBorder(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin, bool end)
{
- const QColor& tc = style->borderTopColor();
- const QColor& bc = style->borderBottomColor();
- const QColor& lc = style->borderLeftColor();
- const QColor& rc = style->borderRightColor();
+ const TQColor& tc = style->borderTopColor();
+ const TQColor& bc = style->borderBottomColor();
+ const TQColor& lc = style->borderLeftColor();
+ const TQColor& rc = style->borderRightColor();
bool tt = style->borderTopIsTransparent();
bool bt = style->borderBottomIsTransparent();
@@ -1052,12 +1052,12 @@ void RenderObject::paintBorder(QPainter *p, int _tx, int _ty, int w, int h, cons
}
}
-void RenderObject::paintOutline(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style)
+void RenderObject::paintOutline(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style)
{
int ow = style->outlineWidth();
if(!ow) return;
- const QColor& oc = style->outlineColor();
+ const TQColor& oc = style->outlineColor();
EBorderStyle os = style->outlineStyle();
int offset = style->outlineOffset();
@@ -1077,19 +1077,19 @@ void RenderObject::paintOutline(QPainter *p, int _tx, int _ty, int w, int h, con
h += 2*offset;
drawBorder(p, _tx-ow, _ty-ow, _tx, _ty+h+ow, BSLeft,
- QColor(oc), style->color(),
+ TQColor(oc), style->color(),
os, ow, ow, true);
drawBorder(p, _tx-ow, _ty-ow, _tx+w+ow, _ty, BSTop,
- QColor(oc), style->color(),
+ TQColor(oc), style->color(),
os, ow, ow, true);
drawBorder(p, _tx+w, _ty-ow, _tx+w+ow, _ty+h+ow, BSRight,
- QColor(oc), style->color(),
+ TQColor(oc), style->color(),
os, ow, ow, true);
drawBorder(p, _tx-ow, _ty+h, _tx+w+ow, _ty+h+ow, BSBottom,
- QColor(oc), style->color(),
+ TQColor(oc), style->color(),
os, ow, ow, true);
}
@@ -1105,14 +1105,14 @@ void RenderObject::repaintRectangle(int x, int y, int w, int h, Priority p, bool
#ifdef ENABLE_DUMP
-QString RenderObject::information() const
+TQString RenderObject::information() const
{
- QString str;
+ TQString str;
int x; int y;
absolutePosition(x,y);
x += inlineXPos();
y += inlineYPos();
- QTextStream ts( &str, IO_WriteOnly );
+ TQTextStream ts( &str, IO_WriteOnly );
ts << renderName()
<< "(" << (style() ? style()->refCount() : 0) << ")"
<< ": " << (void*)this << " ";
@@ -1139,7 +1139,7 @@ QString RenderObject::information() const
} else if (isPseudoAnonymous() && style() && style()->styleType() != RenderStyle::NOPSEUDO) {
ts << " <" << getTagName(node()->id());
- QString pseudo;
+ TQString pseudo;
switch (style()->styleType()) {
case RenderStyle::FIRST_LETTER:
pseudo = ":first-letter"; break;
@@ -1159,27 +1159,27 @@ QString RenderObject::information() const
<< " mB: " << marginBottom() << " qB: " << isBottomMarginQuirk()
<< "}"
<< (isTableCell() ?
- ( QString::fromLatin1(" [r=") +
- QString::number( static_cast<const RenderTableCell *>(this)->row() ) +
- QString::fromLatin1(" c=") +
- QString::number( static_cast<const RenderTableCell *>(this)->col() ) +
- QString::fromLatin1(" rs=") +
- QString::number( static_cast<const RenderTableCell *>(this)->rowSpan() ) +
- QString::fromLatin1(" cs=") +
- QString::number( static_cast<const RenderTableCell *>(this)->colSpan() ) +
- QString::fromLatin1("]") ) : QString::null );
+ ( TQString::fromLatin1(" [r=") +
+ TQString::number( static_cast<const RenderTableCell *>(this)->row() ) +
+ TQString::fromLatin1(" c=") +
+ TQString::number( static_cast<const RenderTableCell *>(this)->col() ) +
+ TQString::fromLatin1(" rs=") +
+ TQString::number( static_cast<const RenderTableCell *>(this)->rowSpan() ) +
+ TQString::fromLatin1(" cs=") +
+ TQString::number( static_cast<const RenderTableCell *>(this)->colSpan() ) +
+ TQString::fromLatin1("]") ) : TQString::null );
if ( layer() )
ts << " layer=" << layer();
if ( continuation() )
ts << " continuation=" << continuation();
if (isText())
- ts << " \"" << QConstString(static_cast<const RenderText *>(this)->text(), kMin(static_cast<const RenderText *>(this)->length(), 10u)).string() << "\"";
+ ts << " \"" << TQConstString(static_cast<const RenderText *>(this)->text(), kMin(static_cast<const RenderText *>(this)->length(), 10u)).string() << "\"";
return str;
}
void RenderObject::printTree(int indent) const
{
- QString ind;
+ TQString ind;
ind.fill(' ', indent);
kdDebug() << ind << information() << endl;
@@ -1192,17 +1192,17 @@ void RenderObject::printTree(int indent) const
}
}
-static QTextStream &operator<<(QTextStream &ts, const QRect &r)
+static TQTextStream &operator<<(TQTextStream &ts, const TQRect &r)
{
return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height();
}
//A bit like getTagName, but handles XML, too.
-static QString lookupTagName(NodeImpl* node) {
+static TQString lookupTagName(NodeImpl* node) {
return node->getDocument()->getName(NodeImpl::ElementId, node->id()).string();
}
-void RenderObject::dump(QTextStream &ts, const QString &ind) const
+void RenderObject::dump(TQTextStream &ts, const TQString &ind) const
{
if ( !layer() )
ts << endl;
@@ -1214,13 +1214,13 @@ void RenderObject::dump(QTextStream &ts, const QString &ind) const
}
if (element()) {
- QString tagName(lookupTagName(element()));
+ TQString tagName(lookupTagName(element()));
if (!tagName.isEmpty()) {
ts << " {" << tagName << "}";
}
} else if (isPseudoAnonymous() && style() && style()->styleType() != RenderStyle::NOPSEUDO) {
- QString pseudo;
- QString tagName(lookupTagName(node()));
+ TQString pseudo;
+ TQString tagName(lookupTagName(node()));
switch (style()->styleType()) {
case RenderStyle::FIRST_LETTER:
pseudo = ":first-letter"; break;
@@ -1234,7 +1234,7 @@ void RenderObject::dump(QTextStream &ts, const QString &ind) const
ts << " {" << tagName << pseudo << "}";
}
- QRect r(xPos(), yPos(), width(), height());
+ TQRect r(xPos(), yPos(), width(), height());
ts << " " << r;
if ( parent() )
@@ -1481,7 +1481,7 @@ void RenderObject::updateBackgroundImages(RenderStyle* oldStyle)
}
}
-QRect RenderObject::viewRect() const
+TQRect RenderObject::viewRect() const
{
return containingBlock()->viewRect();
}
@@ -1705,7 +1705,7 @@ FindSelectionResult RenderObject::checkSelectionPoint( int _x, int _y, int _tx,
if (child->isText() && !static_cast<RenderText *>(child)->inlineTextBoxCount())
continue;
-// kdDebug(6040) << "iterating " << (child ? child->renderName() : "") << "@" << child << (child->isText() ? " contains: \"" + QConstString(static_cast<RenderText *>(child)->text(), kMin(static_cast<RenderText *>(child)->length(), 10u)).string() + "\"" : QString::null) << endl;
+// kdDebug(6040) << "iterating " << (child ? child->renderName() : "") << "@" << child << (child->isText() ? " contains: \"" + TQConstString(static_cast<RenderText *>(child)->text(), kMin(static_cast<RenderText *>(child)->length(), 10u)).string() + "\"" : TQString::null) << endl;
// kdDebug(6040) << "---------- checkSelectionPoint recursive -----------" << endl;
khtml::FindSelectionResult pos = child->checkSelectionPoint(_x, _y, _tx+xPos(), _ty+yPos(), nod, off, state);
// kdDebug(6040) << "-------- end checkSelectionPoint recursive ---------" << endl;
@@ -1773,7 +1773,7 @@ bool RenderObject::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
if ( !inOverflowRect ) {
int ol = overflowLeft();
int ot = overflowTop();
- QRect overflowRect( tx+ol, ty+ot, overflowWidth()-ol, overflowHeight()-ot );
+ TQRect overflowRect( tx+ol, ty+ot, overflowWidth()-ol, overflowHeight()-ot );
inOverflowRect = overflowRect.contains( _x, _y );
}
@@ -1851,7 +1851,7 @@ short RenderObject::getVerticalPosition( bool firstLine, RenderObject* ref ) con
else if ( va == LENGTH )
return vpos - style()->verticalAlignLength().width( lineHeight( firstLine ) );
- const QFont &f = ref->font( firstLine );
+ const TQFont &f = ref->font( firstLine );
int fontsize = f.pixelSize();
if ( va == SUB )
@@ -1859,12 +1859,12 @@ short RenderObject::getVerticalPosition( bool firstLine, RenderObject* ref ) con
else if ( va == SUPER )
vpos -= fontsize/3 + 1;
else if ( va == TEXT_TOP ) {
- vpos += baselinePosition( firstLine ) - (QFontMetrics(f).ascent() + QFontMetrics(f).leading()/2);
+ vpos += baselinePosition( firstLine ) - (TQFontMetrics(f).ascent() + TQFontMetrics(f).leading()/2);
} else if ( va == MIDDLE ) {
- QRect b = QFontMetrics(f).boundingRect('x');
+ TQRect b = TQFontMetrics(f).boundingRect('x');
vpos += -b.height()/2 - lineHeight( firstLine )/2 + baselinePosition( firstLine );
} else if ( va == TEXT_BOTTOM ) {
- vpos += QFontMetrics(f).descent() + QFontMetrics(f).leading()/2;
+ vpos += TQFontMetrics(f).descent() + TQFontMetrics(f).leading()/2;
if ( !isReplaced() )
vpos -= fontMetrics(firstLine).descent();
} else if ( va == BASELINE_MIDDLE )
@@ -1914,7 +1914,7 @@ short RenderObject::baselinePosition( bool firstLine ) const
if (isReplaced() && (!isInlineBlockOrInlineTable() || !needsLayout()))
return height()+marginTop()+marginBottom();
- const QFontMetrics &fm = fontMetrics( firstLine );
+ const TQFontMetrics &fm = fontMetrics( firstLine );
return fm.ascent() + ( lineHeight( firstLine) - fm.height() ) / 2;
}
@@ -1985,8 +1985,8 @@ InlineBox* RenderObject::createInlineBox(bool /*makePlaceHolderBox*/, bool /*isR
return 0;
}
-void RenderObject::getTextDecorationColors(int decorations, QColor& underline, QColor& overline,
- QColor& linethrough, bool quirksMode)
+void RenderObject::getTextDecorationColors(int decorations, TQColor& underline, TQColor& overline,
+ TQColor& linethrough, bool quirksMode)
{
RenderObject* curr = this;
do {
@@ -2031,7 +2031,7 @@ int RenderObject::maximalOutlineSize(PaintAction p) const
return static_cast<RenderCanvas*>(document()->renderer())->maximalOutlineSize();
}
-void RenderObject::collectBorders(QValueList<CollapsedBorderValue>& borderStyles)
+void RenderObject::collectBorders(TQValueList<CollapsedBorderValue>& borderStyles)
{
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling())
curr->collectBorders(borderStyles);
@@ -2052,7 +2052,7 @@ bool RenderObject::usesLineWidth() const
return (flowAroundFloats() && (style()->width().isVariable() || isHR() || (style()->htmlHacks() && !isTable())));
}
-bool RenderObject::hasCounter(const QString& counter) const
+bool RenderObject::hasCounter(const TQString& counter) const
{
if (style() && (!isText() || isCounter())) {
if (lookupCounter(counter)) return true;
@@ -2078,7 +2078,7 @@ bool RenderObject::hasCounter(const QString& counter) const
return false;
}
-CounterNode* RenderObject::getCounter(const QString& counter, bool view, bool counters)
+CounterNode* RenderObject::getCounter(const TQString& counter, bool view, bool counters)
{
// kdDebug( 6040 ) << renderName() << " getCounter(" << counter << ")" << endl;
@@ -2214,9 +2214,9 @@ CounterNode* RenderObject::getCounter(const QString& counter, bool view, bool co
return i;
}
-CounterNode* RenderObject::lookupCounter(const QString& counter) const
+CounterNode* RenderObject::lookupCounter(const TQString& counter) const
{
- QDict<khtml::CounterNode>* counters = document()->counters(this);
+ TQDict<khtml::CounterNode>* counters = document()->counters(this);
if (counters)
return counters->find(counter);
else
@@ -2225,10 +2225,10 @@ CounterNode* RenderObject::lookupCounter(const QString& counter) const
void RenderObject::detachCounters()
{
- QDict<khtml::CounterNode>* counters = document()->counters(this);
+ TQDict<khtml::CounterNode>* counters = document()->counters(this);
if (!counters) return;
- QDictIterator<khtml::CounterNode> i(*counters);
+ TQDictIterator<khtml::CounterNode> i(*counters);
while (i.current()) {
(*i)->remove();
@@ -2238,12 +2238,12 @@ void RenderObject::detachCounters()
document()->removeCounters(this);
}
-void RenderObject::insertCounter(const QString& counter, CounterNode* val)
+void RenderObject::insertCounter(const TQString& counter, CounterNode* val)
{
- QDict<khtml::CounterNode>* counters = document()->counters(this);
+ TQDict<khtml::CounterNode>* counters = document()->counters(this);
if (!counters) {
- counters = new QDict<khtml::CounterNode>(11);
+ counters = new TQDict<khtml::CounterNode>(11);
document()->setCounters(this, counters);
}
@@ -2253,22 +2253,22 @@ void RenderObject::insertCounter(const QString& counter, CounterNode* val)
void RenderObject::updateWidgetMasks() {
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
if ( curr->isWidget() && static_cast<RenderWidget*>(curr)->needsMask() ) {
- QWidget* w = static_cast<RenderWidget*>(curr)->widget();
+ TQWidget* w = static_cast<RenderWidget*>(curr)->widget();
if (!w)
return;
RenderLayer* l = curr->enclosingStackingContext();
- QRegion r = l ? l->getMask() : QRegion();
+ TQRegion r = l ? l->getMask() : TQRegion();
int x,y;
if (!r.isNull() && curr->absolutePosition(x,y)) {
int pbx = curr->borderLeft()+curr->paddingLeft();
int pby = curr->borderTop()+curr->paddingTop();
x+= pbx;
y+= pby;
- r = r.intersect(QRect(x,y,
+ r = r.intersect(TQRect(x,y,
curr->width()-pbx-curr->borderRight()-curr->paddingRight(),
curr->height()-pby-curr->borderBottom()-curr->paddingBottom()));
#ifdef MASK_DEBUG
- QMemArray<QRect> ar = r.rects();
+ TQMemArray<TQRect> ar = r.rects();
kdDebug(6040) << "|| Setting widget mask for " << curr->information() << endl;
for (int i = 0; i < ar.size() ; ++i) {
kdDebug(6040) << " " << ar[i] << endl;
@@ -2286,16 +2286,16 @@ void RenderObject::updateWidgetMasks() {
}
}
-QRegion RenderObject::visibleFlowRegion(int x, int y) const
+TQRegion RenderObject::visibleFlowRegion(int x, int y) const
{
- QRegion r;
+ TQRegion r;
for (RenderObject* ro=firstChild();ro;ro=ro->nextSibling()) {
if( !ro->layer() && !ro->isInlineFlow() && ro->style()->visibility() == VISIBLE) {
const RenderStyle *s = ro->style();
if (ro->isRelPositioned())
static_cast<const RenderBox*>(ro)->relativePositionOffset(x,y);
if ( s->backgroundImage() || s->backgroundColor().isValid() || s->hasBorder() )
- r += QRect(x + ro->effectiveXPos(),y + ro->effectiveYPos(), ro->effectiveWidth(), ro->effectiveHeight());
+ r += TQRect(x + ro->effectiveXPos(),y + ro->effectiveYPos(), ro->effectiveWidth(), ro->effectiveHeight());
else
r += ro->visibleFlowRegion(x+ro->xPos(), y+ro->yPos());
}
diff --git a/khtml/rendering/render_object.h b/khtml/rendering/render_object.h
index 6b98a5fa4..64cb581b3 100644
--- a/khtml/rendering/render_object.h
+++ b/khtml/rendering/render_object.h
@@ -26,10 +26,10 @@
#ifndef render_object_h
#define render_object_h
-#include <qcolor.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqrect.h>
#include <assert.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -169,9 +169,9 @@ public:
}
// ### rename to overflowClipRect and clipRect
- virtual QRect getOverflowClipRect(int /*tx*/, int /*ty*/)
- { return QRect(0,0,0,0); }
- virtual QRect getClipRect(int /*tx*/, int /*ty*/) { return QRect(0,0,0,0); }
+ virtual TQRect getOverflowClipRect(int /*tx*/, int /*ty*/)
+ { return TQRect(0,0,0,0); }
+ virtual TQRect getClipRect(int /*tx*/, int /*ty*/) { return TQRect(0,0,0,0); }
bool hasClip() const { return isPositioned() && style()->hasClip(); }
bool hasOverflowClip() const { return m_hasOverflowClip; }
@@ -192,17 +192,17 @@ public:
RenderObject *objectAbove() const;
// Returns if an object has counter-increment or counter-reset
- bool hasCounter(const QString& counter) const;
+ bool hasCounter(const TQString& counter) const;
// Calculates the value of the counter
- CounterNode* getCounter(const QString& counter, bool view = false, bool counters = false);
+ CounterNode* getCounter(const TQString& counter, bool view = false, bool counters = false);
// Detaches all counterNodes
void detachCounters();
protected:
// Helper functions for counter-cache
- void insertCounter(const QString& counter, CounterNode* value);
- CounterNode* lookupCounter(const QString& counter) const;
+ void insertCounter(const TQString& counter, CounterNode* value);
+ CounterNode* lookupCounter(const TQString& counter) const;
public:
//////////////////////////////////////////
@@ -226,9 +226,9 @@ public:
public:
virtual const char *renderName() const { return "RenderObject"; }
#ifdef ENABLE_DUMP
- QString information() const;
+ TQString information() const;
virtual void printTree(int indent=0) const;
- virtual void dump(QTextStream &stream, const QString &ind = QString::null) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind = TQString::null) const;
#endif
static RenderObject *createObject(DOM::NodeImpl* node, RenderStyle* style);
@@ -372,22 +372,22 @@ public:
* (tx|ty) is the calculated position of the parent
*/
struct PaintInfo {
- PaintInfo(QPainter* _p, const QRect& _r, PaintAction _phase)
+ PaintInfo(TQPainter* _p, const TQRect& _r, PaintAction _phase)
: p(_p), r(_r), phase(_phase), outlineObjects(0) {}
~PaintInfo() { delete outlineObjects; }
- QPainter* p;
- QRect r;
+ TQPainter* p;
+ TQRect r;
PaintAction phase;
- QValueList<RenderFlow *>* outlineObjects; // used to list which outlines should be painted by a block with inline children
+ TQValueList<RenderFlow *>* outlineObjects; // used to list which outlines should be painted by a block with inline children
};
virtual void paint( PaintInfo& i, int tx, int ty);
- void paintBorder(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin=true, bool end=true);
- void paintOutline(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style);
+ void paintBorder(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin=true, bool end=true);
+ void paintOutline(TQPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style);
virtual void paintBoxDecorations(PaintInfo&, int /*_tx*/, int /*_ty*/) {}
- virtual void paintBackgroundExtended(QPainter* /*p*/, const QColor& /*c*/, const BackgroundLayer */*bgLayer*/,
+ virtual void paintBackgroundExtended(TQPainter* /*p*/, const TQColor& /*c*/, const BackgroundLayer */*bgLayer*/,
int /*clipy*/, int /*cliph*/, int /*_tx*/, int /*_ty*/,
int /*w*/, int /*height*/, int /*bleft*/, int /*bright*/, int /*pleft*/, int /*pright*/ ) {}
@@ -667,18 +667,18 @@ public:
return s;
}
- void getTextDecorationColors(int decorations, QColor& underline, QColor& overline,
- QColor& linethrough, bool quirksMode=false);
+ void getTextDecorationColors(int decorations, TQColor& underline, TQColor& overline,
+ TQColor& linethrough, bool quirksMode=false);
enum BorderSide {
BSTop, BSBottom, BSLeft, BSRight
};
- void drawBorder(QPainter *p, int x1, int y1, int x2, int y2, BorderSide s,
- QColor c, const QColor& textcolor, EBorderStyle style,
+ void drawBorder(TQPainter *p, int x1, int y1, int x2, int y2, BorderSide s,
+ TQColor c, const TQColor& textcolor, EBorderStyle style,
int adjbw1, int adjbw2, bool invalidisInvert = false);
// Used by collapsed border tables.
- virtual void collectBorders(QValueList<CollapsedBorderValue>& borderStyles);
+ virtual void collectBorders(TQValueList<CollapsedBorderValue>& borderStyles);
// force a complete repaint
virtual void repaint(Priority p = NormalPriority) { if(m_parent) m_parent->repaint(p); }
@@ -758,11 +758,11 @@ public:
void setDoNotDelete(bool b) { m_doNotDelete = b; }
bool doNotDelete() const { return m_doNotDelete; }
- const QFont &font(bool firstLine) const {
+ const TQFont &font(bool firstLine) const {
return style( firstLine )->font();
}
- const QFontMetrics &fontMetrics(bool firstLine) const {
+ const TQFontMetrics &fontMetrics(bool firstLine) const {
return style( firstLine )->fontMetrics();
}
@@ -780,14 +780,14 @@ public:
*/
virtual long maxOffset() const { return 0; }
- virtual void setPixmap(const QPixmap &, const QRect&, CachedImage *);
+ virtual void setPixmap(const TQPixmap &, const TQRect&, CachedImage *);
- QRegion visibleFlowRegion(int x, int y) const;
+ TQRegion visibleFlowRegion(int x, int y) const;
protected:
virtual void selectionStartEnd(int& spos, int& epos);
- virtual QRect viewRect() const;
+ virtual TQRect viewRect() const;
void remove();
void invalidateVerticalPositions();
bool attemptDirectLayerTranslation();
diff --git a/khtml/rendering/render_replaced.cpp b/khtml/rendering/render_replaced.cpp
index a74338e29..157d1b76d 100644
--- a/khtml/rendering/render_replaced.cpp
+++ b/khtml/rendering/render_replaced.cpp
@@ -30,14 +30,14 @@
#include "render_arena.h"
#include <assert.h>
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qapplication.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqapplication.h>
+#include <tqlineedit.h>
#include <kglobalsettings.h>
-#include <qobjectlist.h>
-#include <qvaluevector.h>
+#include <tqobjectlist.h>
+#include <tqvaluevector.h>
#include "khtml_ext.h"
#include "khtmlview.h"
@@ -142,9 +142,9 @@ RenderWidget::~RenderWidget()
class QWidgetResizeEvent : public QEvent
{
public:
- enum { Type = QEvent::User + 0xbee };
+ enum { Type = TQEvent::User + 0xbee };
QWidgetResizeEvent( int _w, int _h ) :
- QEvent( ( QEvent::Type ) Type ), w( _w ), h( _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();
- QApplication::postEvent( this, new QWidgetResizeEvent( w, h ) );
+ TQApplication::postEvent( this, new QWidgetResizeEvent( w, h ) );
element()->deref();
deref();
}
@@ -171,13 +171,13 @@ void RenderWidget::cancelPendingResize()
if (!m_widget)
return;
m_discardResizes = true;
- QApplication::sendPostedEvents(this, QWidgetResizeEvent::Type);
+ TQApplication::sendPostedEvents(this, QWidgetResizeEvent::Type);
m_discardResizes = false;
}
-bool RenderWidget::event( QEvent *e )
+bool RenderWidget::event( TQEvent *e )
{
- if ( m_widget && (e->type() == (QEvent::Type)QWidgetResizeEvent::Type) ) {
+ if ( m_widget && (e->type() == (TQEvent::Type)QWidgetResizeEvent::Type) ) {
m_resizePending = false;
if (m_discardResizes)
return true;
@@ -187,36 +187,36 @@ bool RenderWidget::event( QEvent *e )
}
// eat all events - except if this is a frame (in which case KHTMLView handles it all)
if ( ::qt_cast<KHTMLView *>( m_widget ) )
- return QObject::event( e );
+ return TQObject::event( e );
return true;
}
void RenderWidget::flushWidgetResizes() //static
{
- QApplication::sendPostedEvents( 0, QWidgetResizeEvent::Type );
+ TQApplication::sendPostedEvents( 0, QWidgetResizeEvent::Type );
}
-void RenderWidget::setQWidget(QWidget *widget)
+void RenderWidget::setQWidget(TQWidget *widget)
{
if (widget != m_widget)
{
if (m_widget) {
m_widget->removeEventFilter(this);
- disconnect( m_widget, SIGNAL( destroyed()), this, SLOT( slotWidgetDestructed()));
+ disconnect( m_widget, TQT_SIGNAL( destroyed()), this, TQT_SLOT( slotWidgetDestructed()));
m_widget->hide();
m_widget->deleteLater(); //Might happen due to event on the widget, so be careful
m_widget = 0;
}
m_widget = widget;
if (m_widget) {
- connect( m_widget, SIGNAL( destroyed()), this, SLOT( slotWidgetDestructed()));
+ connect( m_widget, TQT_SIGNAL( destroyed()), this, TQT_SLOT( slotWidgetDestructed()));
m_widget->installEventFilter(this);
- if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__khtml")) && !::qt_cast<QFrame*>(m_widget))
- m_widget->setBackgroundMode( QWidget::NoBackground );
+ if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__khtml")) && !::qt_cast<TQFrame*>(m_widget))
+ m_widget->setBackgroundMode( TQWidget::NoBackground );
- if (m_widget->focusPolicy() > QWidget::StrongFocus)
- m_widget->setFocusPolicy(QWidget::StrongFocus);
+ if (m_widget->focusPolicy() > TQWidget::StrongFocus)
+ m_widget->setFocusPolicy(TQWidget::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).
@@ -266,11 +266,11 @@ void RenderWidget::updateFromElement()
{
if (m_widget) {
// Color:
- QColor color = style()->color();
- QColor backgroundColor = style()->backgroundColor();
+ TQColor color = style()->color();
+ TQColor backgroundColor = style()->backgroundColor();
if ( color.isValid() || backgroundColor.isValid() ) {
- QPalette pal(QApplication::palette(m_widget));
+ TQPalette pal(TQApplication::palette(m_widget));
int contrast_ = KGlobalSettings::contrast();
int highlightVal = 100 + (2*contrast_+4)*16/10;
@@ -279,38 +279,38 @@ void RenderWidget::updateFromElement()
if (backgroundColor.isValid()) {
if (!isKHTMLWidget())
widget()->setEraseColor(backgroundColor );
- for ( int i = 0; i < QPalette::NColorGroups; ++i ) {
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Background, backgroundColor );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Light, backgroundColor.light(highlightVal) );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Dark, backgroundColor.dark(lowlightVal) );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Mid, backgroundColor.dark(120) );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Midlight, backgroundColor.light(110) );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Button, backgroundColor );
- pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Base, backgroundColor );
+ for ( int i = 0; i < TQPalette::NColorGroups; ++i ) {
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Background, backgroundColor );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Light, backgroundColor.light(highlightVal) );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Dark, backgroundColor.dark(lowlightVal) );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Mid, backgroundColor.dark(120) );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Midlight, backgroundColor.light(110) );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Button, backgroundColor );
+ pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Base, backgroundColor );
}
}
if ( color.isValid() ) {
struct ColorSet {
- QPalette::ColorGroup cg;
- QColorGroup::ColorRole cr;
+ TQPalette::ColorGroup cg;
+ TQColorGroup::ColorRole cr;
};
const struct ColorSet toSet [] = {
- { QPalette::Active, QColorGroup::Foreground },
- { QPalette::Active, QColorGroup::ButtonText },
- { QPalette::Active, QColorGroup::Text },
- { QPalette::Inactive, QColorGroup::Foreground },
- { QPalette::Inactive, QColorGroup::ButtonText },
- { QPalette::Inactive, QColorGroup::Text },
- { QPalette::Disabled,QColorGroup::ButtonText },
- { QPalette::NColorGroups, QColorGroup::NColorRoles },
+ { TQPalette::Active, TQColorGroup::Foreground },
+ { TQPalette::Active, TQColorGroup::ButtonText },
+ { TQPalette::Active, TQColorGroup::Text },
+ { TQPalette::Inactive, TQColorGroup::Foreground },
+ { TQPalette::Inactive, TQColorGroup::ButtonText },
+ { TQPalette::Inactive, TQColorGroup::Text },
+ { TQPalette::Disabled,TQColorGroup::ButtonText },
+ { TQPalette::NColorGroups, TQColorGroup::NColorRoles },
};
const ColorSet *set = toSet;
- while( set->cg != QPalette::NColorGroups ) {
+ while( set->cg != TQPalette::NColorGroups ) {
pal.setColor( set->cg, set->cr, color );
++set;
}
- QColor disfg = color;
+ TQColor disfg = color;
int h, s, v;
disfg.hsv( &h, &s, &v );
if (v > 128)
@@ -322,7 +322,7 @@ void RenderWidget::updateFromElement()
else
// black fg - use darkgray disabled fg
disfg = Qt::darkGray;
- pal.setColor(QPalette::Disabled,QColorGroup::Foreground,disfg);
+ pal.setColor(TQPalette::Disabled,TQColorGroup::Foreground,disfg);
}
m_widget->setPalette(pal);
@@ -330,11 +330,11 @@ void RenderWidget::updateFromElement()
else
m_widget->unsetPalette();
// Border:
- QFrame* frame = ::qt_cast<QFrame*>(m_widget);
+ TQFrame* frame = ::qt_cast<TQFrame*>(m_widget);
if (frame) {
if (shouldPaintBackgroundOrBorder())
{
- frame->setFrameShape(QFrame::NoFrame);
+ frame->setFrameShape(TQFrame::NoFrame);
}
}
@@ -455,7 +455,7 @@ public:
static const int maxPixelBuffering = 320*200;
static const int leaseTime = 20*1000;
- static QPixmap *grab( QSize s = QSize() ) {
+ static TQPixmap *grab( TQSize s = TQSize() ) {
if (!m_inst)
m_inst = new PaintBuffer;
return m_inst->getBuf( s );
@@ -464,7 +464,7 @@ public:
protected:
PaintBuffer(): m_overflow(false), m_grabbed(false),
m_timer(0), m_resetWidth(0), m_resetHeight(0) {};
- void timerEvent(QTimerEvent* e) {
+ void timerEvent(TQTimerEvent* e) {
assert( m_timer == e->timerId() );
if (m_grabbed)
return;
@@ -474,7 +474,7 @@ protected:
m_timer = 0;
}
- QPixmap *getBuf( QSize s ) {
+ TQPixmap *getBuf( TQSize s ) {
assert( !m_grabbed );
if (s.isEmpty())
return 0;
@@ -509,7 +509,7 @@ protected:
}
private:
static PaintBuffer* m_inst;
- QPixmap m_buf;
+ TQPixmap m_buf;
bool m_overflow;
bool m_grabbed;
int m_timer;
@@ -519,21 +519,21 @@ private:
PaintBuffer *PaintBuffer::m_inst = 0;
-static void copyWidget(const QRect& r, QPainter *p, QWidget *widget, int tx, int ty)
+static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx, int ty)
{
if (r.isNull() || r.isEmpty() )
return;
- QRegion blit(r);
- QValueVector<QWidget*> cw;
- QValueVector<QRect> cr;
+ TQRegion blit(r);
+ TQValueVector<TQWidget*> cw;
+ TQValueVector<TQRect> cr;
if (widget->children()) {
// build region
- QObjectListIterator it = *widget->children();
+ TQObjectListIterator it = *widget->children();
for (; it.current(); ++it) {
- QWidget* const w = ::qt_cast<QWidget *>(it.current());
+ TQWidget* const w = ::qt_cast<TQWidget *>(it.current());
if ( w && !w->isTopLevel() && !w->isHidden()) {
- QRect r2 = w->geometry();
+ TQRect r2 = w->geometry();
blit -= r2;
r2 = r2.intersect( r );
r2.moveBy(-w->x(), -w->y());
@@ -542,11 +542,11 @@ static void copyWidget(const QRect& r, QPainter *p, QWidget *widget, int tx, int
}
}
}
- QMemArray<QRect> br = blit.rects();
+ TQMemArray<TQRect> br = blit.rects();
const int cnt = br.size();
const bool external = p->device()->isExtDev();
- QPixmap* const pm = PaintBuffer::grab( widget->size() );
+ TQPixmap* const pm = PaintBuffer::grab( widget->size() );
if (!pm)
{
kdWarning(6040) << "Rendering widget [ " << widget->className() << " ] failed due to invalid size." << endl;
@@ -556,12 +556,12 @@ static void copyWidget(const QRect& r, QPainter *p, QWidget *widget, int tx, int
// fill background
if ( external ) {
// even hackier!
- QPainter pt( pm );
- const QColor c = widget->colorGroup().base();
+ TQPainter pt( pm );
+ const TQColor c = widget->colorGroup().base();
for (int i = 0; i < cnt; ++i)
pt.fillRect( br[i], c );
} else {
- QRect dr;
+ TQRect dr;
for (int i = 0; i < cnt; ++i ) {
dr = br[i];
dr.moveBy( tx, ty );
@@ -571,45 +571,45 @@ static void copyWidget(const QRect& r, QPainter *p, QWidget *widget, int tx, int
}
// send paint event
- QPainter::redirect(widget, pm);
- QPaintEvent e( r, false );
- QApplication::sendEvent( widget, &e );
- QPainter::redirect(widget, 0);
+ TQPainter::redirect(widget, pm);
+ TQPaintEvent e( r, false );
+ TQApplication::sendEvent( widget, &e );
+ TQPainter::redirect(widget, 0);
// transfer result
if ( external )
for ( int i = 0; i < cnt; ++i )
- p->drawPixmap(QPoint(tx+br[i].x(), ty+br[i].y()), *pm, br[i]);
+ p->drawPixmap(TQPoint(tx+br[i].x(), ty+br[i].y()), *pm, br[i]);
else
for ( int i = 0; i < cnt; ++i )
- bitBlt(p->device(), p->xForm( QPoint(tx, ty) + br[i].topLeft() ), pm, br[i]);
+ bitBlt(p->device(), p->xForm( TQPoint(tx, ty) + br[i].topLeft() ), pm, br[i]);
// cleanup and recurse
PaintBuffer::release();
- QValueVector<QWidget*>::iterator cwit = cw.begin();
- QValueVector<QWidget*>::iterator cwitEnd = cw.end();
- QValueVector<QRect>::const_iterator crit = cr.begin();
+ TQValueVector<TQWidget*>::iterator cwit = cw.begin();
+ TQValueVector<TQWidget*>::iterator cwitEnd = cw.end();
+ TQValueVector<TQRect>::const_iterator crit = cr.begin();
for (; cwit != cwitEnd; ++cwit, ++crit)
copyWidget(*crit, p, *cwit, tx+(*cwit)->x(), ty+(*cwit)->y());
}
-void RenderWidget::paintWidget(PaintInfo& pI, QWidget *widget, int tx, int ty)
+void RenderWidget::paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty)
{
- QPainter* const p = pI.p;
+ TQPainter* const p = pI.p;
allowWidgetPaintEvents = true;
const bool dsbld = QSharedDoubleBuffer::isDisabled();
QSharedDoubleBuffer::setDisabled(true);
- QRect rr = pI.r;
+ TQRect rr = pI.r;
rr.moveBy(-tx, -ty);
- const QRect r = widget->rect().intersect( rr );
+ const TQRect r = widget->rect().intersect( rr );
copyWidget(r, p, widget, tx, ty);
QSharedDoubleBuffer::setDisabled(dsbld);
allowWidgetPaintEvents = false;
}
-bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
+bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
{
// no special event processing if this is a frame (in which case KHTMLView handles it all)
if ( ::qt_cast<KHTMLView *>( m_widget ) )
@@ -631,23 +631,23 @@ bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
//kdDebug() << "RenderWidget::eventFilter type=" << e->type() << endl;
switch(e->type()) {
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
// First, forward it to the widget, so that Qt gets a precise
// state of the focus before pesky JS can try changing it..
directToWidget = true;
- QApplication::sendEvent(m_widget, e);
+ TQApplication::sendEvent(m_widget, e);
directToWidget = false;
filtered = true; //We already delivered it!
// 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 ( QFocusEvent::reason() != QFocusEvent::Popup )
+ if ( TQFocusEvent::reason() != TQFocusEvent::Popup )
handleFocusOut();
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
//As above, forward to the widget first...
directToWidget = true;
- QApplication::sendEvent(m_widget, e);
+ TQApplication::sendEvent(m_widget, e);
directToWidget = false;
filtered = true; //We already delivered it!
@@ -658,23 +658,23 @@ bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
// if ( ext ) ext->editableWidgetFocused( m_widget );
// }
break;
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
+ case TQEvent::KeyPress:
+ 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<QKeyEvent*>(e),false))
+ if (element()->dispatchKeyEvent(static_cast<TQKeyEvent*>(e),false))
filtered = true;
break;
- case QEvent::Wheel:
+ case TQEvent::Wheel:
if (widget()->parentWidget() == view()->viewport()) {
// don't allow the widget to react to wheel event unless its
// currently focused. this avoids accidentally changing a select box
// or something while wheeling a webpage.
if (qApp->focusWidget() != widget() &&
- widget()->focusPolicy() <= QWidget::StrongFocus) {
- static_cast<QWheelEvent*>(e)->ignore();
- QApplication::sendEvent(view(), e);
+ widget()->focusPolicy() <= TQWidget::StrongFocus) {
+ static_cast<TQWheelEvent*>(e)->ignore();
+ TQApplication::sendEvent(view(), e);
filtered = true;
}
}
@@ -693,50 +693,50 @@ bool RenderWidget::eventFilter(QObject* /*o*/, QEvent* e)
return filtered;
}
-void RenderWidget::EventPropagator::sendEvent(QEvent *e) {
+void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
- case QEvent::MouseButtonPress:
- mousePressEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonPress:
+ mousePressEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseButtonRelease:
- mouseReleaseEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonRelease:
+ mouseReleaseEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseMove:
- mouseMoveEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseMove:
+ mouseMoveEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::KeyPress:
- keyPressEvent(static_cast<QKeyEvent *>(e));
+ case TQEvent::KeyPress:
+ keyPressEvent(static_cast<TQKeyEvent *>(e));
break;
- case QEvent::KeyRelease:
- keyReleaseEvent(static_cast<QKeyEvent *>(e));
+ case TQEvent::KeyRelease:
+ keyReleaseEvent(static_cast<TQKeyEvent *>(e));
break;
default:
break;
}
}
-void RenderWidget::ScrollViewEventPropagator::sendEvent(QEvent *e) {
+void RenderWidget::ScrollViewEventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
- case QEvent::MouseButtonPress:
- viewportMousePressEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonPress:
+ viewportMousePressEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseButtonRelease:
- viewportMouseReleaseEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonRelease:
+ viewportMouseReleaseEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseButtonDblClick:
- viewportMouseDoubleClickEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonDblClick:
+ viewportMouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::MouseMove:
- viewportMouseMoveEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseMove:
+ viewportMouseMoveEvent(static_cast<TQMouseEvent *>(e));
break;
- case QEvent::KeyPress:
- keyPressEvent(static_cast<QKeyEvent *>(e));
+ case TQEvent::KeyPress:
+ keyPressEvent(static_cast<TQKeyEvent *>(e));
break;
- case QEvent::KeyRelease:
- keyReleaseEvent(static_cast<QKeyEvent *>(e));
+ case TQEvent::KeyRelease:
+ keyReleaseEvent(static_cast<TQKeyEvent *>(e));
break;
default:
break;
@@ -752,15 +752,15 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
case EventImpl::MOUSEMOVE_EVENT: {
if (!ev.isMouseEvent()) break;
const MouseEventImpl &me = static_cast<const MouseEventImpl &>(ev);
- QMouseEvent* const qme = me.qEvent();
+ TQMouseEvent* const qme = me.qEvent();
int absx = 0;
int absy = 0;
absolutePosition(absx, absy);
- QPoint p(me.clientX() - absx + m_view->contentsX(),
+ TQPoint p(me.clientX() - absx + m_view->contentsX(),
me.clientY() - absy + m_view->contentsY());
- QMouseEvent::Type type;
+ TQMouseEvent::Type type;
int button = 0;
int state = 0;
@@ -771,14 +771,14 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
} else {
switch(me.id()) {
case EventImpl::MOUSEDOWN_EVENT:
- type = QMouseEvent::MouseButtonPress;
+ type = TQMouseEvent::MouseButtonPress;
break;
case EventImpl::MOUSEUP_EVENT:
- type = QMouseEvent::MouseButtonRelease;
+ type = TQMouseEvent::MouseButtonRelease;
break;
case EventImpl::MOUSEMOVE_EVENT:
default:
- type = QMouseEvent::MouseMove;
+ type = TQMouseEvent::MouseMove;
break;
}
switch (me.button()) {
@@ -807,9 +807,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
// kdDebug(6000) << "sending event to widget "
// << " pos=" << p << " type=" << type
// << " button=" << button << " state=" << state << endl;
- QMouseEvent e(type, p, button, state);
- QScrollView * sc = ::qt_cast<QScrollView*>(m_widget);
- if (sc && !::qt_cast<QListBox*>(m_widget))
+ TQMouseEvent e(type, p, button, state);
+ TQScrollView * sc = ::qt_cast<TQScrollView*>(m_widget);
+ if (sc && !::qt_cast<TQListBox*>(m_widget))
static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(&e);
else
static_cast<EventPropagator *>(m_widget)->sendEvent(&e);
@@ -825,7 +825,7 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
const KeyEventBaseImpl& domKeyEv = static_cast<const KeyEventBaseImpl &>(ev);
if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break;
- QKeyEvent* const ke = domKeyEv.qKeyEvent();
+ TQKeyEvent* const ke = domKeyEv.qKeyEvent();
static_cast<EventPropagator *>(m_widget)->sendEvent(ke);
ret = ke->isAccepted();
break;
@@ -849,9 +849,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
// Qt::KeyPress is sent for DOM keypress and not DOM keydown to allow
// sites to block a key with onkeypress, #99749
- QKeyEvent* const ke = domKeyEv.qKeyEvent();
+ TQKeyEvent* const ke = domKeyEv.qKeyEvent();
if (ke->isAutoRepeat()) {
- QKeyEvent releaseEv( QEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(),
+ TQKeyEvent releaseEv( TQEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(),
ke->text(), ke->isAutoRepeat(), ke->count() );
static_cast<EventPropagator *>(m_widget)->sendEvent(&releaseEv);
}
@@ -860,13 +860,13 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
break;
}
case EventImpl::MOUSEOUT_EVENT: {
- QEvent moe( QEvent::Leave );
- QApplication::sendEvent(m_widget, &moe);
+ TQEvent moe( TQEvent::Leave );
+ TQApplication::sendEvent(m_widget, &moe);
break;
}
case EventImpl::MOUSEOVER_EVENT: {
- QEvent moe( QEvent::Enter );
- QApplication::sendEvent(m_widget, &moe);
+ TQEvent moe( TQEvent::Enter );
+ TQApplication::sendEvent(m_widget, &moe);
view()->part()->resetHoverText();
break;
}
@@ -924,7 +924,7 @@ FindSelectionResult RenderReplaced::checkSelectionPoint(int _x, int _y, int _tx,
}
#ifdef ENABLE_DUMP
-void RenderWidget::dump(QTextStream &stream, const QString &ind) const
+void RenderWidget::dump(TQTextStream &stream, const TQString &ind) const
{
RenderReplaced::dump(stream,ind);
if ( widget() )
diff --git a/khtml/rendering/render_replaced.h b/khtml/rendering/render_replaced.h
index 97c14a0a8..cb147e3c0 100644
--- a/khtml/rendering/render_replaced.h
+++ b/khtml/rendering/render_replaced.h
@@ -23,8 +23,8 @@
#define render_replaced_h
#include "rendering/render_block.h"
-#include <qobject.h>
-#include <qscrollview.h>
+#include <tqobject.h>
+#include <tqscrollview.h>
class KHTMLView;
class QWidget;
@@ -81,7 +81,7 @@ protected:
};
-class RenderWidget : public QObject, public RenderReplaced, public khtml::Shared<RenderWidget>
+class RenderWidget : public TQObject, public RenderReplaced, public khtml::Shared<RenderWidget>
{
Q_OBJECT
public:
@@ -99,7 +99,7 @@ public:
virtual void updateFromElement();
- QWidget *widget() const { return m_widget; }
+ TQWidget *widget() const { return m_widget; }
KHTMLView* view() const { return m_view; }
void deref();
@@ -107,11 +107,11 @@ public:
void cancelPendingResize();
bool needsMask() const { return m_needsMask; }
- static void paintWidget(PaintInfo& pI, QWidget *widget, int tx, int ty);
+ static void paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty);
virtual bool handleEvent(const DOM::EventImpl& ev);
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
// for ECMA to flush all pending resizes
@@ -127,13 +127,13 @@ protected:
virtual bool acceptsSyntheticEvents() const { return true; }
virtual void handleFocusOut() {}
- bool event( QEvent *e );
+ bool event( TQEvent *e );
- bool eventFilter(QObject* /*o*/, QEvent* e);
- void setQWidget(QWidget *widget);
+ bool eventFilter(TQObject* /*o*/, TQEvent* e);
+ void setQWidget(TQWidget *widget);
void resizeWidget( int w, int h );
- QWidget *m_widget;
+ TQWidget *m_widget;
KHTMLView* m_view;
//Because we mess with normal detach due to ref/deref,
@@ -152,13 +152,13 @@ public:
virtual int borderLeft() const { return canHaveBorder() ? RenderReplaced::borderLeft() : 0; }
virtual int borderRight() const { return canHaveBorder() ? RenderReplaced::borderRight() : 0; }
- class EventPropagator : public QWidget {
+ class EventPropagator : public TQWidget {
public:
- void sendEvent(QEvent *e);
+ void sendEvent(TQEvent *e);
};
- class ScrollViewEventPropagator : public QScrollView {
+ class ScrollViewEventPropagator : public TQScrollView {
public:
- void sendEvent(QEvent *e);
+ void sendEvent(TQEvent *e);
};
};
diff --git a/khtml/rendering/render_style.cpp b/khtml/rendering/render_style.cpp
index 936964b98..18c520ad4 100644
--- a/khtml/rendering/render_style.cpp
+++ b/khtml/rendering/render_style.cpp
@@ -89,7 +89,7 @@ bool StyleBoxData::operator==(const StyleBoxData& o) const
StyleVisualData::StyleVisualData()
: textDecoration(RenderStyle::initialTextDecoration()),
- palette( QApplication::palette() )
+ palette( TQApplication::palette() )
{
}
@@ -879,7 +879,7 @@ void RenderStyle::cleanup()
_default = 0;
}
-void RenderStyle::setPaletteColor(QPalette::ColorGroup g, QColorGroup::ColorRole r, const QColor& c)
+void RenderStyle::setPaletteColor(TQPalette::ColorGroup g, TQColorGroup::ColorRole r, const TQColor& c)
{
visual.access()->palette.setColor(g,r,c);
}
@@ -912,7 +912,7 @@ void RenderStyle::setQuotes(DOM::QuotesValueImpl* q)
if (t) t->deref();
}
-QString RenderStyle::openQuote(int level) const
+TQString RenderStyle::openQuote(int level) const
{
if (inherited->quotes)
return inherited->quotes->openQuote(level);
@@ -920,7 +920,7 @@ QString RenderStyle::openQuote(int level) const
return "\""; // 0 is default quotes
}
-QString RenderStyle::closeQuote(int level) const
+TQString RenderStyle::closeQuote(int level) const
{
if (inherited->quotes)
return inherited->quotes->closeQuote(level);
@@ -1213,14 +1213,14 @@ void RenderStyle::setCounterIncrement(CSSValueListImpl *l)
#ifdef ENABLE_DUMP
-static QString describeFont( const QFont &f)
+static TQString describeFont( const TQFont &f)
{
- QString res = "'" + f.family() + "' ";
+ TQString res = "'" + f.family() + "' ";
if ( f.pointSize() > 0)
- res += QString::number( f.pointSize() ) + "pt";
+ res += TQString::number( f.pointSize() ) + "pt";
else
- res += QString::number( f.pixelSize() ) + "px";
+ res += TQString::number( f.pixelSize() ) + "px";
if ( f.bold() )
res += " bold";
@@ -1235,9 +1235,9 @@ static QString describeFont( const QFont &f)
return res;
}
-QString RenderStyle::createDiff( const RenderStyle &parent ) const
+TQString RenderStyle::createDiff( const RenderStyle &parent ) const
{
- QString res;
+ TQString res;
if ( color().isValid() && parent.color() != color() )
res += " [color=" + color().name() + "]";
if ( backgroundColor().isValid() && parent.backgroundColor() != backgroundColor() )
diff --git a/khtml/rendering/render_style.h b/khtml/rendering/render_style.h
index f8c2affd7..b1c1e5306 100644
--- a/khtml/rendering/render_style.h
+++ b/khtml/rendering/render_style.h
@@ -35,12 +35,12 @@
* and produce invaliud results.
*/
-#include <qcolor.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qptrlist.h>
-#include <qpalette.h>
-#include <qapplication.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqptrlist.h>
+#include <tqpalette.h>
+#include <tqapplication.h>
#include "dom/dom_misc.h"
#include "dom/dom_string.h"
@@ -208,7 +208,7 @@ class BorderValue
public:
BorderValue() : width( 3 ), style( BNONE ) {}
- QColor color;
+ TQColor color;
unsigned short width : 12;
EBorderStyle style : 6;
@@ -264,7 +264,7 @@ struct CollapsedBorderValue
int width() const { return border && border->nonZero() ? border->width : 0; }
EBorderStyle style() const { return border ? border->style : BHIDDEN; }
bool exists() const { return border; }
- QColor color() const { return border ? border->color : QColor(); }
+ TQColor color() const { return border ? border->color : TQColor(); }
bool isTransparent() const { return border ? border->isTransparent() : true; }
bool operator==(const CollapsedBorderValue& o) const
@@ -428,7 +428,7 @@ public:
LengthBox clip;
unsigned textDecoration : 4; // Text decorations defined *only* by this element.
- QPalette palette; //widget styling with IE attributes
+ TQPalette palette; //widget styling with IE attributes
};
@@ -553,7 +553,7 @@ public:
}
BackgroundLayer m_background;
- QColor m_color;
+ TQColor m_color;
OutlineValue m_outline;
};
@@ -641,7 +641,7 @@ public:
// This struct holds information about shadows for the text-shadow and box-shadow properties.
struct ShadowData {
- ShadowData(int _x, int _y, int _blur, const QColor& _color)
+ ShadowData(int _x, int _y, int _blur, const TQColor& _color)
:x(_x), y(_y), blur(_blur), color(_color), next(0) {}
ShadowData(const ShadowData& o);
@@ -655,7 +655,7 @@ struct ShadowData {
int x;
int y;
int blur;
- QColor color;
+ TQColor color;
ShadowData* next;
};
@@ -761,7 +761,7 @@ public:
CachedImage *style_image;
khtml::Font font;
- QColor color;
+ TQColor color;
short border_hspacing;
short border_vspacing;
@@ -1063,19 +1063,19 @@ public:
unsigned short borderLeftWidth() const { return surround->border.borderLeftWidth(); }
EBorderStyle borderLeftStyle() const { return surround->border.left.style; }
- const QColor& borderLeftColor() const { return surround->border.left.color; }
+ const TQColor& borderLeftColor() const { return surround->border.left.color; }
bool borderLeftIsTransparent() const { return surround->border.left.isTransparent(); }
unsigned short borderRightWidth() const { return surround->border.borderRightWidth(); }
EBorderStyle borderRightStyle() const { return surround->border.right.style; }
- const QColor& borderRightColor() const { return surround->border.right.color; }
+ const TQColor& borderRightColor() const { return surround->border.right.color; }
bool borderRightIsTransparent() const { return surround->border.right.isTransparent(); }
unsigned short borderTopWidth() const { return surround->border.borderTopWidth(); }
EBorderStyle borderTopStyle() const { return surround->border.top.style; }
- const QColor& borderTopColor() const { return surround->border.top.color; }
+ const TQColor& borderTopColor() const { return surround->border.top.color; }
bool borderTopIsTransparent() const { return surround->border.top.isTransparent(); }
unsigned short borderBottomWidth() const { return surround->border.borderBottomWidth(); }
EBorderStyle borderBottomStyle() const { return surround->border.bottom.style; }
- const QColor& borderBottomColor() const { return surround->border.bottom.color; }
+ const TQColor& borderBottomColor() const { return surround->border.bottom.color; }
bool borderBottomIsTransparent() const { return surround->border.bottom.isTransparent(); }
unsigned short outlineSize() const { return outlineWidth() + outlineOffset(); }
@@ -1084,7 +1084,7 @@ public:
else return background->m_outline.width; }
EBorderStyle outlineStyle() const { return background->m_outline.style; }
bool outlineStyleIsAuto() const { return background->m_outline._auto; }
- const QColor & outlineColor() const { return background->m_outline.color; }
+ const TQColor & outlineColor() const { return background->m_outline.color; }
EOverflow overflowX() const { return noninherited_flags.f._overflowX; }
EOverflow overflowY() const { return noninherited_flags.f._overflowY; }
@@ -1109,12 +1109,12 @@ public:
EClear clear() const { return noninherited_flags.f._clear; }
ETableLayout tableLayout() const { return noninherited_flags.f._table_layout; }
- const QFont & font() const { return inherited->font.f; }
+ const TQFont & font() const { return inherited->font.f; }
// use with care. call font->update() after modifications
const Font &htmlFont() { return inherited->font; }
- const QFontMetrics & fontMetrics() const { return inherited->font.fm; }
+ const TQFontMetrics & fontMetrics() const { return inherited->font.fm; }
- const QColor & color() const { return inherited->color; }
+ const TQColor & color() const { return inherited->color; }
Length textIndent() const { return inherited->indent; }
ETextAlign textAlign() const { return inherited_flags.f._text_align; }
ETextTransform textTransform() const { return inherited_flags.f._text_transform; }
@@ -1146,7 +1146,7 @@ public:
return false;
}
- const QColor & backgroundColor() const { return background->m_color; }
+ const TQColor & backgroundColor() const { return background->m_color; }
CachedImage *backgroundImage() const { return background->m_background.m_image; }
EBackgroundRepeat backgroundRepeat() const { return background->m_background.m_bgRepeat; }
bool backgroundAttachment() const { return background->m_background.m_bgAttachment; }
@@ -1185,8 +1185,8 @@ public:
EPageBreak pageBreakAfter() const { return noninherited_flags.f._page_break_after; }
DOM::QuotesValueImpl* quotes() const { return inherited->quotes; }
- QString openQuote(int level) const;
- QString closeQuote(int level) const;
+ TQString openQuote(int level) const;
+ TQString closeQuote(int level) const;
// CSS3 Getter Methods
EBoxSizing boxSizing() const { return box->box_sizing; }
@@ -1232,27 +1232,27 @@ public:
void resetBorderLeft() { SET_VAR(surround, border.left, BorderValue()) }
void resetOutline() { SET_VAR(background, m_outline, OutlineValue()) }
- void setBackgroundColor(const QColor& v) { SET_VAR(background, m_color, v) }
+ void setBackgroundColor(const TQColor& v) { SET_VAR(background, m_color, v) }
void setBorderLeftWidth(unsigned short v) { SET_VAR(surround,border.left.width,v) }
void setBorderLeftStyle(EBorderStyle v) { SET_VAR(surround,border.left.style,v) }
- void setBorderLeftColor(const QColor & v) { SET_VAR(surround,border.left.color,v) }
+ void setBorderLeftColor(const TQColor & v) { SET_VAR(surround,border.left.color,v) }
void setBorderRightWidth(unsigned short v) { SET_VAR(surround,border.right.width,v) }
void setBorderRightStyle(EBorderStyle v) { SET_VAR(surround,border.right.style,v) }
- void setBorderRightColor(const QColor & v) { SET_VAR(surround,border.right.color,v) }
+ void setBorderRightColor(const TQColor & v) { SET_VAR(surround,border.right.color,v) }
void setBorderTopWidth(unsigned short v) { SET_VAR(surround,border.top.width,v) }
void setBorderTopStyle(EBorderStyle v) { SET_VAR(surround,border.top.style,v) }
- void setBorderTopColor(const QColor & v) { SET_VAR(surround,border.top.color,v) }
+ void setBorderTopColor(const TQColor & v) { SET_VAR(surround,border.top.color,v) }
void setBorderBottomWidth(unsigned short v) { SET_VAR(surround,border.bottom.width,v) }
void setBorderBottomStyle(EBorderStyle v) { SET_VAR(surround,border.bottom.style,v) }
- void setBorderBottomColor(const QColor & v) { SET_VAR(surround,border.bottom.color,v) }
+ void setBorderBottomColor(const TQColor & v) { SET_VAR(surround,border.bottom.color,v) }
void setOutlineWidth(unsigned short v) { SET_VAR(background,m_outline.width,v) }
void setOutlineStyle(EBorderStyle v, bool isAuto = false)
{
SET_VAR(background,m_outline.style,v)
SET_VAR(background,m_outline._auto, isAuto)
}
- void setOutlineColor(const QColor & v) { SET_VAR(background,m_outline.color,v) }
+ void setOutlineColor(const TQColor & v) { SET_VAR(background,m_outline.color,v) }
void setOverflowX(EOverflow v) { noninherited_flags.f._overflowX = v; }
void setOverflowY(EOverflow v) { noninherited_flags.f._overflowY = v; }
@@ -1280,7 +1280,7 @@ public:
return false;
}
- void setColor(const QColor & v) { SET_VAR(inherited,color,v) }
+ void setColor(const TQColor & v) { SET_VAR(inherited,color,v) }
void setTextIndent(Length v) { SET_VAR(inherited,indent,v) }
void setTextAlign(ETextAlign v) { inherited_flags.f._text_align = v; }
void setTextTransform(ETextTransform v) { inherited_flags.f._text_transform = v; }
@@ -1358,11 +1358,11 @@ public:
void setTextOverflow(bool b) { noninherited_flags.f._textOverflow = b; }
// End CSS3 Setters
- QPalette palette() const { return visual->palette; }
- void setPaletteColor(QPalette::ColorGroup g, QColorGroup::ColorRole r, const QColor& c);
+ TQPalette palette() const { return visual->palette; }
+ void setPaletteColor(TQPalette::ColorGroup g, TQColorGroup::ColorRole r, const TQColor& c);
void resetPalette() // Called when the desktop color scheme changes.
{
- const_cast<StyleVisualData *>(visual.get())->palette = QApplication::palette();
+ const_cast<StyleVisualData *>(visual.get())->palette = TQApplication::palette();
}
bool useNormalContent() const { return generated->content == 0; }
@@ -1407,7 +1407,7 @@ public:
#ifdef ENABLE_DUMP
- QString createDiff( const RenderStyle &parent ) const;
+ TQString createDiff( const RenderStyle &parent ) const;
#endif
// Initial values for all the properties
@@ -1443,7 +1443,7 @@ public:
static short initialBorderHorizontalSpacing() { return 0; }
static short initialBorderVerticalSpacing() { return 0; }
static ECursor initialCursor() { return CURSOR_AUTO; }
- static QColor initialColor() { return Qt::black; }
+ static TQColor initialColor() { return Qt::black; }
static CachedImage* initialBackgroundImage() { return 0; }
static CachedImage* initialListStyleImage() { return 0; }
static unsigned short initialBorderWidth() { return 3; }
diff --git a/khtml/rendering/render_table.cpp b/khtml/rendering/render_table.cpp
index 592db9dbd..2cf1bf1f9 100644
--- a/khtml/rendering/render_table.cpp
+++ b/khtml/rendering/render_table.cpp
@@ -42,8 +42,8 @@
#include <kglobal.h>
-#include <qapplication.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <assert.h>
@@ -477,16 +477,16 @@ void RenderTable::paint( PaintInfo& pI, int _tx, int _ty)
// have all the styles sorted, we then do individual passes, painting each style of border
// from lowest precedence to highest precedence.
pI.phase = PaintActionCollapsedTableBorders;
- QValueList<CollapsedBorderValue> borderStyles;
+ TQValueList<CollapsedBorderValue> borderStyles;
collectBorders(borderStyles);
#if 0
- QString m;
+ TQString m;
for (uint i = 0; i < borderStyles.count(); i++)
- m += QString("%1 ").arg((*borderStyles.at(i)).width());
+ m += TQString("%1 ").arg((*borderStyles.at(i)).width());
kdDebug(6040) << m << endl;
#endif
- QValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
- QValueListIterator<CollapsedBorderValue> end = borderStyles.end();
+ TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
+ TQValueListIterator<CollapsedBorderValue> end = borderStyles.end();
for (; it != end; ++it) {
m_currentBorder = &*it;
for (RenderObject *child = firstChild(); child; child = child->nextSibling()) {
@@ -879,7 +879,7 @@ RenderTableCell* RenderTable::cellRight(const RenderTableCell* cell) const
}
#ifdef ENABLE_DUMP
-void RenderTable::dump(QTextStream &stream, const QString &ind) const
+void RenderTable::dump(TQTextStream &stream, const TQString &ind) const
{
RenderBlock::dump(stream, ind);
@@ -1074,7 +1074,7 @@ void RenderTableSection::addCell( RenderTableCell *cell, RenderTableRow *row )
{
int rSpan = cell->rowSpan();
int cSpan = cell->colSpan();
- QMemArray<RenderTable::ColumnStruct> &columns = table()->columns;
+ TQMemArray<RenderTable::ColumnStruct> &columns = table()->columns;
int nCols = columns.size();
// ### mozilla still seems to do the old HTML way, even for strict DTD
@@ -1161,7 +1161,7 @@ void RenderTableSection::setCellWidths()
#ifdef DEBUG_LAYOUT
kdDebug( 6040 ) << renderName() << "(Table, this=0x" << this << ")::setCellWidths()" << endl;
#endif
- QMemArray<int> &columnPos = table()->columnPos;
+ TQMemArray<int> &columnPos = table()->columnPos;
int rows = grid.size();
for ( int i = 0; i < rows; i++ ) {
@@ -1609,7 +1609,7 @@ int RenderTableSection::highestPosition(bool includeOverflowInterior, bool inclu
// Search from first_row to last_row for the row containing y
static unsigned int findRow(unsigned int first_row, unsigned int last_row,
- const QMemArray<int> &rowPos, int y)
+ const TQMemArray<int> &rowPos, int y)
{
unsigned int under = first_row;
unsigned int over = last_row;
@@ -1629,7 +1629,7 @@ static unsigned int findRow(unsigned int first_row, unsigned int last_row,
}
static void findRowCover(unsigned int &startrow, unsigned int &endrow,
- const QMemArray<int> &rowPos,
+ const TQMemArray<int> &rowPos,
int min_y, int max_y)
{
assert(max_y >= min_y);
@@ -1844,7 +1844,7 @@ void RenderTableSection::addSpaceAt(int pos, int dy)
#ifdef ENABLE_DUMP
-void RenderTableSection::dump(QTextStream &stream, const QString &ind) const
+void RenderTableSection::dump(TQTextStream &stream, const TQString &ind) const
{
RenderContainer::dump(stream,ind);
@@ -2693,11 +2693,11 @@ int RenderTableCell::borderBottom() const
}
#ifdef BOX_DEBUG
-#include <qpainter.h>
+#include <tqpainter.h>
-static void outlineBox(QPainter *p, int _tx, int _ty, int w, int h)
+static void outlineBox(TQPainter *p, int _tx, int _ty, int w, int h)
{
- p->setPen(QPen(QColor("yellow"), 3, Qt::DotLine));
+ p->setPen(TQPen(TQColor("yellow"), 3, Qt::DotLine));
p->setBrush( Qt::NoBrush );
p->drawRect(_tx, _ty, w, h );
}
@@ -2798,13 +2798,13 @@ public:
int count;
};
-static void addBorderStyle(QValueList<CollapsedBorderValue>& borderStyles, CollapsedBorderValue borderValue)
+static void addBorderStyle(TQValueList<CollapsedBorderValue>& borderStyles, CollapsedBorderValue borderValue)
{
if (!borderValue.exists() || borderStyles.contains(borderValue))
return;
- QValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
- QValueListIterator<CollapsedBorderValue> end = borderStyles.end();
+ TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin();
+ TQValueListIterator<CollapsedBorderValue> end = borderStyles.end();
for (; it != end; ++it) {
CollapsedBorderValue result = compareBorders(*it, borderValue);
if (result == *it) {
@@ -2816,7 +2816,7 @@ static void addBorderStyle(QValueList<CollapsedBorderValue>& borderStyles, Colla
borderStyles.append(borderValue);
}
-void RenderTableCell::collectBorders(QValueList<CollapsedBorderValue>& borderStyles)
+void RenderTableCell::collectBorders(TQValueList<CollapsedBorderValue>& borderStyles)
{
addBorderStyle(borderStyles, collapsedLeftBorder());
addBorderStyle(borderStyles, collapsedRightBorder());
@@ -2824,7 +2824,7 @@ void RenderTableCell::collectBorders(QValueList<CollapsedBorderValue>& borderSty
addBorderStyle(borderStyles, collapsedBottomBorder());
}
-void RenderTableCell::paintCollapsedBorder(QPainter* p, int _tx, int _ty, int w, int h)
+void RenderTableCell::paintCollapsedBorder(TQPainter* p, int _tx, int _ty, int w, int h)
{
if (!table()->currentBorderStyle())
return;
@@ -2894,7 +2894,7 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& pI, int _tx, int _ty
int end = kMin( pI.r.y() + pI.r.height(), _ty + h );
int mh = end - my;
- QColor c = backgroundObject->style()->backgroundColor();
+ TQColor c = backgroundObject->style()->backgroundColor();
const BackgroundLayer* bgLayer = backgroundObject->style()->backgroundLayers();
if (bgLayer->hasImage() || c.isValid()) {
@@ -2903,10 +2903,10 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& pI, int _tx, int _ty
bool hasLayer = backgroundObject->layer() && (backgroundObject == this || backgroundObject == parent());
if (hasLayer && tableElt->collapseBorders()) {
pI.p->save();
- QRect clipRect(_tx + borderLeft(), _ty + borderTop(), w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
+ TQRect clipRect(_tx + borderLeft(), _ty + borderTop(), w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
clipRect = pI.p->xForm(clipRect);
- QRegion creg(clipRect);
- QRegion old = pI.p->clipRegion();
+ TQRegion creg(clipRect);
+ TQRegion old = pI.p->clipRegion();
if (!old.isNull())
creg = old.intersect(creg);
pI.p->setClipRegion(creg);
@@ -2940,7 +2940,7 @@ void RenderTableCell::paintBoxDecorations(PaintInfo& pI, int _tx, int _ty)
#ifdef ENABLE_DUMP
-void RenderTableCell::dump(QTextStream &stream, const QString &ind) const
+void RenderTableCell::dump(TQTextStream &stream, const TQString &ind) const
{
RenderFlow::dump(stream,ind);
stream << " row=" << _row;
@@ -2972,7 +2972,7 @@ void RenderTableCol::updateFromElement()
}
#ifdef ENABLE_DUMP
-void RenderTableCol::dump(QTextStream &stream, const QString &ind) const
+void RenderTableCol::dump(TQTextStream &stream, const TQString &ind) const
{
RenderContainer::dump(stream,ind);
stream << " _span=" << m_span;
diff --git a/khtml/rendering/render_table.h b/khtml/rendering/render_table.h
index 979b92187..a6de6cfaf 100644
--- a/khtml/rendering/render_table.h
+++ b/khtml/rendering/render_table.h
@@ -27,8 +27,8 @@
#ifndef RENDER_TABLE_H
#define RENDER_TABLE_H
-#include <qcolor.h>
-#include <qptrvector.h>
+#include <tqcolor.h>
+#include <tqptrvector.h>
#include "rendering/render_box.h"
#include "rendering/render_block.h"
@@ -78,7 +78,7 @@ public:
int paddingTop() const { return collapseBorders() ? 0 : RenderBlock::paddingTop(); }
int paddingBottom() const { return collapseBorders() ? 0 : RenderBlock::paddingBottom(); }
- const QColor &bgColor() const { return style()->backgroundColor(); }
+ const TQColor &bgColor() const { return style()->backgroundColor(); }
uint cellPadding() const { return padding; }
void setCellPadding( uint p ) { padding = p; }
@@ -103,7 +103,7 @@ public:
SelPointState & );
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
struct ColumnStruct {
enum {
@@ -117,8 +117,8 @@ public:
ushort width; // the calculated position of the column
};
- QMemArray<int> columnPos;
- QMemArray<ColumnStruct> columns;
+ TQMemArray<int> columnPos;
+ TQMemArray<ColumnStruct> columns;
void splitColumn( int pos, int firstSpan );
void appendColumn( int span );
@@ -217,7 +217,7 @@ public:
SelPointState & );
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
void addCell( RenderTableCell *cell, RenderTableRow *row );
@@ -228,7 +228,7 @@ public:
RenderTable *table() const { return static_cast<RenderTable *>(parent()); }
- typedef QMemArray<RenderTableCell *> Row;
+ typedef TQMemArray<RenderTableCell *> Row;
struct RowStruct {
Row *row;
RenderTableRow* rowRenderer;
@@ -273,8 +273,8 @@ public:
// this gets a cell grid data structure. changing the number of
// columns is done by the table
- QMemArray<RowStruct> grid;
- QMemArray<int> rowPos;
+ TQMemArray<RowStruct> grid;
+ TQMemArray<int> rowPos;
signed short cRow;
ushort cCol;
@@ -375,7 +375,7 @@ public:
CollapsedBorderValue collapsedRightBorder() const;
CollapsedBorderValue collapsedTopBorder() const;
CollapsedBorderValue collapsedBottomBorder() const;
- virtual void collectBorders(QValueList<CollapsedBorderValue>& borderStyles);
+ virtual void collectBorders(TQValueList<CollapsedBorderValue>& borderStyles);
virtual void updateFromElement();
@@ -388,7 +388,7 @@ public:
virtual void paint( PaintInfo& i, int tx, int ty);
- void paintCollapsedBorder(QPainter* p, int x, int y, int w, int h);
+ void paintCollapsedBorder(TQPainter* p, int x, int y, int w, int h);
void paintBackgroundsBehindCell(PaintInfo& i, int _tx, int _ty, RenderObject* backgroundObject);
virtual void close();
@@ -407,7 +407,7 @@ public:
RenderTableSection *section() const { return static_cast<RenderTableSection *>(parent()->parent()); }
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
bool widthChanged() {
@@ -461,7 +461,7 @@ public:
virtual void updateFromElement();
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString& ind) const;
+ virtual void dump(TQTextStream &stream, const TQString& ind) const;
#endif
int span() const { return m_span; }
diff --git a/khtml/rendering/render_text.cpp b/khtml/rendering/render_text.cpp
index a862c3ad5..0bded06fc 100644
--- a/khtml/rendering/render_text.cpp
+++ b/khtml/rendering/render_text.cpp
@@ -39,9 +39,9 @@
#include "misc/loader.h"
#include "misc/helper.h"
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kglobal.h>
#include <assert.h>
@@ -173,7 +173,7 @@ void InlineTextBox::paint(RenderObject::PaintInfo& i, int tx, int ty)
paintShadow(i.p, font, tx, ty, styleToUse->textShadow());
if (!haveSelection || sPos != 0 || ePos != m_len) {
font->drawText(i.p, m_x + tx, m_y + ty + m_baseline, renderText()->string()->s, renderText()->string()->l, m_start, endPoint,
- m_toAdd, m_reversed ? QPainter::RTL : QPainter::LTR);
+ m_toAdd, m_reversed ? TQPainter::RTL : TQPainter::LTR);
}
}
@@ -206,13 +206,13 @@ inline const RenderStyle *retrieveSelectionPseudoStyle(const RenderObject *obj)
return 0;
}
-void InlineTextBox::paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco)
+void InlineTextBox::paintSelection(const Font *f, RenderText *text, TQPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco)
{
if(startPos > m_len) return;
if(startPos < 0) startPos = 0;
- QColor hc;
- QColor hbg;
+ TQColor hc;
+ TQColor hbg;
const RenderStyle* pseudoStyle = retrieveSelectionPseudoStyle(text);
if (pseudoStyle) {
// ### support outline (mandated by CSS3)
@@ -221,11 +221,11 @@ void InlineTextBox::paintSelection(const Font *f, RenderText *text, QPainter *p,
hbg = pseudoStyle->backgroundColor();
hc = pseudoStyle->color();
} else {
- const QColorGroup &grp = style->palette().active();
+ const TQColorGroup &grp = style->palette().active();
hc = grp.highlightedText();
hbg = grp.highlight();
// ### should be at most retrieved once per render text
- QColor bg = khtml::retrieveBackgroundColor(text);
+ TQColor bg = khtml::retrieveBackgroundColor(text);
// It may happen that the contrast is -- well -- virtually non existent.
// In this case, simply swap the colors, thus in compliance with
// NN4 (win32 only), IE, and Mozilla.
@@ -235,7 +235,7 @@ void InlineTextBox::paintSelection(const Font *f, RenderText *text, QPainter *p,
p->setPen(hc);
- //kdDebug( 6040 ) << "textRun::painting(" << QConstString(text->str->s + m_start, m_len).string().left(30) << ") at(" << m_x+tx << "/" << m_y+ty << ")" << endl;
+ //kdDebug( 6040 ) << "textRun::painting(" << TQConstString(text->str->s + m_start, m_len).string().left(30) << ") at(" << m_x+tx << "/" << m_y+ty << ")" << endl;
const bool needClipping = startPos != 0 || endPos != m_len;
@@ -249,23 +249,23 @@ void InlineTextBox::paintSelection(const Font *f, RenderText *text, QPainter *p,
visualSelectionStart = f->width(text->str->s, text->str->l, m_start, m_len) - visualSelectionEnd;
}
- QRect selectionRect(m_x + tx + visualSelectionStart, m_y + ty, visualSelectionWidth, height());
- QRegion r(selectionRect);
+ TQRect selectionRect(m_x + tx + visualSelectionStart, m_y + ty, visualSelectionWidth, height());
+ TQRegion r(selectionRect);
if (p->hasClipping())
- r &= p->clipRegion(QPainter::CoordPainter);
- p->setClipRegion(r, QPainter::CoordPainter);
+ r &= p->clipRegion(TQPainter::CoordPainter);
+ p->setClipRegion(r, TQPainter::CoordPainter);
}
f->drawText(p, m_x + tx, m_y + ty + m_baseline, text->str->s, text->str->l,
m_start, m_len, m_toAdd,
- m_reversed ? QPainter::RTL : QPainter::LTR,
+ m_reversed ? TQPainter::RTL : TQPainter::LTR,
needClipping ? 0 : startPos, needClipping ? m_len : endPos,
hbg, m_y + ty, height(), deco);
if (needClipping) p->restore();
}
-void InlineTextBox::paintDecoration( QPainter *pt, const Font *f, int _tx, int _ty, int deco)
+void InlineTextBox::paintDecoration( TQPainter *pt, const Font *f, int _tx, int _ty, int deco)
{
_tx += m_x;
_ty += m_y;
@@ -280,7 +280,7 @@ void InlineTextBox::paintDecoration( QPainter *pt, const Font *f, int _tx, int _
RenderObject *p = object();
- QColor underline, overline, linethrough;
+ TQColor underline, overline, linethrough;
p->getTextDecorationColors(deco, underline, overline, linethrough, p->style()->htmlHacks());
if(deco & UNDERLINE){
@@ -299,18 +299,18 @@ void InlineTextBox::paintDecoration( QPainter *pt, const Font *f, int _tx, int _
// support it. Lars
}
-void InlineTextBox::paintShadow(QPainter *pt, const Font *f, int _tx, int _ty, const ShadowData *shadow )
+void InlineTextBox::paintShadow(TQPainter *pt, const Font *f, int _tx, int _ty, const ShadowData *shadow )
{
int x = m_x + _tx + shadow->x;
int y = m_y + _ty + shadow->y;
const RenderText* text = renderText();
if (shadow->blur <= 0) {
- QColor c = pt->pen().color();
+ TQColor c = pt->pen().color();
pt->setPen(shadow->color);
f->drawText(pt, x, y+m_baseline, text->str->s, text->str->l,
m_start, m_len, m_toAdd,
- m_reversed ? QPainter::RTL : QPainter::LTR);
+ m_reversed ? TQPainter::RTL : TQPainter::LTR);
pt->setPen(c);
}
@@ -322,19 +322,19 @@ void InlineTextBox::paintShadow(QPainter *pt, const Font *f, int _tx, int _ty, c
const int gray = qGray(color);
const bool inverse = (gray < 100);
const QRgb bgColor = (inverse) ? qRgb(255,255,255) : qRgb(0,0,0);
- QPixmap pixmap(w, h);
+ TQPixmap pixmap(w, h);
pixmap.fill(bgColor);
- QPainter p;
+ TQPainter p;
p.begin(&pixmap);
p.setPen(shadow->color);
p.setFont(pt->font());
f->drawText(&p, thickness, thickness+m_baseline, text->str->s, text->str->l,
m_start, m_len, m_toAdd,
- m_reversed ? QPainter::RTL : QPainter::LTR);
+ m_reversed ? TQPainter::RTL : TQPainter::LTR);
p.end();
- QImage img = pixmap.convertToImage().convertDepth(32);
+ TQImage img = pixmap.convertToImage().convertDepth(32);
int md = thickness*thickness; // max-dist^2
@@ -381,7 +381,7 @@ void InlineTextBox::paintShadow(QPainter *pt, const Font *f, int _tx, int _ty, c
}
}
- QImage res(w,h,32);
+ TQImage res(w,h,32);
res.setAlphaBuffer(true);
int r = qRed(color);
int g = qGreen(color);
@@ -453,7 +453,7 @@ FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx,
if (justified) {
for( int i = 0; i < m_len; i++ )
- if ( text->str->s[m_start+i].category() == QChar::Separator_Space )
+ if ( text->str->s[m_start+i].category() == TQChar::Separator_Space )
numSpaces++;
}/*end if*/
@@ -465,7 +465,7 @@ FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx,
delta -= m_width;
while(pos < m_len) {
int w = f->width( text->str->s, text->str->l, m_start + pos);
- if (justified && text->str->s[m_start + pos].category() == QChar::Separator_Space)
+ if (justified && text->str->s[m_start + pos].category() == TQChar::Separator_Space)
w += justifyWidth(numSpaces, toAdd);
int w2 = w/2;
w -= w2;
@@ -477,7 +477,7 @@ FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx,
} else {
while(pos < m_len) {
int w = f->width( text->str->s, text->str->l, m_start + pos);
- if (justified && text->str->s[m_start + pos].category() == QChar::Separator_Space)
+ if (justified && text->str->s[m_start + pos].category() == TQChar::Separator_Space)
w += justifyWidth(numSpaces, toAdd);
int w2 = w/2;
w -= w2;
@@ -522,7 +522,7 @@ int InlineTextBox::widthFromStart(int pos) const
const RenderText *t = renderText();
Q_ASSERT(t->isText());
const Font *f = t->htmlFont(m_firstLine);
- const QFontMetrics &fm = t->fontMetrics(m_firstLine);
+ const TQFontMetrics &fm = t->fontMetrics(m_firstLine);
int numSpaces = 0;
// consider spacing for justified text
@@ -531,9 +531,9 @@ int InlineTextBox::widthFromStart(int pos) const
if (justified && m_toAdd > 0) do {
//kdDebug(6000) << "justify" << endl;
-// QConstString cstr = QConstString(t->str->s + m_start, m_len);
+// TQConstString cstr = TQConstString(t->str->s + m_start, m_len);
for( int i = 0; i < m_len; i++ )
- if ( t->str->s[m_start+i].category() == QChar::Separator_Space )
+ if ( t->str->s[m_start+i].category() == TQChar::Separator_Space )
numSpaces++;
if (numSpaces == 0) break;
@@ -543,7 +543,7 @@ int InlineTextBox::widthFromStart(int pos) const
int current = 0; // current position
while (current < pos) {
// add spacing
- while (current < pos && t->str->s[m_start + current].category() == QChar::Separator_Space) {
+ while (current < pos && t->str->s[m_start + current].category() == TQChar::Separator_Space) {
w += f->getWordSpacing();
w += f->getLetterSpacing();
w += justifyWidth(numSpaces, toAdd);
@@ -553,7 +553,7 @@ int InlineTextBox::widthFromStart(int pos) const
if (current >= pos) break;
// seek next space
- while (current < pos && t->str->s[m_start + current].category() != QChar::Separator_Space)
+ while (current < pos && t->str->s[m_start + current].category() != TQChar::Separator_Space)
current++;
// check run without spaces
@@ -661,7 +661,7 @@ int InlineTextBoxArray::findFirstMatching(Item d) const
if ( (*this)[mid] == 0 ) // null item greater
res = -1;
else
- res = ((QGVector*)this)->compareItems( d, (*this)[mid] );
+ res = ((TQGVector*)this)->compareItems( d, (*this)[mid] );
if ( res < 0 )
n2 = mid - 1;
else if ( res > 0 )
@@ -674,7 +674,7 @@ int InlineTextBoxArray::findFirstMatching(Item d) const
/* if ( !found )
return -1; */
// search to first one equal or bigger
- while ( found && (mid > 0) && !((QGVector*)this)->compareItems(d, (*this)[mid-1]) )
+ while ( found && (mid > 0) && !((TQGVector*)this)->compareItems(d, (*this)[mid-1]) )
mid--;
return mid;
}
@@ -697,7 +697,7 @@ RenderText::RenderText(DOM::NodeImpl* node, DOMStringImpl *_str)
m_hasReturn = true;
#ifdef DEBUG_LAYOUT
- QConstString cstr(str->s, str->l);
+ TQConstString cstr(str->s, str->l);
kdDebug( 6040 ) << "RenderText ctr( "<< cstr.string().length() << " ) '" << cstr.string() << "'" << endl;
#endif
}
@@ -931,7 +931,7 @@ void RenderText::caretPos(int offset, int flags, int &_x, int &_y, int &width, i
RenderText *t = s->renderText();
// kdDebug(6040) << "offset="<<offset << " pos="<<pos << endl;
- const QFontMetrics &fm = t->metrics( s->m_firstLine );
+ const TQFontMetrics &fm = t->metrics( s->m_firstLine );
height = fm.height(); // s->m_height;
_x = s->m_x + s->widthFromStart(pos);
@@ -1150,7 +1150,7 @@ int RenderText::inlineYPos() const
return m_lines.isEmpty() ? 0 : m_lines[0]->yPos();
}
-const QFont &RenderText::font()
+const TQFont &RenderText::font()
{
return style()->font();
}
@@ -1188,7 +1188,7 @@ void RenderText::setText(DOMStringImpl *text, bool force)
if (prevStr->length() == 0)
continue;
- QChar c = (*prevStr)[prevStr->length() - 1];
+ TQChar c = (*prevStr)[prevStr->length() - 1];
if (!c.isSpace())
runOnString = true;
@@ -1218,7 +1218,7 @@ void RenderText::setText(DOMStringImpl *text, bool force)
setNeedsLayoutAndMinMaxRecalc();
#ifdef BIDI_DEBUG
- QConstString cstr(str->s, str->l);
+ TQConstString cstr(str->s, str->l);
kdDebug( 6040 ) << "RenderText::setText( " << cstr.string().length() << " ) '" << cstr.string() << "'" << endl;
#endif
}
@@ -1244,7 +1244,7 @@ short RenderText::lineHeight( bool firstLine ) const
short RenderText::baselinePosition( bool firstLine ) const
{
- const QFontMetrics &fm = metrics( firstLine );
+ const TQFontMetrics &fm = metrics( firstLine );
return fm.ascent() +
( lineHeight( firstLine ) - fm.height() ) / 2;
}
@@ -1268,8 +1268,8 @@ void RenderText::position(InlineBox* box, int from, int len, bool reverse)
reverse = reverse && !style()->visuallyOrdered();
#ifdef DEBUG_LAYOUT
- QChar *ch = str->s+from;
- QConstString cstr(ch, len);
+ TQChar *ch = str->s+from;
+ TQConstString cstr(ch, len);
#endif
KHTMLAssert(box->isInlineTextBox());
@@ -1337,7 +1337,7 @@ void RenderText::repaint(Priority p)
bool RenderText::isFixedWidthFont() const
{
- return QFontInfo(style()->font()).fixedPitch();
+ return TQFontInfo(style()->font()).fixedPitch();
}
short RenderText::verticalPositionHint( bool firstLine ) const
@@ -1345,7 +1345,7 @@ short RenderText::verticalPositionHint( bool firstLine ) const
return parent()->verticalPositionHint( firstLine );
}
-const QFontMetrics &RenderText::metrics(bool firstLine) const
+const TQFontMetrics &RenderText::metrics(bool firstLine) const
{
if( firstLine && hasFirstLine() ) {
RenderStyle *pseudoStyle = style()->getPseudoStyle(RenderStyle::FIRST_LINE);
@@ -1372,7 +1372,7 @@ bool RenderText::containsOnlyWhitespace(unsigned int from, unsigned int len) con
{
unsigned int currPos;
for (currPos = from;
- currPos < from+len && (str->s[currPos] == '\n' || str->s[currPos].direction() == QChar::DirWS);
+ currPos < from+len && (str->s[currPos] == '\n' || str->s[currPos].direction() == TQChar::DirWS);
currPos++);
return currPos >= (from+len);
}
@@ -1407,9 +1407,9 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
hasBreakableChar = m_hasBreakableChar;
hasBreak = m_hasBreak;
- if (stripFrontSpaces && (str->s[0].direction() == QChar::DirWS || (!preserveLF && str->s[0] == '\n'))) {
+ if (stripFrontSpaces && (str->s[0].direction() == TQChar::DirWS || (!preserveLF && str->s[0] == '\n'))) {
const Font *f = htmlFont( false );
- QChar space[1]; space[0] = ' ';
+ TQChar space[1]; space[0] = ' ';
int spaceWidth = f->width(space, 1, 0);
maxW -= spaceWidth;
}
@@ -1459,12 +1459,12 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
#ifdef ENABLE_DUMP
-static QString quoteAndEscapeNonPrintables(const QString &s)
+static TQString quoteAndEscapeNonPrintables(const TQString &s)
{
- QString result;
+ TQString result;
result += '"';
for (uint i = 0; i != s.length(); ++i) {
- QChar c = s.at(i);
+ TQChar c = s.at(i);
if (c == '\\') {
result += "\\\\";
} else if (c == '"') {
@@ -1474,7 +1474,7 @@ static QString quoteAndEscapeNonPrintables(const QString &s)
if (u >= 0x20 && u < 0x7F) {
result += c;
} else {
- QString hex;
+ TQString hex;
hex.sprintf("\\x{%X}", u);
result += hex;
}
@@ -1484,13 +1484,13 @@ static QString quoteAndEscapeNonPrintables(const QString &s)
return result;
}
-static void writeTextRun(QTextStream &ts, const RenderText &o, const InlineTextBox &run)
+static void writeTextRun(TQTextStream &ts, const RenderText &o, const InlineTextBox &run)
{
ts << "text run at (" << run.m_x << "," << run.m_y << ") width " << run.m_width << ": "
<< quoteAndEscapeNonPrintables(o.data().string().mid(run.m_start, run.m_len));
}
-void RenderText::dump(QTextStream &stream, const QString &ind) const
+void RenderText::dump(TQTextStream &stream, const TQString &ind) const
{
RenderObject::dump( stream, ind );
diff --git a/khtml/rendering/render_text.h b/khtml/rendering/render_text.h
index c65973c99..2b75043a1 100644
--- a/khtml/rendering/render_text.h
+++ b/khtml/rendering/render_text.h
@@ -30,7 +30,7 @@
#include "rendering/render_object.h"
#include "rendering/render_line.h"
-#include <qptrvector.h>
+#include <tqptrvector.h>
#include <assert.h>
class QPainter;
@@ -80,9 +80,9 @@ public:
virtual bool isInlineTextBox() const { return true; }
void paint(RenderObject::PaintInfo& i, int tx, int ty);
- void paintDecoration(QPainter *pt, const Font *f, int _tx, int _ty, int decoration);
- void paintShadow(QPainter *pt, const Font* f, int _tx, int _ty, const ShadowData *shadow );
- void paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco);
+ void paintDecoration(TQPainter *pt, const Font *f, int _tx, int _ty, int decoration);
+ void paintShadow(TQPainter *pt, const Font* f, int _tx, int _ty, const ShadowData *shadow );
+ void paintSelection(const Font *f, RenderText *text, TQPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco);
void selectionStartEnd(int& sPos, int& ePos);
RenderObject::SelectionState selectionState();
@@ -147,7 +147,7 @@ private:
friend class RenderText;
};
-class InlineTextBoxArray : public QPtrVector<InlineTextBox>
+class InlineTextBoxArray : public TQPtrVector<InlineTextBox>
{
public:
InlineTextBoxArray();
@@ -193,7 +193,7 @@ public:
SelPointState & );
unsigned int length() const { if (str) return str->l; else return 0; }
- QChar *text() const { if (str) return str->s; else return 0; }
+ TQChar *text() const { if (str) return str->s; else return 0; }
unsigned int stringLength() const { return str->l; } // non virtual implementation of length()
virtual void position(InlineBox* box, int from, int len, bool reverse);
@@ -231,7 +231,7 @@ public:
bool hasReturn() const { return m_hasReturn; }
- virtual const QFont &font();
+ virtual const TQFont &font();
virtual short verticalPositionHint( bool firstLine ) const;
bool isFixedWidthFont() const;
@@ -250,7 +250,7 @@ public:
virtual void repaint(Priority p=NormalPriority);
bool hasBreakableChar() const { return m_hasBreakableChar; }
- const QFontMetrics &metrics(bool firstLine) const;
+ const TQFontMetrics &metrics(bool firstLine) const;
const Font *htmlFont(bool firstLine) const;
DOM::TextImpl *element() const
@@ -274,7 +274,7 @@ public:
const InlineTextBoxArray &inlineTextBoxes() const { return m_lines; }
#ifdef ENABLE_DUMP
- virtual void dump(QTextStream &stream, const QString &ind) const;
+ virtual void dump(TQTextStream &stream, const TQString &ind) const;
#endif
/** Find the text box that includes the character at @p offset
diff --git a/khtml/rendering/table_layout.cpp b/khtml/rendering/table_layout.cpp
index bf3daad3a..7b5215d02 100644
--- a/khtml/rendering/table_layout.cpp
+++ b/khtml/rendering/table_layout.cpp
@@ -268,7 +268,7 @@ void FixedTableLayout::layout()
#endif
- QMemArray<int> calcWidth;
+ TQMemArray<int> calcWidth;
calcWidth.resize( nEffCols );
calcWidth.fill( -1 );
diff --git a/khtml/rendering/table_layout.h b/khtml/rendering/table_layout.h
index bc28a91a5..cbaf6d3a7 100644
--- a/khtml/rendering/table_layout.h
+++ b/khtml/rendering/table_layout.h
@@ -23,7 +23,7 @@
#ifndef TABLE_LAYOUT_H
#define TABLE_LAYOUT_H
-#include <qmemarray.h>
+#include <tqmemarray.h>
#include <misc/khtmllayout.h>
namespace khtml {
@@ -60,7 +60,7 @@ public:
protected:
int calcWidthArray();
- QMemArray<Length> width;
+ TQMemArray<Length> width;
};
// -------------------------------------------------------------------------
@@ -100,8 +100,8 @@ protected:
short calcWidth;
};
- QMemArray<Layout> layoutStruct;
- QMemArray<RenderTableCell *>spanCells;
+ TQMemArray<Layout> layoutStruct;
+ TQMemArray<RenderTableCell *>spanCells;
bool hasPercent : 1;
mutable bool percentagesDirty : 1;
mutable bool effWidthDirty : 1;