Conversion KDE -> TDE environment.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/1/head
gregory guy 5 years ago
parent 2c9bc9b806
commit 12b478cefd
No known key found for this signature in database
GPG Key ID: 3BCCA0F7AB4536F4

@ -141,7 +141,7 @@ if 'dist' in COMMAND_LINE_TARGETS:
os.popen("find "+FOLDER+" -name \"*.pyc\" | xargs rm -f")
os.popen("find "+FOLDER+" -name \"*.cache.py\" | xargs rm -f")
os.popen("find "+FOLDER+" -name \"*.log\" | xargs rm -f")
os.popen("find "+FOLDER+" -name \"*.kdevelop.*\" | xargs rm -f")
os.popen("find "+FOLDER+" -name \"*.tdevelop.*\" | xargs rm -f")
os.popen("find "+FOLDER+" -name \"*~\" | xargs rm -f")
os.popen("rm -rf "+FOLDER+"/autopackage")

@ -6,9 +6,9 @@ Icon=codeine
Type=Application
Terminal=false
MimeType=video/x-theora;video/x-ogm;video/x-ms-wmv;video/x-msvideo;video/x-ms-asf;video/x-matroska;video/mpeg;video/avi;video/quicktime;video/vnd.rn-realvideo;video/x-flic;
Categories=Qt;KDE;AudioVideo;Player
Comment=Video player for KDE designed to be as simple as possible
Comment[de]=Videoabspieler für KDE entworfen zur einfachen Bedienung
Categories=Qt;TDE;AudioVideo;Player
Comment=Video player for TDE designed to be as simple as possible
Comment[de]=Videoabspieler für TDE entworfen zur einfachen Bedienung
GenericName=Media Player
GenericName[br]=Soner liesvedia
GenericName[ca]=Reproductor multimèdia

@ -4,7 +4,7 @@ Icon=codeine
MimeType=video/x-theora;video/x-ogm;video/x-ms-wmv;video/x-msvideo;video/x-ms-asf;video/x-matroska;video/mpeg;video/avi;video/quicktime;video/vnd.rn-realvideo;video/x-flic;
Name=Codeine
Comment=Embeddable Video Player
ServiceTypes=KParts/ReadOnlyPart
X-TDE-ServiceTypes=KParts/ReadOnlyPart
Type=Service
X-KDE-Library=libcodeine
InitialPreference=9
X-TDE-Library=libcodeine
X-TDE-InitialPreference=9

@ -1,8 +1,8 @@
[Desktop Entry]
ServiceTypes=media/dvdvideo
X-TDE-ServiceTypes=media/dvdvideo
Actions=Play;
Encoding=UTF-8
X-KDE-Priority=TopLevel
X-TDE-Priority=TopLevel
[Desktop Action Play]
Name=Play DVD with Codeine

@ -298,7 +298,7 @@ msgid ""
" 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>"
"prefix=`tde-config --prefix`</pre>"
msgstr ""
#: ../src/app/mainWindow.cpp:139

@ -17,9 +17,9 @@
SRCDIR=../src # srcdir is the directory containing the source code
TIPSDIR=$SRCDIR # tipsdir is the directory containing the tips
KDEDIR=`kde-config --prefix`
TDEDIR=`tde-config --prefix`
EXTRACTRC=extractrc
KDEPOT=`kde-config --prefix`/include/kde.pot
KDEPOT=`tde-config --prefix`/include/kde.pot
XGETTEXT="xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale -x $KDEPOT "
## check that kde.pot is available

@ -42,7 +42,7 @@ def generate( env ):
def CheckKdeLibs( context ):
# ideally should be able to tell bksys what version we need
context.Message( 'Checking for KDElibs 3.3...' )
kde_version = os.popen("kde-config --version|grep KDE").read().strip().split()[1]
kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1]
result = int( kde_version[0] ) == 3 and int( kde_version[2] ) >= 3
context.Result( result )
return result

