Browse Source

Revert "Rename a number of old tq methods that are no longer tq specific"

This reverts commit f97c8a56e2.
pull/1/head
Timothy Pearson 9 years ago
parent
commit
ee4b31b7bd
25 changed files with 480 additions and 480 deletions
  1. +7
    -7
      src/kmplayer_atom.cpp
  2. +1
    -1
      src/kmplayer_koffice_part.cpp
  3. +50
    -50
      src/kmplayer_part.cpp
  4. +7
    -7
      src/kmplayer_rp.cpp
  5. +2
    -2
      src/kmplayer_rp.h
  6. +66
    -66
      src/kmplayer_smil.cpp
  7. +13
    -13
      src/kmplayer_smil.h
  8. +32
    -32
      src/kmplayerapp.cpp
  9. +57
    -57
      src/kmplayerbroadcast.cpp
  10. +2
    -2
      src/kmplayerconfig.cpp
  11. +6
    -6
      src/kmplayercontrolpanel.cpp
  12. +11
    -11
      src/kmplayerpartbase.cpp
  13. +1
    -1
      src/kmplayerpartbase.h
  14. +2
    -2
      src/kmplayerplaylist.cpp
  15. +6
    -6
      src/kmplayerplaylist.h
  16. +8
    -8
      src/kmplayerprocess.cpp
  17. +46
    -46
      src/kmplayertvsource.cpp
  18. +12
    -12
      src/kmplayervdr.cpp
  19. +13
    -13
      src/kmplayerview.cpp
  20. +1
    -1
      src/kmplayerview.h
  21. +2
    -2
      src/npplayer.c
  22. +5
    -5
      src/playlistview.cpp
  23. +102
    -102
      src/pref.cpp
  24. +27
    -27
      src/viewarea.cpp
  25. +1
    -1
      src/viewarea.h

+ 7
- 7
src/kmplayer_atom.cpp View File

