From 769e63d24adf5c844137484f06a972fcce732d6a Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 06:10:56 +0000 Subject: 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 --- src/kmplayerview.h | 82 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 40 deletions(-) (limited to 'src/kmplayerview.h') diff --git a/src/kmplayerview.h b/src/kmplayerview.h index d255bd0..e8a77a0 100644 --- a/src/kmplayerview.h +++ b/src/kmplayerview.h @@ -22,8 +22,8 @@ #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include #include @@ -34,12 +34,12 @@ #define MOUSE_INVISIBLE_DELAY 2000 -class QWidgetStack; -class QPixmap; -class QPaintDevice; -class QPainter; -class QSlider; -class QLabel; +class TQWidgetStack; +class TQPixmap; +class TQPaintDevice; +class TQPainter; +class TQSlider; +class TQLabel; class KActionCollection; class KAction; class KShortcut; @@ -63,11 +63,11 @@ typedef KStatusBar StatusBar; /* * The console GUI */ -class TextEdit : public QTextEdit { +class TextEdit : public TQTextEdit { public: - TextEdit (QWidget * parent, View * view); + TextEdit (TQWidget * tqparent, View * view); protected: - void contextMenuEvent (QContextMenuEvent * e); + void contextMenuEvent (TQContextMenuEvent * e); private: View * m_view; }; @@ -75,12 +75,12 @@ private: /* * The infowindow GUI */ -class InfoWindow : public QTextEdit { +class InfoWindow : public TQTextEdit { public: - InfoWindow (QWidget * parent, View * view); + InfoWindow (TQWidget * tqparent, View * view); KDE_NO_EXPORT View * view () const { return m_view; } protected: - void contextMenuEvent (QContextMenuEvent * e); + void contextMenuEvent (TQContextMenuEvent * e); private: View * m_view; }; @@ -90,6 +90,7 @@ private: */ class KMPLAYER_EXPORT View : public KMediaPlayer::View { Q_OBJECT + TQ_OBJECT public: enum ControlPanelMode { CP_Hide, CP_AutoHide, CP_Show, CP_Only /* no video widget */ @@ -101,13 +102,13 @@ public: WT_Video, WT_Console, WT_Picture, WT_Last }; - View (QWidget *parent, const char *); + View (TQWidget *tqparent, const char *); ~View(); - void addText (const QString &, bool eol=false); + void addText (const TQString &, bool eol=false); void init (KActionCollection * ac); void reset (); - //void print(QPrinter *pPrinter); + //void print(TQPrinter *pPrinter); TextEdit * console () const { return m_multiedit; } KDE_NO_EXPORT Viewer * viewer () const { return m_viewer; } @@ -115,7 +116,7 @@ public: KDE_NO_EXPORT StatusBar * statusBar () const {return m_status_bar;} KDE_NO_EXPORT PlayListView * playList () const { return m_playlist; } KDE_NO_EXPORT InfoWindow * infoPanel () const { return m_infopanel; } - KDE_NO_EXPORT QWidgetStack * widgetStack () const { return m_widgetstack; } + KDE_NO_EXPORT TQWidgetStack * widgetStack () const { return m_widgetstack; } KDE_NO_EXPORT KDockArea * docArea () const { return m_dockarea; } KDE_NO_EXPORT ViewArea * viewArea () const { return m_view_area; } KDE_NO_EXPORT bool keepSizeRatio () const { return m_keepsizeratio; } @@ -123,22 +124,22 @@ public: void showWidget (WidgetType w); void setControlPanelMode (ControlPanelMode m); void setStatusBarMode (StatusBarMode m); - void setEraseColor (const QColor &); + void setEraseColor (const TQColor &); KDE_NO_EXPORT ControlPanelMode controlPanelMode () const { return m_controlpanel_mode; } KDE_NO_EXPORT StatusBarMode statusBarMode () const { return m_statusbar_mode; } void delayedShowButtons (bool show); bool isFullScreen () const; int statusBarHeight () const; KDE_NO_EXPORT bool editMode () const { return m_edit_mode; } - bool setPicture (const QString & path); - KDE_NO_EXPORT QPixmap * image () const { return m_image; } + bool setPicture (const TQString & path); + KDE_NO_EXPORT TQPixmap * image () const { return m_image; } void setNoInfoMessages (bool b) { m_no_info = b; } void setViewOnly (); void setInfoPanelOnly (); void setPlaylistOnly (); void setEditMode (RootPlayListItem *, bool enable=true); - void dragEnterEvent (QDragEnterEvent *); - void dropEvent (QDropEvent *); + void dragEnterEvent (TQDragEnterEvent *); + void dropEvent (TQDropEvent *); KDE_NO_EXPORT void emitPictureClicked () { emit pictureClicked (); } /* raise video widget, might (auto) hides panel */ void videoStart (); @@ -152,16 +153,16 @@ public slots: void updateLayout (); void toggleShowPlaylist (); void toggleVideoConsoleWindow (); - void setInfoMessage (const QString & msg); - void setStatusMessage (const QString & msg); + void setInfoMessage (const TQString & msg); + void setStatusMessage (const TQString & msg); signals: void urlDropped (const KURL::List & urls); void pictureClicked (); void fullScreenChanged (); void windowVideoConsoleToggled (int wt); protected: - void leaveEvent (QEvent *) KDE_NO_EXPORT; - void timerEvent (QTimerEvent *) KDE_NO_EXPORT; + void leaveEvent (TQEvent *) KDE_NO_EXPORT; + void timerEvent (TQTimerEvent *) KDE_NO_EXPORT; bool x11Event (XEvent *) KDE_NO_EXPORT; private: // widget for player's output @@ -169,24 +170,24 @@ private: // console output TextEdit * m_multiedit; // widget stack contains m_viewer, m_multiedit and m_picturewidget - QWidgetStack * m_widgetstack; - // widget that layouts m_widgetstack for ratio setting and m_control_panel + TQWidgetStack * m_widgetstack; + // widget that tqlayouts m_widgetstack for ratio setting and m_control_panel ViewArea * m_view_area; // playlist widget PlayListView * m_playlist; // infopanel widget InfoWindow * m_infopanel; // all widget types - QWidget * m_widgettypes [WT_Last]; + TQWidget * m_widgettypes [WT_Last]; KDockArea * m_dockarea; KDockWidget * m_dock_video; KDockWidget * m_dock_playlist; KDockWidget * m_dock_infopanel; - QString tmplog; - QPixmap * m_image; + TQString tmplog; + TQPixmap * m_image; ControlPanel * m_control_panel; StatusBar * m_status_bar; - QSlider * m_volume_slider; + TQSlider * m_volume_slider; const char * m_mixer_object; ControlPanelMode m_controlpanel_mode; ControlPanelMode m_old_controlpanel_mode; @@ -209,8 +210,9 @@ private: */ class KMPLAYER_EXPORT Viewer : public QXEmbed { Q_OBJECT + TQ_OBJECT public: - Viewer(QWidget *parent, View * view); + Viewer(TQWidget *tqparent, View * view); ~Viewer(); int heightForWidth (int w) const; @@ -218,18 +220,18 @@ public: void setAspect (float a); float aspect () { return m_aspect; } void sendKeyEvent (int key); - void setBackgroundColor (const QColor & c); + void setBackgroundColor (const TQColor & c); void resetBackgroundColor (); - void setCurrentBackgroundColor (const QColor & c); + void setCurrentBackgroundColor (const TQColor & c); KDE_NO_EXPORT View * view () const { return m_view; } void changeProtocol (QXEmbed::Protocol p); public slots: void sendConfigureEvent (); protected: - void dragEnterEvent (QDragEnterEvent *); - void dropEvent (QDropEvent *); - void mouseMoveEvent (QMouseEvent * e); - void contextMenuEvent (QContextMenuEvent * e); + void dragEnterEvent (TQDragEnterEvent *); + void dropEvent (TQDropEvent *); + void mouseMoveEvent (TQMouseEvent * e); + void contextMenuEvent (TQContextMenuEvent * e); virtual void windowChanged( WId w ); private: WId m_plain_window; -- cgit v1.2.1