@ -36,10 +36,10 @@ The variables used when configuring are :
* libsuffix : for those who need /usr/lib64 and the like ..
* kdeincludes: path to the kde includes (/usr/include/kde on debian, ...)
* kdeincludes: path to the kde includes (/usr/include/tde on debian, ...)
* qtincludes : same punishment, for qt includes (/usr/include/qt on debian, ...)
* kdelibs : path to the kde libs, for linking the programs
* tdelibs : path to the kde libs, for linking the programs
* qtlibs : same punishment, for qt libraries
eg: scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
@ -56,7 +56,7 @@ def exists(env):
return True
def detect_kde(env):
""" Detect the qt and kde environment using kde-config mostly """
""" Detect the qt and kde environment using tde-config mostly """
import os, sys, re
prefix = env['ARGS'].get('prefix', None)
@ -65,7 +65,7 @@ def detect_kde(env):
libdir = env['ARGS'].get('libdir', None)
libsuffix = env['ARGS'].get('libsuffix', '')
kdeincludes = env['ARGS'].get('kdeincludes', None)
kdelibs = env['ARGS'].get('kdelibs', None)
tdelibs = env['ARGS'].get('tdelibs', None)
qtincludes = env['ARGS'].get('qtincludes', None)
qtlibs = env['ARGS'].get('qtlibs', None)
@ -73,20 +73,20 @@ def detect_kde(env):
libdir = libdir+libsuffix
## Detect the kde libraries
print "Checking for kde-config : ",
kde_config = os.popen("which kde-config 2>/dev/null").read().strip()
print "Checking for tde-config : ",
kde_config = os.popen("which tde-config 2>/dev/null").read().strip()
if len(kde_config):
print GREEN + "kde-config was found" + NORMAL
print GREEN + "tde-config was found" + NORMAL
else:
print RED + "kde-config was NOT found in your PATH"+ NORMAL
print RED + "tde-config was NOT found in your PATH"+ NORMAL
print "Make sure kde is installed properly"
print "(missing package kdebase-devel?)"
# TODO : prompt the user for the path of kde-config ?
print "(missing package tdebase-devel?)"
# TODO : prompt the user for the path of tde-config ?
sys.exit(1)
env['KDEDIR'] = os.popen('kde-config -prefix').read().strip()
env['TDEDIR'] = os.popen('tde-config -prefix').read().strip()
print "Checking for kde version : ",
kde_version = os.popen("kde-config --version|grep KDE").read().strip().split()[1]
kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1]
if int(kde_version[0]) != 3 or int(kde_version[2]) < 2:
print RED + kde_version
print RED + "Your kde version can be too old" + NORMAL
@ -100,7 +100,7 @@ def detect_kde(env):
if qtdir:
print GREEN + "qt is in " + qtdir + NORMAL
else:
m = re.search('(.*)/lib/libqt.*', os.popen('ldd `kde-config --expandvars --install lib`' + '/libkdeui.so.4 | grep libqt').read().strip().split()[2])
m = re.search('(.*)/lib/libqt.*', os.popen('ldd `tde-config --expandvars --install lib`' + '/libtdeui.so.4 | grep libqt').read().strip().split()[2])
if m:
qtdir = m.group(1)
print YELLOW + "qt was found as " + m.group(1) + NORMAL
@ -163,16 +163,16 @@ def detect_kde(env):
sys.exit(1)
print "Checking for the kde includes : ",
kdeprefix = os.popen("kde-config --prefix").read().strip()
kdeprefix = os.popen("tde-config --prefix").read().strip()
if not kdeincludes:
kdeincludes = kdeprefix+"/include/"
if os.path.isfile(kdeincludes + "/klineedit.h"):
print GREEN + "ok " + kdeincludes + NORMAL
else:
if os.path.isfile(kdeprefix+"/include/kde/klineedit.h"):
if os.path.isfile(kdeprefix+"/include/tde/klineedit.h"):
# Debian, Fedora probably
print YELLOW + "the kde headers were found in " + kdeprefix + "/include/kde/" + NORMAL
kdeincludes = kdeprefix + "/include/kde/"
print YELLOW + "the kde headers were found in " + kdeprefix + "/include/tde/" + NORMAL
kdeincludes = kdeprefix + "/include/tde/"
else:
print RED + "The kde includes were NOT found" + NORMAL
sys.exit(1)
@ -189,42 +189,42 @@ def detect_kde(env):
subst_vars = lambda x: x.replace('${exec_prefix}', execprefix).replace('${datadir}',
datadir).replace('${libdir}', libdir)
debian_fix = lambda x: x.replace('/usr/share', '${datadir}')
env['KDEBIN'] = subst_vars(os.popen('kde-config --install exe').read().strip())
env['KDEAPPS'] = subst_vars(os.popen('kde-config --install apps').read().strip())
env['KDEDATA'] = subst_vars(os.popen('kde-config --install data').read().strip())
env['KDEMODULE']= subst_vars(os.popen('kde-config --install module').read().strip())
env['KDELOCALE']= subst_vars(os.popen('kde-config --install locale').read().strip())
env['KDEDOC'] = subst_vars( debian_fix(os.popen('kde-config --install html').read().strip()) )
env['KDEKCFG'] = subst_vars(os.popen('kde-config --install kcfg').read().strip())
env['KDEXDG'] = subst_vars(os.popen('kde-config --install xdgdata-apps').read().strip())
env['KDEMENU'] = subst_vars(os.popen('kde-config --install apps').read().strip())
env['KDEMIME'] = subst_vars(os.popen('kde-config --install mime').read().strip())
env['KDEICONS'] = subst_vars(os.popen('kde-config --install icon').read().strip())
env['KDESERV'] = subst_vars(os.popen('kde-config --install services').read().strip())
env['KDEBIN'] = subst_vars(os.popen('tde-config --install exe').read().strip())
env['KDEAPPS'] = subst_vars(os.popen('tde-config --install apps').read().strip())
env['KDEDATA'] = subst_vars(os.popen('tde-config --install data').read().strip())
env['KDEMODULE']= subst_vars(os.popen('tde-config --install module').read().strip())
env['KDELOCALE']= subst_vars(os.popen('tde-config --install locale').read().strip())
env['KDEDOC'] = subst_vars( debian_fix(os.popen('tde-config --install html').read().strip()) )
env['KDEKCFG'] = subst_vars(os.popen('tde-config --install kcfg').read().strip())
env['KDEXDG'] = subst_vars(os.popen('tde-config --install xdgdata-apps').read().strip())
env['KDEMENU'] = subst_vars(os.popen('tde-config --install apps').read().strip())
env['KDEMIME'] = subst_vars(os.popen('tde-config --install mime').read().strip())
env['KDEICONS'] = subst_vars(os.popen('tde-config --install icon').read().strip())
env['KDESERV'] = subst_vars(os.popen('tde-config --install services').read().strip())
else:
# the user has given no prefix, install as a normal kde app
env['PREFIX'] = os.popen('kde-config --prefix').read().strip()
env['KDEBIN'] = os.popen('kde-config --expandvars --install exe').read().strip()
env['KDEAPPS'] = os.popen('kde-config --expandvars --install apps').read().strip()
env['KDEDATA'] = os.popen('kde-config --expandvars --install data').read().strip()
env['KDEMODULE']= os.popen('kde-config --expandvars --install module').read().strip()
env['KDELOCALE']= os.popen('kde-config --expandvars --install locale').read().strip()
env['KDEDOC'] = os.popen('kde-config --expandvars --install html').read().strip()
env['KDEKCFG'] = os.popen('kde-config --expandvars --install kcfg').read().strip()
env['KDEXDG'] = os.popen('kde-config --expandvars --install xdgdata-apps').read().strip()
env['KDEMENU'] = os.popen('kde-config --expandvars --install apps').read().strip()
env['KDEMIME'] = os.popen('kde-config --expandvars --install mime').read().strip()
env['KDEICONS'] = os.popen('kde-config --expandvars --install icon').read().strip()
env['KDESERV'] = os.popen('kde-config --expandvars --install services').read().strip()
env['QTPLUGINS']=os.popen('kde-config --expandvars --install qtplugins').read().strip()
env['PREFIX'] = os.popen('tde-config --prefix').read().strip()
env['KDEBIN'] = os.popen('tde-config --expandvars --install exe').read().strip()
env['KDEAPPS'] = os.popen('tde-config --expandvars --install apps').read().strip()
env['KDEDATA'] = os.popen('tde-config --expandvars --install data').read().strip()
env['KDEMODULE']= os.popen('tde-config --expandvars --install module').read().strip()
env['KDELOCALE']= os.popen('tde-config --expandvars --install locale').read().strip()
env['KDEDOC'] = os.popen('tde-config --expandvars --install html').read().strip()
env['KDEKCFG'] = os.popen('tde-config --expandvars --install kcfg').read().strip()
env['KDEXDG'] = os.popen('tde-config --expandvars --install xdgdata-apps').read().strip()
env['KDEMENU'] = os.popen('tde-config --expandvars --install apps').read().strip()
env['KDEMIME'] = os.popen('tde-config --expandvars --install mime').read().strip()
env['KDEICONS'] = os.popen('tde-config --expandvars --install icon').read().strip()
env['KDESERV'] = os.popen('tde-config --expandvars --install services').read().strip()
env['QTPLUGINS']=os.popen('tde-config --expandvars --install qtplugins').read().strip()
## kde libs and includes
env['KDEINCLUDEPATH']= kdeincludes
if not kdelibs:
kdelibs = os.popen('kde-config --expandvars --install lib').read().strip()
env['KDELIBPATH']= kdelibs
if not tdelibs:
tdelibs = os.popen('tde-config --expandvars --install lib').read().strip()
env['KDELIBPATH']= tdelibs
## qt libs and includes
env['QTINCLUDEPATH']= qtincludes
@ -246,9 +246,9 @@ def generate(env):
"""+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share
"""+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib
"""+BOLD+"""* libsuffix """+NORMAL+""": suffix of libraries on amd64, ie: 64, 32
"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/kde on debian, ...)
"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...)
"""+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...)
"""+BOLD+"""* kdelibs """+NORMAL+""": path to the kde libs, for linking the programs
"""+BOLD+"""* tdelibs """+NORMAL+""": path to the kde libs, for linking the programs
"""+BOLD+"""* qtlibs """+NORMAL+""": same punishment, for qt libraries
ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
"""+NORMAL)
@ -409,7 +409,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
( 'QT_UIC', 'moc directory'),
( 'QT_MOC', 'moc executable command'),
( 'QTPLUGINS', 'uic executable command'),
( 'KDEDIR', 'root of kde directory' ),
( 'TDEDIR', 'root of kde directory' ),
( 'KDELIBPATH', 'path to the kde libs' ),
( 'KDEINCLUDEPATH', 'path to the kde includes' ),
@ -431,7 +431,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
opts.Update(env)
# reconfigure when things are missing
if 'configure' in env['TARGS'] or not env.has_key('QTDIR') or not env.has_key('KDEDIR'):
if 'configure' in env['TARGS'] or not env.has_key('QTDIR') or not env.has_key('TDEDIR'):
detect_kde(env)
# finally save the configuration
@ -469,7 +469,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
act=[]
act.append('$QT_UIC $QT_UIC_HFLAGS -o '+target[0].path+' '+source[0].path)
act.append('rm -f ' +target[1].path)
act.append('echo \'#include <klocale.h>\' >> '+target[1].path)
act.append('echo \'#include <tdelocale.h>\' >> '+target[1].path)
act.append('echo \'#include <kdialog.h>\' >> '+target[1].path)
act.append('$QT_UIC $QT_UIC_CFLAGS -impl '+target[0].path+' -o '+target[1].path+'.tmp '+source[0].path)
act.append('cat '+target[1].path+'.tmp >> '+target[1].path)
@ -517,7 +517,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
###### kcfg file processing
def kcfgGenerator(target, source, env, for_signature):
act=[]
act.append('kconfig_compiler -d'+str(source[0].get_dir())+' '+source[1].path+' '+source[0].path)
act.append('tdeconfig_compiler -d'+str(source[0].get_dir())+' '+source[1].path+' '+source[0].path)
return act
def kcfgEmitter(target, source, env):
@ -687,7 +687,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
for ofile in other_files:
if ofile == file:
print RED+"WARNING: You have included "+file+".kcfg and another file of the same prefix"+NORMAL
print "Files generated by kconfig_compiler (settings.h, settings.cpp) must not be included"
print "Files generated by tdeconfig_compiler (settings.h, settings.cpp) must not be included"
#for file in skel_files:
# for ofile in other_files:
# if ofile == file:

