Remove additional unneeded tq method conversions

pull/1/head
Timothy Pearson 13 years ago
parent 81ad3b51a1
commit 0ed6bc56f9

@ -183,11 +183,11 @@ KDE_NO_EXPORT NodePtr RP::Imfl::childFromTag (const TQString & tag) {
return 0L; return 0L;
} }
KDE_NO_EXPORT void RP::Imfl::tqrepaint () { KDE_NO_EXPORT void RP::Imfl::repaint () {
if (!active ()) if (!active ())
kdWarning () << "Spurious Imfl tqrepaint" << endl; kdWarning () << "Spurious Imfl repaint" << endl;
else if (surface () && width > 0 && height > 0) else if (surface () && width > 0 && height > 0)
rp_surface->tqrepaint (SRect (0, 0, width, height)); rp_surface->repaint (SRect (0, 0, width, height));
} }
KDE_NO_CDTOR_EXPORT RP::Image::Image (NodePtr & doc) KDE_NO_CDTOR_EXPORT RP::Image::Image (NodePtr & doc)
@ -353,7 +353,7 @@ KDE_NO_EXPORT void RP::TimingsBase::update (int percentage) {
progress = percentage; progress = percentage;
Node * p = parentNode ().ptr (); Node * p = parentNode ().ptr ();
if (p->id == RP::id_node_imfl) if (p->id == RP::id_node_imfl)
static_cast <RP::Imfl *> (p)->tqrepaint (); static_cast <RP::Imfl *> (p)->repaint ();
} }
KDE_NO_EXPORT void RP::TimingsBase::finish () { KDE_NO_EXPORT void RP::TimingsBase::finish () {

@ -66,7 +66,7 @@ public:
virtual bool handleEvent (EventPtr event); virtual bool handleEvent (EventPtr event);
virtual void accept (Visitor *); virtual void accept (Visitor *);
Surface *surface (); Surface *surface ();
void tqrepaint (); // called whenever something changes on image void repaint (); // called whenever something changes on image
Fit fit; // how to tqlayout images Fit fit; // how to tqlayout images
unsigned int duration; // cached attributes of head unsigned int duration; // cached attributes of head
TimerInfoPtrW duration_timer; TimerInfoPtrW duration_timer;

@ -1052,8 +1052,8 @@ KDE_NO_EXPORT void AnimateData::stopped () {
KDE_NO_EXPORT void AnimateData::applyStep () { KDE_NO_EXPORT void AnimateData::applyStep () {
Element * target = convertNode <Element> (target_element); Element * target = convertNode <Element> (target_element);
if (target && calcMode == calc_linear) if (target && calcMode == calc_linear)
target->setParam (changed_attribute, TQString ("%1%2").tqarg ( target->setParam (changed_attribute, TQString ("%1%2").arg (
change_from_val).tqarg(change_from_unit), change_from_val).arg(change_from_unit),
&modification_id); &modification_id);
else if (target && calcMode == calc_discrete) else if (target && calcMode == calc_discrete)
target->setParam (changed_attribute, target->setParam (changed_attribute,
@ -1403,7 +1403,7 @@ KDE_NO_EXPORT void KMPlayer::MediaTypeRuntime::reset () {
} }
/** /**
* will request a tqrepaint of attached region * will request a repaint of attached region
*/ */
KDE_NO_EXPORT void MediaTypeRuntime::stopped () { KDE_NO_EXPORT void MediaTypeRuntime::stopped () {
clipStop (); clipStop ();
@ -1623,7 +1623,7 @@ KDE_NO_EXPORT void SMIL::Smil::activate () {
KDE_NO_EXPORT void SMIL::Smil::deactivate () { KDE_NO_EXPORT void SMIL::Smil::deactivate () {
if (layout_node) if (layout_node)
convertNode <SMIL::Layout> (layout_node)->tqrepaint (); convertNode <SMIL::Layout> (layout_node)->repaint ();
if (layout_node) if (layout_node)
convertNode <SMIL::Layout> (layout_node)->region_surface = NULL; convertNode <SMIL::Layout> (layout_node)->region_surface = NULL;
Mrl::getSurface(0L); Mrl::getSurface(0L);
@ -1834,7 +1834,7 @@ KDE_NO_EXPORT void SMIL::Layout::activate () {
RegionBase::activate (); RegionBase::activate ();
if (surface ()) { if (surface ()) {
updateDimensions (); updateDimensions ();
tqrepaint (); repaint ();
} }
finish (); // proceed and allow 'head' to finish finish (); // proceed and allow 'head' to finish
} }
@ -1928,14 +1928,14 @@ KDE_NO_EXPORT void SMIL::RegionBase::remoteReady (TQByteArray & data) {
postpone_lock = 0L; postpone_lock = 0L;
} }
KDE_NO_EXPORT void SMIL::RegionBase::tqrepaint () { KDE_NO_EXPORT void SMIL::RegionBase::repaint () {
if (surface ()) if (surface ())
region_surface->tqrepaint (SRect (0, 0, w, h)); region_surface->repaint (SRect (0, 0, w, h));
} }
KDE_NO_EXPORT void SMIL::RegionBase::tqrepaint (const SRect & rect) { KDE_NO_EXPORT void SMIL::RegionBase::repaint (const SRect & rect) {
if (surface ()) if (surface ())
region_surface->tqrepaint (SRect (0, 0, w, h).intersect (rect)); region_surface->repaint (SRect (0, 0, w, h).intersect (rect));
} }
KDE_NO_EXPORT void SMIL::RegionBase::updateDimensions () { KDE_NO_EXPORT void SMIL::RegionBase::updateDimensions () {
@ -1949,7 +1949,7 @@ KDE_NO_EXPORT void SMIL::RegionBase::updateDimensions () {
} }
KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () { KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () {
// if there is a region_surface and it's moved, do a limit tqrepaint // if there is a region_surface and it's moved, do a limit repaint
NodePtr p = parentNode (); NodePtr p = parentNode ();
if (p && (p->id==SMIL::id_node_region || p->id==SMIL::id_node_layout) && if (p && (p->id==SMIL::id_node_region || p->id==SMIL::id_node_layout) &&
region_surface) { region_surface) {
@ -1958,7 +1958,7 @@ KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () {
w = 0; h = 0; w = 0; h = 0;
sizes.calcSizes (this, pr->w, pr->h, x, y, w, h); sizes.calcSizes (this, pr->w, pr->h, x, y, w, h);
region_surface->bounds = SRect (x, y, w, h); region_surface->bounds = SRect (x, y, w, h);
pr->tqrepaint (region_surface->bounds.unite (old_bounds)); pr->repaint (region_surface->bounds.unite (old_bounds));
} }
} }
@ -1981,7 +1981,7 @@ KDE_NO_EXPORT Surface *SMIL::RegionBase::surface () {
KDE_NO_EXPORT KDE_NO_EXPORT
void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val) { void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val) {
//kdDebug () << "RegionBase::parseParam " << getAttribute ("id") << " " << name << "=" << val << " active:" << active() << endl; //kdDebug () << "RegionBase::parseParam " << getAttribute ("id") << " " << name << "=" << val << " active:" << active() << endl;
bool need_tqrepaint = false; bool need_repaint = false;
SRect rect = SRect (x, y, w, h); SRect rect = SRect (x, y, w, h);
bool dim_changed; bool dim_changed;
if (name == "background-color" || name == "backgroundColor") { if (name == "background-color" || name == "backgroundColor") {
@ -1991,10 +1991,10 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val
background_color = 0xff000000 | TQColor (val).rgb (); background_color = 0xff000000 | TQColor (val).rgb ();
if (region_surface || (active () && surface ())) if (region_surface || (active () && surface ()))
region_surface->background_color = background_color; region_surface->background_color = background_color;
need_tqrepaint = true; need_repaint = true;
} else if (name == "z-index") { } else if (name == "z-index") {
z_order = val.toInt (); z_order = val.toInt ();
need_tqrepaint = true; need_repaint = true;
} else if (sizes.setSizeParam (name, val, dim_changed)) { } else if (sizes.setSizeParam (name, val, dim_changed)) {
if (active ()) { if (active ()) {
if (region_surface) { if (region_surface) {
@ -2009,20 +2009,20 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val
if (p &&(p->id==SMIL::id_node_region ||p->id==SMIL::id_node_layout)) if (p &&(p->id==SMIL::id_node_region ||p->id==SMIL::id_node_layout))
convertNode <SMIL::RegionBase> (p)->updateDimensions (); convertNode <SMIL::RegionBase> (p)->updateDimensions ();
rect = rect.unite (SRect (x, y, w, h)); rect = rect.unite (SRect (x, y, w, h));
need_tqrepaint = true; need_repaint = true;
} }
} else if (name == "showBackground") { } else if (name == "showBackground") {
if (val == "whenActive") if (val == "whenActive")
show_background = ShowWhenActive; show_background = ShowWhenActive;
else else
show_background = ShowAlways; show_background = ShowAlways;
need_tqrepaint = true; need_repaint = true;
} else if (name == "backgroundImage") { } else if (name == "backgroundImage") {
background_image = val; background_image = val;
Smil * s = SMIL::Smil::findSmilNode (this); Smil * s = SMIL::Smil::findSmilNode (this);
if (s) { if (s) {
killWGet (); killWGet ();
need_tqrepaint = !cached_img.isEmpty (); need_repaint = !cached_img.isEmpty ();
Mrl *mrl = s->parentNode () ? s->parentNode ()->mrl () : NULL; Mrl *mrl = s->parentNode () ? s->parentNode ()->mrl () : NULL;
TQString url = mrl ? KURL (mrl->absolutePath (), val).url () : val; TQString url = mrl ? KURL (mrl->absolutePath (), val).url () : val;
cached_img.setUrl (url); cached_img.setUrl (url);
@ -2030,12 +2030,12 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val
postpone_lock = document ()->postpone (); postpone_lock = document ()->postpone ();
wget (url); wget (url);
} else { } else {
need_tqrepaint = true; need_repaint = true;
} }
} }
} }
if (need_tqrepaint && active () && surface() && region_surface->parentNode ()) if (need_repaint && active () && surface() && region_surface->parentNode ())
region_surface->parentNode ()->tqrepaint (rect); region_surface->parentNode ()->repaint (rect);
Element::parseParam (name, val); Element::parseParam (name, val);
} }
@ -2083,7 +2083,7 @@ KDE_NO_EXPORT void SMIL::Region::accept (Visitor * v) {
KDE_NO_EXPORT KDE_NO_EXPORT
void SMIL::RegPoint::parseParam (const TrieString & p, const TQString & v) { void SMIL::RegPoint::parseParam (const TrieString & p, const TQString & v) {
bool b; bool b;
sizes.setSizeParam (p, v, b); // TODO: if dynamic, make sure to tqrepaint sizes.setSizeParam (p, v, b); // TODO: if dynamic, make sure to repaint
Element::parseParam (p, v); Element::parseParam (p, v);
} }
@ -2570,7 +2570,7 @@ KDE_NO_EXPORT void SMIL::Excl::begin () {
for (NodePtr e = firstChild (); e; e = e->nextSibling ()) for (NodePtr e = firstChild (); e; e = e->nextSibling ())
if (isTimedMrl (e)) { if (isTimedMrl (e)) {
SMIL::TimedMrl * tm = static_cast <SMIL::TimedMrl *> (e.ptr ()); SMIL::TimedMrl * tm = static_cast <SMIL::TimedMrl *> (e.ptr ());
if (tm) { // make aboutToStart connection with TimedMrl tqchildren if (tm) { // make aboutToStart connection with TimedMrl children
ConnectionPtr c = tm->connectTo (this, event_to_be_started); ConnectionPtr c = tm->connectTo (this, event_to_be_started);
started_event_list.append (new ConnectionStoreItem (c)); started_event_list.append (new ConnectionStoreItem (c));
} }
@ -2857,10 +2857,10 @@ void SMIL::MediaType::parseParam (const TrieString &para, const TQString & val)
TimedMrl::parseParam (para, val); TimedMrl::parseParam (para, val);
} }
if (sub_surface) if (sub_surface)
sub_surface->tqrepaint (); sub_surface->repaint ();
resetSurface (); resetSurface ();
if (surface ()) if (surface ())
sub_surface->tqrepaint (); sub_surface->repaint ();
} }
KDE_NO_EXPORT void SMIL::MediaType::boundsUpdate () { KDE_NO_EXPORT void SMIL::MediaType::boundsUpdate () {
@ -2869,7 +2869,7 @@ KDE_NO_EXPORT void SMIL::MediaType::boundsUpdate () {
SRect new_bounds = calculateBounds (); SRect new_bounds = calculateBounds ();
SRect repaint_rect = sub_surface->bounds.unite (new_bounds); SRect repaint_rect = sub_surface->bounds.unite (new_bounds);
sub_surface->bounds = new_bounds; sub_surface->bounds = new_bounds;
rb->tqrepaint (repaint_rect); rb->repaint (repaint_rect);
} }
} }
@ -2881,7 +2881,7 @@ KDE_NO_EXPORT void SMIL::MediaType::activate () {
setState (state_activated); setState (state_activated);
for (NodePtr c = firstChild (); c; c = c->nextSibling ()) for (NodePtr c = firstChild (); c; c = c->nextSibling ())
if (c != external_tree) { if (c != external_tree) {
// activate param/set/animate.. tqchildren // activate param/set/animate.. children
c->activate (); c->activate ();
break; // childDone will handle next siblings break; // childDone will handle next siblings
} }
@ -2896,7 +2896,7 @@ KDE_NO_EXPORT void SMIL::MediaType::deactivate () {
region_attach = 0L; region_attach = 0L;
trans_step = trans_steps = 0; trans_step = trans_steps = 0;
if (region_node) if (region_node)
convertNode <SMIL::RegionBase> (region_node)->tqrepaint (); convertNode <SMIL::RegionBase> (region_node)->repaint ();
if (trans_timer) if (trans_timer)
document ()->cancelTimer (trans_timer); document ()->cancelTimer (trans_timer);
if (trans_out_timer) if (trans_out_timer)
@ -2918,7 +2918,7 @@ KDE_NO_EXPORT void SMIL::MediaType::begin () {
region_mouse_leave = r->connectTo (this, event_outbounds); region_mouse_leave = r->connectTo (this, event_outbounds);
region_mouse_click = r->connectTo (this, event_activated); region_mouse_click = r->connectTo (this, event_activated);
region_attach = r->connectTo (this, mediatype_attached); region_attach = r->connectTo (this, mediatype_attached);
r->tqrepaint (); r->repaint ();
tr->clipStart (); tr->clipStart ();
Transition * trans = convertNode <Transition> (trans_in); Transition * trans = convertNode <Transition> (trans_in);
if (trans && trans->supported ()) { if (trans && trans->supported ()) {
@ -2955,13 +2955,13 @@ KDE_NO_EXPORT void SMIL::MediaType::finish () {
ASSERT(!trans_timer); ASSERT(!trans_timer);
} }
if (region_node) if (region_node)
convertNode <SMIL::RegionBase> (region_node)->tqrepaint (); convertNode <SMIL::RegionBase> (region_node)->repaint ();
TimedMrl::finish (); TimedMrl::finish ();
static_cast <MediaTypeRuntime *> (runtime ())->clipStop (); static_cast <MediaTypeRuntime *> (runtime ())->clipStop ();
} }
/** /**
* Re-implement from TimedMrl, because we may have tqchildren like * Re-implement from TimedMrl, because we may have children like
* param/set/animatie that should all be activate, but also other smil or imfl * 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 * 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; bool child_doc = child->mrl () && child->mrl ()->opener.ptr () == this;
if (child_doc) { if (child_doc) {
child->deactivate (); // should only if fill not is freeze or hold child->deactivate (); // should only if fill not is freeze or hold
} else if (active ()) { // traverse param or area tqchildren } else if (active ()) { // traverse param or area children
for (NodePtr c = child->nextSibling(); c; c = c->nextSibling ()) for (NodePtr c = child->nextSibling(); c; c = c->nextSibling ())
if (!c->mrl () || c->mrl ()->opener.ptr () != this ) { if (!c->mrl () || c->mrl ()->opener.ptr () != this ) {
c->activate (); c->activate ();
@ -3086,7 +3086,7 @@ bool SMIL::MediaType::handleEvent (EventPtr event) {
else else
te->interval = trans_step++ < trans_steps; te->interval = trans_step++ < trans_steps;
if (s && s->parentNode()) if (s && s->parentNode())
s->parentNode()->tqrepaint (s->bounds); s->parentNode()->repaint (s->bounds);
return true; return true;
} else if (te->timer_info->event_id == trans_out_timer_id) { } else if (te->timer_info->event_id == trans_out_timer_id) {
active_trans = trans_out; active_trans = trans_out;
@ -3104,7 +3104,7 @@ bool SMIL::MediaType::handleEvent (EventPtr event) {
} }
trans_out_active = true; trans_out_active = true;
if (s) if (s)
s->tqrepaint (); s->repaint ();
} }
return true; return true;
} }
@ -3377,7 +3377,7 @@ bool ImageRuntime::parseParam (const TrieString & name, const TQString & val) {
} }
/** /**
* start_timer timer expired, tqrepaint if we have an image * start_timer timer expired, repaint if we have an image
*/ */
KDE_NO_EXPORT void ImageRuntime::started () { KDE_NO_EXPORT void ImageRuntime::started () {
if (element && downloading ()) { if (element && downloading ()) {
@ -3432,7 +3432,7 @@ KDE_NO_EXPORT void ImageRuntime::remoteReady (TQByteArray & data) {
mt->width = pix->width (); mt->width = pix->width ();
mt->height = pix->height (); mt->height = pix->height ();
if (mt->surface ()) if (mt->surface ())
mt->sub_surface->tqrepaint (); mt->sub_surface->repaint ();
} else } else
delete pix; delete pix;
} }
@ -3451,7 +3451,7 @@ KDE_NO_EXPORT void ImageRuntime::movieUpdated (const TQRect &) {
cached_img.data->image = new TQImage; cached_img.data->image = new TQImage;
*cached_img.data->image = (img_movie->framePixmap ()); *cached_img.data->image = (img_movie->framePixmap ());
if (mt->surface()) if (mt->surface())
mt->sub_surface->tqrepaint (); mt->sub_surface->repaint ();
} }
if (timingstate != timings_started && img_movie) if (timingstate != timings_started && img_movie)
img_movie->pause (); img_movie->pause ();
@ -3469,7 +3469,7 @@ KDE_NO_EXPORT void ImageRuntime::movieStatus (int s) {
KDE_NO_EXPORT void ImageRuntime::movieResize (const TQSize &) { KDE_NO_EXPORT void ImageRuntime::movieResize (const TQSize &) {
SMIL::MediaType * mt = convertNode <SMIL::MediaType> (element); SMIL::MediaType * mt = convertNode <SMIL::MediaType> (element);
if (mt->surface ()) if (mt->surface ())
mt->sub_surface->tqrepaint (); mt->sub_surface->repaint ();
//kdDebug () << "movieResize" << endl; //kdDebug () << "movieResize" << endl;
} }
@ -3564,12 +3564,12 @@ bool TextRuntime::parseParam (const TrieString & name, const TQString & val) {
return MediaTypeRuntime::parseParam (name, val); return MediaTypeRuntime::parseParam (name, val);
mt->resetSurface (); mt->resetSurface ();
if (mt->surface ()) if (mt->surface ())
mt->sub_surface->tqrepaint (); mt->sub_surface->repaint ();
return true; return true;
} }
/** /**
* start_timer timer expired, tqrepaint if we have text * start_timer timer expired, repaint if we have text
*/ */
KDE_NO_EXPORT void TextRuntime::started () { KDE_NO_EXPORT void TextRuntime::started () {
if (element && downloading ()) { if (element && downloading ()) {
@ -3592,7 +3592,7 @@ KDE_NO_EXPORT void TextRuntime::remoteReady (TQByteArray & data) {
ts.setCodec (d->codec); ts.setCodec (d->codec);
text = ts.read (); text = ts.read ();
if (mt->surface ()) if (mt->surface ())
mt->sub_surface->tqrepaint (); mt->sub_surface->repaint ();
} }
postpone_lock = 0L; postpone_lock = 0L;
if (timingstate == timings_started) if (timingstate == timings_started)

@ -61,7 +61,7 @@ class TextRuntimePrivate;
/* /*
* Event signaled before the actual starting takes place. Use by SMIL::Excl * Event signaled before the actual starting takes place. Use by SMIL::Excl
* to stop possible other tqchildren * to stop possible other children
*/ */
class ToBeStartedEvent : public Event { class ToBeStartedEvent : public Event {
public: public:
@ -444,15 +444,15 @@ public:
/** /**
* repaints region, calls scheduleRepaint(x,y,w,h) on view * repaints region, calls scheduleRepaint(x,y,w,h) on view
*/ */
void tqrepaint (); void repaint ();
void tqrepaint (const SRect & rect); void repaint (const SRect & rect);
/** /**
* calculate the relative x,y,w,h on the child region elements * calculate the relative x,y,w,h on the child region elements
* given this element's w and h value * given this element's w and h value
* and child's left/top/right/width/height/bottom attributes * and child's left/top/right/width/height/bottom attributes
*/ */
virtual void updateDimensions (); virtual void updateDimensions ();
void boundsUpdate (); // recalculates and tqrepaint old and new bounds void boundsUpdate (); // recalculates and repaint old and new bounds
virtual Surface *surface (); virtual Surface *surface ();
SurfacePtrW region_surface; SurfacePtrW region_surface;
@ -521,7 +521,7 @@ public:
}; };
/** /**
* Represents a regPoint element for tqalignment inside regions * Represents a regPoint element for alignment inside regions
*/ */
class KMPLAYER_NO_EXPORT RegPoint : public Element { class KMPLAYER_NO_EXPORT RegPoint : public Element {
public: public:
@ -656,7 +656,7 @@ protected:
}; };
/** /**
* A Par represents parallel processing of all its tqchildren * A Par represents parallel processing of all its children
*/ */
class KMPLAYER_NO_EXPORT Par : public GroupBase { class KMPLAYER_NO_EXPORT Par : public GroupBase {
public: public:
@ -668,7 +668,7 @@ public:
}; };
/** /**
* A Seq represents sequential processing of all its tqchildren * A Seq represents sequential processing of all its children
*/ */
class KMPLAYER_NO_EXPORT Seq : public GroupBase { class KMPLAYER_NO_EXPORT Seq : public GroupBase {
public: public:
@ -691,7 +691,7 @@ public:
}; };
/** /**
* An Excl represents exclusive processing of one of its tqchildren * An Excl represents exclusive processing of one of its children
*/ */
class KMPLAYER_NO_EXPORT Excl : public GroupBase { class KMPLAYER_NO_EXPORT Excl : public GroupBase {
public: public:
@ -780,7 +780,7 @@ public:
Surface *surface (); Surface *surface ();
void resetSurface (); void resetSurface ();
SRect calculateBounds (); SRect calculateBounds ();
void boundsUpdate (); // recalculates and tqrepaint old and new bounds void boundsUpdate (); // recalculates and repaint old and new bounds
virtual void parseParam (const TrieString & name, const TQString & value); virtual void parseParam (const TrieString & name, const TQString & value);
virtual bool handleEvent (EventPtr event); virtual bool handleEvent (EventPtr event);
NodeRefListPtr listeners (unsigned int event_id); NodeRefListPtr listeners (unsigned int event_id);

@ -1437,7 +1437,7 @@ KDE_NO_EXPORT void KMPlayerApp::slotViewMenuBar() {
slotStatusMsg(i18n("Ready")); slotStatusMsg(i18n("Ready"));
} else { } else {
menuBar()->hide(); menuBar()->hide();
slotStatusMsg (i18n ("Show Menubar with %1").tqarg(viewMenuBar->shortcutText())); slotStatusMsg (i18n ("Show Menubar with %1").arg(viewMenuBar->shortcutText()));
if (!m_showStatusbar) { if (!m_showStatusbar) {
statusBar()->show(); statusBar()->show();
TQTimer::singleShot (3000, statusBar(), TQT_SLOT (hide ())); TQTimer::singleShot (3000, statusBar(), TQT_SLOT (hide ()));

@ -306,7 +306,7 @@ void VolumeBar::setValue (int v) {
if (m_value > 100) m_value = 100; if (m_value > 100) m_value = 100;
TQToolTip::remove (this); TQToolTip::remove (this);
TQToolTip::add (this, i18n ("Volume is %1").arg (m_value)); TQToolTip::add (this, i18n ("Volume is %1").arg (m_value));
tqrepaint (true); repaint (true);
emit volumeChanged (m_value); emit volumeChanged (m_value);
} }

@ -1437,7 +1437,7 @@ void Source::stateChange(Process *p, Process::State olds, Process::State news) {
} }
if (m_player->view() && if (m_player->view() &&
(!mrl || mrl->view_mode != Mrl::WindowMode)) (!mrl || mrl->view_mode != Mrl::WindowMode))
static_cast<View*>(m_player->view())->viewArea()->tqrepaint(); static_cast<View*>(m_player->view())->viewArea()->repaint();
} else } else
TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ()));
} else if (news == Process::Buffering) { } else if (news == Process::Buffering) {

@ -296,7 +296,7 @@ void Node::clearChildren () {
if (m_doc) if (m_doc)
document()->m_tree_version++; document()->m_tree_version++;
while (m_first_child != m_last_child) { while (m_first_child != m_last_child) {
// avoid stack abuse with 10k tqchildren derefing each other // avoid stack abuse with 10k children derefing each other
m_last_child->m_parent = 0L; m_last_child->m_parent = 0L;
m_last_child = m_last_child->m_prev; m_last_child = m_last_child->m_prev;
m_last_child->m_next = 0L; m_last_child->m_next = 0L;

@ -164,7 +164,7 @@ public:
}; };
/* /*
* Base class for double linked tree nodes having parent/siblings/tqchildren. * Base class for double linked tree nodes having parent/siblings/children.
* The linkage is a shared firstChild and weak parentNode. * The linkage is a shared firstChild and weak parentNode.
*/ */
template <class T> template <class T>
@ -246,7 +246,7 @@ typedef Item<Node>::WeakType NodePtrW;
typedef Item<Attribute>::SharedType AttributePtr; typedef Item<Attribute>::SharedType AttributePtr;
typedef Item<Attribute>::WeakType AttributePtrW; typedef Item<Attribute>::WeakType AttributePtrW;
typedef Item<Event>::SharedType EventPtr; typedef Item<Event>::SharedType EventPtr;
typedef List<Node> NodeList; // eg. for Node's tqchildren typedef List<Node> NodeList; // eg. for Node's children
typedef Item<NodeList>::SharedType NodeListPtr; typedef Item<NodeList>::SharedType NodeListPtr;
typedef Item<NodeList>::WeakType NodeListPtrW; typedef Item<NodeList>::WeakType NodeListPtrW;
ITEM_AS_POINTER(KMPlayer::NodeList) ITEM_AS_POINTER(KMPlayer::NodeList)
@ -402,7 +402,7 @@ public:
virtual void finish (); virtual void finish ();
/** /**
* Stops element, sets state to state_deactivated. Calls deactivate() on * Stops element, sets state to state_deactivated. Calls deactivate() on
* activated/deferred tqchildren. May call childDone() when active() and not * activated/deferred children. May call childDone() when active() and not
* finished yet. * finished yet.
*/ */
virtual void deactivate (); virtual void deactivate ();
@ -440,7 +440,7 @@ public:
*/ */
virtual void opened (); virtual void opened ();
/* /*
* Close tag is found by parser, tqchildren are appended * Close tag is found by parser, children are appended
*/ */
virtual void closed (); virtual void closed ();
protected: protected:
@ -632,8 +632,8 @@ public:
virtual SurfacePtr createSurface (NodePtr owner, const SRect & rect) = 0; virtual SurfacePtr createSurface (NodePtr owner, const SRect & rect) = 0;
virtual IRect toScreen (Single x, Single y, Single w, Single h) = 0; virtual IRect toScreen (Single x, Single y, Single w, Single h) = 0;
virtual void resize (const SRect & rect) = 0; virtual void resize (const SRect & rect) = 0;
virtual void tqrepaint () = 0; virtual void repaint () = 0;
virtual void tqrepaint (const SRect &rect) = 0; virtual void repaint (const SRect &rect) = 0;
virtual void video () = 0; virtual void video () = 0;
void remove (); // remove from parent, mark ancestors dirty void remove (); // remove from parent, mark ancestors dirty
void markDirty (); // mark this and ancestors dirty void markDirty (); // mark this and ancestors dirty

@ -2488,7 +2488,7 @@ KDE_NO_EXPORT void NpPlayer::processStreams () {
char *mt = strdup (stream->mimetype.isEmpty () char *mt = strdup (stream->mimetype.isEmpty ()
? "" ? ""
: stream->mimetype.utf8 ().data ()); : stream->mimetype.utf8 ().data ());
TQString objpath=TQString("/plugin/stream_%1").tqarg(stream->stream_id); TQString objpath=TQString("/plugin/stream_%1").arg(stream->stream_id);
DBusMessage *msg = dbus_message_new_method_call ( DBusMessage *msg = dbus_message_new_method_call (
remote_service.ascii(), remote_service.ascii(),
objpath.ascii (), objpath.ascii (),

@ -218,7 +218,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::playCurrent () {
KDE_NO_EXPORT void KMPlayerVDRSource::processStopped () { KDE_NO_EXPORT void KMPlayerVDRSource::processStopped () {
if (m_socket->state () == TQSocket::Connected) { if (m_socket->state () == TQSocket::Connected) {
queueCommand (TQString ("VOLU %1\n").tqarg (m_stored_volume).ascii ()); queueCommand (TQString ("VOLU %1\n").arg (m_stored_volume).ascii ());
queueCommand ("QUIT\n"); queueCommand ("QUIT\n");
} }
} }
@ -309,7 +309,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::toggleConnected () {
} }
KDE_NO_EXPORT void KMPlayerVDRSource::volumeChanged (int val) { KDE_NO_EXPORT void KMPlayerVDRSource::volumeChanged (int val) {
queueCommand (TQString ("VOLU %1\n").tqarg (int (sqrt (255 * 255 * val / 100))).ascii ()); queueCommand (TQString ("VOLU %1\n").arg (int (sqrt (255 * 255 * val / 100))).ascii ());
} }
static struct ReadBuf { static struct ReadBuf {
@ -380,7 +380,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () {
if (p > 0) if (p > 0)
line.truncate (p); line.truncate (p);
TQString channel_name = line.mid (4); TQString channel_name = line.mid (4);
m_document->appendChild (new KMPlayer::GenericMrl (m_document, TQString ("kmplayer://vdrsource/%1").tqarg(channel_name), channel_name)); m_document->appendChild (new KMPlayer::GenericMrl (m_document, TQString ("kmplayer://vdrsource/%1").arg(channel_name), channel_name));
if (cmd_done) { if (cmd_done) {
m_player->updateTree (); m_player->updateTree ();
if (!m_request_jump.isEmpty ()) { if (!m_request_jump.isEmpty ()) {

@ -144,8 +144,8 @@ public:
SurfacePtr createSurface (NodePtr owner, const SRect & rect); SurfacePtr createSurface (NodePtr owner, const SRect & rect);
IRect toScreen (Single x, Single y, Single w, Single h); IRect toScreen (Single x, Single y, Single w, Single h);
void resize (const SRect & rect); void resize (const SRect & rect);
void tqrepaint (); void repaint ();
void tqrepaint (const SRect &rect); void repaint (const SRect &rect);
void video (); void video ();
NodePtrW current_video; NodePtrW current_video;
@ -181,7 +181,7 @@ KDE_NO_EXPORT void ViewSurface::resize (const SRect &r) {
#endif #endif
/*if (rect == nrect) /*if (rect == nrect)
;//return; ;//return;
SRect pr = rect.unite (nrect); // for tqrepaint SRect pr = rect.unite (nrect); // for repaint
rect = nrect;*/ rect = nrect;*/
} }
@ -197,14 +197,14 @@ KDE_NO_EXPORT IRect ViewSurface::toScreen (Single x, Single y, Single w, Single
} }
KDE_NO_EXPORT KDE_NO_EXPORT
void ViewSurface::tqrepaint (const SRect &r) { void ViewSurface::repaint (const SRect &r) {
markDirty (); markDirty ();
view_widget->scheduleRepaint (toScreen (r.x (), r.y (), r.width (), r.height ())); view_widget->scheduleRepaint (toScreen (r.x (), r.y (), r.width (), r.height ()));
//kdDebug() << "Surface::tqrepaint x:" << (int)x << " y:" << (int)y << " w:" << (int)w << " h:" << (int)h << endl; //kdDebug() << "Surface::repaint x:" << (int)x << " y:" << (int)y << " w:" << (int)w << " h:" << (int)h << endl;
} }
KDE_NO_EXPORT KDE_NO_EXPORT
void ViewSurface::tqrepaint () { void ViewSurface::repaint () {
markDirty (); markDirty ();
view_widget->scheduleRepaint (toScreen (0, 0, bounds.width (), bounds.height ())); view_widget->scheduleRepaint (toScreen (0, 0, bounds.width (), bounds.height ()));
} }
@ -327,7 +327,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::traverseRegion (SMIL::RegionBase * reg) {
if (c->data) if (c->data)
c->data->accept (this); c->data->accept (this);
} }
// finally visit tqchildren, accounting for z-order FIXME optimize // finally visit children, accounting for z-order FIXME optimize
NodeRefList sorted; NodeRefList sorted;
for (NodePtr n = reg->firstChild (); n; n = n->nextSibling ()) { for (NodePtr n = reg->firstChild (); n; n = n->nextSibling ()) {
if (n->id != SMIL::id_node_region) if (n->id != SMIL::id_node_region)
@ -1378,7 +1378,7 @@ KDE_NO_EXPORT void ViewArea::fullScreen () {
} }
m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (playlist_xpm))); m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (playlist_xpm)));
} else { } else {
m_topwindow_rect = topLevelWidget ()->tqgeometry (); m_topwindow_rect = topLevelWidget ()->geometry ();
reparent (0L, 0, tqApp->desktop()->screenGeometry(this).topLeft(), true); reparent (0L, 0, tqApp->desktop()->screenGeometry(this).topLeft(), true);
showFullScreen (); showFullScreen ();
for (unsigned i = 0; i < m_collection->count (); ++i) for (unsigned i = 0; i < m_collection->count (); ++i)
@ -1425,7 +1425,7 @@ void ViewArea::minimalMode () {
m_view->setNoInfoMessages (false); m_view->setNoInfoMessages (false);
m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (playlist_xpm))); m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (playlist_xpm)));
} }
m_topwindow_rect = topLevelWidget ()->tqgeometry (); m_topwindow_rect = topLevelWidget ()->geometry ();
} }
KDE_NO_EXPORT void ViewArea::accelActivated () { KDE_NO_EXPORT void ViewArea::accelActivated () {
@ -1481,7 +1481,7 @@ KDE_NO_EXPORT void ViewArea::syncVisual (const IRect & rect) {
if (surface->node) if (surface->node)
surface->node->accept (&visitor); surface->node->accept (&visitor);
#else #else
tqrepaint (TQRect(rect.x, rect.y, rect.w, rect.h), false); repaint (TQRect(rect.x, rect.y, rect.w, rect.h), false);
#endif #endif
if (m_repaint_timer) { if (m_repaint_timer) {
killTimer (m_repaint_timer); killTimer (m_repaint_timer);
@ -1593,13 +1593,13 @@ void ViewArea::setAudioVideoGeometry (const IRect &rect, unsigned int * bg_color
h = hfw; h = hfw;
} }
} }
m_av_tqgeometry = TQRect (x, y, w, h); m_av_geometry = TQRect (x, y, w, h);
TQRect wrect = m_view->widgetStack ()->tqgeometry (); TQRect wrect = m_view->widgetStack ()->geometry ();
if (m_av_tqgeometry != wrect && if (m_av_geometry != wrect &&
!(m_av_tqgeometry.width() <= 0 && !(m_av_geometry.width() <= 0 &&
wrect.width() <= 1 && wrect.height() <= 1)) { wrect.width() <= 1 && wrect.height() <= 1)) {
m_view->widgetStack ()->setGeometry (x, y, w, h); m_view->widgetStack ()->setGeometry (x, y, w, h);
wrect.unite (m_av_tqgeometry); wrect.unite (m_av_geometry);
scheduleRepaint (IRect (wrect.x (), wrect.y (), wrect.width (), wrect.height ())); scheduleRepaint (IRect (wrect.x (), wrect.y (), wrect.width (), wrect.height ()));
} }
if (bg_color) if (bg_color)
@ -1668,7 +1668,7 @@ KDE_NO_EXPORT void ViewArea::timerEvent (TQTimerEvent * e) {
} else if (e->timerId () == m_repaint_timer) { } else if (e->timerId () == m_repaint_timer) {
killTimer (m_repaint_timer); killTimer (m_repaint_timer);
m_repaint_timer = 0; m_repaint_timer = 0;
//tqrepaint (m_repaint_rect, false); //repaint (m_repaint_rect, false);
syncVisual (m_repaint_rect.intersect (IRect (0, 0, width (), height ()))); syncVisual (m_repaint_rect.intersect (IRect (0, 0, width (), height ())));
} else { } else {
kdError () << "unknown timer " << e->timerId () << " " << m_repaint_timer << endl; kdError () << "unknown timer " << e->timerId () << " " << m_repaint_timer << endl;

@ -73,7 +73,7 @@ private:
KActionCollection * m_collection; KActionCollection * m_collection;
SurfacePtr surface; SurfacePtr surface;
NodePtrW video_node; NodePtrW video_node;
TQRect m_av_tqgeometry; TQRect m_av_geometry;
IRect m_repaint_rect; IRect m_repaint_rect;
TQRect m_topwindow_rect; TQRect m_topwindow_rect;
int m_mouse_invisible_timer; int m_mouse_invisible_timer;

Loading…
Cancel
Save