@ -59,14 +59,14 @@
# include "version.h"
tdemidFrame : : tdemidFrame ( const char * name )
: K MainWindow( 0 , name )
: TDE MainWindow( 0 , name )
{
tdemidclient = new tdemidClient ( this , actionCollection ( ) , " KMidClient " ) ;
tdemidclient - > setSongType ( 1 ) ;
tdemidclient - > show ( ) ;
setCentralWidget ( tdemidclient ) ;
/*
kKeysAccel = new K Accel( this ) ;
kKeysAccel = new TDE Accel( this ) ;
kKeysAccel - > insertItem ( i18n ( " Play/Pause " ) , " Play/Pause " , Key_Space ) ;
kKeysAccel - > connectItem ( " Play/Pause " , TQT_TQOBJECT ( this ) , TQT_SLOT ( spacePressed ( ) ) ) ;
kKeysAccel - > insertItem ( i18n ( " Stop " ) , " Stop " , Key_Backspace ) ;
@ -87,52 +87,52 @@ tdemidFrame::tdemidFrame(const char *name)
kKeysAccel - > readSettings ( ) ;
*/
KStdAction : : open ( TQT_TQOBJECT ( this ) , TQT_SLOT ( file_Open ( ) ) , actionCollection ( ) ) ;
( void ) new K Action( i18n ( " &Save Lyrics... " ) , 0 , TQT_TQOBJECT ( this ) ,
( void ) new TDE Action( i18n ( " &Save Lyrics... " ) , 0 , TQT_TQOBJECT ( this ) ,
TQT_SLOT ( file_SaveLyrics ( ) ) , actionCollection ( ) , " file_save_lyrics " ) ;
KStdAction : : quit ( TQT_TQOBJECT ( kapp ) , TQT_SLOT ( quit ( ) ) , actionCollection ( ) ) ;
( void ) new K Action( i18n ( " &Play " ) , " player_play " , TQt : : Key_Space ,
( void ) new TDE Action( i18n ( " &Play " ) , " player_play " , TQt : : Key_Space ,
TQT_TQOBJECT ( tdemidclient ) , TQT_SLOT ( slotPlay ( ) ) , actionCollection ( ) , " song_play " ) ;
( void ) new K Action( i18n ( " P&ause " ) , " player_pause " , TQt : : Key_P , TQT_TQOBJECT ( tdemidclient ) ,
( void ) new TDE Action( i18n ( " P&ause " ) , " player_pause " , TQt : : Key_P , TQT_TQOBJECT ( tdemidclient ) ,
TQT_SLOT ( slotPause ( ) ) , actionCollection ( ) , " song_pause " ) ;
( void ) new K Action( i18n ( " &Stop " ) , " player_stop " , TQt : : Key_Backspace ,
( void ) new TDE Action( i18n ( " &Stop " ) , " player_stop " , TQt : : Key_Backspace ,
TQT_TQOBJECT ( tdemidclient ) , TQT_SLOT ( slotStop ( ) ) , actionCollection ( ) , " song_stop " ) ;
( void ) new K Action( i18n ( " P&revious Song " ) , " player_start " , Key_Left ,
( void ) new TDE Action( i18n ( " P&revious Song " ) , " player_start " , Key_Left ,
TQT_TQOBJECT ( tdemidclient ) , TQT_SLOT ( slotPrevSong ( ) ) , actionCollection ( ) ,
" song_previous " ) ;
( void ) new K Action( i18n ( " &Next Song " ) , " player_end " , Key_Right ,
( void ) new TDE Action( i18n ( " &Next Song " ) , " player_end " , Key_Right ,
TQT_TQOBJECT ( tdemidclient ) , TQT_SLOT ( slotNextSong ( ) ) , actionCollection ( ) ,
" song_next " ) ;
( void ) new K ToggleAction( i18n ( " &Loop " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( song_Loop ( ) ) ,
( void ) new TDE ToggleAction( i18n ( " &Loop " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( song_Loop ( ) ) ,
actionCollection ( ) , " song_loop " ) ;
( void ) new K Action( i18n ( " Rewind " ) , " 2leftarrow " , 0 , TQT_TQOBJECT ( tdemidclient ) ,
( void ) new TDE Action( i18n ( " Rewind " ) , " 2leftarrow " , 0 , TQT_TQOBJECT ( tdemidclient ) ,
TQT_SLOT ( slotRewind ( ) ) , actionCollection ( ) , " song_rewind " ) ;
( void ) new K Action( i18n ( " Forward " ) , " 2rightarrow " , 0 , TQT_TQOBJECT ( tdemidclient ) ,
( void ) new TDE Action( i18n ( " Forward " ) , " 2rightarrow " , 0 , TQT_TQOBJECT ( tdemidclient ) ,
TQT_SLOT ( slotForward ( ) ) , actionCollection ( ) , " song_forward " ) ;
( void ) new K Action( i18n ( " &Organize... " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( collect_organize ( ) ) ,
( void ) new TDE Action( i18n ( " &Organize... " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( collect_organize ( ) ) ,
actionCollection ( ) , " collect_organize " ) ;
TQStringList playmodes ;
playmodes . append ( i18n ( " In Order " ) ) ;
playmodes . append ( i18n ( " Shuffle " ) ) ;
KSelectAction * act = new K SelectAction( i18n ( " Play Order " ) , 0 , /*this, TQT_SLOT(collect_PlayOrder(int)),*/
TDESelectAction * act = new TDE SelectAction( i18n ( " Play Order " ) , 0 , /*this, TQT_SLOT(collect_PlayOrder(int)),*/
actionCollection ( ) , " play_order " ) ;
connect ( act , TQT_SIGNAL ( activated ( int ) ) , this , TQT_SLOT ( collect_PlayOrder ( int ) ) ) ;
act - > setItems ( playmodes ) ;
( void ) new K ToggleAction( i18n ( " Auto-Add to Collection " ) , 0 , TQT_TQOBJECT ( this ) ,
( void ) new TDE ToggleAction( i18n ( " Auto-Add to Collection " ) , 0 , TQT_TQOBJECT ( this ) ,
TQT_SLOT ( collect_AutoAdd ( ) ) , actionCollection ( ) , " collect_autoadd " ) ;
playmodes . clear ( ) ;
playmodes . append ( i18n ( " &General MIDI " ) ) ;
playmodes . append ( i18n ( " &MT-32 " ) ) ;
act = new K SelectAction( i18n ( " File Type " ) , 0 , /* this, TQT_SLOT(options_FileType(int)),*/
act = new TDE SelectAction( i18n ( " File Type " ) , 0 , /* this, TQT_SLOT(options_FileType(int)),*/
actionCollection ( ) , " file_type " ) ;
connect ( act , TQT_SIGNAL ( activated ( int ) ) , this , TQT_SLOT ( options_FileType ( int ) ) ) ;
act - > setItems ( playmodes ) ;
@ -141,35 +141,35 @@ tdemidFrame::tdemidFrame(const char *name)
playmodes . append ( i18n ( " &Text Events " ) ) ;
playmodes . append ( i18n ( " &Lyric Events " ) ) ;
act = new K SelectAction( i18n ( " Display Events " ) , Key_T , /*this,
act = new TDE SelectAction( i18n ( " Display Events " ) , Key_T , /*this,
TQT_SLOT ( options_DisplayEvents ( int ) ) , */ actionCollection ( ) ,
" display_events " ) ;
connect ( act , TQT_SIGNAL ( activated ( int ) ) , this , TQT_SLOT ( options_DisplayEvents ( int ) ) ) ;
act - > setItems ( playmodes ) ;
( void ) new K ToggleAction( i18n ( " Automatic Text Chooser " ) , 0 , TQT_TQOBJECT ( this ) ,
( void ) new TDE ToggleAction( i18n ( " Automatic Text Chooser " ) , 0 , TQT_TQOBJECT ( this ) ,
TQT_SLOT ( options_AutomaticText ( ) ) , actionCollection ( ) ,
" option_automatictext " ) ;
KToggleAction* togact = new K ToggleAction( i18n ( " Show &Volume Bar " ) , " volume " ,
TDEToggleAction* togact = new TDE ToggleAction( i18n ( " Show &Volume Bar " ) , " volume " ,
0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( options_ShowVolumeBar ( ) ) , actionCollection ( ) ,
" toggle_volumebar " ) ;
togact - > setCheckedState ( i18n ( " Hide &Volume Bar " ) ) ;
togact = new K ToggleAction( i18n ( " Show &Channel View " ) , " piano " ,
togact = new TDE ToggleAction( i18n ( " Show &Channel View " ) , " piano " ,
0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( options_ShowChannelView ( ) ) , actionCollection ( ) ,
" toggle_channelview " ) ;
togact - > setCheckedState ( i18n ( " Hide &Channel View " ) ) ;
( void ) new K Action( i18n ( " Channel View &Options... " ) , 0 , TQT_TQOBJECT ( this ) ,
( void ) new TDE Action( i18n ( " Channel View &Options... " ) , 0 , TQT_TQOBJECT ( this ) ,
TQT_SLOT ( options_ChannelViewOptions ( ) ) , actionCollection ( ) ,
" channelview_options " ) ;
( void ) new K Action( i18n ( " &Font Change... " ) , 0 , TQT_TQOBJECT ( this ) ,
( void ) new TDE Action( i18n ( " &Font Change... " ) , 0 , TQT_TQOBJECT ( this ) ,
TQT_SLOT ( options_FontChange ( ) ) , actionCollection ( ) ,
" change_font " ) ;
( void ) new K Action( i18n ( " MIDI &Setup... " ) , 0 , TQT_TQOBJECT ( this ) ,
( void ) new TDE Action( i18n ( " MIDI &Setup... " ) , 0 , TQT_TQOBJECT ( this ) ,
TQT_SLOT ( options_MidiSetup ( ) ) , actionCollection ( ) , " midi_setup " ) ;
@ -177,38 +177,38 @@ tdemidFrame::tdemidFrame(const char *name)
TDEConfig * cfg = kapp - > config ( ) ;
cfg - > setGroup ( " KMid " ) ;
K SelectAction * tmplistaction =
( ( K SelectAction* ) actionCollection ( ) - > action ( " display_events " ) ) ;
TDE SelectAction * tmplistaction =
( ( TDE SelectAction* ) actionCollection ( ) - > action ( " display_events " ) ) ;
if ( cfg - > readNumEntry ( " TypeOfTextEvents " , 5 ) = = 5 )
tmplistaction - > setCurrentItem ( 1 ) ;
else
tmplistaction - > setCurrentItem ( 0 ) ;
tmplistaction = ( ( K SelectAction* ) actionCollection ( ) - > action ( " file_type " ) ) ;
tmplistaction = ( ( TDE SelectAction* ) actionCollection ( ) - > action ( " file_type " ) ) ;
if ( cfg - > readNumEntry ( " TypeOfMidiFile " , 0 ) = = 0 )
tmplistaction - > setCurrentItem ( 0 ) ;
else
tmplistaction - > setCurrentItem ( 1 ) ;
if ( cfg - > readNumEntry ( " Loop " , 0 ) = = 1 )
( ( K ToggleAction* ) actionCollection ( ) - > action ( " song_loop " ) ) - > setChecked ( true ) ;
( ( TDE ToggleAction* ) actionCollection ( ) - > action ( " song_loop " ) ) - > setChecked ( true ) ;
if ( cfg - > readNumEntry ( " ShowVolumeBar " , 0 ) = = 1 )
( ( K ToggleAction* ) actionCollection ( ) - > action ( " toggle_volumebar " ) ) - > setChecked ( true ) ;
( ( TDE ToggleAction* ) actionCollection ( ) - > action ( " toggle_volumebar " ) ) - > setChecked ( true ) ;
tmplistaction = ( ( K SelectAction* ) actionCollection ( ) - > action ( " play_order " ) ) ;
tmplistaction = ( ( TDE SelectAction* ) actionCollection ( ) - > action ( " play_order " ) ) ;
if ( cfg - > readNumEntry ( " CollectionPlayMode " , 0 ) = = 0 )
tmplistaction - > setCurrentItem ( 0 ) ;
else
tmplistaction - > setCurrentItem ( 1 ) ;
if ( ( cfg - > readNumEntry ( " AutoAddToCollection " , 0 ) ) = = 1 )
( ( K ToggleAction* ) actionCollection ( ) - > action ( " collect_autoadd " ) ) - > setChecked ( true ) ;
( ( TDE ToggleAction* ) actionCollection ( ) - > action ( " collect_autoadd " ) ) - > setChecked ( true ) ;
if ( ( cfg - > readNumEntry ( " AutomaticTextEventChooser " , 1 ) ) = = 1 )
( ( K ToggleAction* ) actionCollection ( ) - > action ( " option_automatictext " ) ) - > setChecked ( true ) ;
( ( TDE ToggleAction* ) actionCollection ( ) - > action ( " option_automatictext " ) ) - > setChecked ( true ) ;
setAcceptDrops ( true ) ;
@ -297,7 +297,7 @@ void tdemidFrame::song_stopPause()
if ( tdemidclient - > isPaused ( ) )
{
// song_Pause();
( ( K ToggleAction* ) actionCollection ( ) - > action ( " song_pause " ) ) - > setChecked ( false ) ;
( ( TDE ToggleAction* ) actionCollection ( ) - > action ( " song_pause " ) ) - > setChecked ( false ) ;
tdemidclient - > pause ( ) ;
}
}
@ -328,7 +328,7 @@ void tdemidFrame::options_AutomaticText()
void tdemidFrame : : options_FontChange ( )
{
KFontDialog * kfd = new K FontDialog( this ) ;
TDEFontDialog * kfd = new TDE FontDialog( this ) ;
TQFont font ;
font = * tdemidclient - > getFont ( ) ;
kfd - > getFont ( font ) ;
@ -516,9 +516,9 @@ void tdemidFrame::rechooseTextEvent()
int t = tdemidclient - > ChooseTypeOfTextEvents ( ) ;
tdemidclient - > repaintText ( t ) ;
if ( t = = 1 )
( ( K SelectAction* ) actionCollection ( ) - > action ( " display_events " ) ) - > setCurrentItem ( 0 ) ;
( ( TDE SelectAction* ) actionCollection ( ) - > action ( " display_events " ) ) - > setCurrentItem ( 0 ) ;
else
( ( K SelectAction* ) actionCollection ( ) - > action ( " display_events " ) ) - > setCurrentItem ( 1 ) ;
( ( TDE SelectAction* ) actionCollection ( ) - > action ( " display_events " ) ) - > setCurrentItem ( 1 ) ;
}
}
@ -593,7 +593,7 @@ void tdemidFrame::options_ShowVolumeBar()
void tdemidFrame : : options_ShowChannelView ( )
{
if ( ! ( ( K ToggleAction* ) actionCollection ( ) - > action ( " toggle_channelview " ) ) - > isChecked ( ) )
if ( ! ( ( TDE ToggleAction* ) actionCollection ( ) - > action ( " toggle_channelview " ) ) - > isChecked ( ) )
{
tdemidclient - > visibleChannelView ( 0 ) ;
} else
@ -607,7 +607,7 @@ void tdemidFrame::options_ShowChannelView()
void tdemidFrame : : channelViewDestroyed ( )
{
tdemidclient - > channelViewDestroyed ( ) ;
( ( K ToggleAction* ) actionCollection ( ) - > action ( " toggle_channelview " ) ) - > setChecked ( false ) ;
( ( TDE ToggleAction* ) actionCollection ( ) - > action ( " toggle_channelview " ) ) - > setChecked ( false ) ;
}
void tdemidFrame : : options_ChannelViewOptions ( )
@ -638,7 +638,7 @@ void tdemidFrame::openURL( const TQString url )
void tdemidFrame : : pause ( )
{
// tdemidclient->pause();
( ( K Action* ) actionCollection ( ) - > action ( " pause " ) ) - > activate ( ) ;
( ( TDE Action* ) actionCollection ( ) - > action ( " pause " ) ) - > activate ( ) ;
}
void tdemidFrame : : stop ( )
@ -673,7 +673,7 @@ void tdemidFrame::nextSong()
void tdemidFrame : : setSongLoop ( int i )
{
( ( K ToggleAction* ) actionCollection ( ) - > action ( " song_loop " ) ) - > setChecked ( i ! = 0 ) ;
( ( TDE ToggleAction* ) actionCollection ( ) - > action ( " song_loop " ) ) - > setChecked ( i ! = 0 ) ;
}
void tdemidFrame : : setVolume ( int i )
@ -688,16 +688,16 @@ void tdemidFrame::setTempo(int i)
void tdemidFrame : : setSongType ( int i )
{
K SelectAction * tmplistaction =
( ( K SelectAction* ) actionCollection ( ) - > action ( " file_type " ) ) ;
TDE SelectAction * tmplistaction =
( ( TDE SelectAction* ) actionCollection ( ) - > action ( " file_type " ) ) ;
tmplistaction - > setCurrentItem ( i ) ;
}
void tdemidFrame : : setLyricEvents ( int i )
{
K SelectAction * tmplistaction =
( ( K SelectAction* ) actionCollection ( ) - > action ( " display_events " ) ) ;
TDE SelectAction * tmplistaction =
( ( TDE SelectAction* ) actionCollection ( ) - > action ( " display_events " ) ) ;
tmplistaction - > setCurrentItem ( i ) ;
}
@ -714,7 +714,7 @@ void tdemidFrame::setActiveCollection( int i )
void tdemidFrame : : setCollectionPlayMode ( int i )
{
( ( K SelectAction* ) actionCollection ( ) - > action ( " play_order " ) ) - > setCurrentItem ( i ) ;
( ( TDE SelectAction* ) actionCollection ( ) - > action ( " play_order " ) ) - > setCurrentItem ( i ) ;
}
void tdemidFrame : : setMidiDevice ( int i )