@ -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')

@ -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 );
}
}

@ -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 );

@ -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>

@ -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;
}

@ -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 );
}
}

@ -1,18 +1,18 @@
// (C) 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
#include <kaction.h>
#include <tdeaction.h>
/**
* @class FullSCreenAction
* @author Max Howell <max.howell@methylblue.com>
* @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 );

@ -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

@ -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/",
"codeine@methylblue.com" );
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;
{

@ -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() )

@ -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();

@ -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() ) {

@ -7,7 +7,7 @@
#include <kurl.h>
#include <ntqdialog.h>
class KListView;
class TDEListView;
class TQBoxLayout;
class TQListViewItem;

@ -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 );
}

@ -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" );

@ -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.

@ -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();
};
}

@ -1,7 +1,7 @@
// (C) 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
#include <kwin.h>
#include <twin.h>
#include "mxcl.library.h"
#include <ntqlabel.h>
#include <ntqlayout.h>

@ -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();

@ -1,8 +1,8 @@
// (C) 2005 Max Howell (max.howell@methylblue.com)
// 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;

@ -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

@ -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 );

@ -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;

@ -234,7 +234,7 @@ namespace Debug
}
#include <kmessagebox.h>
#include <tdemessagebox.h>
namespace Codeine
{

@ -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 );

@ -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 )

@ -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

@ -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;

@ -8,7 +8,7 @@
MouseOverToolBar::MouseOverToolBar( TQWidget *parent )
: KToolBar( parent )
: TDEToolBar( parent )
{
parent->installEventFilter( this );
move( 0, 0 ); //TODO necessary?

@ -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* );

@ -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;

Loading…
Cancel
Save