@ -75,7 +75,7 @@ void ATOM::Link::closed () {
else if (a->name () == "rel")
rel = a->value ();
}
if (!href.isEmpty () && rel == TQString::fromLatin1 ("enclosure"))
if (!href.isEmpty () && rel == TQString::tqfromLatin1 ("enclosure"))
src = href;
else if (pretty_name.isEmpty ())
pretty_name = href;
@ -87,12 +87,12 @@ void ATOM::Content::closed () {
src = a->value ();
else if (a->name () == StringPool::attr_type) {
TQString v = a->value ().lower ();
if (v == TQString::fromLatin1 ("text"))
mimetype = TQString::fromLatin1 ("text/plain");
else if (v == TQString::fromLatin1 ("html"))
mimetype = TQString::fromLatin1 ("text/html");
else if (v == TQString::fromLatin1 ("xhtml"))
mimetype = TQString::fromLatin1 ("application/xhtml+xml");
if (v == TQString::tqfromLatin1 ("text"))
mimetype = TQString::tqfromLatin1 ("text/plain");
else if (v == TQString::tqfromLatin1 ("html"))
mimetype = TQString::tqfromLatin1 ("text/html");
else if (v == TQString::tqfromLatin1 ("xhtml"))
mimetype = TQString::tqfromLatin1 ("application/xhtml+xml");
else
mimetype = v;
}


+ 1
- 1
src/kmplayer_koffice_part.cpp View File

@ -50,7 +50,7 @@
#include <tqdom.h>
//#include <tqmetaobject.h>
#include <layout.h>
#include <tqlayout.h>
#include <tqptrlist.h>
#include <tqpainter.h>
#include <koFrame.h>


+ 50
- 50
src/kmplayer_part.cpp View File

@ -81,8 +81,8 @@ struct KMPLAYER_NO_EXPORT GroupPredicate {
!part->master () && !part->url ().isEmpty ()) ||
(m_part->allowRedir (part->m_docbase) &&
(part->m_group == m_group ||
part->m_group == TQString::fromLatin1("_master") ||
m_group == TQString::fromLatin1("_master")) &&
part->m_group == TQString::tqfromLatin1("_master") ||
m_group == TQString::tqfromLatin1("_master")) &&
(part->m_features & KMPlayerPart::Feat_Viewer) !=
(m_part->m_features & KMPlayerPart::Feat_Viewer)));
}
@ -128,9 +128,9 @@ KDE_NO_EXPORT KParts::Part *KMPlayerFactory::createPartObject
//-----------------------------------------------------------------------------
static bool getBoolValue (const TQString & value) {
return (value.lower() != TQString::fromLatin1("false") &&
value.lower() != TQString::fromLatin1("off") &&
value.lower() != TQString::fromLatin1("0"));
return (value.lower() != TQString::tqfromLatin1("false") &&
value.lower() != TQString::tqfromLatin1("off") &&
value.lower() != TQString::tqfromLatin1("0"));
}
#define SET_FEAT_ON(f) { m_features |= f; turned_off_features &= ~f; }
@ -184,13 +184,13 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wparent, const char *
urlsource->setURL (KURL (value));
urlsource->setIdentified (false);
m_havehref = true;
} else if (name == TQString::fromLatin1("width")) {
} else if (name == TQString::tqfromLatin1("width")) {
m_noresize = true;
} else if (name == TQString::fromLatin1("height")) {
} else if (name == TQString::tqfromLatin1("height")) {
m_noresize = true;
} else if (name == TQString::fromLatin1("type")) {
} else if (name == TQString::tqfromLatin1("type")) {
urlsource->document ()->mrl ()->mimetype = value;
} else if (name == TQString::fromLatin1("controls")) {
} else if (name == TQString::tqfromLatin1("controls")) {
//http://service.real.com/help/library/guides/production8/realpgd.htm?src=noref,rnhmpg_080301,rnhmtn,nosrc
//http://service.real.com/help/library/guides/production8/htmfiles/control.htm
TQStringList sl = TQStringList::split (TQChar (','), value);
@ -198,107 +198,107 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wparent, const char *
const TQStringList::const_iterator e = sl.end ();
for (TQStringList::const_iterator i = sl.begin (); i != e; ++i) {
TQString val_lower ((*i).lower ());
if (val_lower == TQString::fromLatin1("imagewindow")) {
if (val_lower == TQString::tqfromLatin1("imagewindow")) {
SET_FEAT_ON (Feat_ImageWindow | Feat_Viewer)
} else if (val_lower == TQString::fromLatin1("all")) {
} else if (val_lower == TQString::tqfromLatin1("all")) {
m_features = (Feat_Controls | Feat_StatusBar);
} else if (val_lower == TQString::fromLatin1("tacctrl")) {
} else if (val_lower == TQString::tqfromLatin1("tacctrl")) {
SET_FEAT_ON (Feat_Label)
} else if (val_lower == TQString::fromLatin1("controlpanel")) {
} else if (val_lower == TQString::tqfromLatin1("controlpanel")) {
SET_FEAT_ON (Feat_Controls)
} else if (val_lower == TQString::fromLatin1("infovolumepanel")){
} else if (val_lower == TQString::tqfromLatin1("infovolumepanel")){
SET_FEAT_ON (Feat_Controls) // TODO
} else if (val_lower == TQString::fromLatin1("positionfield") ||
val_lower == TQString::fromLatin1("positionslider")) {
} else if (val_lower == TQString::tqfromLatin1("positionfield") ||
val_lower == TQString::tqfromLatin1("positionslider")) {
setAutoControls (false);
panel->positionSlider ()->show ();
SET_FEAT_ON (Feat_Controls)
} else if ( val_lower == TQString::fromLatin1("homectrl")) {
} else if ( val_lower == TQString::tqfromLatin1("homectrl")) {
setAutoControls (false);
panel->button (KMPlayer::ControlPanel::button_config)->show();
} else if (val_lower == TQString::fromLatin1("mutectrl") ||
val_lower == TQString::fromLatin1("mutevolume")) {
} else if (val_lower == TQString::tqfromLatin1("mutectrl") ||
val_lower == TQString::tqfromLatin1("mutevolume")) {
setAutoControls (false);
panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->minimumSize ().height ()));
panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->tqminimumSize ().height ()));
panel->volumeBar()->show ();
SET_FEAT_ON (Feat_Controls)
} else if (val_lower == TQString::fromLatin1("rwctrl")) {
} else if (val_lower == TQString::tqfromLatin1("rwctrl")) {
setAutoControls (false);
panel->button (KMPlayer::ControlPanel::button_back)->show (); // rewind ?
SET_FEAT_ON (Feat_Controls)
} else if ( val_lower == TQString::fromLatin1("ffctrl")) {
} else if ( val_lower == TQString::tqfromLatin1("ffctrl")) {
setAutoControls (false);
panel->button(KMPlayer::ControlPanel::button_forward)->show();
m_features = Feat_Controls;
} else if ( val_lower ==TQString::fromLatin1("stopbutton")) {
} else if ( val_lower ==TQString::tqfromLatin1("stopbutton")) {
setAutoControls (false);
panel->button (KMPlayer::ControlPanel::button_stop)->show ();
SET_FEAT_ON (Feat_Controls)
} else if (val_lower == TQString::fromLatin1("playbutton") ||
val_lower ==TQString::fromLatin1("playonlybutton")) {
} else if (val_lower == TQString::tqfromLatin1("playbutton") ||
val_lower ==TQString::tqfromLatin1("playonlybutton")) {
setAutoControls (false);
panel->button (KMPlayer::ControlPanel::button_play)->show ();
SET_FEAT_ON (Feat_Controls)
} else if (val_lower ==TQString::fromLatin1("pausebutton")) {
} else if (val_lower ==TQString::tqfromLatin1("pausebutton")) {
setAutoControls (false);
panel->button (KMPlayer::ControlPanel::button_pause)->show ();
SET_FEAT_ON (Feat_Controls)
} else if (val_lower == TQString::fromLatin1("statusbar") ||
val_lower == TQString::fromLatin1("statusfield")) {
} else if (val_lower == TQString::tqfromLatin1("statusbar") ||
val_lower == TQString::tqfromLatin1("statusfield")) {
SET_FEAT_ON (Feat_StatusBar)
} else if (val_lower == TQString::fromLatin1("infopanel")) {
} else if (val_lower == TQString::tqfromLatin1("infopanel")) {
SET_FEAT_ON (Feat_InfoPanel)
} else if (val_lower == TQString::fromLatin1("playlist")) {
} else if (val_lower == TQString::tqfromLatin1("playlist")) {
SET_FEAT_ON (Feat_PlayList)
} else if (val_lower==TQString::fromLatin1("volumeslider")) {
} else if (val_lower==TQString::tqfromLatin1("volumeslider")) {
SET_FEAT_ON (Feat_VolumeSlider)
setAutoControls (false);
panel->volumeBar()->show ();
panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->minimumSize ().height ()));
panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->tqminimumSize ().height ()));
}
}
} else if (name == TQString::fromLatin1("uimode")) {
} else if (name == TQString::tqfromLatin1("uimode")) {
TQString val_lower (value.lower ());
if (val_lower == TQString::fromLatin1("full"))
if (val_lower == TQString::tqfromLatin1("full"))
SET_FEAT_ON (Feat_All & ~(Feat_PlayList | Feat_ImageWindow))
// TODO: invisible, none, mini
} else if (name == TQString::fromLatin1("nolabels")) {
} else if (name == TQString::tqfromLatin1("nolabels")) {
SET_FEAT_OFF (Feat_Label)
} else if (name == TQString::fromLatin1("nocontrols")) {
} else if (name == TQString::tqfromLatin1("nocontrols")) {
SET_FEAT_OFF (Feat_Controls | Feat_VolumeSlider)
} else if (name == TQString::fromLatin1("showdisplay")) {
} else if (name == TQString::tqfromLatin1("showdisplay")) {
// the author name, the clip name, and the copyright information
if (getBoolValue (value))
SET_FEAT_ON (Feat_InfoPanel)
else
SET_FEAT_OFF (Feat_InfoPanel)
} else if (name == TQString::fromLatin1("showcontrols")) {
} else if (name == TQString::tqfromLatin1("showcontrols")) {
if (getBoolValue (value))
SET_FEAT_ON (Feat_Viewer | Feat_Controls)
else
SET_FEAT_OFF (Feat_Controls | Feat_VolumeSlider)
} else if (name == TQString::fromLatin1("showstatusbar")) {
} else if (name == TQString::tqfromLatin1("showstatusbar")) {
if (getBoolValue (value))
SET_FEAT_ON (Feat_Viewer | Feat_StatusBar)
else
SET_FEAT_OFF (Feat_StatusBar)
// else showcaptioning/showgotobar/showpositioncontrols/showtracker
} else if (name == TQString::fromLatin1("console")) {
m_group = value.isEmpty() ? TQString::fromLatin1("_anonymous") : value;
} else if (name == TQString::fromLatin1("__khtml__pluginbaseurl")) {
} else if (name == TQString::tqfromLatin1("console")) {
m_group = value.isEmpty() ? TQString::tqfromLatin1("_anonymous") : value;
} else if (name == TQString::tqfromLatin1("__khtml__pluginbaseurl")) {
m_docbase = KURL (value);
} else if (name == TQString::fromLatin1("src")) {
} else if (name == TQString::tqfromLatin1("src")) {
m_src_url = value;
} else if (name == TQString::fromLatin1("filename")) {
} else if (name == TQString::tqfromLatin1("filename")) {
m_file_name = value;
} else if (name == TQString::fromLatin1 ("fullscreenmode")) {
} else if (name == TQString::tqfromLatin1 ("fullscreenmode")) {
show_fullscreen = getBoolValue (value);
} else if (name == TQString::fromLatin1 ("autostart")) {
} else if (name == TQString::tqfromLatin1 ("autostart")) {
urlsource->setAutoPlay (getBoolValue (value));
}
// volume/clicktoplay/transparentatstart/animationatstart
// autorewind/displaysize/border
if (name.startsWith (TQString::fromLatin1 ("__khtml__")))
if (name.startsWith (TQString::tqfromLatin1 ("__khtml__")))
name = name.mid (9);
convertNode <KMPlayer::Element> (urlsource->document ())->setAttribute (name, value);
}
@ -332,7 +332,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wparent, const char *
else
m_view->setControlPanelMode (KMPlayer::View::CP_AutoHide);
}
bool group_member = !m_group.isEmpty () && m_group != TQString::fromLatin1("_unique") && m_features != Feat_Unknown;
bool group_member = !m_group.isEmpty () && m_group != TQString::tqfromLatin1("_unique") && m_features != Feat_Unknown;
if (!group_member || m_features & Feat_Viewer) {
// not part of a group or we're the viewer
setProcess ("mplayer");
@ -1017,8 +1017,8 @@ KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::call
break;
case showcontrolpanel:
if (args.size () &&
(args.first () == TQString::fromLatin1 ("0") ||
args.first () == TQString::fromLatin1 ("false")))
(args.first () == TQString::tqfromLatin1 ("0") ||
args.first () == TQString::tqfromLatin1 ("false")))
static_cast <KMPlayer::View*> (player->view ())->setControlPanelMode (KMPlayer::View::CP_Hide);
else
static_cast <KMPlayer::View*> (player->view ())->setControlPanelMode (KMPlayer::View::CP_Show);


