diff options
Diffstat (limited to 'src')
31 files changed, 145 insertions, 145 deletions
diff --git a/src/app/SConscript b/src/app/SConscript index 9b7600d..bb402f3 100644 --- a/src/app/SConscript +++ b/src/app/SConscript @@ -50,7 +50,7 @@ KDEprogram( "codeine", app_sources, myenv ) KDEaddpaths( ['./', '../', '../../'], myenv ) ## Necessary libraries to link against -KDEaddlibs( ['tqt-mt', 'kio', 'kdecore', 'kdeui', 'xine', 'Xtst'], myenv ) +KDEaddlibs( ['tqt-mt', 'tdeio', 'tdecore', 'tdeui', 'xine', 'Xtst'], myenv ) ## This shows how to add other link flags to the program myenv['LINKFLAGS'].append('-L/usr/X11R6/lib') diff --git a/src/app/actions.cpp b/src/app/actions.cpp index 3fd0971..1612a57 100644 --- a/src/app/actions.cpp +++ b/src/app/actions.cpp @@ -9,19 +9,19 @@ namespace Codeine { - PlayAction::PlayAction( TQObject *receiver, const char *slot, KActionCollection *ac ) - : KToggleAction( i18n("Play"), "player_play", TQt::Key_Space, receiver, slot, ac, "play" ) + PlayAction::PlayAction( TQObject *receiver, const char *slot, TDEActionCollection *ac ) + : TDEToggleAction( i18n("Play"), "player_play", TQt::Key_Space, receiver, slot, ac, "play" ) {} void PlayAction::setChecked( bool b ) { - if( videoWindow()->state() == Engine::Empty && sender() && TQCString(sender()->className()) == "KToolBarButton" ) { + if( videoWindow()->state() == Engine::Empty && sender() && TQCString(sender()->className()) == "TDEToolBarButton" ) { // clicking play when empty means open PlayMediaDialog, but we have to uncheck the toolbar button // as KDElibs sets that checked automatically.. ((TQToolButton*)sender())->setOn( false ); } else - KToggleAction::setChecked( b ); + TDEToggleAction::setChecked( b ); } } diff --git a/src/app/actions.h b/src/app/actions.h index 4d8a121..45b975e 100644 --- a/src/app/actions.h +++ b/src/app/actions.h @@ -4,19 +4,19 @@ #ifndef CODEINEACTIONS_H
#define CODEINEACTIONS_H
-#include <kactionclasses.h> //baseclass
-#include <kactioncollection.h> //convenience
+#include <tdeactionclasses.h> //baseclass
+#include <tdeactioncollection.h> //convenience
namespace Codeine
{
- KActionCollection *actionCollection(); ///defined in mainWindow.cpp
- KAction *action( const char* ); ///defined in mainWindow.cpp
- inline KToggleAction *toggleAction( const char *name ) { return (KToggleAction*)action( name ); }
+ TDEActionCollection *actionCollection(); ///defined in mainWindow.cpp
+ TDEAction *action( const char* ); ///defined in mainWindow.cpp
+ inline TDEToggleAction *toggleAction( const char *name ) { return (TDEToggleAction*)action( name ); }
- class PlayAction : public KToggleAction
+ class PlayAction : public TDEToggleAction
{
public:
- PlayAction( TQObject *receiver, const char *slot, KActionCollection* );
+ PlayAction( TQObject *receiver, const char *slot, TDEActionCollection* );
protected:
virtual void setChecked( bool );
diff --git a/src/app/captureFrame.cpp b/src/app/captureFrame.cpp index 1456817..6043b76 100644 --- a/src/app/captureFrame.cpp +++ b/src/app/captureFrame.cpp @@ -2,7 +2,7 @@ // See COPYING file for licensing information #include "debug.h" -#include <kfiledialog.h> +#include <tdefiledialog.h> #include <kpreviewwidgetbase.h> #include <kpushbutton.h> #include <kstatusbar.h> diff --git a/src/app/config.h b/src/app/config.h index d4a466a..4ac877c 100644 --- a/src/app/config.h +++ b/src/app/config.h @@ -4,14 +4,14 @@ #ifndef CODEINECONFIG_H
#define CODEINECONFIG_H
-#include <kconfig.h>
-#include <kglobal.h>
+#include <tdeconfig.h>
+#include <tdeglobal.h>
namespace Codeine
{
- static inline KConfig *config( const TQString &group )
+ static inline TDEConfig *config( const TQString &group )
{
- KConfig* const instance = KGlobal::config();
+ TDEConfig* const instance = TDEGlobal::config();
instance->setGroup( group );
return instance;
}
diff --git a/src/app/fullScreenAction.cpp b/src/app/fullScreenAction.cpp index 62ba4fa..3787a33 100644 --- a/src/app/fullScreenAction.cpp +++ b/src/app/fullScreenAction.cpp @@ -3,14 +3,14 @@ #include "extern.h" #include "fullScreenAction.h" -#include <klocale.h> -#include <kwin.h> +#include <tdelocale.h> +#include <twin.h> #include <ntqwidget.h> #include "xineEngine.h" //videoWindow() -FullScreenAction::FullScreenAction( TQWidget* window, KActionCollection *parent ) - : KToggleAction( TQString::null, Key_F, 0, 0, parent, "fullscreen" ) +FullScreenAction::FullScreenAction( TQWidget* window, TDEActionCollection *parent ) + : TDEToggleAction( TQString::null, Key_F, 0, 0, parent, "fullscreen" ) , m_window( window ) , m_shouldBeDisabled( false ) , m_state( 0 ) @@ -22,20 +22,20 @@ FullScreenAction::FullScreenAction( TQWidget* window, KActionCollection *parent void FullScreenAction::setChecked( bool setChecked ) { - KToggleAction::setChecked( setChecked ); + TDEToggleAction::setChecked( setChecked ); m_window->raise(); const int id = m_window->winId(); if( setChecked ) { setText( i18n("Exit F&ull Screen Mode") ); - setIcon("window_nofullscreen"); + setIcon("view-restore"); m_state = KWin::windowInfo( id ).state(); KWin::setState( id, NET::FullScreen ); } else { setText(i18n("F&ull Screen Mode")); - setIcon("window_fullscreen"); + setIcon("view-fullscreen"); KWin::clearState( id, NET::FullScreen ); KWin::setState( id, m_state ); // get round bug in KWin where it forgets maximisation state } @@ -54,14 +54,14 @@ FullScreenAction::setEnabled( bool setEnabled ) m_shouldBeDisabled = true; else { - //FIXME Codeine specific (because videoWindow isn't the window we control, we control the KMainWindow) + //FIXME Codeine specific (because videoWindow isn't the window we control, we control the TDEMainWindow) //NOTE also if the videoWindow is hidden at some point, this is broken.. //TODO new type of actionclass that event filters and is always correct state if( setEnabled && reinterpret_cast<TQWidget*>(Codeine::videoWindow())->isHidden() ) setEnabled = false; m_shouldBeDisabled = false; - KToggleAction::setEnabled( setEnabled ); + TDEToggleAction::setEnabled( setEnabled ); } } diff --git a/src/app/fullScreenAction.h b/src/app/fullScreenAction.h index 199fcfd..e86511f 100644 --- a/src/app/fullScreenAction.h +++ b/src/app/fullScreenAction.h @@ -1,18 +1,18 @@ // (C) 2005 Max Howell ([email protected]) // See COPYING file for licensing information -#include <kaction.h> +#include <tdeaction.h> /** * @class FullSCreenAction * @author Max Howell <[email protected]> - * @short Adapted KToggleFullScreenAction, mainly because that class is shit + * @short Adapted TDEToggleFullScreenAction, mainly because that class is shit */ -class FullScreenAction : public KToggleAction +class FullScreenAction : public TDEToggleAction { public: - FullScreenAction( TQWidget *window, KActionCollection* ); + FullScreenAction( TQWidget *window, TDEActionCollection* ); virtual void setChecked( bool ); virtual void setEnabled( bool ); diff --git a/src/app/listView.cpp b/src/app/listView.cpp index e5dd74a..63a6abf 100644 --- a/src/app/listView.cpp +++ b/src/app/listView.cpp @@ -4,14 +4,14 @@ #ifndef CODEINELISTVIEW_CPP
#define CODEINELISTVIEW_CPP
-#include <klistview.h>
+#include <tdelistview.h>
namespace Codeine
{
- class ListView : public KListView
+ class ListView : public TDEListView
{
public:
- ListView( TQWidget *parent ) : KListView( parent )
+ ListView( TQWidget *parent ) : TDEListView( parent )
{
addColumn( TQString::null, 0 );
addColumn( TQString::null );
@@ -26,7 +26,7 @@ namespace Codeine virtual TQSize sizeHint() const
{
- const TQSize sh = KListView::sizeHint();
+ const TQSize sh = TDEListView::sizeHint();
return TQSize( sh.width(),
childCount() == 0
diff --git a/src/app/main.cpp b/src/app/main.cpp index 7c0f6fc..a024d5d 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -2,21 +2,21 @@ // See COPYING file for licensing information #include "codeine.h" -#include <kaboutdata.h> -#include <kapplication.h> -#include <kcmdlineargs.h> +#include <tdeaboutdata.h> +#include <tdeapplication.h> +#include <tdecmdlineargs.h> #include "mainWindow.h" #include <X11/Xlib.h> -static KAboutData aboutData( APP_NAME, +static TDEAboutData aboutData( APP_NAME, I18N_NOOP(PRETTY_NAME), APP_VERSION, - I18N_NOOP("A video player that has a usability focus"), KAboutData::License_GPL_V2, + I18N_NOOP("A video player that has a usability focus"), TDEAboutData::License_GPL_V2, I18N_NOOP("Copyright 2006, Max Howell"), 0, "http://www.methylblue.com/codeine/", "[email protected]" ); -static const KCmdLineOptions options[] = { +static const TDECmdLineOptions options[] = { { "+[URL]", I18N_NOOP( "Play 'URL'" ), 0 }, { "play-dvd", I18N_NOOP( "Play DVD Video" ), 0 }, { 0, 0, 0 } }; @@ -35,10 +35,10 @@ main( int argc, char **argv ) aboutData.addCredit( "Ian Monroe", I18N_NOOP("Patches, advice and moral support") ); - KCmdLineArgs::init( argc, argv, &aboutData ); - KCmdLineArgs::addCmdLineOptions( options ); + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDECmdLineArgs::addCmdLineOptions( options ); - KApplication application; + TDEApplication application; int returnValue; { diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp index bd16fc8..ac054ac 100644 --- a/src/app/mainWindow.cpp +++ b/src/app/mainWindow.cpp @@ -9,17 +9,17 @@ #include "debug.h" #include "extern.h" //dialog creation function definitions #include "fullScreenAction.h" -#include <kapplication.h> -#include <kcmdlineargs.h> +#include <tdeapplication.h> +#include <tdecmdlineargs.h> #include <kcursor.h> -#include <kfiledialog.h> //::open() -#include <kglobalsettings.h> //::timerEvent() -#include <kio/netaccess.h> +#include <tdefiledialog.h> //::open() +#include <tdeglobalsettings.h> //::timerEvent() +#include <tdeio/netaccess.h> #include <ksqueezedtextlabel.h> #include <kstatusbar.h> -#include <ktoolbar.h> +#include <tdetoolbar.h> #include <kurldrag.h> -#include <kwin.h> +#include <twin.h> #include "mainWindow.h" #include "playDialog.h" //::play() #include "playlistFile.h" @@ -52,7 +52,7 @@ namespace Codeine { MainWindow::MainWindow() - : KMainWindow() + : TDEMainWindow() , m_positionSlider( new Slider( this, 65535 ) ) , m_timeLabel( new TQLabel( " 0:00:00 ", this ) ) , m_titleLabel( new KSqueezedTextLabel( this ) ) @@ -72,7 +72,7 @@ MainWindow::MainWindow() setDockEnabled( toolBar(), TQt::DockLeft, false ); //as above m_titleLabel->setMargin( 2 ); - m_timeLabel->setFont( KGlobalSettings::fixedFont() ); + m_timeLabel->setFont( TDEGlobalSettings::fixedFont() ); m_timeLabel->setAlignment( AlignCenter ); m_timeLabel->setMinimumSize( m_timeLabel->sizeHint() ); @@ -99,7 +99,7 @@ MainWindow::MainWindow() // basically, KDE shows all tool-buttons, even if they are // hidden after it does any layout operation. Yay for KDE. Yay. - TQWidget *button = (TQWidget*)((KMainWindow*)mainWindow())->toolBar()->child( "toolbutton_toggle_dvd_menu" ); + TQWidget *button = (TQWidget*)((TDEMainWindow*)mainWindow())->toolBar()->child( "toolbutton_toggle_dvd_menu" ); if (button) button->setShown( TheStream::url().protocol() == "dvd" ); return false; @@ -133,13 +133,13 @@ MainWindow::MainWindow() settings->insertSeparator( index ); } - TQObjectList *list = toolBar()->queryList( "KToolBarButton" ); + TQObjectList *list = toolBar()->queryList( "TDEToolBarButton" ); if (list->isEmpty()) { MessageBox::error( i18n( "<qt>" PRETTY_NAME " could not load its interface, this probably means that " PRETTY_NAME " is not " "installed to the correct prefix. If you installed from packages please contact the packager, if " "you installed from source please try running the <b>configure</b> script again like this: " - "<pre> % ./configure --prefix=`kde-config --prefix`</pre>" ) ); + "<pre> % ./configure --prefix=`tde-config --prefix`</pre>" ) ); std::exit( 1 ); } @@ -147,7 +147,7 @@ MainWindow::MainWindow() KXMLGUIClient::stateChanged( "empty" ); - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); if( args->count() || args->isSet( "play-dvd" ) || kapp->isRestored() ) //we need to resize the window, so we can't show the window yet init(); @@ -184,7 +184,7 @@ MainWindow::init() TQApplication::restoreOverrideCursor(); if( !kapp->isRestored() ) { - KCmdLineArgs &args = *KCmdLineArgs::parsedArgs(); + TDECmdLineArgs &args = *TDECmdLineArgs::parsedArgs(); if (args.isSet( "play-dvd" )) open( "dvd:/" ); else if (args.count() > 0 ) { @@ -217,12 +217,12 @@ bool MainWindow::queryExit() { if( toggleAction( "fullscreen" )->isChecked() ) { - // there seems to be no other way to stop KMainWindow + // there seems to be no other way to stop TDEMainWindow // saving the window state without any controls fullScreenToggled( false ); showNormal(); TQApplication::sendPostedEvents( this, 0 ); - // otherwise KMainWindow saves the screensize as maximised + // otherwise TDEMainWindow saves the screensize as maximised Codeine::MessageBox::sorry( "This annoying messagebox is to get round a bug in either KDE or TQt. " "Just press OK and Codeine will quit." ); @@ -239,24 +239,24 @@ MainWindow::setupActions() { DEBUG_BLOCK - KActionCollection * const ac = actionCollection(); + TDEActionCollection * const ac = actionCollection(); KStdAction::quit( kapp, SLOT(quit()), ac ); KStdAction::open( this, SLOT(playMedia()), ac, "play_media" )->setText( i18n("Play &Media...") ); connect( new FullScreenAction( this, ac ), SIGNAL(toggled( bool )), SLOT(fullScreenToggled( bool )) ); new PlayAction( this, SLOT(play()), ac ); - new KAction( i18n("Stop"), "player_stop", Key_S, engine(), SLOT(stop()), ac, "stop" ); + new TDEAction( i18n("Stop"), "player_stop", Key_S, engine(), SLOT(stop()), ac, "stop" ); - new KToggleAction( i18n("Record"), "player_record", CTRL + Key_R, engine(), SLOT(record()), ac, "record" ); + new TDEToggleAction( i18n("Record"), "player_record", CTRL + Key_R, engine(), SLOT(record()), ac, "record" ); - new KAction( i18n("Reset Video Scale"), "viewmag1", Key_Equal, videoWindow(), SLOT(resetZoom()), ac, "reset_zoom" ); - new KAction( i18n("Media Information"), "messagebox_info", Key_I, this, SLOT(streamInformation()), ac, "information" ); - new KAction( i18n("Menu Toggle"), "dvd_unmount", Key_R, engine(), SLOT(toggleDVDMenu()), ac, "toggle_dvd_menu" ); - new KAction( i18n("&Capture Frame"), "frame_image", Key_C, this, SLOT(captureFrame()), ac, "capture_frame" ); + new TDEAction( i18n("Reset Video Scale"), "viewmag1", Key_Equal, videoWindow(), SLOT(resetZoom()), ac, "reset_zoom" ); + new TDEAction( i18n("Media Information"), "messagebox_info", Key_I, this, SLOT(streamInformation()), ac, "information" ); + new TDEAction( i18n("Menu Toggle"), "dvd_unmount", Key_R, engine(), SLOT(toggleDVDMenu()), ac, "toggle_dvd_menu" ); + new TDEAction( i18n("&Capture Frame"), "frame_image", Key_C, this, SLOT(captureFrame()), ac, "capture_frame" ); - new KAction( i18n("Video Settings..."), "configure", Key_V, this, SLOT(configure()), ac, "video_settings" ); - new KAction( i18n("Configure xine..."), "configure", 0, this, SLOT(configure()), ac, "xine_settings" ); + new TDEAction( i18n("Video Settings..."), "configure", Key_V, this, SLOT(configure()), ac, "video_settings" ); + new TDEAction( i18n("Configure xine..."), "configure", 0, this, SLOT(configure()), ac, "xine_settings" ); (new KWidgetAction( m_positionSlider, i18n("Position Slider"), 0, 0, 0, ac, "position_slider" ))->setAutoSized( true ); @@ -264,14 +264,14 @@ MainWindow::setupActions() } void -MainWindow::saveProperties( KConfig *config ) +MainWindow::saveProperties( TDEConfig *config ) { config->writeEntry( "url", TheStream::url().url() ); config->writeEntry( "time", engine()->time() ); } void -MainWindow::readProperties( KConfig *config ) +MainWindow::readProperties( TDEConfig *config ) { if( engine()->load( config->readPathEntry( "url" ) ) ) engine()->play( config->readNumEntry( "time" ) ); @@ -374,13 +374,13 @@ MainWindow::load( const KURL &url ) } if (url.protocol() == "media") { - #define UDS_LOCAL_PATH (72 | KIO::UDS_STRING) - KIO::UDSEntry e; - if (!KIO::NetAccess::stat( url, e, 0 )) + #define UDS_LOCAL_PATH (72 | TDEIO::UDS_STRING) + TDEIO::UDSEntry e; + if (!TDEIO::NetAccess::stat( url, e, 0 )) MessageBox::sorry( "There was an internal error with the media slave..." ); else { - KIO::UDSEntry::ConstIterator end = e.end(); - for (KIO::UDSEntry::ConstIterator it = e.begin(); it != end; ++it) + TDEIO::UDSEntry::ConstIterator end = e.end(); + for (TDEIO::UDSEntry::ConstIterator it = e.begin(); it != end; ++it) if ((*it).m_uds == UDS_LOCAL_PATH && !(*it).m_str.isEmpty()) return engine()->load( KURL::fromPathOrURL( (*it).m_str ) ); } @@ -439,13 +439,13 @@ MainWindow::playMedia( bool show_welcome_dialog ) class FullScreenToolBarHandler : TQObject { - KToolBar *m_toolbar; + TDEToolBar *m_toolbar; int m_timer_id; bool m_stay_hidden_for_a_bit; TQPoint m_home; public: - FullScreenToolBarHandler( KMainWindow *parent ) + FullScreenToolBarHandler( TDEMainWindow *parent ) : TQObject( parent ) , m_toolbar( parent->toolBar() ) , m_timer_id( 0 ) @@ -684,21 +684,21 @@ MainWindow::menu( const char *name ) /// Convenience class for other classes that need access to the actionCollection -KActionCollection* +TDEActionCollection* actionCollection() { return static_cast<MainWindow*>(kapp->mainWidget())->actionCollection(); } /// Convenience class for other classes that need access to the actions -KAction* +TDEAction* action( const char *name ) { #define QT_FATAL_ASSERT MainWindow *mainWindow = 0; - KActionCollection *actionCollection = 0; - KAction *action = 0; + TDEActionCollection *actionCollection = 0; + TDEAction *action = 0; if( mainWindow = (MainWindow*)kapp->mainWidget() ) if( actionCollection = mainWindow->actionCollection() ) diff --git a/src/app/mainWindow.h b/src/app/mainWindow.h index 3c2770f..a6c7d48 100644 --- a/src/app/mainWindow.h +++ b/src/app/mainWindow.h @@ -5,7 +5,7 @@ #define CODEINEMAINWINDOW_H #include "codeine.h" -#include <kmainwindow.h> +#include <tdemainwindow.h> class KURL; class TQLabel; @@ -15,7 +15,7 @@ class TQSlider; namespace Codeine { - class MainWindow : public KMainWindow + class MainWindow : public TDEMainWindow { Q_OBJECT @@ -56,8 +56,8 @@ namespace Codeine virtual void dropEvent( TQDropEvent* ); virtual void keyPressEvent( TQKeyEvent* ); - virtual void saveProperties( KConfig* ); - virtual void readProperties( KConfig* ); + virtual void saveProperties( TDEConfig* ); + virtual void readProperties( TDEConfig* ); virtual bool queryExit(); diff --git a/src/app/playDialog.cpp b/src/app/playDialog.cpp index 36bd29c..b6cacaa 100644 --- a/src/app/playDialog.cpp +++ b/src/app/playDialog.cpp @@ -3,10 +3,10 @@ #include "config.h" #include "listView.cpp" -#include <kapplication.h> -#include <kconfig.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kguiitem.h> -#include <klistview.h> +#include <tdelistview.h> #include <kpushbutton.h> #include <kstdguiitem.h> #include "playDialog.h" @@ -70,7 +70,7 @@ PlayDialog::PlayDialog( TQWidget *parent, bool be_welcome_dialog ) void PlayDialog::createRecentFileWidget( TQBoxLayout *layout ) { - KListView *lv; + TDEListView *lv; lv = new Codeine::ListView( this ); lv->setColumnText( 1, i18n("Recently Played Media") ); @@ -93,7 +93,7 @@ PlayDialog::createRecentFileWidget( TQBoxLayout *layout ) for( KURL::List::ConstIterator it = urls.begin(), end = urls.end(); it != end; ++it ) { const TQString fileName = (*it).fileName(); - new KListViewItem( lv, 0, (*it).url(), fileName.isEmpty() ? (*it).prettyURL() : fileName ); + new TDEListViewItem( lv, 0, (*it).url(), fileName.isEmpty() ? (*it).prettyURL() : fileName ); } if( lv->childCount() ) { diff --git a/src/app/playDialog.h b/src/app/playDialog.h index c6a1d04..2bbc37d 100644 --- a/src/app/playDialog.h +++ b/src/app/playDialog.h @@ -7,7 +7,7 @@ #include <kurl.h> #include <ntqdialog.h> -class KListView; +class TDEListView; class TQBoxLayout; class TQListViewItem; diff --git a/src/app/playlistFile.cpp b/src/app/playlistFile.cpp index 323643d..83b1f5d 100644 --- a/src/app/playlistFile.cpp +++ b/src/app/playlistFile.cpp @@ -7,7 +7,7 @@ #include "codeine.h" #include "debug.h" -#include <kio/netaccess.h> +#include <tdeio/netaccess.h> #include "playlistFile.h" #include <ntqfile.h> #include <ntqtextstream.h> @@ -35,7 +35,7 @@ PlaylistFile::PlaylistFile( const KURL &url ) if( m_isRemoteFile ) { path = TQString(); - if( !KIO::NetAccess::download( url, path, Codeine::mainWindow() ) ) { + if( !TDEIO::NetAccess::download( url, path, Codeine::mainWindow() ) ) { m_error = i18n( "Codeine could not download the remote playlist: %1" ).arg( url.prettyURL() ); return; } @@ -62,7 +62,7 @@ PlaylistFile::PlaylistFile( const KURL &url ) PlaylistFile::~PlaylistFile() { if( m_isRemoteFile ) - KIO::NetAccess::removeTempFile( m_path ); + TDEIO::NetAccess::removeTempFile( m_path ); } diff --git a/src/app/stateChange.cpp b/src/app/stateChange.cpp index 36d7e42..d547ff1 100644 --- a/src/app/stateChange.cpp +++ b/src/app/stateChange.cpp @@ -5,8 +5,8 @@ #include "adjustSizeButton.h" #include "debug.h" #include "mainWindow.h" -#include <kconfig.h> -#include <kglobal.h> +#include <tdeconfig.h> +#include <tdeglobal.h> #include "mxcl.library.h" #include <ntqapplication.h> #include <ntqevent.h> @@ -134,7 +134,7 @@ MainWindow::engineStateChanged( Engine::State state ) if( !(url_string.contains( "porn", false ) || url_string.contains( "pr0n", false )) ) #endif if( url.protocol() != "dvd" && url.protocol() != "vcd" ) { - KConfig *config = Codeine::config( "General" ); + TDEConfig *config = Codeine::config( "General" ); const TQString prettyUrl = url.prettyURL(); TQStringList urls = config->readPathListEntry( "Recent Urls" ); diff --git a/src/app/theStream.cpp b/src/app/theStream.cpp index dac877e..246e84d 100644 --- a/src/app/theStream.cpp +++ b/src/app/theStream.cpp @@ -11,7 +11,7 @@ namespace Codeine { #define e VideoWindow::s_instance - KConfig* + TDEConfig* TheStream::profile() { //TODO a unique id for discs, and then even to also record chapters etc. diff --git a/src/app/theStream.h b/src/app/theStream.h index 9a04249..c71b5e8 100644 --- a/src/app/theStream.h +++ b/src/app/theStream.h @@ -41,9 +41,9 @@ namespace Codeine static TQString information();
static inline bool hasProfile()
- { return KGlobal::config()->hasGroup( url().prettyURL() ); }
+ { return TDEGlobal::config()->hasGroup( url().prettyURL() ); }
- static KConfig *profile();
+ static TDEConfig *profile();
};
}
diff --git a/src/app/videoSettings.cpp b/src/app/videoSettings.cpp index b25ec1d..19323d8 100644 --- a/src/app/videoSettings.cpp +++ b/src/app/videoSettings.cpp @@ -1,7 +1,7 @@ // (C) 2005 Max Howell ([email protected]) // See COPYING file for licensing information -#include <kwin.h> +#include <twin.h> #include "mxcl.library.h" #include <ntqlabel.h> #include <ntqlayout.h> diff --git a/src/app/videoWindow.cpp b/src/app/videoWindow.cpp index d344181..0affed5 100644 --- a/src/app/videoWindow.cpp +++ b/src/app/videoWindow.cpp @@ -7,11 +7,11 @@ #include <cmath> //std::log10 #include <cstdlib> #include "debug.h" -#include <kapplication.h> //::makeStandardCaption -#include <kconfig.h> +#include <tdeapplication.h> //::makeStandardCaption +#include <tdeconfig.h> #include <kiconloader.h> -#include <kpopupmenu.h> -#include <kwin.h> +#include <tdepopupmenu.h> +#include <twin.h> #include "mxcl.library.h" #include <ntqcursor.h> #include <ntqevent.h> @@ -129,10 +129,10 @@ VideoWindow::contextMenuEvent( TQContextMenuEvent *e ) { e->accept(); - KPopupMenu popup; + TDEPopupMenu popup; if( state() == Engine::Playing ) - popup.insertItem( SmallIconSet("player_pause"), i18n("Pause"), 1 ); + popup.insertItem( SmallIconSet("media-playback-pause"), i18n("Pause"), 1 ); else action( "play" )->plug( &popup ); @@ -141,7 +141,7 @@ VideoWindow::contextMenuEvent( TQContextMenuEvent *e ) if( TheStream::url().protocol() == "dvd" ) action( "toggle_dvd_menu" )->plug( &popup ), popup.insertSeparator(); - if( !((KToggleAction*)actionCollection()->action( "fullscreen" ))->isChecked() ) + if( !((TDEToggleAction*)actionCollection()->action( "fullscreen" ))->isChecked() ) action( "reset_zoom" )->plug( &popup ); action( "capture_frame" )->plug( &popup ); popup.insertSeparator(); diff --git a/src/app/volumeAction.cpp b/src/app/volumeAction.cpp index fb33c7d..f9a1951 100644 --- a/src/app/volumeAction.cpp +++ b/src/app/volumeAction.cpp @@ -1,8 +1,8 @@ // (C) 2005 Max Howell ([email protected]) // See COPYING file for licensing information -#include <klocale.h> -#include <ktoolbar.h> +#include <tdelocale.h> +#include <tdetoolbar.h> #include <ntqevent.h> #include <ntqlabel.h> #include <ntqlayout.h> @@ -41,8 +41,8 @@ public: }; -VolumeAction::VolumeAction( KToolBar *bar, KActionCollection *ac ) - : KToggleAction( i18n("Volume"), "volume", TQt::Key_1, 0, 0, ac, "volume" ) +VolumeAction::VolumeAction( TDEToolBar *bar, TDEActionCollection *ac ) + : TDEToggleAction( i18n("Volume"), "volume", TQt::Key_1, 0, 0, ac, "volume" ) , m_anchor( 0 ) { m_widget = new VolumeSlider( bar->topLevelWidget() ); @@ -58,9 +58,9 @@ VolumeAction::plug( TQWidget *bar, int index ) { DEBUG_BLOCK - int const id = KAction::plug( bar, index ); + int const id = TDEAction::plug( bar, index ); - m_anchor = (TQWidget*)bar->child( "toolbutton_volume" ); //KAction creates it with this name + m_anchor = (TQWidget*)bar->child( "toolbutton_volume" ); //TDEAction creates it with this name m_anchor->installEventFilter( this ); //so we can keep m_widget anchored return id; diff --git a/src/app/volumeAction.h b/src/app/volumeAction.h index aef3434..f83aadb 100644 --- a/src/app/volumeAction.h +++ b/src/app/volumeAction.h @@ -4,9 +4,9 @@ #ifndef CODEINE_VOLUME_ACTION_H #define CODEINE_VOLUME_ACTION_H -#include <kactionclasses.h> +#include <tdeactionclasses.h> -class VolumeAction : public KToggleAction +class VolumeAction : public TDEToggleAction { Q_OBJECT @@ -23,7 +23,7 @@ private slots: void sliderReleased() { setChecked( false ); toggled( false ); } public: - VolumeAction( KToolBar *anchor, KActionCollection *ac ); + VolumeAction( TDEToolBar *anchor, TDEActionCollection *ac ); }; #endif diff --git a/src/app/xineConfig.cpp b/src/app/xineConfig.cpp index abeca50..07d402f 100644 --- a/src/app/xineConfig.cpp +++ b/src/app/xineConfig.cpp @@ -2,7 +2,7 @@ // See COPYING file for licensing information #include "debug.h" -#include <kapplication.h> // XineConfigDialog::ctor -> to get the iconloader +#include <tdeapplication.h> // XineConfigDialog::ctor -> to get the iconloader #include <kcombobox.h> #include <kiconloader.h> // XineConfigDialog::ctor #include <klineedit.h> @@ -77,7 +77,7 @@ XineConfigDialog::XineConfigDialog( xine_t *xine, TQWidget *parent ) TQHBox *hbox = new TQHBox( box ); hbox->setSpacing( METRIC_3B2 ); hbox->setMargin( METRIC_3B2 ); - TQPixmap info = kapp->iconLoader()->loadIcon( "messagebox_info", KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true ); + TQPixmap info = kapp->iconLoader()->loadIcon( "messagebox_info", TDEIcon::NoGroup, TDEIcon::SizeMedium, TDEIcon::DefaultState, 0, true ); TQLabel *label = new TQLabel( hbox ); label->setPixmap( info ); label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); diff --git a/src/app/xineEngine.cpp b/src/app/xineEngine.cpp index ba3c76b..6691288 100644 --- a/src/app/xineEngine.cpp +++ b/src/app/xineEngine.cpp @@ -8,7 +8,7 @@ #include "config.h" #include "debug.h" #include <limits> -#include <klocale.h> +#include <tdelocale.h> #include "mxcl.library.h" #include <ntqapplication.h> //::sendEvent() #include <ntqdatetime.h> //record() @@ -189,7 +189,7 @@ VideoWindow::eject() if( m_url.isEmpty() ) return; - KConfig *profile = TheStream::profile(); // the config profile for this video file + TDEConfig *profile = TheStream::profile(); // the config profile for this video file #define writeParameter( param, default ) { \ const int value = xine_get_param( m_stream, param ); \ @@ -245,7 +245,7 @@ VideoWindow::load( const KURL &url ) debug() << "xine_open()\n"; if( xine_open( m_stream, url.url().local8Bit() ) ) { - KConfig *profile = TheStream::profile(); + TDEConfig *profile = TheStream::profile(); #define setParameter( param, default ) xine_set_param( m_stream, param, profile->readNumEntry( TQString::number( param ), default ) ); setParameter( XINE_PARAM_VO_HUE, 32768 ); setParameter( XINE_PARAM_VO_SATURATION, 32772 ); @@ -753,7 +753,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; diff --git a/src/debug.h b/src/debug.h index da63e8d..436cceb 100644 --- a/src/debug.h +++ b/src/debug.h @@ -234,7 +234,7 @@ namespace Debug } -#include <kmessagebox.h> +#include <tdemessagebox.h> namespace Codeine { diff --git a/src/mxcl.library.h b/src/mxcl.library.h index 87eea65..57eca2c 100644 --- a/src/mxcl.library.h +++ b/src/mxcl.library.h @@ -16,7 +16,7 @@ namespace mxcl } -/// almost always negates the need to #include <klocale.h> in implementations +/// almost always negates the need to #include <tdelocale.h> in implementations #include <ntqstring.h> TQString i18n( const char *text ); 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 <kaboutdata.h>
-#include <kparts/genericfactory.h>
+#include <tdeaboutdata.h>
+#include <tdeparts/genericfactory.h>
#include "part.h"
#include <ntqtimer.h>
#include "toolbar.h"
#include "videoWindow.h"
-#include <kaction.h>
+#include <tdeaction.h>
#include <ntqslider.h>
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 <kparts/statusbarextension.h>
-#include <kparts/part.h>
+#include <tdeparts/statusbarextension.h>
+#include <tdeparts/part.h>
#include <kurl.h>
-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 <ktoolbar.h> +#include <tdetoolbar.h> -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 <kglobalsettings.h> -#include <klocale.h> +#include <tdeglobalsettings.h> +#include <tdelocale.h> #include "mxcl.library.h" #include <ntqapplication.h> //::sendEvent() #include <ntqdatetime.h> //::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; |