From 12b478cefdf1789828dbcd677d409cf8bad654ca Mon Sep 17 00:00:00 2001 From: gregory guy Date: Sat, 13 Jun 2020 16:33:09 +0200 Subject: Conversion KDE -> TDE environment. Signed-off-by: gregory guy --- src/part/SConscript | 2 +- src/part/part.cpp | 16 ++++++++-------- src/part/part.h | 8 ++++---- src/part/toolbar.cpp | 2 +- src/part/toolbar.h | 4 ++-- src/part/xineEngine.cpp | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/part') diff --git a/src/part/SConscript b/src/part/SConscript index 978d490..ff2d085 100644 --- a/src/part/SConscript +++ b/src/part/SConscript @@ -7,6 +7,6 @@ myenv=env.Copy() ## Always add '../' (top-level directory) because moc makes code that needs it KDEaddpaths( ['./', '../', '../../'], myenv ) -KDEaddlibs( ['tqt-mt', 'kdecore', 'kdeui', 'kparts', 'xine'], myenv ) +KDEaddlibs( ['tqt-mt', 'tdecore', 'tdeui', 'tdeparts', 'xine'], myenv ) KDEshlib( "libcodeine", Split( "part.cpp xineEngine.cpp videoWindow.cpp toolbar.cpp ../mxcl.library.cpp" ), myenv ) diff --git a/src/part/part.cpp b/src/part/part.cpp index 1b4b878..f251731 100644 --- a/src/part/part.cpp +++ b/src/part/part.cpp @@ -3,14 +3,14 @@ #include "codeine.h" #include "debug.h" -#include -#include +#include +#include #include "part.h" #include #include "toolbar.h" #include "videoWindow.h" -#include +#include #include namespace Codeine @@ -35,9 +35,9 @@ namespace Codeine //FIXME this will terminate the host, eg Konqueror Debug::fatal() << "Couldn't init xine!\n"; - KAction *play = new KToggleAction( i18n("Play"), "player_play", TQt::Key_Space, videoWindow(), SLOT(togglePlay()), actionCollection(), "play" ); - KAction *mute = new KToggleAction( i18n("Mute"), "player_mute", TQt::Key_M, videoWindow(), SLOT(toggleMute()), actionCollection(), "mute" ); - KToolBar *toolBar = new MouseOverToolBar( widget() ); + TDEAction *play = new TDEToggleAction( i18n("Play"), "player_play", TQt::Key_Space, videoWindow(), SLOT(togglePlay()), actionCollection(), "play" ); + TDEAction *mute = new TDEToggleAction( i18n("Mute"), "player_mute", TQt::Key_M, videoWindow(), SLOT(toggleMute()), actionCollection(), "mute" ); + TDEToolBar *toolBar = new MouseOverToolBar( widget() ); play->plug( toolBar ); mute->plug( toolBar ); m_slider = new TQSlider( TQt::Horizontal, toolBar, "slider" ); @@ -68,11 +68,11 @@ namespace Codeine return true; } - KAboutData* + TDEAboutData* Part::createAboutData() { // generic factory expects this on the heap - return new KAboutData( APP_NAME, PRETTY_NAME, APP_VERSION ); + return new TDEAboutData( APP_NAME, PRETTY_NAME, APP_VERSION ); } void diff --git a/src/part/part.h b/src/part/part.h index d998664..8a55f3a 100644 --- a/src/part/part.h +++ b/src/part/part.h @@ -4,11 +4,11 @@ #ifndef CODEINE_PART_H #define CODEINE_PART_H -#include -#include +#include +#include #include -class KAboutData; +class TDEAboutData; class TQSlider; @@ -23,7 +23,7 @@ namespace Codeine virtual bool openURL( const KURL& ); virtual bool closeURL(); - static KAboutData *createAboutData(); + static TDEAboutData *createAboutData(); private: KParts::StatusBarExtension *m_statusBarExtension; diff --git a/src/part/toolbar.cpp b/src/part/toolbar.cpp index e998244..87caa62 100644 --- a/src/part/toolbar.cpp +++ b/src/part/toolbar.cpp @@ -8,7 +8,7 @@ MouseOverToolBar::MouseOverToolBar( TQWidget *parent ) - : KToolBar( parent ) + : TDEToolBar( parent ) { parent->installEventFilter( this ); move( 0, 0 ); //TODO necessary? diff --git a/src/part/toolbar.h b/src/part/toolbar.h index 58a3a57..2c5d4b4 100644 --- a/src/part/toolbar.h +++ b/src/part/toolbar.h @@ -4,10 +4,10 @@ #ifndef CODEINE_TOOLBAR_H #define CODEINE_TOOLBAR_H -#include +#include -class MouseOverToolBar : public KToolBar +class MouseOverToolBar : public TDEToolBar { virtual bool eventFilter( TQObject*, TQEvent* ); diff --git a/src/part/xineEngine.cpp b/src/part/xineEngine.cpp index 149ad1f..8424f37 100644 --- a/src/part/xineEngine.cpp +++ b/src/part/xineEngine.cpp @@ -4,8 +4,8 @@ #define CODEINE_DEBUG_PREFIX "engine" #include "debug.h" -#include -#include +#include +#include #include "mxcl.library.h" #include //::sendEvent() #include //::play() @@ -65,7 +65,7 @@ VideoWindow::init() xine_cfg_entry_t config; if( xine_config_lookup_entry( m_xine, "misc.save_dir", &config ) ) { - const TQCString dir = KGlobalSettings::desktopPath().local8Bit(); + const TQCString dir = TDEGlobalSettings::desktopPath().local8Bit(); config.str_value = tqstrdup( dir ); xine_config_update_entry( m_xine, &config ); } @@ -258,7 +258,7 @@ VideoWindow::xineEventListener( void *p, const xine_event_t* xineEvent ) TQString msg = "%1 %2%"; msg = msg.arg( TQString::fromUtf8( pd->description ) ) - .arg( KGlobal::locale()->formatNumber( pd->percent, 0 ) ); + .arg( TDEGlobal::locale()->formatNumber( pd->percent, 0 ) ); TQApplication::postEvent( engine, new TQCustomEvent( TQEvent::Type(3000), new TQString( msg ) ) ); break; -- cgit v1.2.3