diff options
Diffstat (limited to 'src/kmplayer_smil.cpp')
-rw-r--r-- | src/kmplayer_smil.cpp | 446 |
1 files changed, 223 insertions, 223 deletions
diff --git a/src/kmplayer_smil.cpp b/src/kmplayer_smil.cpp index 467fbaa..2db8c34 100644 --- a/src/kmplayer_smil.cpp +++ b/src/kmplayer_smil.cpp @@ -20,16 +20,16 @@ #include <stdlib.h> -#include <qtextstream.h> -#include <qcolor.h> -#include <qpixmap.h> -#include <qmovie.h> -#include <qimage.h> -#include <qtextcodec.h> -#include <qfont.h> -#include <qapplication.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqtextstream.h> +#include <tqcolor.h> +#include <tqpixmap.h> +#include <tqmovie.h> +#include <tqimage.h> +#include <tqtextcodec.h> +#include <tqfont.h> +#include <tqapplication.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kdebug.h> #include <kurl.h> @@ -73,7 +73,7 @@ static const unsigned int trans_out_timer_id = (unsigned int) 7; */ //----------------------------------------------------------------------------- -KDE_NO_EXPORT bool KMPlayer::parseTime (const QString & vl, int & dur) { +KDE_NO_EXPORT bool KMPlayer::parseTime (const TQString & vl, int & dur) { const char * cval = vl.ascii (); if (!cval) { dur = 0; @@ -81,7 +81,7 @@ KDE_NO_EXPORT bool KMPlayer::parseTime (const QString & vl, int & dur) { } int sign = 1; bool fp_seen = false; - QString num; + TQString num; const char * p = cval; for ( ; *p; p++ ) { if (*p == '+') { @@ -95,12 +95,12 @@ KDE_NO_EXPORT bool KMPlayer::parseTime (const QString & vl, int & dur) { else sign = -1; } else if (*p >= '0' && *p <= '9') { - num += QChar (*p); + num += TQChar (*p); } else if (*p == '.') { if (fp_seen) break; else - num += QChar (*p); + num += TQChar (*p); fp_seen = true; } else if (*p == ' ') { if (!num.isEmpty ()) @@ -131,12 +131,12 @@ KDE_NO_EXPORT bool KMPlayer::parseTime (const QString & vl, int & dur) { return true; } -static SMIL::Region * findRegion (NodePtr p, const QString & id) { +static SMIL::Region * findRegion (NodePtr p, const TQString & id) { TrieString regionname_attr ("regionName"); for (NodePtr c = p->firstChild (); c; c = c->nextSibling ()) { if (c->id == SMIL::id_node_region) { SMIL::Region * r = convertNode <SMIL::Region> (c); - QString a = r->getAttribute (regionname_attr); + TQString a = r->getAttribute (regionname_attr); if (a.isEmpty ()) a = r->getAttribute (StringPool::attr_id); if ((a.isEmpty () && id.isEmpty ()) || a == id) { @@ -151,7 +151,7 @@ static SMIL::Region * findRegion (NodePtr p, const QString & id) { return 0L; } -static SMIL::Transition * findTransition (NodePtr n, const QString & id) { +static SMIL::Transition * findTransition (NodePtr n, const TQString & id) { SMIL::Smil * s = SMIL::Smil::findSmilNode (n); if (s) { Node * head = s->firstChild ().ptr (); @@ -167,7 +167,7 @@ static SMIL::Transition * findTransition (NodePtr n, const QString & id) { return 0L; } -static NodePtr findLocalNodeById (NodePtr n, const QString & id) { +static NodePtr findLocalNodeById (NodePtr n, const TQString & id) { //kdDebug() << "findLocalNodeById " << id << endl; SMIL::Smil * s = SMIL::Smil::findSmilNode (n); if (s) @@ -223,15 +223,15 @@ KDE_NO_EXPORT void Runtime::reset () { } KDE_NO_EXPORT -void Runtime::setDurationItem (DurationTime item, const QString & val) { +void Runtime::setDurationItem (DurationTime item, const TQString & val) { int dur = -2; // also 0 for 'media' duration, so it will not update then - QString vs = val.stripWhiteSpace (); - QString vl = vs.lower (); + TQString vs = val.stripWhiteSpace (); + TQString vl = vs.lower (); const char * cval = vl.ascii (); int offset = 0; //kdDebug () << "setDuration1 " << vl << endl; if (cval && cval[0]) { - QString idref; + TQString idref; const char * p = cval; if (parseTime (vl, offset)) { dur = dur_timer; @@ -259,14 +259,14 @@ void Runtime::setDurationItem (DurationTime item, const QString & val) { for ( ; *q; q++) { if (*q == '\\') { if (last_esc) { - idref += QChar ('\\'); + idref += TQChar ('\\'); last_esc = false; } else last_esc = true; } else if (*q == '.' && !last_esc) { break; } else - idref += QChar (*q); + idref += TQChar (*q); } if (!*q) idref = vs.mid (p - cval); @@ -370,7 +370,7 @@ KDE_NO_EXPORT void Runtime::beginAndStart () { } KDE_NO_EXPORT -bool Runtime::parseParam (const TrieString & name, const QString & val) { +bool Runtime::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "Runtime::parseParam " << name << "=" << val << endl; if (name == StringPool::attr_begin) { setDurationItem (begin_time, val); @@ -410,7 +410,7 @@ bool Runtime::parseParam (const TrieString & name, const QString & val) { } } } else if (name.startsWith ("repeat")) { - if (val.find ("indefinite") > -1) + if (val.tqfind ("indefinite") > -1) repeat_count = dur_infinite; else repeat_count = val.toInt (); @@ -544,7 +544,7 @@ KDE_NO_CDTOR_EXPORT SizeType::SizeType () { reset (); } -KDE_NO_CDTOR_EXPORT SizeType::SizeType (const QString & s) { +KDE_NO_CDTOR_EXPORT SizeType::SizeType (const TQString & s) { *this = s; } @@ -554,9 +554,9 @@ void SizeType::reset () { isset = false; } -SizeType & SizeType::operator = (const QString & s) { - QString strval (s); - int p = strval.find (QChar ('%')); +SizeType & SizeType::operator = (const TQString & s) { + TQString strval (s); + int p = strval.tqfind (TQChar ('%')); if (p > -1) { strval.truncate (p); perc_size = strval.toDouble (&isset); @@ -635,11 +635,11 @@ KDE_NO_EXPORT void CalculatedSizer::resetSizes () { right.reset (); bottom.reset (); reg_point.truncate (0); - reg_align = QString::fromLatin1 ("topLeft"); + reg_align = TQString::tqfromLatin1 ("topLeft"); } -static bool regPoints (const QString & str, Single & x, Single & y) { - QString lower = str.lower (); +static bool regPoints (const TQString & str, Single & x, Single & y) { + TQString lower = str.lower (); const char * rp = lower.ascii (); if (!rp) return false; @@ -680,7 +680,7 @@ bool CalculatedSizer::applyRegPoints (Node * node, Single w, Single h, node = SMIL::Smil::findSmilNode (node); if (!node) return false; - node = static_cast <SMIL::Smil *> (node)->layout_node.ptr (); + node = static_cast <SMIL::Smil *> (node)->tqlayout_node.ptr (); if (!node) return false; NodePtr c = node->firstChild (); @@ -691,7 +691,7 @@ bool CalculatedSizer::applyRegPoints (Node * node, Single w, Single h, Single i1, i2; // dummies SMIL::RegPoint *rp_elm = static_cast<SMIL::RegPoint*>(c.ptr()); rp_elm->sizes.calcSizes (0L, 100, 100, rpx, rpy, i1, i2); - QString ra = rp_elm->getAttribute ("regAlign"); + TQString ra = rp_elm->getAttribute ("regAlign"); if (!ra.isEmpty () && reg_align.isEmpty ()) reg_align = ra; break; @@ -755,7 +755,7 @@ KDE_NO_EXPORT void CalculatedSizer::calcSizes (Node * node, Single w, Single h, } KDE_NO_EXPORT -bool CalculatedSizer::setSizeParam(const TrieString &name, const QString &val, bool &dim_changed) { +bool CalculatedSizer::setSizeParam(const TrieString &name, const TQString &val, bool &dim_changed) { dim_changed = true; if (name == StringPool::attr_left) { left = val; @@ -815,7 +815,7 @@ CalculatedSizer::move (const SizeType &x, const SizeType &y) { KDE_NO_CDTOR_EXPORT AnimateGroupData::AnimateGroupData (NodePtr e) : Runtime (e), modification_id (-1) {} -bool AnimateGroupData::parseParam (const TrieString &name, const QString &val) { +bool AnimateGroupData::parseParam (const TrieString &name, const TQString &val) { //kdDebug () << "AnimateGroupData::parseParam " << name << "=" << val << endl; if (name == StringPool::attr_target || name == "targetElement") { if (element) @@ -920,7 +920,7 @@ KDE_NO_EXPORT void AnimateData::reset () { } else anim_timer = 0; accumulate = acc_none; - additive = add_replace; + additive = add_tqreplace; change_by = 0; calcMode = calc_linear; change_from.truncate (0); @@ -930,20 +930,20 @@ KDE_NO_EXPORT void AnimateData::reset () { change_from_unit.truncate (0); } -bool AnimateData::parseParam (const TrieString & name, const QString & val) { +bool AnimateData::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "AnimateData::parseParam " << name << "=" << val << endl; if (name == "change_by") { change_by = val.toInt (); } else if (name == "from") { change_from = val; } else if (name == "values") { - change_values = QStringList::split (QString (";"), val); + change_values = TQStringList::split (TQString (";"), val); } else if (name == "calcMode") { - if (val == QString::fromLatin1 ("discrete")) + if (val == TQString::tqfromLatin1 ("discrete")) calcMode = calc_discrete; - else if (val == QString::fromLatin1 ("linear")) + else if (val == TQString::tqfromLatin1 ("linear")) calcMode = calc_linear; - else if (val == QString::fromLatin1 ("paced")) + else if (val == TQString::tqfromLatin1 ("paced")) calcMode = calc_paced; } else return AnimateGroupData::parseParam (name, val); @@ -973,7 +973,7 @@ KDE_NO_EXPORT void AnimateData::started () { break; } if (calcMode == calc_linear) { - QRegExp reg ("^\\s*(-?[0-9\\.]+)(\\s*[%a-z]*)?"); + TQRegExp reg ("^\\s*(-?[0-9\\.]+)(\\s*[%a-z]*)?"); if (change_from.isEmpty ()) { if (change_values.size () > 0) // check 'values' attribute change_from = change_values.first (); @@ -1052,8 +1052,8 @@ KDE_NO_EXPORT void AnimateData::stopped () { KDE_NO_EXPORT void AnimateData::applyStep () { Element * target = convertNode <Element> (target_element); if (target && calcMode == calc_linear) - target->setParam (changed_attribute, QString ("%1%2").arg ( - change_from_val).arg(change_from_unit), + target->setParam (changed_attribute, TQString ("%1%2").tqarg ( + change_from_val).tqarg(change_from_unit), &modification_id); else if (target && calcMode == calc_discrete) target->setParam (changed_attribute, @@ -1114,7 +1114,7 @@ KDE_NO_EXPORT void AnimateMotionData::reset () { } else anim_timer = 0; accumulate = acc_none; - additive = add_replace; + additive = add_tqreplace; calcMode = calc_linear; change_from.truncate (0); change_by.truncate (0); @@ -1127,16 +1127,16 @@ KDE_NO_EXPORT void AnimateMotionData::reset () { cur_x = cur_y = delta_x = delta_y = SizeType(); } -bool AnimateMotionData::parseParam (const TrieString & name, const QString & val) { +bool AnimateMotionData::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "AnimateMotionData::parseParam " << name << "=" << val << endl; if (name == "from") { change_from = val; } else if (name == "by") { change_by = val; } else if (name == "values") { - values = QStringList::split (QString (";"), val); + values = TQStringList::split (TQString (";"), val); } else if (name == "keyTimes") { - QStringList kts = QStringList::split (QString (";"), val); + TQStringList kts = TQStringList::split (TQString (";"), val); delete keytimes; keytime_count = kts.size (); keytimes = new float [keytime_count]; @@ -1154,23 +1154,23 @@ bool AnimateMotionData::parseParam (const TrieString & name, const QString & val return true; } } else if (name == "keySplines") { - splines = QStringList::split (QString (";"), val); + splines = TQStringList::split (TQString (";"), val); } else if (name == "calcMode") { - if (val == QString::fromLatin1 ("discrete")) + if (val == TQString::tqfromLatin1 ("discrete")) calcMode = calc_discrete; - else if (val == QString::fromLatin1 ("linear")) + else if (val == TQString::tqfromLatin1 ("linear")) calcMode = calc_linear; - else if (val == QString::fromLatin1 ("paced")) + else if (val == TQString::tqfromLatin1 ("paced")) calcMode = calc_paced; - else if (val == QString::fromLatin1 ("spline")) + else if (val == TQString::tqfromLatin1 ("spline")) calcMode = calc_spline; } else return AnimateGroupData::parseParam (name, val); return true; } -bool AnimateMotionData::getCoordinates (const QString &coord, SizeType &x, SizeType &y) { - int p = coord.find (QChar (',')); +bool AnimateMotionData::getCoordinates (const TQString &coord, SizeType &x, SizeType &y) { + int p = coord.tqfind (TQChar (',')); if (p > 0) { x = coord.left (p).stripWhiteSpace (); y = coord.mid (p + 1).stripWhiteSpace (); @@ -1207,8 +1207,8 @@ bool AnimateMotionData::setInterval () { break; case calc_spline: if (splines.size () > interval) { - QStringList kss = QStringList::split ( - QString (" "), splines[interval]); + TQStringList kss = TQStringList::split ( + TQString (" "), splines[interval]); control_point[0] = control_point[1] = 0; control_point[2] = control_point[3] = 1; if (kss.size () == 4) { @@ -1403,7 +1403,7 @@ KDE_NO_EXPORT void KMPlayer::MediaTypeRuntime::reset () { } /** - * will request a repaint of attached region + * will request a tqrepaint of attached region */ KDE_NO_EXPORT void MediaTypeRuntime::stopped () { clipStop (); @@ -1492,7 +1492,7 @@ KDE_NO_EXPORT void AudioVideoData::clipStop () { } KDE_NO_EXPORT -bool AudioVideoData::parseParam(const TrieString &name, const QString &val) { +bool AudioVideoData::parseParam(const TrieString &name, const TQString &val) { //kdDebug () << "AudioVideoData::parseParam " << name << "=" << val << endl; if (name == StringPool::attr_src) { NodePtr element_protect = element; // note element is weak @@ -1541,7 +1541,7 @@ NodeRefListPtr MouseListeners::listeners (unsigned int eid) { //----------------------------------------------------------------------------- -static Element * fromScheduleGroup (NodePtr & d, const QString & tag) { +static Element * fromScheduleGroup (NodePtr & d, const TQString & tag) { const char * ctag = tag.ascii (); if (!strcmp (ctag, "par")) return new SMIL::Par (d); @@ -1552,7 +1552,7 @@ static Element * fromScheduleGroup (NodePtr & d, const QString & tag) { return 0L; } -static Element * fromParamGroup (NodePtr & d, const QString & tag) { +static Element * fromParamGroup (NodePtr & d, const TQString & tag) { const char * ctag = tag.ascii (); if (!strcmp (ctag, "param")) return new SMIL::Param (d); @@ -1561,7 +1561,7 @@ static Element * fromParamGroup (NodePtr & d, const QString & tag) { return 0L; } -static Element * fromAnimateGroup (NodePtr & d, const QString & tag) { +static Element * fromAnimateGroup (NodePtr & d, const TQString & tag) { const char * ctag = tag.ascii (); if (!strcmp (ctag, "set")) return new SMIL::Set (d); @@ -1572,7 +1572,7 @@ static Element * fromAnimateGroup (NodePtr & d, const QString & tag) { return 0L; } -static Element * fromMediaContentGroup (NodePtr & d, const QString & tag) { +static Element * fromMediaContentGroup (NodePtr & d, const TQString & tag) { const char * taglatin = tag.latin1 (); if (!strcmp (taglatin, "video") || !strcmp (taglatin, "audio")) return new SMIL::AVMediaType (d, tag); @@ -1590,7 +1590,7 @@ static Element * fromMediaContentGroup (NodePtr & d, const QString & tag) { return 0L; } -static Element * fromContentControlGroup (NodePtr & d, const QString & tag) { +static Element * fromContentControlGroup (NodePtr & d, const TQString & tag) { if (!strcmp (tag.latin1 (), "switch")) return new SMIL::Switch (d); return 0L; @@ -1598,7 +1598,7 @@ static Element * fromContentControlGroup (NodePtr & d, const QString & tag) { //----------------------------------------------------------------------------- -KDE_NO_EXPORT NodePtr SMIL::Smil::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::Smil::childFromTag (const TQString & tag) { const char * ctag = tag.ascii (); if (!strcmp (ctag, "body")) return new SMIL::Body (m_doc); @@ -1611,27 +1611,27 @@ KDE_NO_EXPORT void SMIL::Smil::activate () { //kdDebug () << "Smil::activate" << endl; current_av_media_type = NodePtr (); resolved = true; - SMIL::Layout * layout = convertNode <SMIL::Layout> (layout_node); - if (layout && layout->region_surface) { + SMIL::Layout * tqlayout = convertNode <SMIL::Layout> (tqlayout_node); + if (tqlayout && tqlayout->region_surface) { kdError() << "Layout already has a surface" << endl; } - if (layout) + if (tqlayout) Element::activate (); else - Element::deactivate(); // some unfortunate reset in parent doc + Element::deactivate(); // some unfortunate reset in tqparent doc } KDE_NO_EXPORT void SMIL::Smil::deactivate () { - if (layout_node) - convertNode <SMIL::Layout> (layout_node)->repaint (); - if (layout_node) - convertNode <SMIL::Layout> (layout_node)->region_surface = NULL; + if (tqlayout_node) + convertNode <SMIL::Layout> (tqlayout_node)->tqrepaint (); + if (tqlayout_node) + convertNode <SMIL::Layout> (tqlayout_node)->region_surface = NULL; Mrl::getSurface(0L); Mrl::deactivate (); } KDE_NO_EXPORT bool SMIL::Smil::handleEvent (EventPtr event) { - return layout_node ? layout_node->handleEvent (event) : false; + return tqlayout_node ? tqlayout_node->handleEvent (event) : false; } KDE_NO_EXPORT void SMIL::Smil::closed () { @@ -1650,21 +1650,21 @@ KDE_NO_EXPORT void SMIL::Smil::closed () { } for (NodePtr e = head->firstChild (); e; e = e->nextSibling ()) { if (e->id == id_node_layout) { - layout_node = e; + tqlayout_node = e; } else if (e->id == id_node_title) { - QString str = e->innerText (); - pretty_name = str.left (str.find (QChar ('\n'))); + TQString str = e->innerText (); + pretty_name = str.left (str.tqfind (TQChar ('\n'))); } else if (e->id == id_node_meta) { Element * elm = convertNode <Element> (e); - const QString name = elm->getAttribute (StringPool::attr_name); - if (name == QString::fromLatin1 ("title")) + const TQString name = elm->getAttribute (StringPool::attr_name); + if (name == TQString::tqfromLatin1 ("title")) pretty_name = elm->getAttribute ("content"); - else if (name == QString::fromLatin1 ("base")) + else if (name == TQString::tqfromLatin1 ("base")) src = elm->getAttribute ("content"); } } - if (!layout_node) { - kdError () << "no <root-layout>" << endl; + if (!tqlayout_node) { + kdError () << "no <root-tqlayout>" << endl; return; } } @@ -1692,17 +1692,17 @@ KDE_NO_EXPORT bool SMIL::Smil::expose () const { } KDE_NO_EXPORT void SMIL::Smil::accept (Visitor * v) { - if (active () && layout_node) - layout_node->accept( v ); + if (active () && tqlayout_node) + tqlayout_node->accept( v ); } -void SMIL::Smil::jump (const QString & id) { +void SMIL::Smil::jump (const TQString & id) { NodePtr n = document ()->getElementById (this, id, false); if (n) { if (n->unfinished ()) kdDebug() << "Smil::jump node is unfinished " << id << endl; else { - for (NodePtr p = n; p; p = p->parentNode ()) { + for (NodePtr p = n; p; p = p->tqparentNode ()) { if (p->unfinished () && p->id >= id_node_first_group && p->id <= id_node_last_group) { @@ -1719,7 +1719,7 @@ void SMIL::Smil::jump (const QString & id) { } SMIL::Smil * SMIL::Smil::findSmilNode (Node * node) { - for (Node * e = node; e; e = e->parentNode ().ptr ()) + for (Node * e = node; e; e = e->tqparentNode ().ptr ()) if (e->id == SMIL::id_node_smil) return static_cast <SMIL::Smil *> (e); return 0L; @@ -1736,9 +1736,9 @@ static void headChildDone (NodePtr node, NodePtr child) { } } -KDE_NO_EXPORT NodePtr SMIL::Head::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::Head::childFromTag (const TQString & tag) { const char * ctag = tag.ascii (); - if (!strcmp (ctag, "layout")) + if (!strcmp (ctag, "tqlayout")) return new SMIL::Layout (m_doc); else if (!strcmp (ctag, "title")) return new DarkNode (m_doc, tag, id_node_title); @@ -1757,10 +1757,10 @@ KDE_NO_EXPORT void SMIL::Head::closed () { for (NodePtr e = firstChild (); e; e = e->nextSibling ()) if (e->id == id_node_layout) return; - SMIL::Layout * layout = new SMIL::Layout (m_doc); - appendChild (layout); - layout->setAuxiliaryNode (true); - layout->closed (); // add root-layout and a region + SMIL::Layout * tqlayout = new SMIL::Layout (m_doc); + appendChild (tqlayout); + tqlayout->setAuxiliaryNode (true); + tqlayout->closed (); // add root-tqlayout and a region } KDE_NO_EXPORT void SMIL::Head::childDone (NodePtr child) { @@ -1772,9 +1772,9 @@ KDE_NO_EXPORT void SMIL::Head::childDone (NodePtr child) { KDE_NO_CDTOR_EXPORT SMIL::Layout::Layout (NodePtr & d) : RegionBase (d, id_node_layout) {} -KDE_NO_EXPORT NodePtr SMIL::Layout::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::Layout::childFromTag (const TQString & tag) { const char * ctag = tag.ascii (); - if (!strcmp (ctag, "root-layout")) { + if (!strcmp (ctag, "root-tqlayout")) { NodePtr e = new SMIL::RootLayout (m_doc); rootLayout = e; return e; @@ -1812,11 +1812,11 @@ KDE_NO_EXPORT void SMIL::Layout::closed () { appendChild (r); r->setAuxiliaryNode (true); } - rl->setAttribute(StringPool::attr_width, QString::number(w_root)); - rl->setAttribute(StringPool::attr_height,QString::number(h_root)); + rl->setAttribute(StringPool::attr_width, TQString::number(w_root)); + rl->setAttribute(StringPool::attr_height,TQString::number(h_root)); insertBefore (sr, firstChild ()); } else { - if (childNodes ()->length () < 2) { // only a root-layout + if (childNodes ()->length () < 2) { // only a root-tqlayout SMIL::Region * r = new SMIL::Region (m_doc); appendChild (r); r->setAuxiliaryNode (true); @@ -1834,7 +1834,7 @@ KDE_NO_EXPORT void SMIL::Layout::activate () { RegionBase::activate (); if (surface ()) { updateDimensions (); - repaint (); + tqrepaint (); } finish (); // proceed and allow 'head' to finish } @@ -1861,10 +1861,10 @@ KDE_NO_EXPORT Surface *SMIL::Layout::surface () { if (rl && auxiliaryNode ()) { w = rect.width (); h = rect.height (); - rl->setAttribute (StringPool::attr_width, QString::number ((int)w)); - rl->setAttribute (StringPool::attr_height, QString::number ((int)h)); - rl->setParam (StringPool::attr_width, QString::number((int)w)); - rl->setParam (StringPool::attr_height,QString::number((int)h)); + rl->setAttribute (StringPool::attr_width, TQString::number ((int)w)); + rl->setAttribute (StringPool::attr_height, TQString::number ((int)h)); + rl->setParam (StringPool::attr_width, TQString::number((int)w)); + rl->setParam (StringPool::attr_height,TQString::number((int)h)); } else if (region_surface && w > 0 && h > 0) { updateDimensions (); } @@ -1909,15 +1909,15 @@ KDE_NO_EXPORT void SMIL::RegionBase::deactivate () { background_image.truncate (0); if (region_surface) region_surface->background_color = 0; - cached_img.setUrl (QString ()); + cached_img.setUrl (TQString ()); postpone_lock = NULL; killWGet (); sizes.resetSizes (); Element::deactivate (); } -KDE_NO_EXPORT void SMIL::RegionBase::remoteReady (QByteArray & data) { - QImage *pix = new QImage (data); +KDE_NO_EXPORT void SMIL::RegionBase::remoteReady (TQByteArray & data) { + TQImage *pix = new TQImage (data); if (!pix->isNull ()) { cached_img.data->image = pix; if (region_surface) @@ -1928,14 +1928,14 @@ KDE_NO_EXPORT void SMIL::RegionBase::remoteReady (QByteArray & data) { postpone_lock = 0L; } -KDE_NO_EXPORT void SMIL::RegionBase::repaint () { +KDE_NO_EXPORT void SMIL::RegionBase::tqrepaint () { if (surface ()) - region_surface->repaint (SRect (0, 0, w, h)); + region_surface->tqrepaint (SRect (0, 0, w, h)); } -KDE_NO_EXPORT void SMIL::RegionBase::repaint (const SRect & rect) { +KDE_NO_EXPORT void SMIL::RegionBase::tqrepaint (const SRect & rect) { if (surface ()) - region_surface->repaint (SRect (0, 0, w, h).intersect (rect)); + region_surface->tqrepaint (SRect (0, 0, w, h).intersect (rect)); } KDE_NO_EXPORT void SMIL::RegionBase::updateDimensions () { @@ -1949,8 +1949,8 @@ KDE_NO_EXPORT void SMIL::RegionBase::updateDimensions () { } KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () { - // if there is a region_surface and it's moved, do a limit repaint - NodePtr p = parentNode (); + // if there is a region_surface and it's moved, do a limit tqrepaint + NodePtr p = tqparentNode (); if (p && (p->id==SMIL::id_node_region || p->id==SMIL::id_node_layout) && region_surface) { RegionBase *pr = convertNode <SMIL::RegionBase> (p); @@ -1958,13 +1958,13 @@ KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () { w = 0; h = 0; sizes.calcSizes (this, pr->w, pr->h, x, y, w, h); region_surface->bounds = SRect (x, y, w, h); - pr->repaint (region_surface->bounds.unite (old_bounds)); + pr->tqrepaint (region_surface->bounds.unite (old_bounds)); } } KDE_NO_EXPORT Surface *SMIL::RegionBase::surface () { if (!region_surface) { - Node *n = parentNode ().ptr (); + Node *n = tqparentNode ().ptr (); if (n && (SMIL::id_node_region == n->id || SMIL::id_node_layout == n->id)) { @@ -1979,22 +1979,22 @@ KDE_NO_EXPORT Surface *SMIL::RegionBase::surface () { } KDE_NO_EXPORT -void SMIL::RegionBase::parseParam (const TrieString & name, const QString & val) { +void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "RegionBase::parseParam " << getAttribute ("id") << " " << name << "=" << val << " active:" << active() << endl; - bool need_repaint = false; + bool need_tqrepaint = false; SRect rect = SRect (x, y, w, h); bool dim_changed; if (name == "background-color" || name == "backgroundColor") { if (val.isEmpty ()) background_color = 0; else - background_color = 0xff000000 | QColor (val).rgb (); + background_color = 0xff000000 | TQColor (val).rgb (); if (region_surface || (active () && surface ())) region_surface->background_color = background_color; - need_repaint = true; + need_tqrepaint = true; } else if (name == "z-index") { z_order = val.toInt (); - need_repaint = true; + need_tqrepaint = true; } else if (sizes.setSizeParam (name, val, dim_changed)) { if (active ()) { if (region_surface) { @@ -2005,37 +2005,37 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const QString & val) return; // smart update of old bounds to new moved one } } - NodePtr p = parentNode (); + NodePtr p = tqparentNode (); if (p &&(p->id==SMIL::id_node_region ||p->id==SMIL::id_node_layout)) convertNode <SMIL::RegionBase> (p)->updateDimensions (); rect = rect.unite (SRect (x, y, w, h)); - need_repaint = true; + need_tqrepaint = true; } } else if (name == "showBackground") { if (val == "whenActive") show_background = ShowWhenActive; else show_background = ShowAlways; - need_repaint = true; + need_tqrepaint = true; } else if (name == "backgroundImage") { background_image = val; Smil * s = SMIL::Smil::findSmilNode (this); if (s) { killWGet (); - need_repaint = !cached_img.isEmpty (); - Mrl *mrl = s->parentNode () ? s->parentNode ()->mrl () : NULL; - QString url = mrl ? KURL (mrl->absolutePath (), val).url () : val; + need_tqrepaint = !cached_img.isEmpty (); + Mrl *mrl = s->tqparentNode () ? s->tqparentNode ()->mrl () : NULL; + TQString url = mrl ? KURL (mrl->absolutePath (), val).url () : val; cached_img.setUrl (url); if (cached_img.isEmpty ()) { postpone_lock = document ()->postpone (); wget (url); } else { - need_repaint = true; + need_tqrepaint = true; } } } - if (need_repaint && active () && surface() && region_surface->parentNode ()) - region_surface->parentNode ()->repaint (rect); + if (need_tqrepaint && active () && surface() && region_surface->tqparentNode ()) + region_surface->tqparentNode ()->tqrepaint (rect); Element::parseParam (name, val); } @@ -2044,7 +2044,7 @@ KDE_NO_CDTOR_EXPORT SMIL::Region::Region (NodePtr & d) has_mouse (false), m_AttachedMediaTypes (new NodeRefList) {} -KDE_NO_EXPORT NodePtr SMIL::Region::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::Region::childFromTag (const TQString & tag) { if (!strcmp (tag.latin1 (), "region")) return new SMIL::Region (m_doc); return NodePtr (); @@ -2052,7 +2052,7 @@ KDE_NO_EXPORT NodePtr SMIL::Region::childFromTag (const QString & tag) { /** * calculates dimensions of this regions with _w and _h as width and height - * of parent Region (representing 100%) + * of tqparent Region (representing 100%) */ KDE_NO_EXPORT void SMIL::Region::calculateBounds (Single pw, Single ph) { @@ -2060,7 +2060,7 @@ void SMIL::Region::calculateBounds (Single pw, Single ph) { sizes.calcSizes (this, pw, ph, x, y, w, h); if (surface ()) region_surface->bounds = SRect (x, y, w, h); - //kdDebug () << "Region::calculateBounds parent:" << pw << "x" << ph << " this:" << x << "," << y << " " << w << "x" << h << endl; + //kdDebug () << "Region::calculateBounds tqparent:" << pw << "x" << ph << " this:" << x << "," << y << " " << w << "x" << h << endl; } NodeRefListPtr SMIL::Region::listeners (unsigned int eid) { @@ -2081,9 +2081,9 @@ KDE_NO_EXPORT void SMIL::Region::accept (Visitor * v) { //----------------------------------------------------------------------------- KDE_NO_EXPORT -void SMIL::RegPoint::parseParam (const TrieString & p, const QString & v) { +void SMIL::RegPoint::parseParam (const TrieString & p, const TQString & v) { bool b; - sizes.setSizeParam (p, v, b); // TODO: if dynamic, make sure to repaint + sizes.setSizeParam (p, v, b); // TODO: if dynamic, make sure to tqrepaint Element::parseParam (p, v); } @@ -2136,7 +2136,7 @@ KDE_NO_EXPORT void SMIL::Transition::activate () { } KDE_NO_EXPORT -void SMIL::Transition::parseParam (const TrieString & para, const QString & val) { +void SMIL::Transition::parseParam (const TrieString & para, const TQString & val) { if (para == StringPool::attr_type) { type_info = transInfoFromString (val.ascii ()); if (type_info) { @@ -2163,7 +2163,7 @@ void SMIL::Transition::parseParam (const TrieString & para, const QString & val) sub_type = type_info->sub_type[0]; } } else if (para == "fadeColor") { - fade_color = QColor (getAttribute (val)).rgb (); + fade_color = TQColor (getAttribute (val)).rgb (); } else if (para == "direction") { direction = val == "reverse" ? dir_reverse : dir_forward; } else if (para == "startProgress") { @@ -2342,7 +2342,7 @@ KDE_NO_EXPORT Runtime * SMIL::TimedMrl::getNewRuntime () { } KDE_NO_EXPORT -void SMIL::TimedMrl::parseParam (const TrieString ¶, const QString &value) { +void SMIL::TimedMrl::parseParam (const TrieString ¶, const TQString &value) { if (para.startsWith (StringPool::attr_fill)) { Fill * f = &fill; if (para != StringPool::attr_fill) { @@ -2389,18 +2389,18 @@ KDE_NO_EXPORT bool SMIL::TimedMrl::keepContent (Node *n) { TimedMrl * tm = convertNode <SMIL::TimedMrl> (n); if (tm->runtime ()->timingstate == Runtime::timings_started) return true; - Node *p = n->parentNode (); + Node *p = n->tqparentNode (); Node *np = tm; while (p && id_node_body != p->id && !isTimedMrl (p)) { np = p; - p = p->parentNode ().ptr (); // skip anchors + p = p->tqparentNode ().ptr (); // skip anchors } if (tm->m_runtime && p && p->active ()) { if (tm->runtime ()->timingstate == Runtime::timings_stopped) switch (tm->fill_active) { - case fill_hold: // keep while parent active + case fill_hold: // keep while tqparent active return true; - case fill_freeze: // keep in parent duration + case fill_freeze: // keep in tqparent duration if (p->unfinished() && (p->id == SMIL::id_node_par || p->id == SMIL::id_node_excl || @@ -2409,7 +2409,7 @@ KDE_NO_EXPORT bool SMIL::TimedMrl::keepContent (Node *n) { return true; // else fall through case fill_default: // as freeze when no duration is set - case fill_auto: // or when parent finished w/o duration + case fill_auto: // or when tqparent finished w/o duration return keepContent (p) && (p->id == SMIL::id_node_par || p->id == SMIL::id_node_excl || @@ -2427,13 +2427,13 @@ KDE_NO_EXPORT bool SMIL::TimedMrl::keepContent (Node *n) { } KDE_NO_EXPORT SMIL::TimedMrl::Fill SMIL::TimedMrl::getDefaultFill (NodePtr n) { - for (NodePtr p = n->parentNode (); p; p = p->parentNode ()) + for (NodePtr p = n->tqparentNode (); p; p = p->tqparentNode ()) if (isTimedMrl (p)) { SMIL::TimedMrl * tm = convertNode<SMIL::TimedMrl>(p); if (tm->fill_def != fill_inherit) return tm->fill_def; else if (tm->fill == fill_default) - return tm->fill_active; // assume parent figured out this + return tm->fill_active; // assume tqparent figured out this } else if (p->id == SMIL::id_node_smil) break; return fill_auto; @@ -2441,7 +2441,7 @@ KDE_NO_EXPORT SMIL::TimedMrl::Fill SMIL::TimedMrl::getDefaultFill (NodePtr n) { //----------------------------------------------------------------------------- -KDE_NO_EXPORT NodePtr SMIL::GroupBase::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::GroupBase::childFromTag (const TQString & tag) { Element * elm = fromScheduleGroup (m_doc, tag); if (!elm) elm = fromMediaContentGroup (m_doc, tag); if (!elm) elm = fromContentControlGroup (m_doc, tag); @@ -2476,7 +2476,7 @@ KDE_NO_EXPORT void SMIL::GroupBase::setJumpNode (NodePtr n) { for (NodePtr c = firstChild (); c; c = c->nextSibling ()) if (c->active ()) c->reset (); - for (NodePtr c = n->parentNode (); c; c = c->parentNode ()) { + for (NodePtr c = n->tqparentNode (); c; c = c->tqparentNode ()) { if (c.ptr () == this || c->id == id_node_body) break; if (c->id >= id_node_first_group && c->id <= id_node_last_group) @@ -2570,7 +2570,7 @@ KDE_NO_EXPORT void SMIL::Excl::begin () { for (NodePtr e = firstChild (); e; e = e->nextSibling ()) if (isTimedMrl (e)) { SMIL::TimedMrl * tm = static_cast <SMIL::TimedMrl *> (e.ptr ()); - if (tm) { // make aboutToStart connection with TimedMrl children + if (tm) { // make aboutToStart connection with TimedMrl tqchildren ConnectionPtr c = tm->connectTo (this, event_to_be_started); started_event_list.append (new ConnectionStoreItem (c)); } @@ -2628,14 +2628,14 @@ KDE_NO_EXPORT void SMIL::Switch::begin () { for (NodePtr e = firstChild (); e; e = e->nextSibling ()) if (e->isElementNode ()) { Element *elm = convertNode <Element> (e); - QString lang = elm->getAttribute ("systemLanguage"); + TQString lang = elm->getAttribute ("systemLanguage"); if (!lang.isEmpty ()) { - lang = lang.replace (QChar ('-'), QChar ('_')); + lang = lang.tqreplace (TQChar ('-'), TQChar ('_')); char *clang = getenv ("LANG"); if (!clang) { if (!fallback) fallback = e; - } else if (QString (clang).lower ().startsWith (lang)) { + } else if (TQString (clang).lower ().startsWith (lang)) { chosenOne = e; } else if (!fallback) { fallback = e->nextSibling (); @@ -2691,7 +2691,7 @@ KDE_NO_EXPORT void SMIL::Switch::childDone (NodePtr child) { //----------------------------------------------------------------------------- KDE_NO_CDTOR_EXPORT SMIL::LinkingBase::LinkingBase (NodePtr & d, short id) - : Element(d, id), show (show_replace) {} + : Element(d, id), show (show_tqreplace) {} KDE_NO_EXPORT void SMIL::LinkingBase::deactivate () { mediatype_activated = 0L; @@ -2700,7 +2700,7 @@ KDE_NO_EXPORT void SMIL::LinkingBase::deactivate () { } KDE_NO_EXPORT -void SMIL::LinkingBase::parseParam(const TrieString ¶, const QString &val) { +void SMIL::LinkingBase::parseParam(const TrieString ¶, const TQString &val) { if (para == StringPool::attr_href) { href = val; } @@ -2731,13 +2731,13 @@ KDE_NO_EXPORT void SMIL::Anchor::childDone (NodePtr child) { } } -NodePtr SMIL::Anchor::childFromTag (const QString & tag) { +NodePtr SMIL::Anchor::childFromTag (const TQString & tag) { return fromMediaContentGroup (m_doc, tag); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT SMIL::Area::Area (NodePtr & d, const QString & t) +KDE_NO_CDTOR_EXPORT SMIL::Area::Area (NodePtr & d, const TQString & t) : LinkingBase (d, id_node_area), coords (0L), nr_coords (0), tag (t) {} KDE_NO_CDTOR_EXPORT SMIL::Area::~Area () { @@ -2746,20 +2746,20 @@ KDE_NO_CDTOR_EXPORT SMIL::Area::~Area () { KDE_NO_EXPORT void SMIL::Area::activate () { init (); - if (parentNode () && - parentNode ()->id >= id_node_first_mediatype && - parentNode ()->id <= id_node_last_mediatype) { - mediatype_activated = parentNode ()->connectTo (this, event_activated); - mediatype_attach = parentNode ()->connectTo (this, mediatype_attached); + if (tqparentNode () && + tqparentNode ()->id >= id_node_first_mediatype && + tqparentNode ()->id <= id_node_last_mediatype) { + mediatype_activated = tqparentNode ()->connectTo (this, event_activated); + mediatype_attach = tqparentNode ()->connectTo (this, mediatype_attached); } Element::activate (); } KDE_NO_EXPORT -void SMIL::Area::parseParam (const TrieString & para, const QString & val) { +void SMIL::Area::parseParam (const TrieString & para, const TQString & val) { if (para == "coords") { delete [] coords; - QStringList clist = QStringList::split (QString (","), val); + TQStringList clist = TQStringList::split (TQString (","), val); nr_coords = clist.count (); coords = new SizeType [nr_coords]; for (int i = 0; i < nr_coords; ++i) @@ -2777,14 +2777,14 @@ KDE_NO_EXPORT NodeRefListPtr SMIL::Area::listeners (unsigned int id) { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT SMIL::MediaType::MediaType (NodePtr &d, const QString &t, short id) +KDE_NO_CDTOR_EXPORT SMIL::MediaType::MediaType (NodePtr &d, const TQString &t, short id) : TimedMrl (d, id), m_type (t), bitrate (0), trans_step (0), trans_steps (0), sensitivity (sens_opaque), trans_out_active (false), m_MediaAttached (new NodeRefList) { view_mode = Mrl::WindowMode; } -KDE_NO_EXPORT NodePtr SMIL::MediaType::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::MediaType::childFromTag (const TQString & tag) { Element * elm = fromContentControlGroup (m_doc, tag); if (!elm) elm = fromParamGroup (m_doc, tag); if (!elm) elm = fromAnimateGroup (m_doc, tag); @@ -2804,7 +2804,7 @@ KDE_NO_EXPORT void SMIL::MediaType::closed () { } KDE_NO_EXPORT -void SMIL::MediaType::parseParam (const TrieString ¶, const QString & val) { +void SMIL::MediaType::parseParam (const TrieString ¶, const TQString & val) { bool update_surface = true; if (para == "fit") { const char * cval = val.ascii (); @@ -2857,19 +2857,19 @@ void SMIL::MediaType::parseParam (const TrieString ¶, const QString & val) { TimedMrl::parseParam (para, val); } if (sub_surface) - sub_surface->repaint (); + sub_surface->tqrepaint (); resetSurface (); if (surface ()) - sub_surface->repaint (); + sub_surface->tqrepaint (); } KDE_NO_EXPORT void SMIL::MediaType::boundsUpdate () { SMIL::RegionBase *rb = convertNode <SMIL::RegionBase> (region_node); if (rb && sub_surface) { SRect new_bounds = calculateBounds (); - SRect repaint_rect = sub_surface->bounds.unite (new_bounds); + SRect tqrepaint_rect = sub_surface->bounds.unite (new_bounds); sub_surface->bounds = new_bounds; - rb->repaint (repaint_rect); + rb->tqrepaint (tqrepaint_rect); } } @@ -2881,7 +2881,7 @@ KDE_NO_EXPORT void SMIL::MediaType::activate () { setState (state_activated); for (NodePtr c = firstChild (); c; c = c->nextSibling ()) if (c != external_tree) { - // activate param/set/animate.. children + // activate param/set/animate.. tqchildren c->activate (); break; // childDone will handle next siblings } @@ -2896,7 +2896,7 @@ KDE_NO_EXPORT void SMIL::MediaType::deactivate () { region_attach = 0L; trans_step = trans_steps = 0; if (region_node) - convertNode <SMIL::RegionBase> (region_node)->repaint (); + convertNode <SMIL::RegionBase> (region_node)->tqrepaint (); if (trans_timer) document ()->cancelTimer (trans_timer); if (trans_out_timer) @@ -2906,9 +2906,9 @@ KDE_NO_EXPORT void SMIL::MediaType::deactivate () { } KDE_NO_EXPORT void SMIL::MediaType::begin () { - SMIL::Smil * s = Smil::findSmilNode (parentNode ().ptr ()); + SMIL::Smil * s = Smil::findSmilNode (tqparentNode ().ptr ()); SMIL::Region * r = s ? - findRegion (s->layout_node, param (StringPool::attr_region)) : 0L; + findRegion (s->tqlayout_node, param (StringPool::attr_region)) : 0L; MediaTypeRuntime *tr = static_cast<MediaTypeRuntime*>(runtime ()); if (trans_timer) // eg transOut and we're repeating document ()->cancelTimer (trans_timer); @@ -2918,7 +2918,7 @@ KDE_NO_EXPORT void SMIL::MediaType::begin () { region_mouse_leave = r->connectTo (this, event_outbounds); region_mouse_click = r->connectTo (this, event_activated); region_attach = r->connectTo (this, mediatype_attached); - r->repaint (); + r->tqrepaint (); tr->clipStart (); Transition * trans = convertNode <Transition> (trans_in); if (trans && trans->supported ()) { @@ -2955,13 +2955,13 @@ KDE_NO_EXPORT void SMIL::MediaType::finish () { ASSERT(!trans_timer); } if (region_node) - convertNode <SMIL::RegionBase> (region_node)->repaint (); + convertNode <SMIL::RegionBase> (region_node)->tqrepaint (); TimedMrl::finish (); static_cast <MediaTypeRuntime *> (runtime ())->clipStop (); } /** - * Re-implement from TimedMrl, because we may have children like + * Re-implement from TimedMrl, because we may have tqchildren like * param/set/animatie that should all be activate, but also other smil or imfl * documents, that should only be activated if the runtime has started */ @@ -2969,7 +2969,7 @@ KDE_NO_EXPORT void SMIL::MediaType::childDone (NodePtr child) { bool child_doc = child->mrl () && child->mrl ()->opener.ptr () == this; if (child_doc) { child->deactivate (); // should only if fill not is freeze or hold - } else if (active ()) { // traverse param or area children + } else if (active ()) { // traverse param or area tqchildren for (NodePtr c = child->nextSibling(); c; c = c->nextSibling ()) if (!c->mrl () || c->mrl ()->opener.ptr () != this ) { c->activate (); @@ -3085,8 +3085,8 @@ bool SMIL::MediaType::handleEvent (EventPtr event) { active_trans = NULL; else te->interval = trans_step++ < trans_steps; - if (s && s->parentNode()) - s->parentNode()->repaint (s->bounds); + if (s && s->tqparentNode()) + s->tqparentNode()->tqrepaint (s->bounds); return true; } else if (te->timer_info->event_id == trans_out_timer_id) { active_trans = trans_out; @@ -3104,7 +3104,7 @@ bool SMIL::MediaType::handleEvent (EventPtr event) { } trans_out_active = true; if (s) - s->repaint (); + s->tqrepaint (); } return true; } @@ -3129,10 +3129,10 @@ KDE_NO_EXPORT NodeRefListPtr SMIL::MediaType::listeners (unsigned int id) { //----------------------------------------------------------------------------- KDE_NO_CDTOR_EXPORT -SMIL::AVMediaType::AVMediaType (NodePtr & d, const QString & t) +SMIL::AVMediaType::AVMediaType (NodePtr & d, const TQString & t) : SMIL::MediaType (d, t, id_node_audio_video) {} -KDE_NO_EXPORT NodePtr SMIL::AVMediaType::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::AVMediaType::childFromTag (const TQString & tag) { return fromXMLDocumentTag (m_doc, tag); } @@ -3182,7 +3182,7 @@ KDE_NO_EXPORT Runtime * SMIL::ImageMediaType::getNewRuntime () { return new ImageRuntime (this); } -KDE_NO_EXPORT NodePtr SMIL::ImageMediaType::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::ImageMediaType::childFromTag (const TQString & tag) { if (!strcmp (tag.latin1 (), "imfl")) return new RP::Imfl (m_doc); return SMIL::MediaType::childFromTag (tag); @@ -3281,10 +3281,10 @@ KDE_NO_EXPORT bool SMIL::AnimateMotion::handleEvent (EventPtr event) { KDE_NO_EXPORT void SMIL::Param::activate () { setState (state_activated); - QString name = getAttribute (StringPool::attr_name); - Node * parent = parentNode ().ptr (); - if (!name.isEmpty () && parent && parent->isElementNode ()) - static_cast<Element*>(parent)->setParam (name, + TQString name = getAttribute (StringPool::attr_name); + Node * tqparent = tqparentNode ().ptr (); + if (!name.isEmpty () && tqparent && tqparent->isElementNode ()) + static_cast<Element*>(tqparent)->setParam (name, getAttribute (StringPool::attr_value)); Element::activate (); //finish (); // no livetime of itself, will deactivate } @@ -3350,7 +3350,7 @@ KDE_NO_CDTOR_EXPORT ImageRuntime::~ImageRuntime () { } KDE_NO_EXPORT -bool ImageRuntime::parseParam (const TrieString & name, const QString & val) { +bool ImageRuntime::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "ImageRuntime::param " << name << "=" << val << endl; if (name == StringPool::attr_src) { killWGet (); @@ -3362,7 +3362,7 @@ bool ImageRuntime::parseParam (const TrieString & name, const QString & val) { mt->removeChild (mt->external_tree); mt->src = val; if (!val.isEmpty ()) { - QString abs = mt->absolutePath (); + TQString abs = mt->absolutePath (); cached_img.setUrl (abs); if (cached_img.isEmpty ()) { wget (abs); @@ -3377,7 +3377,7 @@ bool ImageRuntime::parseParam (const TrieString & name, const QString & val) { } /** - * start_timer timer expired, repaint if we have an image + * start_timer timer expired, tqrepaint if we have an image */ KDE_NO_EXPORT void ImageRuntime::started () { if (element && downloading ()) { @@ -3402,16 +3402,16 @@ KDE_NO_EXPORT void ImageRuntime::clipStop () { MediaTypeRuntime::clipStop (); } -KDE_NO_EXPORT void ImageRuntime::remoteReady (QByteArray & data) { +KDE_NO_EXPORT void ImageRuntime::remoteReady (TQByteArray & data) { NodePtr element_protect = element; // note element is weak SMIL::MediaType * mt = convertNode <SMIL::MediaType> (element); if (data.size () && mt) { mt->resetSurface (); - QString mime = mimetype (); + TQString mime = mimetype (); kdDebug () << "ImageRuntime::remoteReady " << mime << " empty:" << cached_img.isEmpty () << " " << mt->src << endl; - if (mime.startsWith (QString::fromLatin1 ("text/"))) { - QTextStream ts (data, IO_ReadOnly); - readXML (element, ts, QString ()); + if (mime.startsWith (TQString::tqfromLatin1 ("text/"))) { + TQTextStream ts (data, IO_ReadOnly); + readXML (element, ts, TQString ()); Mrl *mrl = mt->external_tree ? mt->external_tree->mrl () : NULL; if (mrl) { mt->width = mrl->width; @@ -3421,18 +3421,18 @@ KDE_NO_EXPORT void ImageRuntime::remoteReady (QByteArray & data) { if (!mt->external_tree && cached_img.isEmpty ()) { delete img_movie; img_movie = 0L; - QImage *pix = new QImage (data); + TQImage *pix = new TQImage (data); if (!pix->isNull ()) { cached_img.data->image = pix; - img_movie = new QMovie (data, data.size ()); - img_movie->connectUpdate(this,SLOT(movieUpdated(const QRect&))); - img_movie->connectStatus (this, SLOT (movieStatus (int))); - img_movie->connectResize(this,SLOT (movieResize(const QSize&))); + img_movie = new TQMovie (data, data.size ()); + img_movie->connectUpdate(this,TQT_SLOT(movieUpdated(const TQRect&))); + img_movie->connectStatus (this, TQT_SLOT (movietqStatus (int))); + img_movie->connectResize(this,TQT_SLOT (movieResize(const TQSize&))); frame_nr = 0; mt->width = pix->width (); mt->height = pix->height (); if (mt->surface ()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); } else delete pix; } @@ -3442,34 +3442,34 @@ KDE_NO_EXPORT void ImageRuntime::remoteReady (QByteArray & data) { started (); } -KDE_NO_EXPORT void ImageRuntime::movieUpdated (const QRect &) { +KDE_NO_EXPORT void ImageRuntime::movieUpdated (const TQRect &) { SMIL::MediaType * mt = convertNode <SMIL::MediaType> (element); if (mt && frame_nr++) { mt->resetSurface (); - cached_img.setUrl (QString ()); + cached_img.setUrl (TQString ()); ASSERT (cached_img.data && cached_img.isEmpty ()); - cached_img.data->image = new QImage; + cached_img.data->image = new TQImage; *cached_img.data->image = (img_movie->framePixmap ()); if (mt->surface()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); } if (timingstate != timings_started && img_movie) img_movie->pause (); } -KDE_NO_EXPORT void ImageRuntime::movieStatus (int s) { +KDE_NO_EXPORT void ImageRuntime::movietqStatus (int s) { if (element && element->state >= Node::state_began && SMIL::TimedMrl::keepContent (element)) { - if (s == QMovie::EndOfMovie) { + if (s == TQMovie::EndOfMovie) { propagateStop (false); } } } -KDE_NO_EXPORT void ImageRuntime::movieResize (const QSize &) { +KDE_NO_EXPORT void ImageRuntime::movieResize (const TQSize &) { SMIL::MediaType * mt = convertNode <SMIL::MediaType> (element); if (mt->surface ()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); //kdDebug () << "movieResize" << endl; } @@ -3493,12 +3493,12 @@ namespace KMPlayer { } void reset () { codec = 0L; - font = QApplication::font (); + font = TQApplication::font (); data.truncate (0); } - QByteArray data; - QTextCodec * codec; - QFont font; + TQByteArray data; + TQTextCodec * codec; + TQFont font; }; } @@ -3522,7 +3522,7 @@ KDE_NO_EXPORT void TextRuntime::reset () { } KDE_NO_EXPORT -bool TextRuntime::parseParam (const TrieString & name, const QString & val) { +bool TextRuntime::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "TextRuntime::parseParam " << name << "=" << val << endl; SMIL::MediaType * mt = convertNode <SMIL::MediaType> (element); if (!mt) @@ -3536,11 +3536,11 @@ bool TextRuntime::parseParam (const TrieString & name, const QString & val) { return true; } if (name == "backgroundColor" || name == "background-color") { - background_color = val.isEmpty () ? 0xffffff : QColor (val).rgb (); + background_color = val.isEmpty () ? 0xffffff : TQColor (val).rgb (); } else if (name == "fontColor") { - font_color = val.isEmpty () ? 0 : QColor (val).rgb (); + font_color = val.isEmpty () ? 0 : TQColor (val).rgb (); } else if (name == "charset") { - d->codec = QTextCodec::codecForName (val.ascii ()); + d->codec = TQTextCodec::codecForName (val.ascii ()); } else if (name == "fontFace") { ; //FIXME } else if (name == "fontPtSize") { @@ -3564,12 +3564,12 @@ bool TextRuntime::parseParam (const TrieString & name, const QString & val) { return MediaTypeRuntime::parseParam (name, val); mt->resetSurface (); if (mt->surface ()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); return true; } /** - * start_timer timer expired, repaint if we have text + * start_timer timer expired, tqrepaint if we have text */ KDE_NO_EXPORT void TextRuntime::started () { if (element && downloading ()) { @@ -3579,20 +3579,20 @@ KDE_NO_EXPORT void TextRuntime::started () { MediaTypeRuntime::started (); } -KDE_NO_EXPORT void TextRuntime::remoteReady (QByteArray & data) { - QString str (data); +KDE_NO_EXPORT void TextRuntime::remoteReady (TQByteArray & data) { + TQString str (data); SMIL::MediaType * mt = convertNode <SMIL::MediaType> (element); if (mt && data.size ()) { d->data = data; mt->resetSurface (); if (d->data.size () > 0 && !d->data [d->data.size () - 1]) d->data.resize (d->data.size () - 1); // strip zero terminate char - QTextStream ts (d->data, IO_ReadOnly); + TQTextStream ts (d->data, IO_ReadOnly); if (d->codec) ts.setCodec (d->codec); text = ts.read (); if (mt->surface ()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); } postpone_lock = 0L; if (timingstate == timings_started) |