summaryrefslogtreecommitdiffstats
path: root/src/app/mainWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/mainWindow.cpp')
-rw-r--r--src/app/mainWindow.cpp76
1 files changed, 38 insertions, 38 deletions
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() )