diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
commit | ffe8a83e053396df448e9413828527613ca3bd46 (patch) | |
tree | a73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /khtml/css | |
parent | 682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff) | |
download | tdelibs-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/css')
-rw-r--r-- | khtml/css/css_base.cpp | 6 | ||||
-rw-r--r-- | khtml/css/css_base.h | 8 | ||||
-rw-r--r-- | khtml/css/css_renderstyledeclarationimpl.cpp | 18 | ||||
-rw-r--r-- | khtml/css/css_ruleimpl.cpp | 2 | ||||
-rw-r--r-- | khtml/css/css_ruleimpl.h | 10 | ||||
-rw-r--r-- | khtml/css/css_stylesheetimpl.cpp | 32 | ||||
-rw-r--r-- | khtml/css/css_stylesheetimpl.h | 8 | ||||
-rw-r--r-- | khtml/css/css_valueimpl.cpp | 106 | ||||
-rw-r--r-- | khtml/css/css_valueimpl.h | 28 | ||||
-rw-r--r-- | khtml/css/csshelper.cpp | 10 | ||||
-rw-r--r-- | khtml/css/csshelper.h | 4 | ||||
-rw-r--r-- | khtml/css/cssparser.cpp | 44 | ||||
-rw-r--r-- | khtml/css/cssparser.h | 16 | ||||
-rw-r--r-- | khtml/css/cssstyleselector.cpp | 238 | ||||
-rw-r--r-- | khtml/css/cssstyleselector.h | 38 | ||||
-rw-r--r-- | khtml/css/parser.cpp | 14 | ||||
-rw-r--r-- | khtml/css/parser.h | 2 |
17 files changed, 292 insertions, 292 deletions
diff --git a/khtml/css/css_base.cpp b/khtml/css/css_base.cpp index 9cca21761..5af37b9b9 100644 --- a/khtml/css/css_base.cpp +++ b/khtml/css/css_base.cpp @@ -76,9 +76,9 @@ KURL StyleBaseImpl::baseURL() } void StyleBaseImpl::setParsedValue(int propId, const CSSValueImpl *parsedValue, - bool important, bool nonCSSHint, QPtrList<CSSProperty> *propList) + bool important, bool nonCSSHint, TQPtrList<CSSProperty> *propList) { - QPtrListIterator<CSSProperty> propIt(*propList); + TQPtrListIterator<CSSProperty> propIt(*propList); propIt.toLast(); // just remove the top one - not sure what should happen if we have multiple instances of the property while (propIt.current() && ( propIt.current()->m_id != propId || propIt.current()->nonCSSHint != nonCSSHint || @@ -122,7 +122,7 @@ StyleListImpl::~StyleListImpl() void CSSSelector::print(void) { - kdDebug( 6080 ) << "[Selector: tag = " << QString::number(tag,16) << ", attr = \"" << attr << "\", match = \"" << match + kdDebug( 6080 ) << "[Selector: tag = " << TQString::number(tag,16) << ", attr = \"" << attr << "\", match = \"" << match << "\" value = \"" << value.string().latin1() << "\" relation = " << (int)relation << "]" << endl; if ( tagHistory ) diff --git a/khtml/css/css_base.h b/khtml/css/css_base.h index f8b520423..9a8774107 100644 --- a/khtml/css/css_base.h +++ b/khtml/css/css_base.h @@ -30,8 +30,8 @@ #include "xml/dom_nodeimpl.h" #include "misc/shared.h" #include <kdemacros.h> -#include <qdatetime.h> -#include <qptrlist.h> +#include <tqdatetime.h> +#include <tqptrlist.h> namespace DOM { @@ -229,7 +229,7 @@ namespace DOM { void setParent(StyleBaseImpl *parent) { m_parent = parent; } static void setParsedValue(int propId, const CSSValueImpl *parsedValue, - bool important, bool nonCSSHint, QPtrList<CSSProperty> *propList); + bool important, bool nonCSSHint, TQPtrList<CSSProperty> *propList); virtual bool parseString(const DOMString &/*cssString*/, bool = false) { return false; } @@ -261,7 +261,7 @@ namespace DOM { void append(StyleBaseImpl *item) { m_lstChildren->append(item); } protected: - QPtrList<StyleBaseImpl> *m_lstChildren; + TQPtrList<StyleBaseImpl> *m_lstChildren; }; KDE_NO_EXPORT int getPropertyID(const char *tagStr, int len); diff --git a/khtml/css/css_renderstyledeclarationimpl.cpp b/khtml/css/css_renderstyledeclarationimpl.cpp index 25de55f4a..daf607a9e 100644 --- a/khtml/css/css_renderstyledeclarationimpl.cpp +++ b/khtml/css/css_renderstyledeclarationimpl.cpp @@ -267,7 +267,7 @@ DOMString khtml::stringForListStyleType(EListStyleType type) return ""; } -static CSSPrimitiveValueImpl* valueForColor(QColor color) +static CSSPrimitiveValueImpl* valueForColor(TQColor color) { if (color.isValid()) return new CSSPrimitiveValueImpl(color.rgb());//### KDE4: use rgba! @@ -412,15 +412,15 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) DOMString string; Length length(style->backgroundXPosition()); if (length.isPercent()) - string = QString::number(length.value()) + "%"; + string = TQString::number(length.value()) + "%"; else - string = QString::number(length.minWidth(renderer->contentWidth())); + string = TQString::number(length.minWidth(renderer->contentWidth())); string += " "; length = style->backgroundYPosition(); if (length.isPercent()) - string += QString::number(length.value()) + "%"; + string += TQString::number(length.value()) + "%"; else - string += QString::number(length.minWidth(renderer->contentWidth())); + string += TQString::number(length.minWidth(renderer->contentWidth())); return new CSSPrimitiveValueImpl(string, CSSPrimitiveValue::CSS_STRING); } case CSS_PROP_BACKGROUND_POSITION_X: @@ -434,9 +434,9 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) return new CSSPrimitiveValueImpl(CSS_VAL_SEPARATE); case CSS_PROP_BORDER_SPACING: { - QString string(QString::number(style->borderHorizontalSpacing()) + + TQString string(TQString::number(style->borderHorizontalSpacing()) + "px " + - QString::number(style->borderVerticalSpacing()) + + TQString::number(style->borderVerticalSpacing()) + "px"); return new CSSPrimitiveValueImpl(string, CSSPrimitiveValue::CSS_STRING); } @@ -651,7 +651,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) // FIXME: this does not reflect the full range of weights // that can be expressed with CSS FontDef def = style->htmlFont().getFontDef(); - if (def.weight == QFont::Bold) + if (def.weight == TQFont::Bold) return new CSSPrimitiveValueImpl(CSS_VAL_BOLD); else return new CSSPrimitiveValueImpl(CSS_VAL_NORMAL); @@ -888,7 +888,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) return valueForTextAlign(style->textAlign()); case CSS_PROP_TEXT_DECORATION: { - QString string; + TQString string; if (style->textDecoration() & khtml::UNDERLINE) string += "underline"; if (style->textDecoration() & khtml::OVERLINE) { diff --git a/khtml/css/css_ruleimpl.cpp b/khtml/css/css_ruleimpl.cpp index ff927e061..0bf675484 100644 --- a/khtml/css/css_ruleimpl.cpp +++ b/khtml/css/css_ruleimpl.cpp @@ -148,7 +148,7 @@ void CSSImportRuleImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DOMS checkLoaded(); } -void CSSImportRuleImpl::error(int /*err*/, const QString &/*text*/) +void CSSImportRuleImpl::error(int /*err*/, const TQString &/*text*/) { if ( m_styleSheet ) { m_styleSheet->setParent(0); diff --git a/khtml/css/css_ruleimpl.h b/khtml/css/css_ruleimpl.h index 0db6e97ba..2753fcf83 100644 --- a/khtml/css/css_ruleimpl.h +++ b/khtml/css/css_ruleimpl.h @@ -113,7 +113,7 @@ public: // from CachedObjectClient virtual void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet, const DOM::DOMString &charset); - virtual void error(int err, const QString &text); + virtual void error(int err, const TQString &text); bool isLoading(); virtual void init(); @@ -146,7 +146,7 @@ public: void append( CSSRuleImpl *rule ) { m_lstCSSRules.append( rule ); } protected: - QPtrList<CSSRuleImpl> m_lstCSSRules; + TQPtrList<CSSRuleImpl> m_lstCSSRules; }; class CSSMediaRuleImpl : public CSSRuleImpl @@ -209,17 +209,17 @@ public: virtual bool parseString( const DOMString &string, bool = false ); - void setSelector( QPtrList<CSSSelector> *selector) { m_selector = selector; } + void setSelector( TQPtrList<CSSSelector> *selector) { m_selector = selector; } void setDeclaration( CSSStyleDeclarationImpl *style); - QPtrList<CSSSelector> *selector() { return m_selector; } + TQPtrList<CSSSelector> *selector() { return m_selector; } CSSStyleDeclarationImpl *declaration() { return m_style; } void setNonCSSHints(); protected: CSSStyleDeclarationImpl *m_style; - QPtrList<CSSSelector> *m_selector; + TQPtrList<CSSSelector> *m_selector; }; diff --git a/khtml/css/css_stylesheetimpl.cpp b/khtml/css/css_stylesheetimpl.cpp index 4743cd2e4..bf85c0d59 100644 --- a/khtml/css/css_stylesheetimpl.cpp +++ b/khtml/css/css_stylesheetimpl.cpp @@ -110,7 +110,7 @@ void StyleSheetImpl::setDisabled( bool disabled ) CSSStyleSheetImpl::CSSStyleSheetImpl(CSSStyleSheetImpl *parentSheet, DOMString href) : StyleSheetImpl(parentSheet, href) { - m_lstChildren = new QPtrList<StyleBaseImpl>; + m_lstChildren = new TQPtrList<StyleBaseImpl>; m_doc = parentSheet ? parentSheet->doc() : 0; m_implicit = false; m_namespaces = 0; @@ -120,7 +120,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSStyleSheetImpl *parentSheet, DOMString h CSSStyleSheetImpl::CSSStyleSheetImpl(DOM::NodeImpl *parentNode, DOMString href, bool _implicit) : StyleSheetImpl(parentNode, href) { - m_lstChildren = new QPtrList<StyleBaseImpl>; + m_lstChildren = new TQPtrList<StyleBaseImpl>; m_doc = parentNode->getDocument(); m_implicit = _implicit; m_namespaces = 0; @@ -130,7 +130,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(DOM::NodeImpl *parentNode, DOMString href, CSSStyleSheetImpl::CSSStyleSheetImpl(CSSRuleImpl *ownerRule, DOMString href) : StyleSheetImpl(ownerRule, href) { - m_lstChildren = new QPtrList<StyleBaseImpl>; + m_lstChildren = new TQPtrList<StyleBaseImpl>; m_doc = static_cast<CSSStyleSheetImpl*>(ownerRule->stylesheet())->doc(); m_implicit = false; m_namespaces = 0; @@ -140,7 +140,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSRuleImpl *ownerRule, DOMString href) CSSStyleSheetImpl::CSSStyleSheetImpl(DOM::NodeImpl *parentNode, CSSStyleSheetImpl *orig) : StyleSheetImpl(parentNode, orig->m_strHref) { - m_lstChildren = new QPtrList<StyleBaseImpl>; + m_lstChildren = new TQPtrList<StyleBaseImpl>; StyleBaseImpl *rule; for ( rule = orig->m_lstChildren->first(); rule != 0; rule = orig->m_lstChildren->next() ) { @@ -157,7 +157,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSRuleImpl *ownerRule, CSSStyleSheetImpl * : StyleSheetImpl(ownerRule, orig->m_strHref) { // m_lstChildren is deleted in StyleListImpl - m_lstChildren = new QPtrList<StyleBaseImpl>; + m_lstChildren = new TQPtrList<StyleBaseImpl>; StyleBaseImpl *rule; for ( rule = orig->m_lstChildren->first(); rule != 0; rule = orig->m_lstChildren->next() ) { @@ -318,7 +318,7 @@ void CSSStyleSheetImpl::setNonCSSHints() StyleSheetListImpl::~StyleSheetListImpl() { - for ( QPtrListIterator<StyleSheetImpl> it ( styleSheets ); it.current(); ++it ) + for ( TQPtrListIterator<StyleSheetImpl> it ( styleSheets ); it.current(); ++it ) it.current()->deref(); } @@ -340,7 +340,7 @@ unsigned long StyleSheetListImpl::length() const { // hack so implicit BODY stylesheets don't get counted here unsigned long l = 0; - QPtrListIterator<StyleSheetImpl> it(styleSheets); + TQPtrListIterator<StyleSheetImpl> it(styleSheets); for (; it.current(); ++it) { if (!it.current()->isCSSStyleSheet() || !static_cast<CSSStyleSheetImpl*>(it.current())->implicit()) ++l; @@ -351,7 +351,7 @@ unsigned long StyleSheetListImpl::length() const StyleSheetImpl *StyleSheetListImpl::item ( unsigned long index ) { unsigned long l = 0; - QPtrListIterator<StyleSheetImpl> it(styleSheets); + TQPtrListIterator<StyleSheetImpl> it(styleSheets); for (; it.current(); ++it) { if (!it.current()->isCSSStyleSheet() || !static_cast<CSSStyleSheetImpl*>(it.current())->implicit()) { if (l == index) @@ -397,9 +397,9 @@ CSSRuleImpl *MediaListImpl::parentRule() const void MediaListImpl::deleteMedium( const DOMString &oldMedium ) { - const QValueList<DOMString>::Iterator itEnd = m_lstMedia.end(); + const TQValueList<DOMString>::Iterator itEnd = m_lstMedia.end(); - for ( QValueList<DOMString>::Iterator it = m_lstMedia.begin(); it != itEnd; ++it ) { + for ( TQValueList<DOMString>::Iterator it = m_lstMedia.begin(); it != itEnd; ++it ) { if( (*it) == oldMedium ) { m_lstMedia.remove( it ); return; @@ -410,9 +410,9 @@ void MediaListImpl::deleteMedium( const DOMString &oldMedium ) DOM::DOMString MediaListImpl::mediaText() const { DOMString text; - const QValueList<DOMString>::ConstIterator itEnd = m_lstMedia.end(); + const TQValueList<DOMString>::ConstIterator itEnd = m_lstMedia.end(); - for ( QValueList<DOMString>::ConstIterator it = m_lstMedia.begin(); it != itEnd; ++it ) { + for ( TQValueList<DOMString>::ConstIterator it = m_lstMedia.begin(); it != itEnd; ++it ) { text += *it; text += ", "; } @@ -422,12 +422,12 @@ DOM::DOMString MediaListImpl::mediaText() const void MediaListImpl::setMediaText(const DOM::DOMString &value) { m_lstMedia.clear(); - const QString val = value.string(); - const QStringList list = QStringList::split( ',', val ); + const TQString val = value.string(); + const TQStringList list = TQStringList::split( ',', val ); - const QStringList::ConstIterator itEnd = list.end(); + const TQStringList::ConstIterator itEnd = list.end(); - for ( QStringList::ConstIterator it = list.begin(); it != itEnd; ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != itEnd; ++it ) { const DOMString medium = (*it).stripWhiteSpace(); if( !medium.isEmpty() ) diff --git a/khtml/css/css_stylesheetimpl.h b/khtml/css/css_stylesheetimpl.h index 0b35c2104..e7a551947 100644 --- a/khtml/css/css_stylesheetimpl.h +++ b/khtml/css/css_stylesheetimpl.h @@ -23,8 +23,8 @@ #ifndef _CSS_css_stylesheetimpl_h_ #define _CSS_css_stylesheetimpl_h_ -#include <qvaluelist.h> -#include <qptrlist.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> #include "dom/dom_string.h" #include "css/css_base.h" @@ -143,7 +143,7 @@ public: void add(StyleSheetImpl* s); void remove(StyleSheetImpl* s); - QPtrList<StyleSheetImpl> styleSheets; + TQPtrList<StyleSheetImpl> styleSheets; }; // ---------------------------------------------------------------------------- @@ -182,7 +182,7 @@ public: bool contains( const DOM::DOMString &medium ) const; protected: - QValueList<DOM::DOMString> m_lstMedia; + TQValueList<DOM::DOMString> m_lstMedia; }; diff --git a/khtml/css/css_valueimpl.cpp b/khtml/css/css_valueimpl.cpp index 531cb88bf..73a53d5d2 100644 --- a/khtml/css/css_valueimpl.cpp +++ b/khtml/css/css_valueimpl.cpp @@ -41,9 +41,9 @@ #include "rendering/render_style.h" #include <kdebug.h> -#include <qregexp.h> -#include <qpaintdevice.h> -#include <qpaintdevicemetrics.h> +#include <tqregexp.h> +#include <tqpaintdevice.h> +#include <tqpaintdevicemetrics.h> // Hack for debugging purposes extern DOM::DOMString getPropertyName(unsigned short id); @@ -56,7 +56,7 @@ using namespace DOM; static DOMString quoteStringIfNeeded(const DOMString &string) { // FIXME: Also need to transform control characters into \ sequences. - QString s = string.string(); + TQString s = string.string(); s.replace('\\', "\\\\"); s.replace('\'', "\\'"); return '\'' + s + '\''; @@ -70,7 +70,7 @@ CSSStyleDeclarationImpl::CSSStyleDeclarationImpl(CSSRuleImpl *parent) m_node = 0; } -CSSStyleDeclarationImpl::CSSStyleDeclarationImpl(CSSRuleImpl *parent, QPtrList<CSSProperty> *lstValues) +CSSStyleDeclarationImpl::CSSStyleDeclarationImpl(CSSRuleImpl *parent, TQPtrList<CSSProperty> *lstValues) : StyleBaseImpl(parent) { m_lstValues = lstValues; @@ -83,10 +83,10 @@ CSSStyleDeclarationImpl& CSSStyleDeclarationImpl::operator= (const CSSStyleDecl delete m_lstValues; m_lstValues = 0; if (o.m_lstValues) { - m_lstValues = new QPtrList<CSSProperty>; + m_lstValues = new TQPtrList<CSSProperty>; m_lstValues->setAutoDelete( true ); - QPtrListIterator<CSSProperty> lstValuesIt(*o.m_lstValues); + TQPtrListIterator<CSSProperty> lstValuesIt(*o.m_lstValues); for (lstValuesIt.toFirst(); lstValuesIt.current(); ++lstValuesIt) m_lstValues->append(new CSSProperty(*lstValuesIt.current())); } @@ -233,7 +233,7 @@ DOMString CSSStyleDeclarationImpl::getShortHandValue( const int* properties, int { if(!m_lstValues) return 0; - QPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues); + TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues); CSSProperty *current; for ( lstValuesIt.toLast(); (current = lstValuesIt.current()); --lstValuesIt ) if (current->m_id == propertyID && !current->nonCSSHint) @@ -246,7 +246,7 @@ DOMString CSSStyleDeclarationImpl::removeProperty( int propertyID, bool NonCSSHi if(!m_lstValues) return DOMString(); DOMString value; - QPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues); + TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues); CSSProperty *current; for ( lstValuesIt.toLast(); (current = lstValuesIt.current()); --lstValuesIt ) { if (current->m_id == propertyID && NonCSSHint == current->nonCSSHint) { @@ -289,7 +289,7 @@ void CSSStyleDeclarationImpl::removeCSSHints() bool CSSStyleDeclarationImpl::getPropertyPriority( int propertyID ) const { if ( m_lstValues) { - QPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues); + TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues); CSSProperty *current; for ( lstValuesIt.toFirst(); (current = lstValuesIt.current()); ++lstValuesIt ) { if( propertyID == current->m_id ) @@ -302,7 +302,7 @@ bool CSSStyleDeclarationImpl::getPropertyPriority( int propertyID ) const bool CSSStyleDeclarationImpl::setProperty(int id, const DOMString &value, bool important, bool nonCSSHint) { if(!m_lstValues) { - m_lstValues = new QPtrList<CSSProperty>; + m_lstValues = new TQPtrList<CSSProperty>; m_lstValues->setAutoDelete(true); } @@ -319,7 +319,7 @@ bool CSSStyleDeclarationImpl::setProperty(int id, const DOMString &value, bool i void CSSStyleDeclarationImpl::setProperty(int id, int value, bool important, bool nonCSSHint) { if(!m_lstValues) { - m_lstValues = new QPtrList<CSSProperty>; + m_lstValues = new TQPtrList<CSSProperty>; m_lstValues->setAutoDelete(true); } removeProperty(id, nonCSSHint ); @@ -342,7 +342,7 @@ void CSSStyleDeclarationImpl::setLengthProperty(int id, const DOM::DOMString &va void CSSStyleDeclarationImpl::setProperty ( const DOMString &propertyString) { if(!m_lstValues) { - m_lstValues = new QPtrList<CSSProperty>; + m_lstValues = new TQPtrList<CSSProperty>; m_lstValues->setAutoDelete( true ); } @@ -374,7 +374,7 @@ DOM::DOMString CSSStyleDeclarationImpl::cssText() const DOMString result; if ( m_lstValues) { - QPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues); + TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues); CSSProperty *current; for ( lstValuesIt.toFirst(); (current = lstValuesIt.current()); ++lstValuesIt ) { result += current->cssText(); @@ -389,7 +389,7 @@ void CSSStyleDeclarationImpl::setCssText(DOM::DOMString text) if (m_lstValues) { m_lstValues->clear(); } else { - m_lstValues = new QPtrList<CSSProperty>; + m_lstValues = new TQPtrList<CSSProperty>; m_lstValues->setAutoDelete( true ); } @@ -454,7 +454,7 @@ DOM::DOMString CSSValueListImpl::cssText() const { DOMString result = ""; - for (QPtrListIterator<CSSValueImpl> iterator(m_values); iterator.current(); ++iterator) { + for (TQPtrListIterator<CSSValueImpl> iterator(m_values); iterator.current(); ++iterator) { result += iterator.current()->cssText(); } @@ -549,7 +549,7 @@ void CSSPrimitiveValueImpl::cleanup() m_type = 0; } -int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics ) +int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, TQPaintDeviceMetrics *devMetrics ) { double result = computeLengthFloat( style, devMetrics ); // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We @@ -558,7 +558,7 @@ int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDevic return intResult; } -double CSSPrimitiveValueImpl::computeLengthFloat( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics ) +double CSSPrimitiveValueImpl::computeLengthFloat( khtml::RenderStyle *style, TQPaintDeviceMetrics *devMetrics ) { unsigned short type = primitiveType(); @@ -576,11 +576,11 @@ double CSSPrimitiveValueImpl::computeLengthFloat( khtml::RenderStyle *style, QPa break; case CSSPrimitiveValue::CSS_EXS: { - QFontMetrics fm = style->fontMetrics(); + TQFontMetrics fm = style->fontMetrics(); #ifdef APPLE_CHANGES factor = fm.xHeight(); #else - QRect b = fm.boundingRect('x'); + TQRect b = fm.boundingRect('x'); factor = b.height(); #endif break; @@ -671,55 +671,55 @@ DOM::DOMString CSSPrimitiveValueImpl::cssText() const // ### break; case CSSPrimitiveValue::CSS_NUMBER: - text = DOMString(QString::number( (int)m_value.num )); + text = DOMString(TQString::number( (int)m_value.num )); break; case CSSPrimitiveValue::CSS_PERCENTAGE: - text = DOMString(QString::number( m_value.num ) + "%"); + text = DOMString(TQString::number( m_value.num ) + "%"); break; case CSSPrimitiveValue::CSS_EMS: - text = DOMString(QString::number( m_value.num ) + "em"); + text = DOMString(TQString::number( m_value.num ) + "em"); break; case CSSPrimitiveValue::CSS_EXS: - text = DOMString(QString::number( m_value.num ) + "ex"); + text = DOMString(TQString::number( m_value.num ) + "ex"); break; case CSSPrimitiveValue::CSS_PX: - text = DOMString(QString::number( m_value.num ) + "px"); + text = DOMString(TQString::number( m_value.num ) + "px"); break; case CSSPrimitiveValue::CSS_CM: - text = DOMString(QString::number( m_value.num ) + "cm"); + text = DOMString(TQString::number( m_value.num ) + "cm"); break; case CSSPrimitiveValue::CSS_MM: - text = DOMString(QString::number( m_value.num ) + "mm"); + text = DOMString(TQString::number( m_value.num ) + "mm"); break; case CSSPrimitiveValue::CSS_IN: - text = DOMString(QString::number( m_value.num ) + "in"); + text = DOMString(TQString::number( m_value.num ) + "in"); break; case CSSPrimitiveValue::CSS_PT: - text = DOMString(QString::number( m_value.num ) + "pt"); + text = DOMString(TQString::number( m_value.num ) + "pt"); break; case CSSPrimitiveValue::CSS_PC: - text = DOMString(QString::number( m_value.num ) + "pc"); + text = DOMString(TQString::number( m_value.num ) + "pc"); break; case CSSPrimitiveValue::CSS_DEG: - text = DOMString(QString::number( m_value.num ) + "deg"); + text = DOMString(TQString::number( m_value.num ) + "deg"); break; case CSSPrimitiveValue::CSS_RAD: - text = DOMString(QString::number( m_value.num ) + "rad"); + text = DOMString(TQString::number( m_value.num ) + "rad"); break; case CSSPrimitiveValue::CSS_GRAD: - text = DOMString(QString::number( m_value.num ) + "grad"); + text = DOMString(TQString::number( m_value.num ) + "grad"); break; case CSSPrimitiveValue::CSS_MS: - text = DOMString(QString::number( m_value.num ) + "ms"); + text = DOMString(TQString::number( m_value.num ) + "ms"); break; case CSSPrimitiveValue::CSS_S: - text = DOMString(QString::number( m_value.num ) + "s"); + text = DOMString(TQString::number( m_value.num ) + "s"); break; case CSSPrimitiveValue::CSS_HZ: - text = DOMString(QString::number( m_value.num ) + "hz"); + text = DOMString(TQString::number( m_value.num ) + "hz"); break; case CSSPrimitiveValue::CSS_KHZ: - text = DOMString(QString::number( m_value.num ) + "khz"); + text = DOMString(TQString::number( m_value.num ) + "khz"); break; case CSSPrimitiveValue::CSS_DIMENSION: // ### @@ -759,12 +759,12 @@ DOM::DOMString CSSPrimitiveValueImpl::cssText() const if (m_value.rgbcolor == khtml::transparentColor) text = "transparent"; else - text = "rgba(" + QString::number(qRed (m_value.rgbcolor)) + "," - + QString::number(qBlue (m_value.rgbcolor)) + "," - + QString::number(qGreen(m_value.rgbcolor)) + "," - + QString::number(qAlpha(m_value.rgbcolor)/255.0) + ")"; + text = "rgba(" + TQString::number(qRed (m_value.rgbcolor)) + "," + + TQString::number(qBlue (m_value.rgbcolor)) + "," + + TQString::number(qGreen(m_value.rgbcolor)) + "," + + TQString::number(qAlpha(m_value.rgbcolor)/255.0) + ")"; } else { - text = QColor(m_value.rgbcolor).name(); + text = TQColor(m_value.rgbcolor).name(); } break; case CSSPrimitiveValue::CSS_PAIR: @@ -876,20 +876,20 @@ CSSImageValueImpl::~CSSImageValueImpl() // ------------------------------------------------------------------------ -FontFamilyValueImpl::FontFamilyValueImpl( const QString &string) +FontFamilyValueImpl::FontFamilyValueImpl( const TQString &string) : CSSPrimitiveValueImpl( DOMString(string), CSSPrimitiveValue::CSS_STRING) { - static const QRegExp parenReg(" \\(.*\\)$"); - static const QRegExp braceReg(" \\[.*\\]$"); + static const TQRegExp parenReg(" \\(.*\\)$"); + static const TQRegExp braceReg(" \\[.*\\]$"); parsedFontName = string; // a language tag is often added in braces at the end. Remove it. - parsedFontName.replace(parenReg, QString::null); + parsedFontName.replace(parenReg, TQString::null); // remove [Xft] qualifiers - parsedFontName.replace(braceReg, QString::null); + parsedFontName.replace(braceReg, TQString::null); #ifndef APPLE_CHANGES - const QString &available = KHTMLSettings::availableFamilies(); + const TQString &available = KHTMLSettings::availableFamilies(); parsedFontName = parsedFontName.lower(); // kdDebug(0) << "searching for face '" << parsedFontName << "'" << endl; @@ -913,7 +913,7 @@ FontFamilyValueImpl::FontFamilyValueImpl( const QString &string) parsedFontName = available.mid( pos, p - pos); // kdDebug(0) << "going for '" << parsedFontName << "'" << endl; } else - parsedFontName = QString::null; + parsedFontName = TQString::null; #endif // !APPLE_CHANGES } @@ -987,14 +987,14 @@ DOMString QuotesValueImpl::cssText() const return "\"" + data.join("\" \"") + "\""; } -void QuotesValueImpl::addLevel(const QString& open, const QString& close) +void QuotesValueImpl::addLevel(const TQString& open, const TQString& close) { data.append(open); data.append(close); levels++; } -QString QuotesValueImpl::openQuote(int level) const +TQString QuotesValueImpl::openQuote(int level) const { if (levels == 0) return ""; level--; // increments are calculated before openQuote is called @@ -1005,7 +1005,7 @@ QString QuotesValueImpl::openQuote(int level) const return data[level*2]; } -QString QuotesValueImpl::closeQuote(int level) const +TQString QuotesValueImpl::closeQuote(int level) const { if (levels == 0) return ""; // kdDebug( 6080 ) << "Close quote level:" << level << endl; @@ -1060,7 +1060,7 @@ DOMString ShadowValueImpl::cssText() const DOMString CounterActImpl::cssText() const { DOMString text(m_counter); - text += DOMString(QString::number(m_value)); + text += DOMString(TQString::number(m_value)); return text; } diff --git a/khtml/css/css_valueimpl.h b/khtml/css/css_valueimpl.h index 5b4207149..3566c00cb 100644 --- a/khtml/css/css_valueimpl.h +++ b/khtml/css/css_valueimpl.h @@ -30,7 +30,7 @@ #include "misc/loader_client.h" #include "misc/shared.h" -#include <qintdict.h> +#include <tqintdict.h> namespace khtml { class RenderStyle; @@ -51,7 +51,7 @@ class CSSStyleDeclarationImpl : public StyleBaseImpl { public: CSSStyleDeclarationImpl(CSSRuleImpl *parentRule); - CSSStyleDeclarationImpl(CSSRuleImpl *parentRule, QPtrList<CSSProperty> *lstValues); + CSSStyleDeclarationImpl(CSSRuleImpl *parentRule, TQPtrList<CSSProperty> *lstValues); virtual ~CSSStyleDeclarationImpl(); CSSStyleDeclarationImpl& operator=( const CSSStyleDeclarationImpl&); @@ -79,7 +79,7 @@ public: virtual DOMString getPropertyValue( int propertyID ) const; virtual bool getPropertyPriority( int propertyID ) const; - QPtrList<CSSProperty> *values() const { return m_lstValues; } + TQPtrList<CSSProperty> *values() const { return m_lstValues; } void setNode(NodeImpl *_node) { m_node = _node; } void setChanged(); @@ -90,7 +90,7 @@ protected: DOMString getShortHandValue( const int* properties, int number ) const; DOMString get4Values( const int* properties ) const; - QPtrList<CSSProperty> *m_lstValues; + TQPtrList<CSSProperty> *m_lstValues; NodeImpl *m_node; private: @@ -146,7 +146,7 @@ public: virtual DOM::DOMString cssText() const; protected: - QPtrList<CSSValueImpl> m_values; + TQPtrList<CSSValueImpl> m_values; }; @@ -182,9 +182,9 @@ public: * this is screen/printer dependent, so we probably need a config option for this, * and some tool to calibrate. */ - int computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics ); + int computeLength( khtml::RenderStyle *style, TQPaintDeviceMetrics *devMetrics ); - double computeLengthFloat( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics ); + double computeLengthFloat( khtml::RenderStyle *style, TQPaintDeviceMetrics *devMetrics ); // use with care!!! void setPrimitiveType(unsigned short type) { m_type = type; } @@ -323,11 +323,11 @@ protected: class FontFamilyValueImpl : public CSSPrimitiveValueImpl { public: - FontFamilyValueImpl( const QString &string); - const QString &fontName() const { return parsedFontName; } + FontFamilyValueImpl( const TQString &string); + const TQString &fontName() const { return parsedFontName; } int genericFamilyType() const { return _genericFamilyType; } protected: - QString parsedFontName; + TQString parsedFontName; private: int _genericFamilyType; }; @@ -362,12 +362,12 @@ public: virtual unsigned short cssValueType() const { return CSSValue::CSS_CUSTOM; } virtual DOM::DOMString cssText() const; - void addLevel(const QString& open, const QString& close); - QString openQuote(int level) const; - QString closeQuote(int level) const; + void addLevel(const TQString& open, const TQString& close); + TQString openQuote(int level) const; + TQString closeQuote(int level) const; unsigned int levels; - QStringList data; + TQStringList data; }; // Used for text-shadow and box-shadow diff --git a/khtml/css/csshelper.cpp b/khtml/css/csshelper.cpp index 7b7a464f4..73eff588c 100644 --- a/khtml/css/csshelper.cpp +++ b/khtml/css/csshelper.cpp @@ -21,11 +21,11 @@ */ #include "csshelper.h" -#include <qfontmetrics.h> -#include <qfontinfo.h> -#include <qpaintdevice.h> -#include <qpaintdevicemetrics.h> -#include <qfontdatabase.h> +#include <tqfontmetrics.h> +#include <tqfontinfo.h> +#include <tqpaintdevice.h> +#include <tqpaintdevicemetrics.h> +#include <tqfontdatabase.h> #include <kcharsets.h> #include <kglobal.h> diff --git a/khtml/css/csshelper.h b/khtml/css/csshelper.h index 68793421b..5a9142091 100644 --- a/khtml/css/csshelper.h +++ b/khtml/css/csshelper.h @@ -22,8 +22,8 @@ #ifndef css_helper_h #define css_helper_h -#include <qcolor.h> -#include <qfont.h> +#include <tqcolor.h> +#include <tqfont.h> #include "dom/dom_string.h" diff --git a/khtml/css/cssparser.cpp b/khtml/css/cssparser.cpp index 6ec9a4ec7..1bff45c51 100644 --- a/khtml/css/cssparser.cpp +++ b/khtml/css/cssparser.cpp @@ -191,7 +191,7 @@ CSSRuleImpl *CSSParser::parseRule( DOM::CSSStyleSheetImpl *sheet, const DOM::DOM for ( unsigned int i = 0; i < strlen(khtml_rule); i++ ) data[i] = khtml_rule[i]; memcpy( data + strlen( khtml_rule ), string.unicode(), string.length()*sizeof( unsigned short) ); - // qDebug("parse string = '%s'", QConstString( (const QChar *)data, length ).string().latin1() ); + // qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); data[length-4] = '}'; runParser(length); @@ -220,7 +220,7 @@ bool CSSParser::parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id, data[i] = khtml_value[i]; memcpy( data + strlen( khtml_value ), string.unicode(), string.length()*sizeof( unsigned short) ); data[length-4] = '}'; - // qDebug("parse string = '%s'", QConstString( (const QChar *)data, length ).string().latin1() ); + // qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); id = _id; important = _important; @@ -301,7 +301,7 @@ void CSSParser::addProperty( int propId, CSSValueImpl *value, bool important ) CSSStyleDeclarationImpl *CSSParser::createStyleDeclaration( CSSStyleRuleImpl *rule ) { - QPtrList<CSSProperty> *propList = new QPtrList<CSSProperty>; + TQPtrList<CSSProperty> *propList = new TQPtrList<CSSProperty>; propList->setAutoDelete( true ); for ( int i = 0; i < numParsedProperties; i++ ) propList->append( parsedProperties[i] ); @@ -477,7 +477,7 @@ bool CSSParser::parseValue( int propId, bool important ) } else { QuotesValueImpl *quotes = new QuotesValueImpl; bool is_valid = true; - QString open, close; + TQString open, close; Value *val=valueList->current(); while (val) { if (val->unit == CSSPrimitiveValue::CSS_STRING) @@ -1338,7 +1338,7 @@ bool CSSParser::parseContent( int propId, bool important ) } else if ( val->unit == Value::Function ) { // attr( X ) | counter( X [,Y] ) | counters( X, Y, [,Z] ) ValueList *args = val->function->args; - QString fname = qString( val->function->name ).lower(); + TQString fname = qString( val->function->name ).lower(); if (!args) return false; if (fname == "attr(") { if ( args->size() != 1) @@ -1693,7 +1693,7 @@ bool CSSParser::parseShape( int propId, bool important ) { Value *value = valueList->current(); ValueList *args = value->function->args; - QString fname = qString( value->function->name ).lower(); + TQString fname = qString( value->function->name ).lower(); //qDebug( "parseShape: fname: %d", fname.latin1() ); if ( fname != "rect(" || !args ) return false; @@ -1750,7 +1750,7 @@ bool CSSParser::parseFont( bool important ) // optional font-style, font-variant and font-weight while ( value ) { // kdDebug( 6080 ) << "got value " << value->id << " / " << (value->unit == CSSPrimitiveValue::CSS_STRING || - // value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : QString::null ) + // value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : TQString::null ) // << endl; int id = value->id; if ( id ) { @@ -1890,12 +1890,12 @@ CSSValueListImpl *CSSParser::parseFontFamily() // kdDebug( 6080 ) << "CSSParser::parseFontFamily current=" << valueList->currentValue << endl; CSSValueListImpl *list = new CSSValueListImpl; Value *value = valueList->current(); - QString currFace; + TQString currFace; while ( value ) { // kdDebug( 6080 ) << "got value " << value->id << " / " // << (value->unit == CSSPrimitiveValue::CSS_STRING || -// value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : QString::null ) +// value->unit == CSSPrimitiveValue::CSS_IDENT ? qString( value->string ) : TQString::null ) // << endl; Value* nextValue = valueList->next(); bool nextValBreaksFont = !nextValue || @@ -1913,7 +1913,7 @@ CSSValueListImpl *CSSParser::parseFontFamily() else if (nextValBreaksFont || !nextValIsFontName) { if ( !currFace.isNull() ) { list->append( new FontFamilyValueImpl( currFace ) ); - currFace = QString::null; + currFace = TQString::null; } list->append(new CSSPrimitiveValueImpl(value->id)); } @@ -1923,7 +1923,7 @@ CSSValueListImpl *CSSParser::parseFontFamily() } else if (value->unit == CSSPrimitiveValue::CSS_STRING) { // Strings never share in a family name. - currFace = QString::null; + currFace = TQString::null; list->append(new FontFamilyValueImpl(qString( value->string) ) ); } else if (value->unit == CSSPrimitiveValue::CSS_IDENT) { @@ -1934,7 +1934,7 @@ CSSValueListImpl *CSSParser::parseFontFamily() else if (nextValBreaksFont || !nextValIsFontName) { if ( !currFace.isNull() ) { list->append( new FontFamilyValueImpl( currFace ) ); - currFace = QString::null; + currFace = TQString::null; } list->append(new FontFamilyValueImpl( qString( value->string ) ) ); } @@ -1954,7 +1954,7 @@ CSSValueListImpl *CSSParser::parseFontFamily() value = valueList->next(); if ( !currFace.isNull() ) list->append( new FontFamilyValueImpl( currFace ) ); - currFace = QString::null; + currFace = TQString::null; } else if (nextValIsFontName) value = nextValue; @@ -2037,7 +2037,7 @@ bool CSSParser::parseHSLParameters(Value* value, double* colorArray, bool parseA return true; } -static bool parseColor(int unit, const QString &name, QRgb& rgb) +static bool parseColor(int unit, const TQString &name, QRgb& rgb) { int len = name.length(); @@ -2067,7 +2067,7 @@ static bool parseColor(int unit, const QString &name, QRgb& rgb) if ( unit == CSSPrimitiveValue::CSS_IDENT ) { // try a little harder - QColor tc; + TQColor tc; tc.setNamedColor(name.lower()); if ( tc.isValid() ) { rgb = tc.rgb(); @@ -2088,7 +2088,7 @@ CSSPrimitiveValueImpl *CSSParser::parseColorFromValue(Value* value) QRgb c = khtml::transparentColor; if ( !strict && value->unit == CSSPrimitiveValue::CSS_NUMBER && value->fValue >= 0. && value->fValue < 1000000. ) { - QString str; + TQString str; str.sprintf( "%06d", (int)(value->fValue+.5) ); if ( !::parseColor( value->unit, str, c ) ) return 0; @@ -2357,7 +2357,7 @@ int DOM::CSSParser::lex( void *_yylval ) unsigned short *t = text( &length ); #ifdef TOKEN_DEBUG - qDebug("CSSTokenizer: got token %d: '%s'", token, token == END ? "" : QString( (QChar *)t, length ).latin1() ); + qDebug("CSSTokenizer: got token %d: '%s'", token, token == END ? "" : TQString( (TQChar *)t, length ).latin1() ); #endif switch( token ) { case '{': @@ -2426,8 +2426,8 @@ int DOM::CSSParser::lex( void *_yylval ) length--; case FLOAT: case INTEGER: - yylval->val = QString( (QChar *)t, length ).toDouble(); - //qDebug("value = %s, converted=%.2f", QString( (QChar *)t, length ).latin1(), yylval->val ); + yylval->val = TQString( (TQChar *)t, length ).toDouble(); + //qDebug("value = %s, converted=%.2f", TQString( (TQChar *)t, length ).latin1(), yylval->val ); break; default: @@ -2531,7 +2531,7 @@ unsigned short *DOM::CSSParser::text(int *length) uc += toHex( *escape ); escape++; } -// qDebug(" converting escape: string='%s', value=0x%x", QString( (QChar *)e, current-e ).latin1(), uc ); +// qDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc ); // can't handle chars outside ucs2 if ( uc > 0xffff ) uc = 0xfffd; @@ -2560,7 +2560,7 @@ unsigned short *DOM::CSSParser::text(int *length) uc += toHex( *escape ); escape++; } - // qDebug(" converting escape: string='%s', value=0x%x", QString( (QChar *)e, current-e ).latin1(), uc ); + // qDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc ); // can't handle chars outside ucs2 if ( uc > 0xffff ) uc = 0xfffd; @@ -2585,7 +2585,7 @@ typedef unsigned int YY_CHAR; *yy_cp = 0; \ yy_c_buf_p = yy_cp; #define YY_BREAK break; -#define ECHO qDebug( "%s", QString( (QChar *)yytext, yyleng ).latin1() ) +#define ECHO qDebug( "%s", TQString( (TQChar *)yytext, yyleng ).latin1() ) #define YY_RULE_SETUP #define INITIAL 0 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) diff --git a/khtml/css/cssparser.h b/khtml/css/cssparser.h index 1c055acd0..0e00ebc16 100644 --- a/khtml/css/cssparser.h +++ b/khtml/css/cssparser.h @@ -22,9 +22,9 @@ #ifndef _CSS_cssparser_h_ #define _CSS_cssparser_h_ -#include <qstring.h> -#include <qcolor.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqcolor.h> +#include <tqvaluevector.h> #include <dom/dom_string.h> namespace DOM { @@ -72,11 +72,11 @@ namespace DOM { int unit; }; - static inline QString qString( const ParseString &ps ) { - return QString( (QChar *)ps.string, ps.length ); + static inline TQString qString( const ParseString &ps ) { + return TQString( (TQChar *)ps.string, ps.length ); } static inline DOMString domString( const ParseString &ps ) { - return DOMString( (QChar *)ps.string, ps.length ); + return DOMString( (TQChar *)ps.string, ps.length ); } class ValueList { @@ -88,7 +88,7 @@ namespace DOM { Value* current() { return m_current < m_values.size() ? &m_values[m_current] : 0; } Value* next() { ++m_current; return current(); } private: - QValueVector<Value> m_values; + TQValueVector<Value> m_values; unsigned int m_current; }; @@ -148,7 +148,7 @@ namespace DOM { CSSPrimitiveValueImpl *parseColorFromValue(Value* val); CSSValueImpl* parseCounterContent(ValueList *args, bool counters); - static bool parseColor(const QString &name, QRgb& rgb); + static bool parseColor(const TQString &name, QRgb& rgb); // CSS3 Parsing Routines (for properties specific to CSS3) bool parseShadow(int propId, bool important); diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp index 235a2cf20..8f6cc09a6 100644 --- a/khtml/css/cssstyleselector.cpp +++ b/khtml/css/cssstyleselector.cpp @@ -59,14 +59,14 @@ using namespace DOM; #include <kcharsets.h> #include <kglobal.h> #include <kconfig.h> -#include <qfile.h> -#include <qvaluelist.h> -#include <qstring.h> -#include <qtooltip.h> +#include <tqfile.h> +#include <tqvaluelist.h> +#include <tqstring.h> +#include <tqtooltip.h> #include <kdebug.h> #include <kurl.h> #include <assert.h> -#include <qpaintdevicemetrics.h> +#include <tqpaintdevicemetrics.h> #include <stdlib.h> #define HANDLE_INHERIT(prop, Prop) \ @@ -188,7 +188,7 @@ enum PseudoState { PseudoUnknown, PseudoNone, PseudoLink, PseudoVisited}; static PseudoState pseudoState; -CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, StyleSheetListImpl *styleSheets, +CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, TQString userStyleSheet, StyleSheetListImpl *styleSheets, const KURL &url, bool _strictParsing ) { KHTMLView* view = doc->view(); @@ -196,7 +196,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S init(view ? view->part()->settings() : 0, doc); strictParsing = _strictParsing; - m_medium = view ? view->mediaType() : QString("all"); + m_medium = view ? view->mediaType() : TQString("all"); selectors = 0; selectorCache = 0; @@ -220,7 +220,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S authorStyle = new CSSStyleSelectorList(); - QPtrListIterator<StyleSheetImpl> it( styleSheets->styleSheets ); + TQPtrListIterator<StyleSheetImpl> it( styleSheets->styleSheets ); for ( ; it.current(); ++it ) { if ( it.current()->isCSSStyleSheet() && !it.current()->disabled()) { authorStyle->append( static_cast<CSSStyleSheetImpl*>( it.current() ), m_medium ); @@ -234,8 +234,8 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S KURL u = url; - u.setQuery( QString::null ); - u.setRef( QString::null ); + u.setQuery( TQString::null ); + u.setRef( TQString::null ); encodedurl.file = u.url(); int pos = encodedurl.file.findRev('/'); encodedurl.path = encodedurl.file; @@ -243,7 +243,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S encodedurl.path.truncate( pos ); encodedurl.path += '/'; } - u.setPath( QString::null ); + u.setPath( TQString::null ); encodedurl.host = u.url(); //kdDebug() << "CSSStyleSelector::CSSStyleSelector encoded url " << encodedurl.path << endl; @@ -298,16 +298,16 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *do if(s_defaultStyle) return; { - QFile f(locate( "data", "khtml/css/html4.css" ) ); + TQFile f(locate( "data", "khtml/css/html4.css" ) ); f.open(IO_ReadOnly); - QCString file( f.size()+1 ); + TQCString file( f.size()+1 ); int readbytes = f.readBlock( file.data(), f.size() ); f.close(); if ( readbytes >= 0 ) file[readbytes] = '\0'; - QString style = QString::fromLatin1( file.data() ); + TQString style = TQString::fromLatin1( file.data() ); if(s) style += s->settingsToCSS(); DOMString str(style); @@ -323,16 +323,16 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *do s_defaultPrintStyle->append( s_defaultSheet, "print" ); } { - QFile f(locate( "data", "khtml/css/quirks.css" ) ); + TQFile f(locate( "data", "khtml/css/quirks.css" ) ); f.open(IO_ReadOnly); - QCString file( f.size()+1 ); + TQCString file( f.size()+1 ); int readbytes = f.readBlock( file.data(), f.size() ); f.close(); if ( readbytes >= 0 ) file[readbytes] = '\0'; - QString style = QString::fromLatin1( file.data() ); + TQString style = TQString::fromLatin1( file.data() ); DOMString str(style); s_quirksSheet = new DOM::CSSStyleSheetImpl(doc); @@ -371,13 +371,13 @@ void CSSStyleSelector::reparseConfiguration() #define MAXFONTSIZES 8 -void CSSStyleSelector::computeFontSizes(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor) +void CSSStyleSelector::computeFontSizes(TQPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor) { computeFontSizesFor(paintDeviceMetrics, zoomFactor, m_fontSizes, false); computeFontSizesFor(paintDeviceMetrics, zoomFactor, m_fixedFontSizes, true); } -void CSSStyleSelector::computeFontSizesFor(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor, QValueVector<int>& fontSizes, bool isFixed) +void CSSStyleSelector::computeFontSizesFor(TQPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor, TQValueVector<int>& fontSizes, bool isFixed) { #ifdef APPLE_CHANGES // We don't want to scale the settings by the dpi. @@ -743,8 +743,8 @@ unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e, if (!decl && !addDecls) return numProps; - QPtrList<CSSProperty>* values = decl ? decl->values() : 0; - QPtrList<CSSProperty>* addValues = addDecls ? addDecls->values() : 0; + TQPtrList<CSSProperty>* values = decl ? decl->values() : 0; + TQPtrList<CSSProperty>* addValues = addDecls ? addDecls->values() : 0; if (!values && !addValues) return numProps; @@ -805,7 +805,7 @@ unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e, } // modified version of the one in kurl.cpp -static void cleanpath(QString &path) +static void cleanpath(TQString &path) { int pos; while ( (pos = path.find( "/../" )) != -1 ) { @@ -851,8 +851,8 @@ static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encoded if( attr.isNull() ) { return PseudoNone; } - QConstString cu(attr.unicode(), attr.length()); - QString u = cu.string(); + TQConstString cu(attr.unicode(), attr.length()); + TQString u = cu.string(); if ( !u.contains("://") ) { if ( u[0] == '/' ) u = encodedurl.host + u; @@ -870,7 +870,7 @@ static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encoded } // a helper function for parsing nth-arguments -static bool matchNth(int count, const QString& nth) +static bool matchNth(int count, const TQString& nth) { if (nth.isEmpty()) return false; int a = 0; @@ -1145,11 +1145,11 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm // else the value is longer and can be a list if ( sel->match == CSSSelector::Class && !e->hasClassList() ) return false; - QChar* sel_uc = sel->value.unicode(); - QChar* val_uc = value->unicode(); + TQChar* sel_uc = sel->value.unicode(); + TQChar* val_uc = value->unicode(); - QConstString sel_str(sel_uc, sel_len); - QConstString val_str(val_uc, val_len); + TQConstString sel_str(sel_uc, sel_len); + TQConstString val_str(val_uc, val_len); int pos = 0; for ( ;; ) { @@ -1167,31 +1167,31 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm case CSSSelector::Contain: { //kdDebug( 6080 ) << "checking for contains match" << endl; - QConstString val_str(value->unicode(), value->length()); - QConstString sel_str(sel->value.unicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); return val_str.string().contains(sel_str.string(), caseSensitive); } case CSSSelector::Begin: { //kdDebug( 6080 ) << "checking for beginswith match" << endl; - QConstString val_str(value->unicode(), value->length()); - QConstString sel_str(sel->value.unicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); return val_str.string().startsWith(sel_str.string(), caseSensitive); } case CSSSelector::End: { //kdDebug( 6080 ) << "checking for endswith match" << endl; - QConstString val_str(value->unicode(), value->length()); - QConstString sel_str(sel->value.unicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); return val_str.string().endsWith(sel_str.string(), caseSensitive); } case CSSSelector::Hyphen: { //kdDebug( 6080 ) << "checking for hyphen match" << endl; - QConstString val_str(value->unicode(), value->length()); - QConstString sel_str(sel->value.unicode(), sel->value.length()); - const QString& str = val_str.string(); - const QString& selStr = sel_str.string(); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); + const TQString& str = val_str.string(); + const TQString& selStr = sel_str.string(); if(str.length() < selStr.length()) return false; // Check if str begins with selStr: if(str.find(selStr, 0, caseSensitive) != 0) return false; @@ -1486,8 +1486,8 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm } if (value.isEmpty()) return false; - QString langAttr = value.string(); - QString langSel = sel->string_arg.string(); + TQString langAttr = value.string(); + TQString langSel = sel->string_arg.string(); if(langAttr.length() < langSel.length()) return false; @@ -1536,7 +1536,7 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm HTMLElementImpl *elem; elem = static_cast<HTMLElementImpl*>(e); DOMString s = elem->innerText(); - QString selStr = sel->string_arg.string(); + TQString selStr = sel->string_arg.string(); // kdDebug(6080) << ":contains(\"" << selStr << "\")" << " on \"" << s << "\"" << endl; return s.string().contains(selStr); } @@ -1642,7 +1642,7 @@ void CSSStyleSelector::buildLists() clearLists(); // collect all selectors and Properties in lists. Then transfer them to the array for faster lookup. - QPtrList<CSSSelector> selectorList; + TQPtrList<CSSSelector> selectorList; CSSOrderedPropertyList propertyList; if(m_medium == "print" && defaultPrintStyle) @@ -1733,7 +1733,7 @@ CSSOrderedRule::~CSSOrderedRule() // ----------------------------------------------------------------- CSSStyleSelectorList::CSSStyleSelectorList() - : QPtrList<CSSOrderedRule>() + : TQPtrList<CSSOrderedRule>() { setAutoDelete(true); } @@ -1759,11 +1759,11 @@ void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet, if(item->isStyleRule()) { CSSStyleRuleImpl *r = static_cast<CSSStyleRuleImpl *>(item); - QPtrList<CSSSelector> *s = r->selector(); + TQPtrList<CSSSelector> *s = r->selector(); for(int j = 0; j < (int)s->count(); j++) { CSSOrderedRule *rule = new CSSOrderedRule(r, s->at(j), count()); - QPtrList<CSSOrderedRule>::append(rule); + TQPtrList<CSSOrderedRule>::append(rule); //kdDebug( 6080 ) << "appending StyleRule!" << endl; } } @@ -1805,12 +1805,12 @@ void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet, CSSStyleRuleImpl *styleRule = static_cast<CSSStyleRuleImpl *>( childItem ); - QPtrList<CSSSelector> *s = styleRule->selector(); + TQPtrList<CSSSelector> *s = styleRule->selector(); for( int j = 0; j < ( int ) s->count(); j++ ) { CSSOrderedRule *orderedRule = new CSSOrderedRule( styleRule, s->at( j ), count() ); - QPtrList<CSSOrderedRule>::append( orderedRule ); + TQPtrList<CSSOrderedRule>::append( orderedRule ); } } else @@ -1831,7 +1831,7 @@ void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet, } -void CSSStyleSelectorList::collect( QPtrList<CSSSelector> *selectorList, CSSOrderedPropertyList *propList, +void CSSStyleSelectorList::collect( TQPtrList<CSSSelector> *selectorList, CSSOrderedPropertyList *propList, Source regular, Source important ) { CSSOrderedRule *r = first(); @@ -1855,7 +1855,7 @@ void CSSStyleSelectorList::collect( QPtrList<CSSSelector> *selectorList, CSSOrde // ------------------------------------------------------------------------- -int CSSOrderedPropertyList::compareItems(QPtrCollection::Item i1, QPtrCollection::Item i2) +int CSSOrderedPropertyList::compareItems(TQPtrCollection::Item i1, TQPtrCollection::Item i2) { int diff = static_cast<CSSOrderedProperty *>(i1)->priority - static_cast<CSSOrderedProperty *>(i2)->priority; @@ -1866,7 +1866,7 @@ int CSSOrderedPropertyList::compareItems(QPtrCollection::Item i1, QPtrCollection void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint selector, uint specificity, Source regular, Source important ) { - QPtrList<CSSProperty> *values = decl->values(); + TQPtrList<CSSProperty> *values = decl->values(); if(!values) return; int len = values->count(); for(int i = 0; i < len; i++) @@ -1898,7 +1898,7 @@ void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint sel break; } - QPtrList<CSSOrderedProperty>::append(new CSSOrderedProperty(prop, selector, + TQPtrList<CSSOrderedProperty>::append(new CSSOrderedProperty(prop, selector, first, source, specificity, count() )); } @@ -1907,7 +1907,7 @@ void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint sel // ------------------------------------------------------------------------------------- // this is mostly boring stuff on how to apply a certain rule to the renderstyle... -static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, QPaintDeviceMetrics *paintDeviceMetrics, bool *ok = 0 ) +static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, TQPaintDeviceMetrics *paintDeviceMetrics, bool *ok = 0 ) { Length l; if ( !primitiveValue ) { @@ -1966,8 +1966,8 @@ struct uiColors { int css_value; const char * configGroup; const char * configEntry; -QPalette::ColorGroup group; -QColorGroup::ColorRole role; +TQPalette::ColorGroup group; +TQColorGroup::ColorRole role; }; const char * const wmgroup = "WM"; @@ -1978,66 +1978,66 @@ const char * const generalgroup = "General"; */ static const uiColors uimap[] = { // Active window border. - { CSS_VAL_ACTIVEBORDER, wmgroup, "background", QPalette::Active, QColorGroup::Light }, + { CSS_VAL_ACTIVEBORDER, wmgroup, "background", TQPalette::Active, TQColorGroup::Light }, // Active window caption. - { CSS_VAL_ACTIVECAPTION, wmgroup, "background", QPalette::Active, QColorGroup::Text }, + { CSS_VAL_ACTIVECAPTION, wmgroup, "background", TQPalette::Active, TQColorGroup::Text }, // Text in caption, size box, and scrollbar arrow box. - { CSS_VAL_CAPTIONTEXT, wmgroup, "activeForeground", QPalette::Active, QColorGroup::Text }, + { CSS_VAL_CAPTIONTEXT, wmgroup, "activeForeground", TQPalette::Active, TQColorGroup::Text }, // Face color for three-dimensional display elements. - { CSS_VAL_BUTTONFACE, wmgroup, 0, QPalette::Inactive, QColorGroup::Button }, + { CSS_VAL_BUTTONFACE, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Button }, // Dark shadow for three-dimensional display elements (for edges facing away from the light source). - { CSS_VAL_BUTTONHIGHLIGHT, wmgroup, 0, QPalette::Inactive, QColorGroup::Light }, + { CSS_VAL_BUTTONHIGHLIGHT, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Light }, // Shadow color for three-dimensional display elements. - { CSS_VAL_BUTTONSHADOW, wmgroup, 0, QPalette::Inactive, QColorGroup::Shadow }, + { CSS_VAL_BUTTONSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Shadow }, // Text on push buttons. - { CSS_VAL_BUTTONTEXT, wmgroup, "buttonForeground", QPalette::Inactive, QColorGroup::ButtonText }, + { CSS_VAL_BUTTONTEXT, wmgroup, "buttonForeground", TQPalette::Inactive, TQColorGroup::ButtonText }, // Dark shadow for three-dimensional display elements. - { CSS_VAL_THREEDDARKSHADOW, wmgroup, 0, QPalette::Inactive, QColorGroup::Dark }, + { CSS_VAL_THREEDDARKSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Dark }, // Face color for three-dimensional display elements. - { CSS_VAL_THREEDFACE, wmgroup, 0, QPalette::Inactive, QColorGroup::Button }, + { CSS_VAL_THREEDFACE, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Button }, // Highlight color for three-dimensional display elements. - { CSS_VAL_THREEDHIGHLIGHT, wmgroup, 0, QPalette::Inactive, QColorGroup::Light }, + { CSS_VAL_THREEDHIGHLIGHT, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Light }, // Light color for three-dimensional display elements (for edges facing the light source). - { CSS_VAL_THREEDLIGHTSHADOW, wmgroup, 0, QPalette::Inactive, QColorGroup::Midlight }, + { CSS_VAL_THREEDLIGHTSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Midlight }, // Dark shadow for three-dimensional display elements. - { CSS_VAL_THREEDSHADOW, wmgroup, 0, QPalette::Inactive, QColorGroup::Shadow }, + { CSS_VAL_THREEDSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Shadow }, // Inactive window border. - { CSS_VAL_INACTIVEBORDER, wmgroup, "background", QPalette::Disabled, QColorGroup::Background }, + { CSS_VAL_INACTIVEBORDER, wmgroup, "background", TQPalette::Disabled, TQColorGroup::Background }, // Inactive window caption. - { CSS_VAL_INACTIVECAPTION, wmgroup, "inactiveBackground", QPalette::Disabled, QColorGroup::Background }, + { CSS_VAL_INACTIVECAPTION, wmgroup, "inactiveBackground", TQPalette::Disabled, TQColorGroup::Background }, // Color of text in an inactive caption. - { CSS_VAL_INACTIVECAPTIONTEXT, wmgroup, "inactiveForeground", QPalette::Disabled, QColorGroup::Text }, - { CSS_VAL_GRAYTEXT, wmgroup, 0, QPalette::Disabled, QColorGroup::Text }, + { CSS_VAL_INACTIVECAPTIONTEXT, wmgroup, "inactiveForeground", TQPalette::Disabled, TQColorGroup::Text }, + { CSS_VAL_GRAYTEXT, wmgroup, 0, TQPalette::Disabled, TQColorGroup::Text }, // Menu background - { CSS_VAL_MENU, generalgroup, "background", QPalette::Inactive, QColorGroup::Background }, + { CSS_VAL_MENU, generalgroup, "background", TQPalette::Inactive, TQColorGroup::Background }, // Text in menus - { CSS_VAL_MENUTEXT, generalgroup, "foreground", QPalette::Inactive, QColorGroup::Background }, + { CSS_VAL_MENUTEXT, generalgroup, "foreground", TQPalette::Inactive, TQColorGroup::Background }, // Text of item(s) selected in a control. - { CSS_VAL_HIGHLIGHT, generalgroup, "selectBackground", QPalette::Inactive, QColorGroup::Background }, + { CSS_VAL_HIGHLIGHT, generalgroup, "selectBackground", TQPalette::Inactive, TQColorGroup::Background }, // Text of item(s) selected in a control. - { CSS_VAL_HIGHLIGHTTEXT, generalgroup, "selectForeground", QPalette::Inactive, QColorGroup::Background }, + { CSS_VAL_HIGHLIGHTTEXT, generalgroup, "selectForeground", TQPalette::Inactive, TQColorGroup::Background }, // Background color of multiple document interface. - { CSS_VAL_APPWORKSPACE, generalgroup, "background", QPalette::Inactive, QColorGroup::Text }, + { CSS_VAL_APPWORKSPACE, generalgroup, "background", TQPalette::Inactive, TQColorGroup::Text }, // Scroll bar gray area. - { CSS_VAL_SCROLLBAR, generalgroup, "background", QPalette::Inactive, QColorGroup::Background }, + { CSS_VAL_SCROLLBAR, generalgroup, "background", TQPalette::Inactive, TQColorGroup::Background }, // Window background. - { CSS_VAL_WINDOW, generalgroup, "windowBackground", QPalette::Inactive, QColorGroup::Background }, + { CSS_VAL_WINDOW, generalgroup, "windowBackground", TQPalette::Inactive, TQColorGroup::Background }, // Window frame. - { CSS_VAL_WINDOWFRAME, generalgroup, "windowBackground", QPalette::Inactive, QColorGroup::Background }, + { CSS_VAL_WINDOWFRAME, generalgroup, "windowBackground", TQPalette::Inactive, TQColorGroup::Background }, // WindowText - { CSS_VAL_WINDOWTEXT, generalgroup, "windowForeground", QPalette::Inactive, QColorGroup::Text }, - { CSS_VAL_TEXT, generalgroup, 0, QPalette::Inactive, QColorGroup::Text }, - { 0, 0, 0, QPalette::NColorGroups, QColorGroup::NColorRoles } + { CSS_VAL_WINDOWTEXT, generalgroup, "windowForeground", TQPalette::Inactive, TQColorGroup::Text }, + { CSS_VAL_TEXT, generalgroup, 0, TQPalette::Inactive, TQColorGroup::Text }, + { 0, 0, 0, TQPalette::NColorGroups, TQColorGroup::NColorRoles } }; -static QColor colorForCSSValue( int css_value ) +static TQColor colorForCSSValue( int css_value ) { // try the regular ones first const colorMap *col = cmap; @@ -2052,21 +2052,21 @@ static QColor colorForCSSValue( int css_value ) #ifndef APPLE_CHANGES if ( !uicol->css_value ) { if ( css_value == CSS_VAL_INFOBACKGROUND ) - return QToolTip::palette().inactive().background(); + return TQToolTip::palette().inactive().background(); else if ( css_value == CSS_VAL_INFOTEXT ) - return QToolTip::palette().inactive().foreground(); + return TQToolTip::palette().inactive().foreground(); else if ( css_value == CSS_VAL_BACKGROUND ) { KConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support bckgrConfig.setGroup("Desktop0"); // Desktop background. return bckgrConfig.readColorEntry("Color1", &qApp->palette().disabled().background()); } - return QColor(); + return TQColor(); } #endif - const QPalette &pal = qApp->palette(); - QColor c = pal.color( uicol->group, uicol->role ); + const TQPalette &pal = qApp->palette(); + TQColor c = pal.color( uicol->group, uicol->role ); #ifndef APPLE_CHANGES if ( uicol->configEntry ) { KConfig *globalConfig = KGlobal::config(); @@ -2078,7 +2078,7 @@ static QColor colorForCSSValue( int css_value ) return c; } -static inline int nextFontSize(const QValueVector<int>& a, int v, bool smaller) +static inline int nextFontSize(const TQValueVector<int>& a, int v, bool smaller) { // return the nearest bigger/smaller value in scale a, when v is in range. // otherwise increase/decrease value using a 1.2 fixed ratio @@ -2334,7 +2334,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) if (isInherit) fontDef.weight = parentStyle->htmlFont().fontDef.weight; else if (isInitial) - fontDef.weight = QFont::Normal; + fontDef.weight = TQFont::Normal; else { if(!primitiveValue) return; if(primitiveValue->getIdent()) @@ -2348,7 +2348,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) case CSS_VAL_700: case CSS_VAL_800: case CSS_VAL_900: - fontDef.weight = QFont::Bold; + fontDef.weight = TQFont::Bold; break; case CSS_VAL_NORMAL: case CSS_VAL_LIGHTER: @@ -2357,7 +2357,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) case CSS_VAL_300: case CSS_VAL_400: case CSS_VAL_500: - fontDef.weight = QFont::Normal; + fontDef.weight = TQFont::Normal; break; default: return; @@ -2718,7 +2718,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) case CSS_PROP_SCROLLBAR_TRACK_COLOR: case CSS_PROP_SCROLLBAR_ARROW_COLOR: { - QColor col; + TQColor col; if (isInherit) { HANDLE_INHERIT_COND(CSS_PROP_BACKGROUND_COLOR, backgroundColor, BackgroundColor) HANDLE_INHERIT_COND(CSS_PROP_BORDER_TOP_COLOR, borderTopColor, BorderTopColor) @@ -2747,7 +2747,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) && id != CSS_PROP_BORDER_RIGHT_COLOR && id != CSS_PROP_BORDER_BOTTOM_COLOR && id != CSS_PROP_BORDER_LEFT_COLOR ) - col = QColor(); + col = TQColor(); else col = colorForCSSValue( ident ); } else if ( primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR ) { @@ -2778,36 +2778,36 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) style->setOutlineColor(col); break; #ifndef APPLE_CHANGES case CSS_PROP_SCROLLBAR_FACE_COLOR: - style->setPaletteColor(QPalette::Active, QColorGroup::Button, col); - style->setPaletteColor(QPalette::Inactive, QColorGroup::Button, col); + style->setPaletteColor(TQPalette::Active, TQColorGroup::Button, col); + style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Button, col); break; case CSS_PROP_SCROLLBAR_SHADOW_COLOR: - style->setPaletteColor(QPalette::Active, QColorGroup::Shadow, col); - style->setPaletteColor(QPalette::Inactive, QColorGroup::Shadow, col); + style->setPaletteColor(TQPalette::Active, TQColorGroup::Shadow, col); + style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Shadow, col); break; case CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR: - style->setPaletteColor(QPalette::Active, QColorGroup::Light, col); - style->setPaletteColor(QPalette::Inactive, QColorGroup::Light, col); + style->setPaletteColor(TQPalette::Active, TQColorGroup::Light, col); + style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Light, col); break; case CSS_PROP_SCROLLBAR_3DLIGHT_COLOR: break; case CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR: - style->setPaletteColor(QPalette::Active, QColorGroup::Dark, col); - style->setPaletteColor(QPalette::Inactive, QColorGroup::Dark, col); + style->setPaletteColor(TQPalette::Active, TQColorGroup::Dark, col); + style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Dark, col); break; case CSS_PROP_SCROLLBAR_TRACK_COLOR: - style->setPaletteColor(QPalette::Active, QColorGroup::Mid, col); - style->setPaletteColor(QPalette::Inactive, QColorGroup::Mid, col); - style->setPaletteColor(QPalette::Active, QColorGroup::Background, col); - style->setPaletteColor(QPalette::Inactive, QColorGroup::Background, col); + style->setPaletteColor(TQPalette::Active, TQColorGroup::Mid, col); + style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Mid, col); + style->setPaletteColor(TQPalette::Active, TQColorGroup::Background, col); + style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Background, col); // fall through case CSS_PROP_SCROLLBAR_BASE_COLOR: - style->setPaletteColor(QPalette::Active, QColorGroup::Base, col); - style->setPaletteColor(QPalette::Inactive, QColorGroup::Base, col); + style->setPaletteColor(TQPalette::Active, TQColorGroup::Base, col); + style->setPaletteColor(TQPalette::Inactive, TQColorGroup::Base, col); break; case CSS_PROP_SCROLLBAR_ARROW_COLOR: - style->setPaletteColor(QPalette::Active, QColorGroup::ButtonText, col); - style->setPaletteColor(QPalette::Inactive, QColorGroup::ButtonText, col); + style->setPaletteColor(TQPalette::Active, TQColorGroup::ButtonText, col); + style->setPaletteColor(TQPalette::Inactive, TQColorGroup::ButtonText, col); break; #endif default: @@ -3176,10 +3176,10 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) // keywords are being used. Pick the correct default // based off the font family. #ifdef APPLE_CHANGES - const QValueVector<int>& fontSizes = (fontDef.genericFamily == FontDef::eMonospace) ? + const TQValueVector<int>& fontSizes = (fontDef.genericFamily == FontDef::eMonospace) ? m_fixedFontSizes : m_fontSizes; #else - const QValueVector<int>& fontSizes = m_fontSizes; + const TQValueVector<int>& fontSizes = m_fontSizes; #endif switch(primitiveValue->getIdent()) { @@ -3464,7 +3464,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) #ifdef APPLE_CHANGES fontDef.family = initialDef.firstFamily(); #else - fontDef.family = QString::null; + fontDef.family = TQString::null; #endif if (style->setFontDef(fontDef)) fontDirty = true; @@ -3478,7 +3478,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) CSSValueImpl *item = list->item(i); if(!item->isPrimitiveValue()) continue; CSSPrimitiveValueImpl *val = static_cast<CSSPrimitiveValueImpl *>(item); - QString face; + TQString face; if( val->primitiveType() == CSSPrimitiveValue::CSS_STRING ) face = static_cast<FontFamilyValueImpl *>(val)->fontName(); else if ( val->primitiveType() == CSSPrimitiveValue::CSS_IDENT ) { @@ -3614,10 +3614,10 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) style->setBorderRightColor(parentStyle->borderRightColor()); } else if (isInitial) { - style->setBorderTopColor(QColor()); // Reset to invalid color so currentColor is used instead. - style->setBorderBottomColor(QColor()); - style->setBorderLeftColor(QColor()); - style->setBorderRightColor(QColor()); + style->setBorderTopColor(TQColor()); // Reset to invalid color so currentColor is used instead. + style->setBorderBottomColor(TQColor()); + style->setBorderLeftColor(TQColor()); + style->setBorderRightColor(TQColor()); } } if (id == CSS_PROP_BORDER || id == CSS_PROP_BORDER_STYLE) @@ -3801,7 +3801,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) int x = item->x->computeLength(style, paintDeviceMetrics); int y = item->y->computeLength(style, paintDeviceMetrics); int blur = item->blur ? item->blur->computeLength(style, paintDeviceMetrics) : 0; - QColor col = khtml::transparentColor; + TQColor col = khtml::transparentColor; if (item->color) { int ident = item->color->getIdent(); if (ident) diff --git a/khtml/css/cssstyleselector.h b/khtml/css/cssstyleselector.h index 235eb72a6..23d854bc0 100644 --- a/khtml/css/cssstyleselector.h +++ b/khtml/css/cssstyleselector.h @@ -23,8 +23,8 @@ #ifndef _CSS_cssstyleselector_h_ #define _CSS_cssstyleselector_h_ -#include <qptrlist.h> -#include <qvaluevector.h> +#include <tqptrlist.h> +#include <tqvaluevector.h> #include "rendering/render_style.h" #include "dom/dom_string.h" @@ -114,7 +114,7 @@ namespace khtml * Also takes into account special cases for HTML documents, * including the defaultStyle (which is html only) */ - CSSStyleSelector( DOM::DocumentImpl* doc, QString userStyleSheet, DOM::StyleSheetListImpl *styleSheets, const KURL &url, + CSSStyleSelector( DOM::DocumentImpl* doc, TQString userStyleSheet, DOM::StyleSheetListImpl *styleSheets, const KURL &url, bool _strictParsing ); /** * same as above but for a single stylesheet. @@ -131,18 +131,18 @@ namespace khtml RenderStyle *styleForElement(DOM::ElementImpl *e); - QValueVector<int> fontSizes() const { return m_fontSizes; } - QValueVector<int> fixedFontSizes() const { return m_fixedFontSizes; } + TQValueVector<int> fontSizes() const { return m_fontSizes; } + TQValueVector<int> fixedFontSizes() const { return m_fixedFontSizes; } bool strictParsing; struct Encodedurl { - QString host; //also contains protocol - QString path; - QString file; + TQString host; //also contains protocol + TQString path; + TQString file; } encodedurl; - void computeFontSizes(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor); - void computeFontSizesFor(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor, QValueVector<int>& fontSizes, bool isFixed); + void computeFontSizes(TQPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor); + void computeFontSizesFor(TQPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor, TQValueVector<int>& fontSizes, bool isFixed); static void precomputeAttributeDependencies(DOM::DocumentImpl* doc, DOM::CSSSelector* sel); protected: @@ -232,8 +232,8 @@ public: SelectorCache *selectorCache; unsigned int properties_size; CSSOrderedProperty **properties; - QMemArray<CSSOrderedProperty> inlineProps; - QString m_medium; + TQMemArray<CSSOrderedProperty> inlineProps; + TQString m_medium; CSSOrderedProperty **propsToApply; CSSOrderedProperty **pseudoProps; unsigned int propsToApplySize; @@ -249,9 +249,9 @@ public: KHTMLView *view; KHTMLPart *part; const KHTMLSettings *settings; - QPaintDeviceMetrics *paintDeviceMetrics; - QValueVector<int> m_fontSizes; - QValueVector<int> m_fixedFontSizes; + TQPaintDeviceMetrics *paintDeviceMetrics; + TQValueVector<int> m_fontSizes; + TQValueVector<int> m_fixedFontSizes; bool fontDirty; @@ -297,10 +297,10 @@ public: * This is the list we will collect all properties we need to apply in. * It will get sorted once before applying. */ - class CSSOrderedPropertyList : public QPtrList<CSSOrderedProperty> + class CSSOrderedPropertyList : public TQPtrList<CSSOrderedProperty> { public: - virtual int compareItems(QPtrCollection::Item i1, QPtrCollection::Item i2); + virtual int compareItems(TQPtrCollection::Item i1, TQPtrCollection::Item i2); void append(DOM::CSSStyleDeclarationImpl *decl, uint selector, uint specificity, Source regular, Source important ); }; @@ -316,7 +316,7 @@ public: int index; }; - class CSSStyleSelectorList : public QPtrList<CSSOrderedRule> + class CSSStyleSelectorList : public TQPtrList<CSSOrderedRule> { public: CSSStyleSelectorList(); @@ -325,7 +325,7 @@ public: void append( DOM::CSSStyleSheetImpl *sheet, const DOM::DOMString &medium = "screen" ); - void collect( QPtrList<DOM::CSSSelector> *selectorList, CSSOrderedPropertyList *propList, + void collect( TQPtrList<DOM::CSSSelector> *selectorList, CSSOrderedPropertyList *propList, Source regular, Source important ); }; diff --git a/khtml/css/parser.cpp b/khtml/css/parser.cpp index 57275190c..c0e6f5869 100644 --- a/khtml/css/parser.cpp +++ b/khtml/css/parser.cpp @@ -264,7 +264,7 @@ static inline int getValueID(const char *tagStr, int len) typedef union YYSTYPE { CSSRuleImpl *rule; CSSSelector *selector; - QPtrList<CSSSelector> *selectorList; + TQPtrList<CSSSelector> *selectorList; bool ok; MediaListImpl *mediaList; CSSMediaRuleImpl *mediaRule; @@ -1862,7 +1862,7 @@ yyreduce: { if ( yyvsp[0].selector ) { - yyval.selectorList = new QPtrList<CSSSelector>; + yyval.selectorList = new TQPtrList<CSSSelector>; yyval.selectorList->setAutoDelete( true ); #ifdef CSS_DEBUG kdDebug( 6080 ) << " got simple selector:" << endl; @@ -2019,7 +2019,7 @@ yyreduce: { CSSParser *p = static_cast<CSSParser *>(parser); DOM::DocumentImpl *doc = p->document(); - QString tag = qString(yyvsp[0].string); + TQString tag = qString(yyvsp[0].string); if ( doc ) { if (doc->isHTMLDocument()) tag = tag.lower(); @@ -2097,7 +2097,7 @@ yyreduce: CSSParser *p = static_cast<CSSParser *>(parser); DOM::DocumentImpl *doc = p->document(); - QString attr = qString(yyvsp[-1].string); + TQString attr = qString(yyvsp[-1].string); if ( doc ) { if (doc->isHTMLDocument()) attr = attr.lower(); @@ -2235,7 +2235,7 @@ yyreduce: { yyval.selector = new CSSSelector(); yyval.selector->match = CSSSelector::PseudoClass; - yyval.selector->string_arg = QString::number(yyvsp[-1].val); + yyval.selector->string_arg = TQString::number(yyvsp[-1].val); yyval.selector->value = domString(yyvsp[-2].string); ;} break; @@ -2373,7 +2373,7 @@ yyreduce: case 117: { - QString str = qString(yyvsp[-1].string); + TQString str = qString(yyvsp[-1].string); yyval.prop_id = getPropertyID( str.lower().latin1(), str.length() ); ;} break; @@ -2457,7 +2457,7 @@ yyreduce: case 129: { - QString str = qString( yyvsp[-1].string ); + TQString str = qString( yyvsp[-1].string ); yyval.value.id = getValueID( str.lower().latin1(), str.length() ); yyval.value.unit = CSSPrimitiveValue::CSS_IDENT; yyval.value.string = yyvsp[-1].string; diff --git a/khtml/css/parser.h b/khtml/css/parser.h index 497e3017f..e3375db66 100644 --- a/khtml/css/parser.h +++ b/khtml/css/parser.h @@ -133,7 +133,7 @@ typedef union YYSTYPE { CSSRuleImpl *rule; CSSSelector *selector; - QPtrList<CSSSelector> *selectorList; + TQPtrList<CSSSelector> *selectorList; bool ok; MediaListImpl *mediaList; CSSMediaRuleImpl *mediaRule; |