diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 06:10:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 06:10:56 +0000 |
commit | 769e63d24adf5c844137484f06a972fcce732d6a (patch) | |
tree | 5185797dcb3ff4b1b3cb71d367123bf89eb2410f /src/kmplayer_smil.h | |
parent | 0a8af92185eac74d48da1225e6053a0d66c078f5 (diff) | |
download | kmplayer-769e63d24adf5c844137484f06a972fcce732d6a.tar.gz kmplayer-769e63d24adf5c844137484f06a972fcce732d6a.zip |
TQt4 port kmplayer
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmplayer@1238840 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kmplayer_smil.h')
-rw-r--r-- | src/kmplayer_smil.h | 165 |
1 files changed, 83 insertions, 82 deletions
diff --git a/src/kmplayer_smil.h b/src/kmplayer_smil.h index 3ecfd18..2e84e09 100644 --- a/src/kmplayer_smil.h +++ b/src/kmplayer_smil.h @@ -22,15 +22,15 @@ #define _KMPLAYER_SMILL_H_ #include <config.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> #include "kmplayerplaylist.h" -class QTextStream; -class QImage; -class QPainter; +class TQTextStream; +class TQImage; +class TQPainter; namespace KIO { class Job; @@ -41,18 +41,18 @@ struct TransTypeInfo; namespace KMPlayer { struct KMPLAYER_NO_EXPORT ImageData { - ImageData( const QString & img); + ImageData( const TQString & img); ~ImageData(); - QImage *image; + TQImage *image; private: - QString url; + TQString url; }; typedef SharedPtr <ImageData> ImageDataPtr; typedef WeakPtr <ImageData> ImageDataPtrW; struct KMPLAYER_NO_EXPORT CachedImage { - void setUrl (const QString & url); + void setUrl (const TQString & url); bool isEmpty (); ImageDataPtr data; }; @@ -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: @@ -75,9 +75,9 @@ public: class KMPLAYER_NO_EXPORT SizeType { public: SizeType (); - SizeType (const QString & s); + SizeType (const TQString & s); void reset (); - SizeType & operator = (const QString & s); + SizeType & operator = (const TQString & s); SizeType & operator += (const SizeType & s); SizeType & operator -= (const SizeType & s); SizeType & operator /= (const int i) @@ -106,8 +106,8 @@ public: bool applyRegPoints (Node *, Single w, Single h, Single & xoff, Single & yoff, Single & w1, Single & h1); SizeType left, top, width, height, right, bottom; - QString reg_point, reg_align; - bool setSizeParam (const TrieString &name, const QString &value, bool &dim); + TQString reg_point, reg_align; + bool setSizeParam (const TrieString &name, const TQString &value, bool &dim); void move (const SizeType &x, const SizeType &y); }; @@ -136,7 +136,7 @@ public: * Reset all data, called from end() and init() */ virtual void reset (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); TimingState state () const { return timingstate; } void propagateStop (bool forced); void propagateStart (); @@ -156,7 +156,7 @@ public: KDE_NO_EXPORT DurationItem & durTime () { return durations[duration_time]; } KDE_NO_EXPORT DurationItem & endTime () { return durations [end_time]; } private: - void setDurationItem (DurationTime item, const QString & val); + void setDurationItem (DurationTime item, const TQString & val); public: TimingState timingstate; protected: @@ -190,32 +190,33 @@ class KMPLAYER_NO_EXPORT AudioVideoData : public MediaTypeRuntime { public: AudioVideoData (NodePtr e); virtual bool isAudioVideo (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void started (); virtual void postpone (bool b); virtual void clipStart (); virtual void clipStop (); }; -class KMPLAYER_NO_EXPORT ImageRuntime : public QObject,public MediaTypeRuntime { +class KMPLAYER_NO_EXPORT ImageRuntime : public TQObject,public MediaTypeRuntime { Q_OBJECT + TQ_OBJECT public: ImageRuntime (NodePtr e); ~ImageRuntime (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void postpone (bool b); virtual void clipStart (); virtual void clipStop (); - QMovie * img_movie; + TQMovie * img_movie; CachedImage cached_img; int frame_nr; protected: virtual void started (); - virtual void remoteReady (QByteArray &); + virtual void remoteReady (TQByteArray &); private slots: - void movieUpdated (const QRect &); - void movieStatus (int); - void movieResize (const QSize &); + void movieUpdated (const TQRect &); + void movietqStatus (int); + void movieResize (const TQSize &); }; /** @@ -226,17 +227,17 @@ public: TextRuntime (NodePtr e); ~TextRuntime (); void reset (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); int font_size; unsigned int font_color; unsigned int background_color; int bg_opacity; enum { align_left, align_center, align_right } halign; - QString text; + TQString text; TextRuntimePrivate * d; protected: virtual void started (); - virtual void remoteReady (QByteArray &); + virtual void remoteReady (TQByteArray &); }; /** @@ -245,14 +246,14 @@ protected: class KMPLAYER_NO_EXPORT AnimateGroupData : public Runtime { public: KDE_NO_CDTOR_EXPORT ~AnimateGroupData () {} - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void reset (); protected: void restoreModification (); AnimateGroupData (NodePtr e); NodePtrW target_element; TrieString changed_attribute; - QString change_to; + TQString change_to; int modification_id; protected: virtual void stopped (); @@ -276,7 +277,7 @@ class KMPLAYER_NO_EXPORT AnimateData : public AnimateGroupData { public: AnimateData (NodePtr e); KDE_NO_CDTOR_EXPORT ~AnimateData () {} - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void reset (); virtual void started (); virtual void stopped (); @@ -285,14 +286,14 @@ private: void applyStep (); TimerInfoPtrW anim_timer; enum { acc_none, acc_sum } accumulate; - enum { add_replace, add_sum } additive; + enum { add_tqreplace, add_sum } additive; int change_by; enum { calc_discrete, calc_linear, calc_paced, calc_spline } calcMode; - QString change_from; - QStringList change_values; + TQString change_from; + TQStringList change_values; int steps; float change_delta, change_to_val, change_from_val; - QString change_from_unit; + TQString change_from_unit; }; /** @@ -302,7 +303,7 @@ class KMPLAYER_NO_EXPORT AnimateMotionData : public AnimateGroupData { public: AnimateMotionData (NodePtr e); ~AnimateMotionData (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void reset (); virtual void started (); virtual void stopped (); @@ -311,17 +312,17 @@ private: bool checkTarget (Node *n); bool setInterval (); void applyStep (); - bool getCoordinates (const QString &coord, SizeType &x, SizeType &y); + bool getCoordinates (const TQString &coord, SizeType &x, SizeType &y); TimerInfoPtrW anim_timer; enum { acc_none, acc_sum } accumulate; - enum { add_replace, add_sum } additive; + enum { add_tqreplace, add_sum } additive; enum { calc_discrete, calc_linear, calc_paced, calc_spline } calcMode; - QString change_from; - QString change_by; - QStringList values; + TQString change_from; + TQString change_by; + TQStringList values; float *keytimes; int keytime_count; - QStringList splines; + TQStringList splines; float control_point[4]; unsigned int steps; unsigned int cur_step; @@ -347,7 +348,7 @@ public: /** * Translates string to deci-seconds or 'special' high number */ -bool parseTime (const QString & val, int & dur /*,const QString & dateformat*/); +bool parseTime (const TQString & val, int & dur /*,const TQString & dateformat*/); //----------------------------------------------------------------------------- @@ -392,7 +393,7 @@ const short id_node_last = 200; // reserve 100 ids class Smil : public Mrl { public: KDE_NO_CDTOR_EXPORT Smil (NodePtr & d) : Mrl (d, id_node_smil) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "smil"; } PlayType playType () { return play_type_video; } void activate (); @@ -402,7 +403,7 @@ public: bool expose () const; bool handleEvent (EventPtr event); void accept (Visitor *); - void jump (const QString & id); + void jump (const TQString & id); static Smil * findSmilNode (Node * node); /** * Hack to mark the currently playing MediaType as finished @@ -410,7 +411,7 @@ public: */ Mrl * linkNode (); NodePtrW current_av_media_type; - NodePtrW layout_node; + NodePtrW tqlayout_node; }; /** @@ -420,7 +421,7 @@ public: class KMPLAYER_NO_EXPORT Head : public Element { public: KDE_NO_CDTOR_EXPORT Head (NodePtr & d) : Element (d, id_node_head) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "head"; } void closed (); void childDone (NodePtr child); @@ -439,19 +440,19 @@ public: void activate (); void childDone (NodePtr child); void deactivate (); - virtual void parseParam (const TrieString & name, const QString & value); + virtual void parseParam (const TrieString & name, const TQString & value); /** - * repaints region, calls scheduleRepaint(x,y,w,h) on view + * tqrepaints 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; @@ -461,22 +462,22 @@ public: Single x, y, w, h; // unscaled values int z_order; unsigned int background_color; - QString background_image; + TQString background_image; ShowBackground show_background; protected: RegionBase (NodePtr & d, short id); PostponePtr postpone_lock; // pause while loading bg image - virtual void remoteReady (QByteArray &); // image downloaded + virtual void remoteReady (TQByteArray &); // image downloaded }; /** - * 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 QString & tag); - KDE_NO_EXPORT const char * nodeName () const { return "layout"; } + NodePtr childFromTag (const TQString & tag); + KDE_NO_EXPORT const char * nodeName () const { return "tqlayout"; } void activate (); void closed (); virtual void accept (Visitor *); @@ -496,7 +497,7 @@ class KMPLAYER_NO_EXPORT Region : public RegionBase { public: Region (NodePtr & d); KDE_NO_EXPORT const char * nodeName () const { return "region"; } - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); void calculateBounds (Single w, Single h); virtual NodeRefListPtr listeners (unsigned int event_id); virtual void accept (Visitor *); @@ -516,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: @@ -528,7 +529,7 @@ public: KDE_NO_CDTOR_EXPORT ~RegPoint () {} KDE_NO_EXPORT const char * nodeName () const { return "regPoint"; } KDE_NO_EXPORT bool expose () const { return false; } - void parseParam (const TrieString & name, const QString & value); + void parseParam (const TrieString & name, const TQString & value); CalculatedSizer sizes; }; @@ -570,7 +571,7 @@ public: void activate (); KDE_NO_EXPORT void accept (Visitor * v) { v->visit (this); } KDE_NO_EXPORT const char * nodeName () const { return "transition"; } - void parseParam (const TrieString & name, const QString & value); + void parseParam (const TrieString & name, const TQString & value); KDE_NO_EXPORT bool expose () const { return false; } bool supported (); TransType type; @@ -605,7 +606,7 @@ public: virtual NodeRefListPtr listeners (unsigned int event_id); KDE_NO_EXPORT void accept (Visitor * v) { v->visit (this); } void init (); - virtual void parseParam (const TrieString &, const QString &); + virtual void parseParam (const TrieString &, const TQString &); Runtime * runtime (); static Runtime::DurationItem * getDuration (NodePtr n); static bool isTimedMrl (const Node *n); @@ -644,7 +645,7 @@ KDE_NO_EXPORT inline bool TimedMrl::isTimedMrl (const Node *n) { class KMPLAYER_NO_EXPORT GroupBase : public TimedMrl { public: KDE_NO_CDTOR_EXPORT ~GroupBase () {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); PlayType playType () { return play_type_none; } void finish (); void deactivate (); @@ -655,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: @@ -667,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: @@ -690,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: @@ -725,11 +726,11 @@ public: KDE_NO_CDTOR_EXPORT ~LinkingBase () {} void deactivate (); KDE_NO_EXPORT bool expose () const { return false; } - void parseParam (const TrieString & name, const QString & value); + void parseParam (const TrieString & name, const TQString & value); ConnectionPtr mediatype_activated; ConnectionPtr mediatype_attach; - QString href; - enum { show_new, show_replace } show; + TQString href; + enum { show_new, show_tqreplace } show; protected: LinkingBase (NodePtr & d, short id); }; @@ -741,22 +742,22 @@ public: void activate (); void childDone (NodePtr child); KDE_NO_EXPORT const char * nodeName () const { return "a"; } - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT void accept (Visitor * v) { v->visit (this); } }; class KMPLAYER_NO_EXPORT Area : public LinkingBase { public: - Area (NodePtr & d, const QString & tag); + Area (NodePtr & d, const TQString & tag); ~Area (); void activate (); KDE_NO_EXPORT const char * nodeName () const { return tag.ascii (); } KDE_NO_EXPORT void accept (Visitor * v) { v->visit (this); } - void parseParam (const TrieString & name, const QString & value); + void parseParam (const TrieString & name, const TQString & value); NodeRefListPtr listeners (unsigned int event_id); SizeType * coords; int nr_coords; - const QString tag; + const TQString tag; MouseListeners mouse_listeners; }; @@ -765,8 +766,8 @@ public: */ class KMPLAYER_NO_EXPORT MediaType : public TimedMrl { public: - MediaType (NodePtr & d, const QString & t, short id); - NodePtr childFromTag (const QString & tag); + MediaType (NodePtr & d, const TQString & t, short id); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return m_type.latin1 (); } void closed (); void activate (); @@ -779,8 +780,8 @@ public: Surface *surface (); void resetSurface (); SRect calculateBounds (); - void boundsUpdate (); // recalculates and repaint old and new bounds - virtual void parseParam (const TrieString & name, const QString & value); + 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); bool needsVideoWidget (); // for 'video' and 'ref' nodes @@ -790,7 +791,7 @@ public: NodePtrW trans_out; NodePtrW active_trans; NodePtrW region_node; - QString m_type; + TQString m_type; CalculatedSizer sizes; Fit fit; int opacity; @@ -813,8 +814,8 @@ protected: class KMPLAYER_NO_EXPORT AVMediaType : public MediaType { public: - AVMediaType (NodePtr & d, const QString & t); - NodePtr childFromTag (const QString & tag); + AVMediaType (NodePtr & d, const TQString & t); + NodePtr childFromTag (const TQString & tag); virtual Runtime * getNewRuntime (); virtual void defer (); virtual void undefer (); @@ -827,7 +828,7 @@ class KMPLAYER_NO_EXPORT ImageMediaType : public MediaType { public: ImageMediaType (NodePtr & d); Runtime * getNewRuntime (); - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); PlayType playType () { return play_type_image; } virtual void accept (Visitor *); }; |