diff options
Diffstat (limited to 'kmid/kmidframe.cpp')
-rw-r--r-- | kmid/kmidframe.cpp | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/kmid/kmidframe.cpp b/kmid/kmidframe.cpp index 007f0b82..54f9d3c5 100644 --- a/kmid/kmidframe.cpp +++ b/kmid/kmidframe.cpp @@ -28,8 +28,8 @@ #include <sys/wait.h> #include <sys/stat.h> -#include <qkeycode.h> -#include <qstring.h> +#include <tqkeycode.h> +#include <tqstring.h> #include <kaccel.h> #include <kapplication.h> @@ -68,73 +68,73 @@ kmidFrame::kmidFrame(const char *name) /* kKeysAccel=new KAccel(this); kKeysAccel->insertItem(i18n("Play/Pause"),"Play/Pause", Key_Space); - kKeysAccel->connectItem("Play/Pause", this, SLOT(spacePressed())); + kKeysAccel->connectItem("Play/Pause", this, TQT_SLOT(spacePressed())); kKeysAccel->insertItem(i18n("Stop"),"Stop", Key_Backspace); - kKeysAccel->connectItem("Stop",kmidclient,SLOT(song_Stop())); + kKeysAccel->connectItem("Stop",kmidclient,TQT_SLOT(song_Stop())); kKeysAccel->insertItem(i18n("Previous Song"),"Previous Song", Key_Left); - kKeysAccel->connectItem("Previous Song",kmidclient,SLOT(song_PlayPrevSong())); + kKeysAccel->connectItem("Previous Song",kmidclient,TQT_SLOT(song_PlayPrevSong())); kKeysAccel->insertItem(i18n("Next Song"),"Next Song", Key_Right); - kKeysAccel->connectItem("Next Song",kmidclient,SLOT(song_PlayNextSong())); + kKeysAccel->connectItem("Next Song",kmidclient,TQT_SLOT(song_PlayNextSong())); kKeysAccel->insertItem(i18n("Scroll Down Karaoke"),"Scroll down karaoke",Key_Down); - kKeysAccel->connectItem("Scroll Down karaoke",kmidclient->getKDisplayText(),SLOT(ScrollDown())); + kKeysAccel->connectItem("Scroll Down karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollDown())); kKeysAccel->insertItem(i18n("Scroll Up Karaoke"),"Scroll up karaoke",Key_Up); - kKeysAccel->connectItem("Scroll Up Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollUp())); + kKeysAccel->connectItem("Scroll Up Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollUp())); kKeysAccel->insertItem(i18n("Scroll Page Down Karaoke"),"Scroll page down karaoke",Key_PageDown); - kKeysAccel->connectItem("Scroll Page Down Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollPageDown())); + kKeysAccel->connectItem("Scroll Page Down Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollPageDown())); kKeysAccel->insertItem(i18n("Scroll Page Up Karaoke"),"Scroll page up karaoke",Key_PageUp); - kKeysAccel->connectItem("Scroll Page Up Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollPageUp())); + kKeysAccel->connectItem("Scroll Page Up Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollPageUp())); kKeysAccel->readSettings(); */ - KStdAction::open(this, SLOT(file_Open()), actionCollection()); + KStdAction::open(this, TQT_SLOT(file_Open()), actionCollection()); (void)new KAction(i18n("&Save Lyrics..."), 0, this, - SLOT(file_SaveLyrics()), actionCollection(), "file_save_lyrics"); - KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + TQT_SLOT(file_SaveLyrics()), actionCollection(), "file_save_lyrics"); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); (void)new KAction(i18n("&Play"), "player_play", Qt::Key_Space, - kmidclient, SLOT(slotPlay()), actionCollection(), "song_play"); + kmidclient, TQT_SLOT(slotPlay()), actionCollection(), "song_play"); (void)new KAction(i18n("P&ause"), "player_pause", Qt::Key_P, kmidclient, - SLOT(slotPause()), actionCollection(), "song_pause"); + TQT_SLOT(slotPause()), actionCollection(), "song_pause"); (void)new KAction(i18n("&Stop"), "player_stop", Qt::Key_Backspace, - kmidclient, SLOT(slotStop()), actionCollection(), "song_stop"); + kmidclient, TQT_SLOT(slotStop()), actionCollection(), "song_stop"); (void)new KAction(i18n("P&revious Song"), "player_start", Key_Left, - kmidclient, SLOT(slotPrevSong()), actionCollection(), + kmidclient, TQT_SLOT(slotPrevSong()), actionCollection(), "song_previous"); (void)new KAction(i18n("&Next Song"), "player_end", Key_Right, - kmidclient, SLOT(slotNextSong()), actionCollection(), + kmidclient, TQT_SLOT(slotNextSong()), actionCollection(), "song_next"); - (void)new KToggleAction(i18n("&Loop"), 0, this, SLOT(song_Loop()), + (void)new KToggleAction(i18n("&Loop"), 0, this, TQT_SLOT(song_Loop()), actionCollection(), "song_loop"); (void)new KAction(i18n("Rewind"), "2leftarrow", 0, kmidclient, - SLOT(slotRewind()), actionCollection(), "song_rewind"); + TQT_SLOT(slotRewind()), actionCollection(), "song_rewind"); (void)new KAction(i18n("Forward"), "2rightarrow", 0, kmidclient, - SLOT(slotForward()), actionCollection(), "song_forward"); + TQT_SLOT(slotForward()), actionCollection(), "song_forward"); - (void)new KAction(i18n("&Organize..."), 0, this, SLOT(collect_organize()), + (void)new KAction(i18n("&Organize..."), 0, this, TQT_SLOT(collect_organize()), actionCollection(), "collect_organize"); - QStringList playmodes; + TQStringList playmodes; playmodes.append(i18n("In Order")); playmodes.append(i18n("Shuffle")); - KSelectAction *act=new KSelectAction(i18n("Play Order"), 0, /*this, SLOT(collect_PlayOrder(int)),*/ + KSelectAction *act=new KSelectAction(i18n("Play Order"), 0, /*this, TQT_SLOT(collect_PlayOrder(int)),*/ actionCollection(), "play_order"); - connect(act,SIGNAL(activated(int)),this, SLOT(collect_PlayOrder(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(collect_PlayOrder(int))); act->setItems(playmodes); (void)new KToggleAction(i18n("Auto-Add to Collection"), 0, this, - SLOT(collect_AutoAdd()), actionCollection(), "collect_autoadd"); + TQT_SLOT(collect_AutoAdd()), actionCollection(), "collect_autoadd"); playmodes.clear(); playmodes.append(i18n("&General MIDI")); playmodes.append(i18n("&MT-32")); - act=new KSelectAction(i18n("File Type"), 0,/* this, SLOT(options_FileType(int)),*/ + act=new KSelectAction(i18n("File Type"), 0,/* this, TQT_SLOT(options_FileType(int)),*/ actionCollection(), "file_type"); - connect(act,SIGNAL(activated(int)),this, SLOT(options_FileType(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(options_FileType(int))); act->setItems(playmodes); playmodes.clear(); @@ -142,35 +142,35 @@ kmidFrame::kmidFrame(const char *name) playmodes.append(i18n("&Lyric Events")); act=new KSelectAction(i18n("Display Events"), Key_T, /*this, - SLOT(options_DisplayEvents(int)),*/ actionCollection(), + TQT_SLOT(options_DisplayEvents(int)),*/ actionCollection(), "display_events"); - connect(act,SIGNAL(activated(int)),this, SLOT(options_DisplayEvents(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(options_DisplayEvents(int))); act->setItems(playmodes); (void)new KToggleAction(i18n("Automatic Text Chooser"), 0, this, - SLOT(options_AutomaticText()), actionCollection(), + TQT_SLOT(options_AutomaticText()), actionCollection(), "option_automatictext"); KToggleAction* togact = new KToggleAction(i18n("Show &Volume Bar"), "volume", - 0, this, SLOT(options_ShowVolumeBar()), actionCollection(), + 0, this, TQT_SLOT(options_ShowVolumeBar()), actionCollection(), "toggle_volumebar"); togact->setCheckedState(i18n("Hide &Volume Bar")); togact = new KToggleAction(i18n("Show &Channel View"), "piano", - 0, this, SLOT(options_ShowChannelView()), actionCollection(), + 0, this, TQT_SLOT(options_ShowChannelView()), actionCollection(), "toggle_channelview"); togact->setCheckedState(i18n("Hide &Channel View")); (void)new KAction(i18n("Channel View &Options..."), 0, this, - SLOT(options_ChannelViewOptions()), actionCollection(), + TQT_SLOT(options_ChannelViewOptions()), actionCollection(), "channelview_options"); (void)new KAction(i18n("&Font Change..."), 0, this, - SLOT(options_FontChange()), actionCollection(), + TQT_SLOT(options_FontChange()), actionCollection(), "change_font"); (void)new KAction(i18n("MIDI &Setup..."), 0, this, - SLOT(options_MidiSetup()), actionCollection(), "midi_setup"); + TQT_SLOT(options_MidiSetup()), actionCollection(), "midi_setup"); setupGUI((ToolBar | Keys | StatusBar | Save | Create ), "kmidui.rc" ); @@ -212,14 +212,14 @@ kmidFrame::kmidFrame(const char *name) setAcceptDrops(true); - connect( kmidclient, SIGNAL( mustRechooseTextEvent() ), - this, SLOT( rechooseTextEvent() ) ); + connect( kmidclient, TQT_SIGNAL( mustRechooseTextEvent() ), + this, TQT_SLOT( rechooseTextEvent() ) ); - connect( kmidclient, SIGNAL( stopPause() ), - this, SLOT( song_stopPause() ) ); + connect( kmidclient, TQT_SIGNAL( stopPause() ), + this, TQT_SLOT( song_stopPause() ) ); -// connect( kmidclient, SIGNAL( channelView_Destroyed() ), -// this, SLOT( channelViewDestroyed() ) ); +// connect( kmidclient, TQT_SIGNAL( channelView_Destroyed() ), +// this, TQT_SLOT( channelViewDestroyed() ) ); KCmdLineArgs * args = KCmdLineArgs::parsedArgs(); @@ -258,7 +258,7 @@ kmidFrame::kmidFrame(const char *name) /* kKeys->addKey("Play/Pause",Key_Space); kKeys->registerWidget("KMidFrame",this); - kKeys->connectFunction("KMidFrame","Play/Pause",this,SLOT(spacePressed())); + kKeys->connectFunction("KMidFrame","Play/Pause",this,TQT_SLOT(spacePressed())); */ // kKeysAccel->writeSettings(cfg); @@ -276,7 +276,7 @@ kmidFrame::~kmidFrame() void kmidFrame::file_Open() { - KURL url = KFileDialog::getOpenURL(QString::null, "*.kar *.mid *.kar.gz *.mid.gz\n*.kar *.kar.gz\n*.mid *.mid.gz\n*",this); + KURL url = KFileDialog::getOpenURL(TQString::null, "*.kar *.mid *.kar.gz *.mid.gz\n*.kar *.kar.gz\n*.mid *.mid.gz\n*",this); if( url.isEmpty() ) return; @@ -329,7 +329,7 @@ void kmidFrame::options_AutomaticText() void kmidFrame::options_FontChange() { KFontDialog *kfd=new KFontDialog(this); - QFont font; + TQFont font; font=*kmidclient->getFont(); kfd->getFont(font); delete kfd; @@ -340,7 +340,7 @@ void kmidFrame::options_FontChange() kmidclient->fontChanged(); } -int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) +int kmidFrame::autoAddSongToCollection(const TQString& filename,int setactive) { int r; SLManager *slman; @@ -354,7 +354,7 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) if (setactive) slman->createTemporaryCollection(); sl=slman->getCollection(0); if (filename==NULL) sl->AddSong(kmidclient->midiFileName()); - else sl->AddSong(QFile::encodeName(filename)); + else sl->AddSong(TQFile::encodeName(filename)); } else { @@ -364,7 +364,7 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) if (sl==NULL) return 0; int id; if (filename==NULL) id=sl->AddSong(kmidclient->midiFileName()); - else id=sl->AddSong(QFile::encodeName(filename)); + else id=sl->AddSong(TQFile::encodeName(filename)); if (setactive) { sl->setActiveSong(id); @@ -373,17 +373,17 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) return r; } -void kmidFrame::urlDrop_slot(QDropEvent* e) +void kmidFrame::urlDrop_slot(TQDropEvent* e) { dropEvent(e); } -void kmidFrame::dragEnterEvent(QDragEnterEvent* e) +void kmidFrame::dragEnterEvent(TQDragEnterEvent* e) { e->accept(KURLDrag::canDecode(e)); } -void kmidFrame::dropEvent( QDropEvent * event ) +void kmidFrame::dropEvent( TQDropEvent * event ) { KURL::List list; KURLDrag::decode(event, list); @@ -453,7 +453,7 @@ void kmidFrame::readProperties(KConfig *cfg) if ((activecol==0)&&(wasplaying)) // It was the temporary collection, { // surely the user would like to continue // hearing the song - QString s = cfg->readPathEntry("File"); + TQString s = cfg->readPathEntry("File"); int c=autoAddSongToCollection(s,1); kmidclient->setActiveCollection(c); } @@ -472,7 +472,7 @@ void kmidFrame::options_MidiSetup() MidiConfigDialog *dlg; dlg=new MidiConfigDialog(kmidclient->devman(),NULL,"MidiDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { KConfig *cfg=kapp->config(); cfg->setGroup("KMid"); @@ -480,7 +480,7 @@ void kmidFrame::options_MidiSetup() kmidclient->setMidiDevice(MidiConfigDialog::selecteddevice); cfg->setGroup("Midimapper"); cfg->writePathEntry("LoadFile", - (MidiConfigDialog::selectedmap==NULL)? QString::null:MidiConfigDialog::selectedmap); + (MidiConfigDialog::selectedmap==NULL)? TQString::null:MidiConfigDialog::selectedmap); kmidclient->setMidiMapFilename(MidiConfigDialog::selectedmap); } delete dlg; @@ -493,7 +493,7 @@ void kmidFrame::collect_organize() int idx=kmidclient->getActiveCollection(); dlg=new CollectionDialog(slman,idx,NULL,"MidiDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { kmidclient->setSLManager(slman); kmidclient->setActiveCollection(CollectionDialog::selectedC); @@ -551,7 +551,7 @@ void kmidFrame::collect_AutoAdd() void kmidFrame::file_SaveLyrics() { - KURL url = KFileDialog::getSaveURL(QString::null,"*",this); + KURL url = KFileDialog::getSaveURL(TQString::null,"*",this); if( url.isEmpty() ) return; @@ -562,17 +562,17 @@ void kmidFrame::file_SaveLyrics() return; } - QString filename = url.path(); + TQString filename = url.path(); struct stat statbuf; - if (stat(QFile::encodeName(filename), &statbuf)!=-1) + if (stat(TQFile::encodeName(filename), &statbuf)!=-1) { - QString s = i18n("File %1 already exists\nDo you want to overwrite it?").arg(filename); - if (KMessageBox::warningYesNo(this,s,QString::null,i18n("Overwrite"),KStdGuiItem::cancel())==1) + TQString s = i18n("File %1 already exists\nDo you want to overwrite it?").arg(filename); + if (KMessageBox::warningYesNo(this,s,TQString::null,i18n("Overwrite"),KStdGuiItem::cancel())==1) return; } - FILE *fh=fopen(QFile::encodeName(filename),"wt"); + FILE *fh=fopen(TQFile::encodeName(filename),"wt"); kmidclient->saveLyrics(fh); fclose(fh); } @@ -599,7 +599,7 @@ void kmidFrame::options_ShowChannelView() } else { kmidclient->visibleChannelView(1); - connect (kmidclient->getChannelView(),SIGNAL(destroyMe()),this,SLOT(channelViewDestroyed())); + connect (kmidclient->getChannelView(),TQT_SIGNAL(destroyMe()),this,TQT_SLOT(channelViewDestroyed())); } } @@ -615,7 +615,7 @@ void kmidFrame::options_ChannelViewOptions() ChannelViewConfigDialog *dlg; dlg=new ChannelViewConfigDialog(NULL,"ChannelViewConfigDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { if (kmidclient->getChannelView()) kmidclient->getChannelView()->lookMode( @@ -624,7 +624,7 @@ void kmidFrame::options_ChannelViewOptions() delete dlg; } -void kmidFrame::openURL( const QString url ) +void kmidFrame::openURL( const TQString url ) { int c=autoAddSongToCollection(url,1); kmidclient->setActiveCollection(c); |