+ 7
- 7
src/kmplayer_rp.cpp View File

@ -183,11 +183,11 @@ KDE_NO_EXPORT NodePtr RP::Imfl::childFromTag (const TQString & tag) {
return 0L;
}
KDE_NO_EXPORT void RP::Imfl::repaint () {
KDE_NO_EXPORT void RP::Imfl::tqrepaint () {
if (!active ())
kdWarning () << "Spurious Imfl repaint" << endl;
kdWarning () << "Spurious Imfl tqrepaint" << endl;
else if (surface () && width > 0 && height > 0)
rp_surface->repaint (SRect (0, 0, width, height));
rp_surface->tqrepaint (SRect (0, 0, width, height));
}
KDE_NO_CDTOR_EXPORT RP::Image::Image (NodePtr & doc)
@ -353,7 +353,7 @@ KDE_NO_EXPORT void RP::TimingsBase::update (int percentage) {
progress = percentage;
Node * p = parentNode ().ptr ();
if (p->id == RP::id_node_imfl)
static_cast <RP::Imfl *> (p)->repaint ();
static_cast <RP::Imfl *> (p)->tqrepaint ();
}
KDE_NO_EXPORT void RP::TimingsBase::finish () {
@ -447,11 +447,11 @@ KDE_NO_EXPORT void RP::Wipe::activate () {
//TODO implement 'type="push"'
TQString dir = getAttribute ("direction").lower ();
direction = dir_right;
if (dir == TQString::fromLatin1 ("left"))
if (dir == TQString::tqfromLatin1 ("left"))
direction = dir_left;
else if (dir == TQString::fromLatin1 ("up"))
else if (dir == TQString::tqfromLatin1 ("up"))
direction = dir_up;
else if (dir == TQString::fromLatin1 ("down"))
else if (dir == TQString::tqfromLatin1 ("down"))
direction = dir_down;
TimingsBase::activate ();
}


+ 2
- 2
src/kmplayer_rp.h View File

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


+ 66
- 66
src/kmplayer_smil.cpp View File

@ -20,12 +20,12 @@
#include <stdlib.h>
#include <textstream.h>
#include <tqtextstream.h>
#include <tqcolor.h>
#include <tqpixmap.h>
#include <tqmovie.h>
#include <tqimage.h>
#include <textcodec.h>
#include <tqtextcodec.h>
#include <tqfont.h>
#include <tqapplication.h>
#include <tqregexp.h>
@ -635,7 +635,7 @@ KDE_NO_EXPORT void CalculatedSizer::resetSizes () {
right.reset ();
bottom.reset ();
reg_point.truncate (0);
reg_align = TQString::fromLatin1 ("topLeft");
reg_align = TQString::tqfromLatin1 ("topLeft");
}
static bool regPoints (const TQString & str, Single & x, Single & y) {
@ -939,11 +939,11 @@ bool AnimateData::parseParam (const TrieString & name, const TQString & val) {
} else if (name == "values") {
change_values = TQStringList::split (TQString (";"), val);
} else if (name == "calcMode") {
if (val == TQString::fromLatin1 ("discrete"))
if (val == TQString::tqfromLatin1 ("discrete"))
calcMode = calc_discrete;
else if (val == TQString::fromLatin1 ("linear"))
else if (val == TQString::tqfromLatin1 ("linear"))
calcMode = calc_linear;
else if (val == TQString::fromLatin1 ("paced"))
else if (val == TQString::tqfromLatin1 ("paced"))
calcMode = calc_paced;
} else
return AnimateGroupData::parseParam (name, val);
@ -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, TQString ("%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,
@ -1156,13 +1156,13 @@ bool AnimateMotionData::parseParam (const TrieString & name, const TQString & va
} else if (name == "keySplines") {
splines = TQStringList::split (TQString (";"), val);
} else if (name == "calcMode") {
if (val == TQString::fromLatin1 ("discrete"))
if (val == TQString::tqfromLatin1 ("discrete"))
calcMode = calc_discrete;
else if (val == TQString::fromLatin1 ("linear"))
else if (val == TQString::tqfromLatin1 ("linear"))
calcMode = calc_linear;
else if (val == TQString::fromLatin1 ("paced"))
else if (val == TQString::tqfromLatin1 ("paced"))
calcMode = calc_paced;
else if (val == TQString::fromLatin1 ("spline"))
else if (val == TQString::tqfromLatin1 ("spline"))
calcMode = calc_spline;
} else
return AnimateGroupData::parseParam (name, val);
@ -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 ();
@ -1611,11 +1611,11 @@ 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> (layout_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
@ -1623,7 +1623,7 @@ KDE_NO_EXPORT void SMIL::Smil::activate () {
KDE_NO_EXPORT void SMIL::Smil::deactivate () {
if (layout_node)
convertNode <SMIL::Layout> (layout_node)->repaint ();
convertNode <SMIL::Layout> (layout_node)->tqrepaint ();
if (layout_node)
convertNode <SMIL::Layout> (layout_node)->region_surface = NULL;
Mrl::getSurface(0L);
@ -1657,14 +1657,14 @@ KDE_NO_EXPORT void SMIL::Smil::closed () {
} else if (e->id == id_node_meta) {
Element * elm = convertNode <Element> (e);
const TQString name = elm->getAttribute (StringPool::attr_name);
if (name == TQString::fromLatin1 ("title"))
if (name == TQString::tqfromLatin1 ("title"))
pretty_name = elm->getAttribute ("content");
else if (name == TQString::fromLatin1 ("base"))
else if (name == TQString::tqfromLatin1 ("base"))
src = elm->getAttribute ("content");
}
}
if (!layout_node) {
kdError () << "no <root-layout>" << endl;
kdError () << "no <root-tqlayout>" << endl;
return;
}
}
@ -1738,7 +1738,7 @@ static void headChildDone (NodePtr node, NodePtr child) {
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) {
@ -1774,7 +1774,7 @@ KDE_NO_CDTOR_EXPORT SMIL::Layout::Layout (NodePtr & d)
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;
@ -1816,7 +1816,7 @@ KDE_NO_EXPORT void SMIL::Layout::closed () {
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
}
@ -1928,14 +1928,14 @@ KDE_NO_EXPORT void SMIL::RegionBase::remoteReady (TQByteArray & 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,7 +1949,7 @@ 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
// if there is a region_surface and it's moved, do a limit tqrepaint
NodePtr p = parentNode ();
if (p && (p->id==SMIL::id_node_region || p->id==SMIL::id_node_layout) &&
region_surface) {
@ -1958,7 +1958,7 @@ 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));
}
}
@ -1981,7 +1981,7 @@ KDE_NO_EXPORT Surface *SMIL::RegionBase::surface () {
KDE_NO_EXPORT
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") {
@ -1991,10 +1991,10 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val
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) {
@ -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))
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 ();
need_tqrepaint = !cached_img.isEmpty ();
Mrl *mrl = s->parentNode () ? s->parentNode ()->mrl () : NULL;
TQString url = mrl ? KURL (mrl->absolutePath (), val).url () : val;
cached_img.setUrl (url);
@ -2030,12 +2030,12 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val
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->parentNode ())
region_surface->parentNode ()->tqrepaint (rect);
Element::parseParam (name, val);
}
@ -2083,7 +2083,7 @@ KDE_NO_EXPORT void SMIL::Region::accept (Visitor * v) {
KDE_NO_EXPORT
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);
}
@ -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));
}
@ -2857,10 +2857,10 @@ void SMIL::MediaType::parseParam (const TrieString &para, const TQString & 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 () {
@ -2869,7 +2869,7 @@ KDE_NO_EXPORT void SMIL::MediaType::boundsUpdate () {
SRect new_bounds = calculateBounds ();
SRect repaint_rect = sub_surface->bounds.unite (new_bounds);
sub_surface->bounds = new_bounds;
rb->repaint (repaint_rect);
rb->tqrepaint (repaint_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)
@ -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 ();
@ -3086,7 +3086,7 @@ bool SMIL::MediaType::handleEvent (EventPtr event) {
else
te->interval = trans_step++ < trans_steps;
if (s && s->parentNode())
s->parentNode()->repaint (s->bounds);
s->parentNode()->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;
}
@ -3377,7 +3377,7 @@ bool ImageRuntime::parseParam (const TrieString & name, const TQString & 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 ()) {
@ -3409,7 +3409,7 @@ KDE_NO_EXPORT void ImageRuntime::remoteReady (TQByteArray & data) {
mt->resetSurface ();
TQString mime = mimetype ();
kdDebug () << "ImageRuntime::remoteReady " << mime << " empty:" << cached_img.isEmpty () << " " << mt->src << endl;
if (mime.startsWith (TQString::fromLatin1 ("text/"))) {
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;
@ -3426,13 +3426,13 @@ KDE_NO_EXPORT void ImageRuntime::remoteReady (TQByteArray & data) {
cached_img.data->image = pix;
img_movie = new TQMovie (data, data.size ());
img_movie->connectUpdate(this,TQT_SLOT(movieUpdated(const TQRect&)));
img_movie->connectStatus (this, TQT_SLOT (movieStatus (int)));
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;
}
@ -3451,13 +3451,13 @@ KDE_NO_EXPORT void ImageRuntime::movieUpdated (const TQRect &) {
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 == TQMovie::EndOfMovie) {
@ -3469,7 +3469,7 @@ KDE_NO_EXPORT void ImageRuntime::movieStatus (int s) {
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;
}
@ -3564,12 +3564,12 @@ bool TextRuntime::parseParam (const TrieString & name, const TQString & 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 ()) {
@ -3592,7 +3592,7 @@ KDE_NO_EXPORT void TextRuntime::remoteReady (TQByteArray & data) {
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)


+ 13
- 13
src/kmplayer_smil.h View File

@ -61,7 +61,7 @@ class TextRuntimePrivate;
/*
* Event signaled before the actual starting takes place. Use by SMIL::Excl
* to stop possible other children
* to stop possible other tqchildren
*/
class ToBeStartedEvent : public Event {
public:
@ -215,7 +215,7 @@ protected:
virtual void remoteReady (TQByteArray &);
private slots:
void movieUpdated (const TQRect &);
void movieStatus (int);
void movietqStatus (int);
void movieResize (const TQSize &);
};
@ -444,15 +444,15 @@ public:
/**
* repaints region, calls scheduleRepaint(x,y,w,h) on view
*/
void repaint ();
void repaint (const SRect & rect);
void tqrepaint ();
void tqrepaint (const SRect & rect);
/**
* calculate the relative x,y,w,h on the child region elements
* given this element's w and h value
* and child's left/top/right/width/height/bottom attributes
*/
virtual void updateDimensions ();
void boundsUpdate (); // recalculates and repaint old and new bounds
void boundsUpdate (); // recalculates and tqrepaint old and new bounds
virtual Surface *surface ();
SurfacePtrW region_surface;
@ -471,13 +471,13 @@ protected:
};
/**
* Defines region layout, should reside below 'head' element
* Defines region tqlayout, should reside below 'head' element
*/
class KMPLAYER_NO_EXPORT Layout : public RegionBase {
public:
Layout (NodePtr & d);
NodePtr childFromTag (const TQString & tag);
KDE_NO_EXPORT const char * nodeName () const { return "layout"; }
KDE_NO_EXPORT const char * nodeName () const { return "tqlayout"; }
void activate ();
void closed ();
virtual void accept (Visitor *);
@ -517,11 +517,11 @@ class KMPLAYER_NO_EXPORT RootLayout : public RegionBase {
public:
KDE_NO_CDTOR_EXPORT RootLayout (NodePtr & d)
: RegionBase (d, id_node_root_layout) {}
KDE_NO_EXPORT const char * nodeName () const { return "root-layout"; }
KDE_NO_EXPORT const char * nodeName () const { return "root-tqlayout"; }
};
/**
* Represents a regPoint element for alignment inside regions
* Represents a regPoint element for tqalignment inside regions
*/
class KMPLAYER_NO_EXPORT RegPoint : public Element {
public:
@ -656,7 +656,7 @@ protected:
};
/**
* A Par represents parallel processing of all its children
* A Par represents parallel processing of all its tqchildren
*/
class KMPLAYER_NO_EXPORT Par : public GroupBase {
public:
@ -668,7 +668,7 @@ public:
};
/**
* A Seq represents sequential processing of all its children
* A Seq represents sequential processing of all its tqchildren
*/
class KMPLAYER_NO_EXPORT Seq : public GroupBase {
public:
@ -691,7 +691,7 @@ public:
};
/**
* An Excl represents exclusive processing of one of its children
* An Excl represents exclusive processing of one of its tqchildren
*/
class KMPLAYER_NO_EXPORT Excl : public GroupBase {
public:
@ -780,7 +780,7 @@ public:
Surface *surface ();
void resetSurface ();
SRect calculateBounds ();
void boundsUpdate (); // recalculates and repaint old and new bounds
void boundsUpdate (); // recalculates and tqrepaint old and new bounds
virtual void parseParam (const TrieString & name, const TQString & value);
virtual bool handleEvent (EventPtr event);
NodeRefListPtr listeners (unsigned int event_id);


+ 32
- 32
src/kmplayerapp.cpp View File

@ -29,7 +29,7 @@
#include <tqkeysequence.h>
#include <tqapplication.h>
#include <tqslider.h>
#include <layout.h>
#include <tqlayout.h>
#include <tqwhatsthis.h>
#include <tqtimer.h>
#include <tqfile.h>
@ -202,7 +202,7 @@ KDE_NO_CDTOR_EXPORT FileDocument::FileDocument (short i, const TQString &s, KMPl
}
KDE_NO_EXPORT KMPlayer::NodePtr FileDocument::childFromTag(const TQString &tag) {
if (tag == TQString::fromLatin1 (nodeName ()))
if (tag == TQString::tqfromLatin1 (nodeName ()))
return this;
return 0L;
}
@ -246,9 +246,9 @@ KDE_NO_EXPORT void Recents::defer () {
KDE_NO_EXPORT KMPlayer::NodePtr Recents::childFromTag (const TQString & tag) {
// kdDebug () << nodeName () << " childFromTag " << tag << endl;
if (tag == TQString::fromLatin1 ("item"))
if (tag == TQString::tqfromLatin1 ("item"))
return new Recent (m_doc, app);
else if (tag == TQString::fromLatin1 ("group"))
else if (tag == TQString::tqfromLatin1 ("group"))
return new Group (m_doc, app);
return FileDocument::childFromTag (tag);
}
@ -282,9 +282,9 @@ Group::Group (KMPlayer::NodePtr & doc, KMPlayerApp * a, const TQString & pn)
}
KDE_NO_EXPORT KMPlayer::NodePtr Group::childFromTag (const TQString & tag) {
if (tag == TQString::fromLatin1 ("item"))
if (tag == TQString::tqfromLatin1 ("item"))
return new Recent (m_doc, app);
else if (tag == TQString::fromLatin1 ("group"))
else if (tag == TQString::tqfromLatin1 ("group"))
return new Group (m_doc, app);
return 0L;
}
@ -862,14 +862,14 @@ KDE_NO_EXPORT void IntroSource::activate () {
TQTextStream ts (&file);
KMPlayer::readXML (m_document, ts, TQString (), false);
} else {
TQString smil = TQString::fromLatin1 (
"<smil><head><layout>"
"<root-layout width='320' height='240' background-color='black'/>"
TQString smil = TQString::tqfromLatin1 (
"<smil><head><tqlayout>"
"<root-tqlayout width='320' height='240' background-color='black'/>"
"<region id='image1' left='31.25%' top='25%' width='37.5%' height='50%' z-order='1'/>"
"<region id='reg1' top='10%' height='80%' z-order='2'>"
"<region id='image2' left='128' top='72' width='64' bottom='56'/>"
"</region>"
"</layout>"
"</tqlayout>"
"<transition id='fadein-1' dur='0.6' type='fade'/>"
"<transition id='iris1' dur='0.3' type='irisWipe'/>"
"</head>"
@ -882,7 +882,7 @@ KDE_NO_EXPORT void IntroSource::activate () {
"<seq begin='reg1.activateEvent'/>"
"</excl>"
"</body></smil>"
).arg (locate ("data", "kmplayer/noise.gif")).arg (KGlobal::iconLoader()->iconPath (TQString::fromLatin1 ("kmplayer"), -64));
).arg (locate ("data", "kmplayer/noise.gif")).arg (KGlobal::iconLoader()->iconPath (TQString::tqfromLatin1 ("kmplayer"), -64));
TQTextStream ts (smil.utf8 (), IO_ReadOnly);
KMPlayer::readXML (m_document, ts, TQString (), false);
}
@ -927,7 +927,7 @@ KDE_NO_EXPORT void KMPlayerApp::restoreFromConfig () {
m_view->docArea ()->hide ();
m_view->docArea ()->readDockConfig (m_player->config (), TQString ("Window Layout"));
m_view->docArea ()->show ();
m_view->layout ()->activate ();
m_view->tqlayout ()->activate ();
}
}
@ -1165,7 +1165,7 @@ KDE_NO_EXPORT void KMPlayerApp::readOptions() {
#include <netwm.h>
#undef Always
#undef Never
#undef Status
#undef tqStatus
#undef Unsorted
#undef Bool
@ -1227,18 +1227,18 @@ KDE_NO_EXPORT void ExitSource::activate () {
TQTextStream ts (&file);
KMPlayer::readXML (m_document, ts, TQString (), false);
} else {
TQString smil = TQString::fromLatin1 ("<smil><head><layout>"
"<root-layout width='320' height='240' background-color='black'/>"
TQString smil = TQString::tqfromLatin1 ("<smil><head><tqlayout>"
"<root-tqlayout width='320' height='240' background-color='black'/>"
"<region id='reg1' top='10%' height='80%' z-order='2'>"
"<region id='image' left='128' top='72' width='64' bottom='56'/>"
"</region></layout>"
"</region></tqlayout>"
"<transition id='pw' dur='0.3' type='pushWipe' subtype='fromBottom'/>"
"</head><body>"
"<par>"
//"<animate target='reg1' attribute='background-color' calcMode='discrete' values='#FFFFFF;#E4E4E4;#CCCCCC;#B4B4B4;#9E9E9E;#8A8A8A;#777777;#656565;#555555;#464646;#393939;#2D2D2D;#222222;#191919;#111111;#0B0B0B;#060606;#020202;#000000;#000000' dur='0.6'/>"
"<img src='%2' id='img1' region='image' dur='0.4' fit='hidden' transOut='pw'/>"
"</par>"
"</body></smil>").arg (KGlobal::iconLoader()->iconPath (TQString::fromLatin1 ("kmplayer"), -64));
"</body></smil>").arg (KGlobal::iconLoader()->iconPath (TQString::tqfromLatin1 ("kmplayer"), -64));
TQTextStream ts (smil.utf8 (), IO_ReadOnly);
KMPlayer::readXML (m_document, ts, TQString (), false);
}
@ -1261,7 +1261,7 @@ KDE_NO_EXPORT void ExitSource::stateElementChanged (KMPlayer::Node * node, KMPla
if (new_state == KMPlayer::Node::state_deactivated &&
m_document == node &&
m_player->view ())
m_player->view ()->topLevelWidget ()->close ();
m_player->view ()->tqtopLevelWidget ()->close ();
}
#endif
@ -1437,7 +1437,7 @@ KDE_NO_EXPORT void KMPlayerApp::slotViewMenuBar() {
slotStatusMsg(i18n("Ready"));
} else {
menuBar()->hide();
slotStatusMsg (i18n ("Show Menubar with %1").arg(viewMenuBar->shortcutText()));
slotStatusMsg (i18n ("Show Menubar with %1").tqarg(viewMenuBar->shortcutText()));
if (!m_showStatusbar) {
statusBar()->show();
TQTimer::singleShot (3000, statusBar(), TQT_SLOT (hide ()));
@ -1452,7 +1452,7 @@ KDE_NO_EXPORT void KMPlayerApp::slotStatusMsg (const TQString &text) {
}
KDE_NO_EXPORT void KMPlayerApp::fullScreen () {
// if (TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender ()))->metaObject ()->inherits ("KAction"))
// if (TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender ()))->tqmetaObject ()->inherits ("KAction"))
if (TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender ()))->inherits ("KAction"))
m_view->fullScreen();
#if KDE_IS_VERSION(3,1,90)
@ -1704,17 +1704,17 @@ KDE_NO_EXPORT void KMPlayerMenuSource::menuItemClicked (TQPopupMenu * menu, int
KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageDVD::KMPlayerPrefSourcePageDVD (TQWidget * parent)
: TQFrame(parent) {
TQVBoxLayout *layout = new TQVBoxLayout (this, 5, 2);
TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 2);
autoPlayDVD = new TQCheckBox (i18n ("Auto play after opening DVD"), this, 0);
TQWhatsThis::add(autoPlayDVD, i18n ("Start playing DVD right after opening DVD"));
TQLabel *dvdDevicePathLabel = new TQLabel (i18n("DVD device:"), this, 0);
dvddevice = new KURLRequester ("/dev/dvd", this, 0);
TQWhatsThis::add(dvddevice, i18n ("Path to your DVD device, you must have read rights to this device"));
layout->addWidget (autoPlayDVD);
layout->addItem (new TQSpacerItem (0, 10, TQSizePolicy::Minimum, TQSizePolicy::Minimum));
layout->addWidget (dvdDevicePathLabel);
layout->addWidget (dvddevice);
layout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
tqlayout->addWidget (autoPlayDVD);
tqlayout->addItem (new TQSpacerItem (0, 10, TQSizePolicy::Minimum, TQSizePolicy::Minimum));
tqlayout->addWidget (dvdDevicePathLabel);
tqlayout->addWidget (dvddevice);
tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
}
//-----------------------------------------------------------------------------
@ -2065,17 +2065,17 @@ KDE_NO_EXPORT TQString KMPlayerDVDNavSource::prettyName () {
KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageVCD::KMPlayerPrefSourcePageVCD (TQWidget * parent)
: TQFrame (parent) {
TQVBoxLayout *layout = new TQVBoxLayout (this, 5, 2);
TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 2);
autoPlayVCD = new TQCheckBox (i18n ("Auto play after opening a VCD"), this, 0);
TQWhatsThis::add(autoPlayVCD, i18n ("Start playing VCD right after opening VCD"));
TQLabel *vcdDevicePathLabel = new TQLabel (i18n ("VCD (CDROM) device:"), this, 0);
vcddevice= new KURLRequester ("/dev/cdrom", this, 0);
TQWhatsThis::add(vcddevice, i18n ("Path to your CDROM/DVD device, you must have read rights to this device"));
layout->addWidget (autoPlayVCD);
layout->addItem (new TQSpacerItem (0, 10, TQSizePolicy::Minimum, TQSizePolicy::Minimum));
layout->addWidget (vcdDevicePathLabel);
layout->addWidget (vcddevice);
layout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
tqlayout->addWidget (autoPlayVCD);
tqlayout->addItem (new TQSpacerItem (0, 10, TQSizePolicy::Minimum, TQSizePolicy::Minimum));
tqlayout->addWidget (vcdDevicePathLabel);
tqlayout->addWidget (vcddevice);
tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
}
//-----------------------------------------------------------------------------


+ 57
- 57
src/kmplayerbroadcast.cpp View File

@ -18,7 +18,7 @@
*/
#include <algorithm>
#include <layout.h>
#include <tqlayout.h>
#include <tqlabel.h>
#include <tqpushbutton.h>
#include <tqtable.h>
@ -155,51 +155,51 @@ KDE_NO_EXPORT const TQStringList FFServerSetting::list () {
//-----------------------------------------------------------------------------
KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastPage::KMPlayerPrefBroadcastPage (TQWidget *parent) : TQFrame (parent) {
TQVBoxLayout *layout = new TQVBoxLayout (this, 5);
TQGridLayout *gridlayout = new TQGridLayout (layout, 6, 2, 2);
TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5);
TQGridLayout *gridtqlayout = new TQGridLayout (tqlayout, 6, 2, 2);
TQLabel *label = new TQLabel (i18n ("Bind address:"), this);
bindaddress = new TQLineEdit ("", this);
TQWhatsThis::add (bindaddress, i18n ("If you have multiple network devices, you can limit access"));
gridlayout->addWidget (label, 0, 0);
gridlayout->addWidget (bindaddress, 0, 1);
gridtqlayout->addWidget (label, 0, 0);
gridtqlayout->addWidget (bindaddress, 0, 1);
label = new TQLabel (i18n ("Listen port:"), this);
port = new TQLineEdit ("", this);
gridlayout->addWidget (label, 1, 0);
gridlayout->addWidget (port, 1, 1);
gridtqlayout->addWidget (label, 1, 0);
gridtqlayout->addWidget (port, 1, 1);
label = new TQLabel (i18n ("Maximum connections:"), this);
maxclients = new TQLineEdit ("", this);
gridlayout->addWidget (label, 2, 0);
gridlayout->addWidget (maxclients, 2, 1);
gridtqlayout->addWidget (label, 2, 0);
gridtqlayout->addWidget (maxclients, 2, 1);
label = new TQLabel (i18n ("Maximum bandwidth (kbit):"), this);
maxbandwidth = new TQLineEdit ("", this);
gridlayout->addWidget (label, 3, 0);
gridlayout->addWidget (maxbandwidth, 3, 1);
gridtqlayout->addWidget (label, 3, 0);
gridtqlayout->addWidget (maxbandwidth, 3, 1);
label = new TQLabel (i18n ("Temporary feed file:"), this);
feedfile = new TQLineEdit ("", this);
gridlayout->addWidget (label, 4, 0);
gridlayout->addWidget (feedfile, 4, 1);
gridtqlayout->addWidget (label, 4, 0);
gridtqlayout->addWidget (feedfile, 4, 1);
label = new TQLabel (i18n ("Feed file size (kB):"), this);
feedfilesize = new TQLineEdit ("", this);
gridlayout->addWidget (label, 5, 0);
gridlayout->addWidget (feedfilesize, 5, 1);
layout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
gridtqlayout->addWidget (label, 5, 0);
gridtqlayout->addWidget (feedfilesize, 5, 1);
tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
}
//-----------------------------------------------------------------------------
#undef ADDPROPERTY
#define ADDPROPERTY(label,qedit,gridlayout,row,parent) \
#define ADDPROPERTY(label,qedit,gridtqlayout,row,parent) \
qedit = new TQLineEdit ("", parent); \
gridlayout->addWidget (new TQLabel (qedit, label, parent), row, 0); \
gridlayout->addWidget (qedit, row, 1);
gridtqlayout->addWidget (new TQLabel (qedit, label, parent), row, 0); \
gridtqlayout->addWidget (qedit, row, 1);
KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastFormatPage::KMPlayerPrefBroadcastFormatPage (TQWidget *parent, FFServerSettingList & ffs) : TQFrame (parent, "BroadcastPage"), profiles (ffs)
{
TQHBoxLayout *layout = new TQHBoxLayout (this, 5);
TQGridLayout *formatlayout = new TQGridLayout (11, 2, 2);
formatlayout->setAlignment (TQt::AlignTop);
TQVBoxLayout *leftlayout = new TQVBoxLayout (15);
TQHBoxLayout *ledlayout = new TQHBoxLayout (5);
TQHBoxLayout *tqlayout = new TQHBoxLayout (this, 5);
TQGridLayout *formattqlayout = new TQGridLayout (11, 2, 2);
formattqlayout->tqsetAlignment (TQt::AlignTop);
TQVBoxLayout *lefttqlayout = new TQVBoxLayout (15);
TQHBoxLayout *ledtqlayout = new TQHBoxLayout (5);
format = new TQComboBox (this);
TQLabel * label = new TQLabel (format, i18n ("Format:"), this);
format->clear ();
@ -210,18 +210,18 @@ KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastFormatPage::KMPlayerPrefBroadcastFormat
format->insertItem (TQString ("rm"));
format->insertItem (TQString ("swf"));
TQWhatsThis::add (format, i18n ("Only avi, mpeg and rm work for mplayer playback"));
formatlayout->addWidget (label, 0, 0);
formatlayout->addWidget (format, 0, 1);
ADDPROPERTY (i18n ("Audio codec:"), audiocodec, formatlayout, 1, this);
ADDPROPERTY (i18n ("Audio bit rate (kbit):"), audiobitrate, formatlayout, 2, this);
ADDPROPERTY (i18n ("Audio sample rate (Hz):"), audiosamplerate, formatlayout, 3, this);
ADDPROPERTY (i18n ("Video codec:"), videocodec, formatlayout, 4, this);
ADDPROPERTY (i18n ("Video bit rate (kbit):"), videobitrate, formatlayout, 5, this);
ADDPROPERTY (i18n ("Quality (1-31):"), quality, formatlayout, 6, this);
ADDPROPERTY (i18n ("Frame rate (Hz):"), framerate, formatlayout, 7, this);
ADDPROPERTY (i18n ("Gop size:"), gopsize, formatlayout, 8, this);
ADDPROPERTY (i18n ("Width (pixels):"), moviewidth, formatlayout, 9, this);
ADDPROPERTY (i18n ("Height (pixels):"), movieheight, formatlayout, 10, this);
formattqlayout->addWidget (label, 0, 0);
formattqlayout->addWidget (format, 0, 1);
ADDPROPERTY (i18n ("Audio codec:"), audiocodec, formattqlayout, 1, this);
ADDPROPERTY (i18n ("Audio bit rate (kbit):"), audiobitrate, formattqlayout, 2, this);
ADDPROPERTY (i18n ("Audio sample rate (Hz):"), audiosamplerate, formattqlayout, 3, this);
ADDPROPERTY (i18n ("Video codec:"), videocodec, formattqlayout, 4, this);
ADDPROPERTY (i18n ("Video bit rate (kbit):"), videobitrate, formattqlayout, 5, this);
ADDPROPERTY (i18n ("Quality (1-31):"), quality, formattqlayout, 6, this);
ADDPROPERTY (i18n ("Frame rate (Hz):"), framerate, formattqlayout, 7, this);
ADDPROPERTY (i18n ("Gop size:"), gopsize, formattqlayout, 8, this);
ADDPROPERTY (i18n ("Width (pixels):"), moviewidth, formattqlayout, 9, this);
ADDPROPERTY (i18n ("Height (pixels):"), movieheight, formattqlayout, 10, this);
label = new TQLabel (i18n ("Allow access from:"), this);
accesslist = new TQTable (40, 1, this);
accesslist->verticalHeader ()->hide ();
@ -231,7 +231,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastFormatPage::KMPlayerPrefBroadcastFormat
TQHeader *header = accesslist->horizontalHeader ();
header->setLabel (0, i18n ("Host/IP or IP Range"));
TQFrame *profileframe = new TQFrame (this);
TQGridLayout *profileslayout = new TQGridLayout (profileframe, 5, 2, 2);
TQGridLayout *profilestqlayout = new TQGridLayout (profileframe, 5, 2, 2);
profile = new TQLineEdit ("", profileframe);
connect (profile, TQT_SIGNAL(textChanged (